Makefiles and changes.

This commit is contained in:
2026-01-08 00:57:17 -08:00
parent d04d74c242
commit ee4896b5ae
5 changed files with 62 additions and 6 deletions

3
.gitignore vendored
View File

@@ -1,5 +1,8 @@
.DS_Store
arm64
x86_64
build
Caffeine
Caffeine.app
ids
src/tags

45
Makefile Normal file
View File

@@ -0,0 +1,45 @@
APPLE_ID := $(shell cat ./ids/APPLE_ID)
TEAM_ID := $(shell cat ./ids/TEAM_ID)
APP_SPECIFIC_PASSWORD := $(shell cat ./ids/APP_SPECIFIC_PASSWORD)
exe = Caffeine
$(exe).app:
$(MAKE) -C src FLAGS=-O CFLAGS=-O3 default
container:
ditto -c -k --keepParent ./src/$(exe).app ./build/$(exe).zip
notarize:
xcrun notarytool submit ./build/$(exe).zip \
--apple-id "$(APPLE_ID)" --team-id "$(TEAM_ID)" \
--password "$(APP_SPECIFIC_PASSWORD)" --wait
staple:
cd build && \
ditto -xk $(exe).zip . && \
rm $(exe).zip && \
xcrun stapler staple $(exe).app
zip:
cd build && \
ditto -c -k --keepParent $(exe).app $(exe).zip
dmg:
cp background.png build && cd build && \
create-dmg --volname "$(exe) Installer" --window-size 600 400 \
--background "background.png" --icon "$(exe).app" 200 170 \
--app-drop-link 400 170 --icon-size 100 "$(exe).dmg" "$(exe)"
rm build/background.png
all: $(exe).app container notarize staple zip dmg
status:
@echo 'xcrun notarytool log "" --apple-id "$(APPLE_ID)" --team-id "$(TEAM_ID)" --password "$(APP_SPECIFIC_PASSWORD)" developer_log.json'
clean:
rm -rf build
clean-all: clean
mkdir build
@$(MAKE) -C src clean-all

View File

@@ -56,7 +56,7 @@
[_versionLabel setTranslatesAutoresizingMaskIntoConstraints:NO];
_copyrightLabel = [[NSTextField labelWithString:
@"Copyright © 2025\nGarikMI. All rights reserved."] retain];
@"Copyright © 2026 Rednera.\nAll rights reserved."] retain];
[_copyrightLabel setFont:_fontSubheadline];
[_copyrightLabel setTextColor:[NSColor systemGrayColor]];
[_copyrightLabel setAlignment:NSTextAlignmentCenter];

View File

@@ -11,7 +11,7 @@
<key>CFBundleIconName</key>
<string>AppIcon</string>
<key>CFBundleIdentifier</key>
<string>com.garikme.Caffeine</string>
<string>com.rednera.Caffeine</string>
<key>CFBundleInfoDictionaryVersion</key>
<string>6.0</string>
<key>CFBundleName</key>
@@ -19,13 +19,13 @@
<key>CFBundlePackageType</key>
<string>APPL</string>
<key>CFBundleShortVersionString</key>
<string>0.2</string>
<string>0.1.0</string>
<key>CFBundleSupportedPlatforms</key>
<array>
<string>MacOSX</string>
</array>
<key>CFBundleVersion</key>
<string>0.2</string>
<string>0.1.0</string>
<key>DTPlatformName</key>
<string>macosx</string>
<key>DTPlatformVersion</key>
@@ -40,5 +40,7 @@
<true/>
<key>NSPrincipalClass</key>
<string>NSApplication</string>
<key>NSHumanReadableCopyright</key>
<string>Copyright © 2026 Rednera. All rights reserved.</string>
</dict>
</plist>

View File

@@ -1,3 +1,6 @@
APPLE_DEVELOPMENT := $(shell cat ../ids/APPLE_DEVELOPMENT)
APPLE_DEVELOPER_ID_APPLICATION := $(shell cat ../ids/APPLE_DEVELOPER_ID_APPLICATION)
CC = clang
FLAGS = -fno-objc-arc -Wall -Wextra -Wunguarded-availability \
-Werror=unguarded-availability -glldb -fno-caret-diagnostics \
@@ -27,7 +30,11 @@ $(EXEC).app: $(EXEC)
mkdir -p $@/Contents/Resources/ && \
cp Info.plist $@/Contents/ && \
cp resources/AppIcon.icns $@/Contents/Resources/ && \
cp $(EXEC) $@/Contents/MacOS/
cp $(EXEC) $@/Contents/MacOS/ && \
$(if $(DEBUG), codesign --entitlements $(EXEC).entitlements \
-s ${APPLE_DEVELOPMENT} -f --timestamp -o runtime $(EXEC).app, \
codesign -s ${APPLE_DEVELOPER_ID_APPLICATION} -f --timestamp \
-o runtime $(EXEC).app)
# Requires universal-ctags for Objective-C.
ctags:
@@ -35,4 +42,3 @@ ctags:
clean:
rm -rf $(EXEC) $(EXEC).dSYM $(EXEC).app