Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DEPLOY: flutter build macos to make macos installer #75

Closed
jesscmoore opened this issue Dec 11, 2023 · 1 comment
Closed

DEPLOY: flutter build macos to make macos installer #75

jesscmoore opened this issue Dec 11, 2023 · 1 comment
Assignees

Comments

@jesscmoore
Copy link
Contributor

jesscmoore commented Dec 11, 2023

Build macos .app and create .dmg app installer, add to podnotes/installers folder.

@jesscmoore jesscmoore self-assigned this Dec 11, 2023
@jesscmoore
Copy link
Contributor Author

Completed. The trick was to set incoming and outgoing network connections to True in the Release Entitlements file

Edited macos/Runner/Release.entitlements to insert below

<key>com.apple.security.network.client</key>
<true/>
<key>com.apple.security.network.server</key>
<true/>

Ran flutter build macos

It builds the app in

Made the macos icons .icns file.
https://www.codingforentrepreneurs.com/blog/create-icns-icons-for-macos-apps/

Created a macos_dmg folder, added config.json for dmg configuration and setting .icns file.
https://blog.stackademic.com/generating-dmg-files-with-flutter-packaging-for-macos-like-a-pro-335bc884d233

Made .dmg installer with

cd installers/macos_dmg

appdmg ./config.json ./podnotes.dmg
[ 1/21] Looking for target...                [ OK ]
[ 2/21] Reading JSON Specification...        [ OK ]
[ 3/21] Parsing JSON Specification...        [ OK ]
[ 4/21] Validating JSON Specification...     [ OK ]
[ 5/21] Looking for files...                 [ OK ]
[ 6/21] Calculating size of image...         [ OK ]
[ 7/21] Creating temporary image...          [ OK ]
[ 8/21] Mounting temporary image...          [ OK ]
[ 9/21] Making hidden background folder...   [ OK ]
[10/21] Copying background...                [SKIP]
[11/21] Reading background dimensions...     [SKIP]
[12/21] Copying icon...                      [ OK ]
[13/21] Setting icon...                      [ OK ]
[14/21] Creating links...                    [ OK ]
[15/21] Copying files...                     [ OK ]
[16/21] Making all the visuals...            [ OK ]
[17/21] Blessing image...                    [ OK ]
[18/21] Unmounting temporary image...        [ OK ]
[19/21] Finalizing image...                  [ OK ]
[20/21] Signing image...                     [SKIP]
[21/21] Removing temporary image...          [ OK ]
[22/21] Removing target image...             [ OK ]

Your image is ready:
./podnotes.dmg


mv podnotes.dmg ../.

Added installers/macos_dmg to .gitignore

Merged to main from jess/mac_app_build.

@jesscmoore jesscmoore changed the title DEPLOY: make MacOS app DEPLOY: flutter build macos to make macos installer Dec 12, 2023
@gjwgit gjwgit closed this as completed Dec 12, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants