@@ -16,33 +16,55 @@ jobs:
1616 runs-on : macos-latest
1717 timeout-minutes : 60
1818 env :
19- LAZBUILD_WITH_PATH : /Applications/Lazarus/lazbuild
2019 MACOS_APP : enduser/trackereditor.app
2120 PROGRAM_NAME_WITH_PATH : ' enduser/trackereditor'
2221 BUILD_WITH_CERTIFICATE : ${{ secrets.PROD_MACOS_CERTIFICATE_NAME }}
2322 PROJECT_LPI : source/project/tracker_editor/trackereditor.lpi
2423 RELEASE_DMG_FILE : trackereditor_macOS_notarized_universal_binary.dmg
24+ # Copied the latest Lazarus source code from: https://sourceforge.net/projects/lazarus/files/Lazarus%20Zip%20_%20GZip/
25+ LAZARUS_URL_TAR_GZ : " https://github.com/GerryFerdinandus/bittorrent-tracker-editor/releases/download/V1.32.0/lazarus.tar.gz"
2526
2627 steps :
2728 - uses : actions/checkout@v4
2829 with :
2930 submodules : true
3031
31- - name : Install Lazarus IDE
32- run : brew install --cask lazarus
32+ - name : Install Free Pascal Compiler (FPC) multi arch version for macOS x86_64 and aarch64
33+ run : brew install --cask fpc-laz
34+ shell : bash
3335
3436 - name : Install Create dmg
3537 run : brew install create-dmg
3638
39+ - name : Download Lazarus source code into temp folder
40+ run : |
41+ #Download lazarus source code. Directory 'lazarus' will be created in the temp folder.
42+ cd ${RUNNER_TEMP}
43+ curl -L -O ${{ env.LAZARUS_URL_TAR_GZ }}
44+ tar -xzf *.tar.gz
45+ shell : bash
46+
47+ - name : Build lazbuild from Lazarus source code
48+ run : |
49+ # make lazbuild and put the link with extra parameter in the temp folder.
50+ LAZARUS_DIR=${RUNNER_TEMP}/lazarus
51+ cd "$LAZARUS_DIR"
52+ make lazbuild
53+ echo "$LAZARUS_DIR/lazbuild --primary-config-path=$LAZARUS_DIR --lazarusdir=$LAZARUS_DIR \$*" > ${RUNNER_TEMP}/lazbuild
54+ chmod +x ${RUNNER_TEMP}/lazbuild
55+ # Add lazbuild to the PATH variable. So it can be used in the next steps.
56+ echo ${RUNNER_TEMP} >> $GITHUB_PATH
57+ shell : bash
58+
3759 - name : Build trackereditor app for Apple silicon (aarch64)
3860 run : |
39- ${{ env.LAZBUILD_WITH_PATH }} --build-all --build-mode=Release --widgetset=cocoa --cpu=aarch64 ${{ env.PROJECT_LPI }}
61+ lazbuild --build-all --build-mode=Release --widgetset=cocoa --cpu=aarch64 ${{ env.PROJECT_LPI }}
4062 mv ${{ env.PROGRAM_NAME_WITH_PATH }} ${{ env.PROGRAM_NAME_WITH_PATH }}-aarch64
4163 shell : bash
4264
4365 - name : Build trackereditor app for Intel Mac version (x86_64)
4466 run : |
45- ${{ env.LAZBUILD_WITH_PATH }} --build-all --build-mode=Release --widgetset=cocoa --cpu=x86_64 ${{ env.PROJECT_LPI }}
67+ lazbuild --build-all --build-mode=Release --widgetset=cocoa --cpu=x86_64 ${{ env.PROJECT_LPI }}
4668 mv ${{ env.PROGRAM_NAME_WITH_PATH }} ${{ env.PROGRAM_NAME_WITH_PATH }}-x86_64
4769 shell : bash
4870
0 commit comments