Makefiles and changes.
This commit is contained in:
3
.gitignore
vendored
3
.gitignore
vendored
@@ -1,5 +1,8 @@
|
|||||||
.DS_Store
|
.DS_Store
|
||||||
arm64
|
arm64
|
||||||
x86_64
|
x86_64
|
||||||
|
build
|
||||||
Caffeine
|
Caffeine
|
||||||
Caffeine.app
|
Caffeine.app
|
||||||
|
ids
|
||||||
|
src/tags
|
||||||
|
|||||||
45
Makefile
Normal file
45
Makefile
Normal 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
|
||||||
@@ -56,7 +56,7 @@
|
|||||||
[_versionLabel setTranslatesAutoresizingMaskIntoConstraints:NO];
|
[_versionLabel setTranslatesAutoresizingMaskIntoConstraints:NO];
|
||||||
|
|
||||||
_copyrightLabel = [[NSTextField labelWithString:
|
_copyrightLabel = [[NSTextField labelWithString:
|
||||||
@"Copyright © 2025\nGarikMI. All rights reserved."] retain];
|
@"Copyright © 2026 Rednera.\nAll rights reserved."] retain];
|
||||||
[_copyrightLabel setFont:_fontSubheadline];
|
[_copyrightLabel setFont:_fontSubheadline];
|
||||||
[_copyrightLabel setTextColor:[NSColor systemGrayColor]];
|
[_copyrightLabel setTextColor:[NSColor systemGrayColor]];
|
||||||
[_copyrightLabel setAlignment:NSTextAlignmentCenter];
|
[_copyrightLabel setAlignment:NSTextAlignmentCenter];
|
||||||
|
|||||||
@@ -11,7 +11,7 @@
|
|||||||
<key>CFBundleIconName</key>
|
<key>CFBundleIconName</key>
|
||||||
<string>AppIcon</string>
|
<string>AppIcon</string>
|
||||||
<key>CFBundleIdentifier</key>
|
<key>CFBundleIdentifier</key>
|
||||||
<string>com.garikme.Caffeine</string>
|
<string>com.rednera.Caffeine</string>
|
||||||
<key>CFBundleInfoDictionaryVersion</key>
|
<key>CFBundleInfoDictionaryVersion</key>
|
||||||
<string>6.0</string>
|
<string>6.0</string>
|
||||||
<key>CFBundleName</key>
|
<key>CFBundleName</key>
|
||||||
@@ -19,13 +19,13 @@
|
|||||||
<key>CFBundlePackageType</key>
|
<key>CFBundlePackageType</key>
|
||||||
<string>APPL</string>
|
<string>APPL</string>
|
||||||
<key>CFBundleShortVersionString</key>
|
<key>CFBundleShortVersionString</key>
|
||||||
<string>0.2</string>
|
<string>0.1.0</string>
|
||||||
<key>CFBundleSupportedPlatforms</key>
|
<key>CFBundleSupportedPlatforms</key>
|
||||||
<array>
|
<array>
|
||||||
<string>MacOSX</string>
|
<string>MacOSX</string>
|
||||||
</array>
|
</array>
|
||||||
<key>CFBundleVersion</key>
|
<key>CFBundleVersion</key>
|
||||||
<string>0.2</string>
|
<string>0.1.0</string>
|
||||||
<key>DTPlatformName</key>
|
<key>DTPlatformName</key>
|
||||||
<string>macosx</string>
|
<string>macosx</string>
|
||||||
<key>DTPlatformVersion</key>
|
<key>DTPlatformVersion</key>
|
||||||
@@ -40,5 +40,7 @@
|
|||||||
<true/>
|
<true/>
|
||||||
<key>NSPrincipalClass</key>
|
<key>NSPrincipalClass</key>
|
||||||
<string>NSApplication</string>
|
<string>NSApplication</string>
|
||||||
|
<key>NSHumanReadableCopyright</key>
|
||||||
|
<string>Copyright © 2026 Rednera. All rights reserved.</string>
|
||||||
</dict>
|
</dict>
|
||||||
</plist>
|
</plist>
|
||||||
|
|||||||
10
src/Makefile
10
src/Makefile
@@ -1,3 +1,6 @@
|
|||||||
|
APPLE_DEVELOPMENT := $(shell cat ../ids/APPLE_DEVELOPMENT)
|
||||||
|
APPLE_DEVELOPER_ID_APPLICATION := $(shell cat ../ids/APPLE_DEVELOPER_ID_APPLICATION)
|
||||||
|
|
||||||
CC = clang
|
CC = clang
|
||||||
FLAGS = -fno-objc-arc -Wall -Wextra -Wunguarded-availability \
|
FLAGS = -fno-objc-arc -Wall -Wextra -Wunguarded-availability \
|
||||||
-Werror=unguarded-availability -glldb -fno-caret-diagnostics \
|
-Werror=unguarded-availability -glldb -fno-caret-diagnostics \
|
||||||
@@ -27,7 +30,11 @@ $(EXEC).app: $(EXEC)
|
|||||||
mkdir -p $@/Contents/Resources/ && \
|
mkdir -p $@/Contents/Resources/ && \
|
||||||
cp Info.plist $@/Contents/ && \
|
cp Info.plist $@/Contents/ && \
|
||||||
cp resources/AppIcon.icns $@/Contents/Resources/ && \
|
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.
|
# Requires universal-ctags for Objective-C.
|
||||||
ctags:
|
ctags:
|
||||||
@@ -35,4 +42,3 @@ ctags:
|
|||||||
|
|
||||||
clean:
|
clean:
|
||||||
rm -rf $(EXEC) $(EXEC).dSYM $(EXEC).app
|
rm -rf $(EXEC) $(EXEC).dSYM $(EXEC).app
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user