-
Notifications
You must be signed in to change notification settings - Fork 91
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Showing
4 changed files
with
14 additions
and
9 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
1. macOS安装包格式改为.pkg | ||
1. macOS安装包格式改为.dmg | ||
|
||
------------------------------------------------------------------------------------------ | ||
|
||
1. Distribute .pkg file for macOS | ||
1. Distribute .dmg file for macOS |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,5 @@ | ||
version=$(head -n 5 pubspec.yaml | tail -n 1 | cut -d ' ' -f 2) | ||
|
||
flutter build macos --release -t lib/src/main.dart \ | ||
&& hdiutil create -size 150m -fs HFS+ -volname JHenTai JHenTai.dmg \ | ||
&& hdiutil attach JHenTai.dmg \ | ||
&& cp -R build/macos/Build/Products/Release/jhentai.app /Volumes/JHenTai \ | ||
&& pkgbuild --install-location /Applications/JHenTai.app --identifier top.jtmonster.jhentai --version ${version} --root /Volumes/JHenTai/jhentai.app build/macos/JHenTai-${version}.pkg \ | ||
&& hdiutil detach /Volumes/JHenTai | ||
&& brew install create-dmg \ | ||
&& create-dmg --volname JHenTai-${version} --window-pos 200 120 --window-size 800 450 --icon-size 100 --app-drop-link 600 185 JHenTai-${version}.dmg build/macos/Build/Products/Release/jhentai.app |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
version=$(head -n 5 pubspec.yaml | tail -n 1 | cut -d ' ' -f 2) | ||
|
||
flutter build macos --release -t lib/src/main.dart \ | ||
&& hdiutil create -size 150m -fs HFS+ -volname JHenTai JHenTai.dmg \ | ||
&& hdiutil attach JHenTai.dmg \ | ||
&& cp -R build/macos/Build/Products/Release/jhentai.app /Volumes/JHenTai \ | ||
&& pkgbuild --install-location /Applications/JHenTai.app --identifier top.jtmonster.jhentai --version ${version} --root /Volumes/JHenTai/jhentai.app build/macos/JHenTai-${version}.pkg \ | ||
&& hdiutil detach /Volumes/JHenTai |