Skip to content

Commit

Permalink
feat: update build-dmg script
Browse files Browse the repository at this point in the history
  • Loading branch information
Drapegnik committed Dec 30, 2024
1 parent 64a9d18 commit 2b5bf87
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 5 deletions.
14 changes: 10 additions & 4 deletions BatteryMonitor.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -279,11 +279,13 @@
ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor;
ASSETCATALOG_COMPILER_INCLUDE_ALL_APPICON_ASSETS = YES;
CODE_SIGN_ENTITLEMENTS = BatteryMonitor/BatteryMonitor.entitlements;
"CODE_SIGN_IDENTITY[sdk=macosx*]" = "Apple Development";
CODE_SIGN_STYLE = Automatic;
COMBINE_HIDPI_IMAGES = YES;
CURRENT_PROJECT_VERSION = 1;
CURRENT_PROJECT_VERSION = 3;
DEAD_CODE_STRIPPING = YES;
DEVELOPMENT_ASSET_PATHS = "\"BatteryMonitor/Preview Content\"";
DEVELOPMENT_TEAM = Z9G4JMSFCK;
ENABLE_PREVIEWS = YES;
GENERATE_INFOPLIST_FILE = YES;
INFOPLIST_FILE = BatteryMonitor/Info.plist;
Expand All @@ -292,7 +294,8 @@
"$(inherited)",
"@executable_path/../Frameworks",
);
MARKETING_VERSION = "0.1-alpha.2";
MACOSX_DEPLOYMENT_TARGET = 13.0;
MARKETING_VERSION = "0.1-alpha.3";
PRODUCT_BUNDLE_IDENTIFIER = drapegnik.BatteryMonitor;
PRODUCT_NAME = "$(TARGET_NAME)";
SWIFT_EMIT_LOC_STRINGS = YES;
Expand All @@ -307,11 +310,13 @@
ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor;
ASSETCATALOG_COMPILER_INCLUDE_ALL_APPICON_ASSETS = YES;
CODE_SIGN_ENTITLEMENTS = BatteryMonitor/BatteryMonitor.entitlements;
"CODE_SIGN_IDENTITY[sdk=macosx*]" = "Apple Development";
CODE_SIGN_STYLE = Automatic;
COMBINE_HIDPI_IMAGES = YES;
CURRENT_PROJECT_VERSION = 1;
CURRENT_PROJECT_VERSION = 3;
DEAD_CODE_STRIPPING = YES;
DEVELOPMENT_ASSET_PATHS = "\"BatteryMonitor/Preview Content\"";
DEVELOPMENT_TEAM = Z9G4JMSFCK;
ENABLE_PREVIEWS = YES;
GENERATE_INFOPLIST_FILE = YES;
INFOPLIST_FILE = BatteryMonitor/Info.plist;
Expand All @@ -320,7 +325,8 @@
"$(inherited)",
"@executable_path/../Frameworks",
);
MARKETING_VERSION = "0.1-alpha.2";
MACOSX_DEPLOYMENT_TARGET = 13.0;
MARKETING_VERSION = "0.1-alpha.3";
PRODUCT_BUNDLE_IDENTIFIER = drapegnik.BatteryMonitor;
PRODUCT_NAME = "$(TARGET_NAME)";
SWIFT_EMIT_LOC_STRINGS = YES;
Expand Down
12 changes: 11 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ VERSION=0.1-alpha.2
.PHONY: install
install:
brew install imagemagick
brew install create-dmg

.PHONY: prepare-icons
prepare-icons:
Expand All @@ -13,4 +14,13 @@ prepare-icons:

.PHONY: build-dmg
build-dmg:
hdiutil create -fs HFS+ -srcfolder ./dist/BatteryMonitor-$(VERSION) -volname "Battery Monitor" ./dist/BatteryMonitor-$(VERSION).dmg
create-dmg \
--volname "Battery Monitor Installer" \
--window-pos 200 120 \
--window-size 800 400 \
--icon-size 100 \
--icon "BatteryMonitor.app" 200 190 \
--hide-extension "BatteryMonitor.app" \
--app-drop-link 600 185 \
"./dist/BatteryMonitor-$(VERSION)-Installer.dmg" \
"./dist/BatteryMonitor-$(VERSION)"

0 comments on commit 2b5bf87

Please sign in to comment.