Skip to content

Commit

Permalink
Fix universal build (issue #2)
Browse files Browse the repository at this point in the history
  • Loading branch information
relikd committed Nov 24, 2021
1 parent d26169f commit 60d2a15
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 6 deletions.
9 changes: 6 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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: src/*
@mkdir -p Memmon.app/Contents/MacOS/
swiftc ${CFLAGS} src/main.swift \
-target arm64-apple-macos10.10 -target x86_64-apple-macos10.10 \
-emit-executable -sdk ${SDK_PATH} -o Memmon.app/Contents/MacOS/Memmon
swiftc ${CFLAGS} src/main.swift -target x86_64-apple-macos10.10 \
-emit-executable -sdk ${SDK_PATH} -o bin_x64
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
@mkdir -p Memmon.app/Contents/Resources/
@cp src/AppIcon.icns Memmon.app/Contents/Resources/AppIcon.icns
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ Memmon remembers what your Mac forgets – A simple deamon that restores your wi

### 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:

Expand Down
2 changes: 1 addition & 1 deletion src/Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
<key>CFBundlePackageType</key>
<string>APPL</string>
<key>CFBundleShortVersionString</key>
<string>1.4</string>
<string>1.5</string>
<key>CFBundleVersion</key>
<string>42</string>
<key>LSMinimumSystemVersion</key>
Expand Down
2 changes: 1 addition & 1 deletion src/main.swift
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ class AppDelegate: NSObject, NSApplicationDelegate {
}
}
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: "Quit", action: #selector(NSApp.terminate), keyEquivalent: "q")
}
Expand Down

0 comments on commit 60d2a15

Please sign in to comment.