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