Fix universal build (issue #2)

This commit is contained in:
relikd
2021-11-24 18:26:49 +01:00
parent d26169f8b9
commit 60d2a15f0f
4 changed files with 9 additions and 6 deletions

View File

@@ -12,9 +12,12 @@ PLIST=$(shell grep -A1 $(1) src/Info.plist | tail -1 | cut -d'>' -f2 | cut -d'<'
Memmon.app: SDK_PATH=$(shell xcrun --show-sdk-path --sdk macosx) Memmon.app: SDK_PATH=$(shell xcrun --show-sdk-path --sdk macosx)
Memmon.app: src/* Memmon.app: src/*
@mkdir -p Memmon.app/Contents/MacOS/ @mkdir -p Memmon.app/Contents/MacOS/
swiftc ${CFLAGS} src/main.swift \ swiftc ${CFLAGS} src/main.swift -target x86_64-apple-macos10.10 \
-target arm64-apple-macos10.10 -target x86_64-apple-macos10.10 \ -emit-executable -sdk ${SDK_PATH} -o bin_x64
-emit-executable -sdk ${SDK_PATH} -o Memmon.app/Contents/MacOS/Memmon swiftc ${CFLAGS} src/main.swift -target arm64-apple-macos10.10 \
-emit-executable -sdk ${SDK_PATH} -o bin_arm64
lipo -create bin_x64 bin_arm64 -o Memmon.app/Contents/MacOS/Memmon
@rm bin_x64 bin_arm64
@echo 'APPL????' > Memmon.app/Contents/PkgInfo @echo 'APPL????' > Memmon.app/Contents/PkgInfo
@mkdir -p Memmon.app/Contents/Resources/ @mkdir -p Memmon.app/Contents/Resources/
@cp src/AppIcon.icns Memmon.app/Contents/Resources/AppIcon.icns @cp src/AppIcon.icns Memmon.app/Contents/Resources/AppIcon.icns

View File

@@ -20,7 +20,7 @@ Memmon remembers what your Mac forgets A simple deamon that restores your wi
### Status Icon ### Status Icon
You can hide the status icon either via `defaults` or the same-titled menu entry. If you do so, the only way to quit the app is by killing the process (with Activity.app or `killall Memmon`). You can hide the status icon either via `defaults` or the same-titled menu entry. If you do so, the only way to quit the app is by killing the process (with Activity.app or `killall Memmon`). The status icon stays hidden during this execution only. If you restart the OS or app it will reappear (unless you hide the icon with `defaults`).
Memmon has exactly one app-setting, the status icon. You can manipulate the display of the icon, or hide the icon completely: Memmon has exactly one app-setting, the status icon. You can manipulate the display of the icon, or hide the icon completely:

View File

@@ -15,7 +15,7 @@
<key>CFBundlePackageType</key> <key>CFBundlePackageType</key>
<string>APPL</string> <string>APPL</string>
<key>CFBundleShortVersionString</key> <key>CFBundleShortVersionString</key>
<string>1.4</string> <string>1.5</string>
<key>CFBundleVersion</key> <key>CFBundleVersion</key>
<string>42</string> <string>42</string>
<key>LSMinimumSystemVersion</key> <key>LSMinimumSystemVersion</key>

View File

@@ -37,7 +37,7 @@ class AppDelegate: NSObject, NSApplicationDelegate {
} }
} }
self.statusItem.menu = NSMenu(title: "") self.statusItem.menu = NSMenu(title: "")
self.statusItem.menu!.addItem(withTitle: "Memmon (v1.4)", action: nil, keyEquivalent: "") self.statusItem.menu!.addItem(withTitle: "Memmon (v1.5)", action: nil, keyEquivalent: "")
self.statusItem.menu!.addItem(withTitle: "Hide Status Icon", action: #selector(self.enableInvisbleMode), keyEquivalent: "") self.statusItem.menu!.addItem(withTitle: "Hide Status Icon", action: #selector(self.enableInvisbleMode), keyEquivalent: "")
self.statusItem.menu!.addItem(withTitle: "Quit", action: #selector(NSApp.terminate), keyEquivalent: "q") self.statusItem.menu!.addItem(withTitle: "Quit", action: #selector(NSApp.terminate), keyEquivalent: "q")
} }