ask for for accessibility permission + fix restore current space only

This commit is contained in:
relikd
2021-10-26 23:57:27 +02:00
parent 7510327139
commit acc0b03522
3 changed files with 57 additions and 33 deletions

View File

@@ -6,21 +6,32 @@ else
CFLAGS=-O
endif
APP_DIR = Memmon.app/Contents
PLIST=$(shell grep -A1 $(1) src/Info.plist | tail -1 | cut -d'>' -f2 | cut -d'<' -f1)
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/*
mkdir -p Memmon.app/Contents/MacOS/
swiftc $(CFLAGS) src/main.swift \
@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
mkdir -p Memmon.app/Contents/Resources/
cp src/AppIcon.icns Memmon.app/Contents/Resources/AppIcon.icns
cp src/Info.plist Memmon.app/Contents/Info.plist
echo 'APPL????' > Memmon.app/Contents/PkgInfo
-emit-executable -sdk ${SDK_PATH} -o Memmon.app/Contents/MacOS/Memmon
@echo 'APPL????' > Memmon.app/Contents/PkgInfo
@mkdir -p Memmon.app/Contents/Resources/
@cp src/AppIcon.icns Memmon.app/Contents/Resources/AppIcon.icns
@cp src/Info.plist Memmon.app/Contents/Info.plist
@touch Memmon.app
@echo
codesign -v -s 'Apple Development' --options=runtime --timestamp Memmon.app
@echo
@echo 'Verify Signature...'
@echo
codesign -dvv Memmon.app
@echo
codesign -vvv --deep --strict Memmon.app
@echo
spctl -vvv --assess --type exec Memmon.app
.PHONY: release
release: VERSION=$(shell grep -A1 CFBundleShortVersionString src/Info.plist | tail -1 | tr -d '[a-z \t</>]')
release: VERSION=$(call PLIST,CFBundleShortVersionString)
release: Memmon.app
tar -czf "Memmon_v$(VERSION).tar.gz" Memmon.app
tar -czf "Memmon_v${VERSION}.tar.gz" Memmon.app