From d10538093d25e4218e6d2bf09068a9e19898b4f8 Mon Sep 17 00:00:00 2001 From: Mohammed CHAHBOUN <69054810+M97Chahboun@users.noreply.github.com> Date: Wed, 20 Dec 2023 12:51:56 +0100 Subject: [PATCH] Used dmg for macos build (#6) * test build macos dmg * fix branch name * try fix issue on npm * Fix issue of dmg tool * Remove node action and use direct cmd * test install appdmg * TRY TO FIX INTALL APPDMG * downgrade macos version * install python * clear cache before install appdmg * try other workaround * check python version * install py 3.9 * Retry with py 3.9 * fix install command * Fix appdmg install * Fixed asset type and config path * separate appdmg cmd * Update desktop_build.yaml * fix app name * Fixed other issue on name * Enable other os build and change trigger to master --- .github/workflows/desktop_build.yaml | 21 +++++++++++++++------ .vscode/branch-timer.json | 2 +- installer/dmg_creator/config.json | 17 +++++++++++------ 3 files changed, 27 insertions(+), 13 deletions(-) diff --git a/.github/workflows/desktop_build.yaml b/.github/workflows/desktop_build.yaml index 2b71896..b990a66 100644 --- a/.github/workflows/desktop_build.yaml +++ b/.github/workflows/desktop_build.yaml @@ -51,8 +51,8 @@ jobs: target: macOS build_target: macos build_path: build/macos/Build/Products/Release - asset_extension: .zip - asset_content_type: application/zip + asset_extension: .dmg + asset_content_type: application/vnd.appimage - os: windows-latest target: Windows build_target: windows @@ -65,7 +65,7 @@ jobs: build_path: build/linux/x64/release/bundle asset_extension: .tar.gz asset_content_type: application/gzip - # - os: ubuntu-latest + - os: ubuntu-latest # target: Android # build_target: apk # build_path: build/app/outputs/flutter-apk @@ -110,10 +110,19 @@ jobs: if: matrix.target == 'Linux' run: tar czf $GITHUB_WORKSPACE/EyesCare${{ matrix.target }}.tar.gz * working-directory: ${{ matrix.build_path }} - - name: Compress build for macOS + - name: Setup Node.js environment + uses: actions/setup-node@v2 + with: + node-version: '14' + - name: Convert build to dmg for macOS if: matrix.target == 'macOS' - run: ditto -c -k --sequesterRsrc --keepParent Eyes\ Care.app $GITHUB_WORKSPACE/EyesCare${{ matrix.target }}.zip - working-directory: ${{ matrix.build_path }} + run: | + brew install python@3.9 + npm config set python /usr/local/bin/python3.9 + npm install -g appdmg + - name: run appdmg + if: matrix.target == 'macOS' + run: appdmg installer/dmg_creator/config.json $GITHUB_WORKSPACE/EyesCare${{ matrix.target }}.dmg - name: Compress build for Windows if: matrix.target == 'Windows' run: compress-archive -Path * -DestinationPath ${env:GITHUB_WORKSPACE}\EyesCare${{ matrix.target }}.zip diff --git a/.vscode/branch-timer.json b/.vscode/branch-timer.json index 438ea84..b666db4 100644 --- a/.vscode/branch-timer.json +++ b/.vscode/branch-timer.json @@ -1 +1 @@ -{"master":5741,"add-build-desktop-workflow":3416,"theme-modes":797} \ No newline at end of file +{"add-build-desktop-workflow":833,"master":304} \ No newline at end of file diff --git a/installer/dmg_creator/config.json b/installer/dmg_creator/config.json index 569e12c..e4285f5 100644 --- a/installer/dmg_creator/config.json +++ b/installer/dmg_creator/config.json @@ -1,7 +1,12 @@ { - "title": "KeepYourEyes", - "contents": [ - { "x": 448, "y": 344, "type": "link", "path": "/Applications" }, - { "x": 192, "y": 344, "type": "file", "path": "../../build/macos/Build/Products/Release/eyes_care.app" } - ] - } \ No newline at end of file + "title": "Eyes Care", + "contents": [ + { "x": 448, "y": 344, "type": "link", "path": "/Applications" }, + { + "x": 192, + "y": 344, + "type": "file", + "path": "../../build/macos/Build/Products/Release/Eyes Care.app" + } + ] +}