anusii / podnotes

GNU General Public License v3.0
2 stars 3 forks source link

DEPLOY: flutter build macos to make macos installer #75

Closed jesscmoore closed 8 months ago

jesscmoore commented 9 months ago

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

jesscmoore commented 8 months ago

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.