Skip to content

Commit 60d2a15

Browse files
committed
Fix universal build (issue #2)
1 parent d26169f commit 60d2a15

File tree

4 files changed

+9
-6
lines changed

4 files changed

+9
-6
lines changed

Makefile

+6-3
Original file line numberDiff line numberDiff line change
@@ -12,9 +12,12 @@ PLIST=$(shell grep -A1 $(1) src/Info.plist | tail -1 | cut -d'>' -f2 | cut -d'<'
1212
Memmon.app: SDK_PATH=$(shell xcrun --show-sdk-path --sdk macosx)
1313
Memmon.app: src/*
1414
@mkdir -p Memmon.app/Contents/MacOS/
15-
swiftc ${CFLAGS} src/main.swift \
16-
-target arm64-apple-macos10.10 -target x86_64-apple-macos10.10 \
17-
-emit-executable -sdk ${SDK_PATH} -o Memmon.app/Contents/MacOS/Memmon
15+
swiftc ${CFLAGS} src/main.swift -target x86_64-apple-macos10.10 \
16+
-emit-executable -sdk ${SDK_PATH} -o bin_x64
17+
swiftc ${CFLAGS} src/main.swift -target arm64-apple-macos10.10 \
18+
-emit-executable -sdk ${SDK_PATH} -o bin_arm64
19+
lipo -create bin_x64 bin_arm64 -o Memmon.app/Contents/MacOS/Memmon
20+
@rm bin_x64 bin_arm64
1821
@echo 'APPL????' > Memmon.app/Contents/PkgInfo
1922
@mkdir -p Memmon.app/Contents/Resources/
2023
@cp src/AppIcon.icns Memmon.app/Contents/Resources/AppIcon.icns

README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ Memmon remembers what your Mac forgets – A simple deamon that restores your wi
2020

2121
### Status Icon
2222

23-
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`).
23+
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`).
2424

2525
Memmon has exactly one app-setting, the status icon. You can manipulate the display of the icon, or hide the icon completely:
2626

src/Info.plist

+1-1
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
<key>CFBundlePackageType</key>
1616
<string>APPL</string>
1717
<key>CFBundleShortVersionString</key>
18-
<string>1.4</string>
18+
<string>1.5</string>
1919
<key>CFBundleVersion</key>
2020
<string>42</string>
2121
<key>LSMinimumSystemVersion</key>

src/main.swift

+1-1
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ class AppDelegate: NSObject, NSApplicationDelegate {
3737
}
3838
}
3939
self.statusItem.menu = NSMenu(title: "")
40-
self.statusItem.menu!.addItem(withTitle: "Memmon (v1.4)", action: nil, keyEquivalent: "")
40+
self.statusItem.menu!.addItem(withTitle: "Memmon (v1.5)", action: nil, keyEquivalent: "")
4141
self.statusItem.menu!.addItem(withTitle: "Hide Status Icon", action: #selector(self.enableInvisbleMode), keyEquivalent: "")
4242
self.statusItem.menu!.addItem(withTitle: "Quit", action: #selector(NSApp.terminate), keyEquivalent: "q")
4343
}

0 commit comments

Comments
 (0)