Removed update button.
This commit is contained in:
@@ -151,22 +151,22 @@ class CmdViewController: NSViewController {
|
|||||||
return button
|
return button
|
||||||
}()
|
}()
|
||||||
|
|
||||||
private var updateButton: NSButton = {
|
// private var updateButton: NSButton = {
|
||||||
let button = NSButton()
|
// let button = NSButton()
|
||||||
// TODO: WHY??!!!
|
// // TODO: WHY??!!!
|
||||||
button.image = NSImage(systemSymbolName: "arrow.down.circle.fill",
|
// button.image = NSImage(systemSymbolName: "arrow.down.circle.fill",
|
||||||
accessibilityDescription: nil)?
|
// accessibilityDescription: nil)?
|
||||||
.withSymbolConfiguration(NSImage
|
// .withSymbolConfiguration(NSImage
|
||||||
.SymbolConfiguration(textStyle: .title2, scale: .large)
|
// .SymbolConfiguration(textStyle: .title2, scale: .large)
|
||||||
.applying(.init(paletteColors: [.white, .systemGreen])))
|
// .applying(.init(paletteColors: [.white, .systemGreen])))
|
||||||
button.isBordered = false
|
// button.isBordered = false
|
||||||
button.action = #selector(updateApp)
|
// button.action = #selector(updateApp)
|
||||||
button.sizeToFit()
|
// button.sizeToFit()
|
||||||
button.toolTip = "About"
|
// button.toolTip = "About"
|
||||||
button.toolTip = "Update"
|
// button.toolTip = "Update"
|
||||||
button.translatesAutoresizingMaskIntoConstraints = false
|
// button.translatesAutoresizingMaskIntoConstraints = false
|
||||||
return button
|
// return button
|
||||||
}()
|
// }()
|
||||||
|
|
||||||
private var buttonsBackground: NSView = {
|
private var buttonsBackground: NSView = {
|
||||||
let blurView = NSVisualEffectView()
|
let blurView = NSVisualEffectView()
|
||||||
@@ -201,7 +201,7 @@ class CmdViewController: NSViewController {
|
|||||||
view.addSubview(startButton)
|
view.addSubview(startButton)
|
||||||
view.addSubview(aboutButton)
|
view.addSubview(aboutButton)
|
||||||
view.addSubview(reloadsText)
|
view.addSubview(reloadsText)
|
||||||
view.addSubview(updateButton)
|
// view.addSubview(updateButton)
|
||||||
view.addSubview(progressView)
|
view.addSubview(progressView)
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -319,10 +319,10 @@ class CmdViewController: NSViewController {
|
|||||||
.constraint(equalToConstant: aboutButton.bounds.width),
|
.constraint(equalToConstant: aboutButton.bounds.width),
|
||||||
aboutButton.heightAnchor
|
aboutButton.heightAnchor
|
||||||
.constraint(equalToConstant: aboutButton.bounds.height),
|
.constraint(equalToConstant: aboutButton.bounds.height),
|
||||||
updateButton.widthAnchor
|
// updateButton.widthAnchor
|
||||||
.constraint(equalToConstant: updateButton.bounds.width),
|
// .constraint(equalToConstant: updateButton.bounds.width),
|
||||||
updateButton.heightAnchor
|
// updateButton.heightAnchor
|
||||||
.constraint(equalToConstant: updateButton.bounds.height),
|
// .constraint(equalToConstant: updateButton.bounds.height),
|
||||||
|
|
||||||
buttonsContainer.trailingAnchor
|
buttonsContainer.trailingAnchor
|
||||||
.constraint(equalTo: view.trailingAnchor,
|
.constraint(equalTo: view.trailingAnchor,
|
||||||
@@ -367,15 +367,18 @@ class CmdViewController: NSViewController {
|
|||||||
aboutButton.trailingAnchor
|
aboutButton.trailingAnchor
|
||||||
.constraint(equalTo: startButton.leadingAnchor,
|
.constraint(equalTo: startButton.leadingAnchor,
|
||||||
constant: -Metrics.buttonSpacing),
|
constant: -Metrics.buttonSpacing),
|
||||||
|
aboutButton.leadingAnchor
|
||||||
updateButton.firstBaselineAnchor
|
|
||||||
.constraint(equalTo: startButton.firstBaselineAnchor),
|
|
||||||
updateButton.leadingAnchor
|
|
||||||
.constraint(equalTo: buttonsContainer.leadingAnchor,
|
.constraint(equalTo: buttonsContainer.leadingAnchor,
|
||||||
constant: Metrics.buttonSpacing),
|
constant: Metrics.buttonSpacing),
|
||||||
updateButton.trailingAnchor
|
|
||||||
.constraint(equalTo: aboutButton.leadingAnchor,
|
// updateButton.firstBaselineAnchor
|
||||||
constant: -Metrics.buttonSpacing),
|
// .constraint(equalTo: startButton.firstBaselineAnchor),
|
||||||
|
// updateButton.leadingAnchor
|
||||||
|
// .constraint(equalTo: buttonsContainer.leadingAnchor,
|
||||||
|
// constant: Metrics.buttonSpacing),
|
||||||
|
// updateButton.trailingAnchor
|
||||||
|
// .constraint(equalTo: aboutButton.leadingAnchor,
|
||||||
|
// constant: -Metrics.buttonSpacing),
|
||||||
])
|
])
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
17
src/Makefile
17
src/Makefile
@@ -22,12 +22,13 @@ FRAMEWORKS = -framework AppKit -framework ServiceManagement
|
|||||||
|
|
||||||
LIBS = -lzip
|
LIBS = -lzip
|
||||||
|
|
||||||
default: prereq zip cmdbar_updater $(EXEC).app
|
default: libzip.a cmdbar_updater $(EXEC).app
|
||||||
|
|
||||||
prereq:
|
libminizip.a:
|
||||||
@mkdir -p arm64 x86_64
|
@$(MAKE) -C libs/Zip/Zip/minizip CFLAGS=$(CFLAGS) \
|
||||||
|
MACOS_VERSION=$(MACOS_VERSION)
|
||||||
|
|
||||||
zip: prereq
|
libzip.a: libminizip.a
|
||||||
@$(MAKE) -C libs/Zip/Zip FLAGS=$(FLAGS) CFLAGS=$(CFLAGS) \
|
@$(MAKE) -C libs/Zip/Zip FLAGS=$(FLAGS) CFLAGS=$(CFLAGS) \
|
||||||
MACOS_VERSION=$(MACOS_VERSION)
|
MACOS_VERSION=$(MACOS_VERSION)
|
||||||
|
|
||||||
@@ -35,7 +36,7 @@ cmdbar_updater:
|
|||||||
@$(MAKE) -C updater FLAGS=$(FLAGS)
|
@$(MAKE) -C updater FLAGS=$(FLAGS)
|
||||||
@cp updater/$@ .
|
@cp updater/$@ .
|
||||||
|
|
||||||
./arm64/%.o: %.swift zip
|
./arm64/%.o: %.swift libzip.a
|
||||||
swift -frontend -c $(if $(DEBUG), -D DEBUG,) \
|
swift -frontend -c $(if $(DEBUG), -D DEBUG,) \
|
||||||
-target arm64-apple-macos$(MACOS_VERSION) $(FLAGS) \
|
-target arm64-apple-macos$(MACOS_VERSION) $(FLAGS) \
|
||||||
-I./libs/Zip/Zip -I./libs/Zip/Zip/arm64 -L./libs/Zip/Zip/arm64 \
|
-I./libs/Zip/Zip -I./libs/Zip/Zip/arm64 -L./libs/Zip/Zip/arm64 \
|
||||||
@@ -43,7 +44,7 @@ cmdbar_updater:
|
|||||||
-sdk $(SDK) -module-name $(EXEC) -o $@ -emit-module && touch $@
|
-sdk $(SDK) -module-name $(EXEC) -o $@ -emit-module && touch $@
|
||||||
|
|
||||||
ifdef UNIVERSAL
|
ifdef UNIVERSAL
|
||||||
./x86_64/%.o: %.swift zip
|
./x86_64/%.o: %.swift libzip.a
|
||||||
@swift -frontend -c $(if $(DEBUG), -D DEBUG,) \
|
@swift -frontend -c $(if $(DEBUG), -D DEBUG,) \
|
||||||
-target x86_64-apple-macos$(MACOS_VERSION) $(FLAGS) \
|
-target x86_64-apple-macos$(MACOS_VERSION) $(FLAGS) \
|
||||||
-I./libs/Zip/Zip -I./libs/Zip/Zip/x86_64 -L./libs/Zip/Zip/x86_64 \
|
-I./libs/Zip/Zip -I./libs/Zip/Zip/x86_64 -L./libs/Zip/Zip/x86_64 \
|
||||||
@@ -99,7 +100,9 @@ $(EXEC).app: $(EXEC)
|
|||||||
|
|
||||||
clean:
|
clean:
|
||||||
rm -rf $(EXEC) $(EXEC).app cmdbar_updater arm64 x86_64
|
rm -rf $(EXEC) $(EXEC).app cmdbar_updater arm64 x86_64
|
||||||
|
mkdir -p arm64 x86_64
|
||||||
|
|
||||||
clean-all: clean
|
clean-all: clean
|
||||||
$(MAKE) -C libs/Zip/Zip clean-all
|
$(MAKE) -C libs/Zip/Zip/minizip clean
|
||||||
|
$(MAKE) -C libs/Zip/Zip clean
|
||||||
$(MAKE) -C updater clean
|
$(MAKE) -C updater clean
|
||||||
|
|||||||
@@ -2,31 +2,24 @@ CC = swiftc
|
|||||||
CFLAGS = -g
|
CFLAGS = -g
|
||||||
FLAGS = -g
|
FLAGS = -g
|
||||||
|
|
||||||
default: prereq build_minizip ./arm64/libzip.a ./x86_64/libzip.a
|
default: ./arm64/libzip.a ./x86_64/libzip.a
|
||||||
|
|
||||||
prereq:
|
./arm64/libzip.a: Zip.swift QuickZip.swift ZipUtilities.swift \
|
||||||
@mkdir -p arm64 x86_64
|
./minizip/arm64/libminizip.a
|
||||||
|
|
||||||
build_minizip: prereq
|
|
||||||
@:$(if $(value MACOS_VERSION),,$(error MACOS_VERSION is not defined))
|
|
||||||
@$(MAKE) -C minizip CFLAGS=$(CFLAGS) MACOS_VERSION=$(MACOS_VERSION)
|
|
||||||
|
|
||||||
./arm64/libzip.a: build_minizip Zip.swift QuickZip.swift ZipUtilities.swift
|
|
||||||
@:$(if $(value MACOS_VERSION),,$(error MACOS_VERSION is not defined))
|
@:$(if $(value MACOS_VERSION),,$(error MACOS_VERSION is not defined))
|
||||||
swiftc -target arm64-apple-macos$(MACOS_VERSION) -I./minizip/module \
|
swiftc -target arm64-apple-macos$(MACOS_VERSION) -I./minizip/module \
|
||||||
-I./minizip/include -L./minizip/arm64 $(FLAGS) -static \
|
-I./minizip/include -L./minizip/arm64 $(FLAGS) -static \
|
||||||
-module-name Zip -emit-library -emit-module -parse-as-library \
|
-module-name Zip -emit-library -emit-module -parse-as-library \
|
||||||
$(filter-out build_minizip, $^) ./minizip/arm64/libminizip.a -o $@
|
$^ -o $@
|
||||||
|
|
||||||
./x86_64/libzip.a: build_minizip Zip.swift QuickZip.swift ZipUtilities.swift
|
./x86_64/libzip.a: Zip.swift QuickZip.swift ZipUtilities.swift \
|
||||||
|
./minizip/x86_64/libminizip.a
|
||||||
@:$(if $(value MACOS_VERSION),,$(error MACOS_VERSION is not defined))
|
@:$(if $(value MACOS_VERSION),,$(error MACOS_VERSION is not defined))
|
||||||
@swiftc -target x86_64-apple-macos$(MACOS_VERSION) -I./minizip/module \
|
@swiftc -target x86_64-apple-macos$(MACOS_VERSION) -I./minizip/module \
|
||||||
-I./minizip/include -L./minizip/x86_64 $(FLAGS) -static \
|
-I./minizip/include -L./minizip/x86_64 $(FLAGS) -static \
|
||||||
-module-name Zip -emit-library -emit-module -parse-as-library \
|
-module-name Zip -emit-library -emit-module -parse-as-library \
|
||||||
$(filter-out build_minizip, $^) ./minizip/x86_64/libminizip.a -o $@
|
$^ -o $@
|
||||||
|
|
||||||
clean:
|
clean:
|
||||||
rm -rf arm64 x86_64
|
rm -rf arm64 x86_64
|
||||||
|
mkdir -p arm64 x86_64
|
||||||
clean-all: clean
|
|
||||||
$(MAKE) -C minizip clean
|
|
||||||
|
|||||||
@@ -6,11 +6,7 @@ HEADERS = $(wildcard ./include/*.h)
|
|||||||
CC = clang
|
CC = clang
|
||||||
CFLAGS = -g
|
CFLAGS = -g
|
||||||
|
|
||||||
defult: prereq ./arm64/libminizip.a ./x86_64/libminizip.a
|
defult: ./arm64/libminizip.a ./x86_64/libminizip.a
|
||||||
# default: $(ARMOBJMODULES) $(X86OBJMODULES)
|
|
||||||
|
|
||||||
prereq:
|
|
||||||
@mkdir -p arm64 x86_64
|
|
||||||
|
|
||||||
./arm64/%.o: %.c $(HEADERS)
|
./arm64/%.o: %.c $(HEADERS)
|
||||||
@:$(if $(value MACOS_VERSION),,$(error MACOS_VERSION is not defined))
|
@:$(if $(value MACOS_VERSION),,$(error MACOS_VERSION is not defined))
|
||||||
@@ -24,11 +20,12 @@ prereq:
|
|||||||
$(CFLAGS) -fmodule-file=./module/module.modulemap -I./include \
|
$(CFLAGS) -fmodule-file=./module/module.modulemap -I./include \
|
||||||
-c $< -o ./$@
|
-c $< -o ./$@
|
||||||
|
|
||||||
./arm64/libminizip.a: prereq $(ARMOBJMODULES)
|
./arm64/libminizip.a: $(ARMOBJMODULES)
|
||||||
ar rcs $@ $(ARMOBJMODULES)
|
ar rcs $@ $(ARMOBJMODULES)
|
||||||
|
|
||||||
./x86_64/libminizip.a: prereq $(X86OBJMODULES)
|
./x86_64/libminizip.a: $(X86OBJMODULES)
|
||||||
ar rcs $@ $(X86OBJMODULES)
|
@ar rcs $@ $(X86OBJMODULES)
|
||||||
|
|
||||||
clean:
|
clean:
|
||||||
rm -rf arm64 x86_64
|
rm -rf arm64 x86_64
|
||||||
|
mkdir -p arm64 x86_64
|
||||||
|
|||||||
Reference in New Issue
Block a user