diff --git a/.github/actions/2_deploy/action.yml b/.github/actions/2_deploy/action.yml index 69b582081..c7667a7d8 100644 --- a/.github/actions/2_deploy/action.yml +++ b/.github/actions/2_deploy/action.yml @@ -33,12 +33,16 @@ inputs: description: 'Windows Certificate Password' required: false default: '' + use-brew-qt: + description: 'Qt Option' + required: false + default: 'false' runs: using: "composite" steps: - name: Set Notarization settings - id: notarization + id: envs shell: bash run: | if [ "${{ inputs.mac-notarization-user }}" != "" ]; then @@ -46,6 +50,11 @@ runs: else echo "not_setting=" >> $GITHUB_OUTPUT fi + if [ "${{ inputs.use-brew-qt }}" == "true" ]; then + echo "qt-option=--use_brew_qt" >> $GITHUB_OUTPUT + else + echo "qt-option=" >> $GITHUB_OUTPUT + fi - name: Set CodeSign Certificate macOS if: ${{ runner.os == 'macOS' && inputs.mac-certificate != ''}} uses: apple-actions/import-codesign-certs@v2 @@ -62,4 +71,4 @@ runs: - name: Deploy shell: bash run: | - bash scripts/${{ runner.os }}/2_deploy.sh --cert_pssw='${{ inputs.win-certificate-pssw }}' --cert_id='${{ inputs.mac-certificate-id }}' ${{ steps.notarization.outputs.not_setting }} \ No newline at end of file + bash scripts/${{ runner.os }}/2_deploy.sh ${{ steps.envs.outputs.qt-option }} --cert_pssw='${{ inputs.win-certificate-pssw }}' --cert_id='${{ inputs.mac-certificate-id }}' ${{ steps.envs.outputs.not_setting }} \ No newline at end of file diff --git a/.github/workflows/BuildMeshLab.yml b/.github/workflows/BuildMeshLab.yml index 3e9b0a88b..08716ac36 100644 --- a/.github/workflows/BuildMeshLab.yml +++ b/.github/workflows/BuildMeshLab.yml @@ -31,19 +31,12 @@ jobs: id: envs shell: bash run: | + ARCH=$(uname -m) if [ "${{matrix.precision}}" == "double_precision" ]; then - echo "artifact_suffix=_double" >> $GITHUB_OUTPUT + echo "artifact_suffix=_double_$ARCH" >> $GITHUB_OUTPUT else - echo "artifact_suffix=" >> $GITHUB_OUTPUT + echo "artifact_suffix=_$ARCH" >> $GITHUB_OUTPUT fi - if [ "${{matrix.os}}" == "macos-14" ]; then - echo "build_options=--use_brew_qt" >> $GITHUB_OUTPUT - echo "artifact_os=${{ runner.os }}_arm64" >> $GITHUB_OUTPUT - else - echo "build_options=" >> $GITHUB_OUTPUT - echo "artifact_os=${{ runner.os }}" >> $GITHUB_OUTPUT - fi - - name: Build uses: ./.github/actions/1_build with: @@ -55,6 +48,7 @@ jobs: - name: Deploy uses: ./.github/actions/2_deploy with: + use-brew-qt: ${{matrix.os == 'macos-14'}} mac-certificate: ${{ secrets.MACOS_CERTIFICATE }} mac-certificate-id: ${{ secrets.MACOS_CERT_ID }} mac-certificate-pssw: ${{ secrets.MACOS_CERTIFICATE_PSSW }} @@ -63,10 +57,10 @@ jobs: - name: Upload MeshLab Portable uses: actions/upload-artifact@v4 with: - name: MeshLab_${{ steps.envs.outputs.artifact_os }}_portable${{steps.envs.outputs.artifact_suffix}} + name: MeshLab_portable${{steps.envs.outputs.artifact_suffix}} path: install/ - name: Upload MeshLab Packages uses: actions/upload-artifact@v4 with: - name: MeshLab_${{ steps.envs.outputs.artifact_os }}_packages${{steps.envs.outputs.artifact_suffix}} + name: MeshLab_packages${{steps.envs.outputs.artifact_suffix}} path: packages/MeshLab* \ No newline at end of file diff --git a/scripts/Linux/internal/2d_appimage.sh b/scripts/Linux/internal/2d_appimage.sh index 5dd05a7cd..e50827f2f 100644 --- a/scripts/Linux/internal/2d_appimage.sh +++ b/scripts/Linux/internal/2d_appimage.sh @@ -32,5 +32,8 @@ STR_VERSION=$($INSTALL_PATH/AppRun --version) read -a strarr <<< "$STR_VERSION" ML_VERSION=${strarr[1]} #get the meshlab version from the string +# get running architecture +ARCH=$(uname -m) + mkdir $PACKAGES_PATH -mv MeshLab-*.AppImage $PACKAGES_PATH/MeshLab$ML_VERSION-linux.AppImage \ No newline at end of file +mv MeshLab-*.AppImage $PACKAGES_PATH/MeshLab$ML_VERSION-linux_$ARCH.AppImage \ No newline at end of file diff --git a/scripts/Windows/internal/2c_installer.sh b/scripts/Windows/internal/2c_installer.sh index 529314ac2..e4916e273 100644 --- a/scripts/Windows/internal/2c_installer.sh +++ b/scripts/Windows/internal/2c_installer.sh @@ -47,4 +47,8 @@ rm $INSTALL_PATH/ExecWaitJob.nsh rm $INSTALL_PATH/FileAssociation.nsh mkdir $PACKAGES_PATH -mv $INSTALL_PATH/MeshLab*-windows.exe $PACKAGES_PATH \ No newline at end of file +mv $INSTALL_PATH/MeshLab*-windows.exe $PACKAGES_PATH + +# get running architecture +ARCH=$(uname -m) +mv $PACKAGES_PATH/MeshLab*-windows.exe $PACKAGES_PATH/MeshLab*-windows_$ARCH.exe diff --git a/scripts/macOS/2_deploy.sh b/scripts/macOS/2_deploy.sh index f359e86e6..5b319cc68 100755 --- a/scripts/macOS/2_deploy.sh +++ b/scripts/macOS/2_deploy.sh @@ -24,6 +24,10 @@ case $i in QT_DIR_OPTION=-qt=${i#*=} shift # past argument=value ;; + --use_brew_qt) + QT_DIR_OPTION="--use_brew_qt" + shift # past argument=value + ;; -p=*|--packages_path=*) PACKAGES_PATH="${i#*=}" shift # past argument=value diff --git a/scripts/macOS/internal/2a_appbundle.sh b/scripts/macOS/internal/2a_appbundle.sh index d7924fa7e..30d0e49f1 100644 --- a/scripts/macOS/internal/2a_appbundle.sh +++ b/scripts/macOS/internal/2a_appbundle.sh @@ -15,7 +15,11 @@ case $i in shift # past argument=value ;; -qt=*|--qt_dir=*) - QT_DIR=${i#*=}/bin/ + QT_DIR=${i#*=} + shift # past argument=value + ;; + --use_brew_qt) + QT_DIR=$(brew --prefix qt5) shift # past argument=value ;; *) @@ -32,7 +36,7 @@ do done # save in message the output of macdeployqt -message=$(${QT_DIR}macdeployqt $INSTALL_PATH/$APPNAME \ +message=$(${QT_DIR}/bin/macdeployqt $INSTALL_PATH/$APPNAME \ $ARGUMENTS 2>&1) # if message contains "ERROR" then macdeployqt failed diff --git a/scripts/macOS/internal/2d_dmg.sh b/scripts/macOS/internal/2d_dmg.sh index 7a5495d15..c1124b52a 100644 --- a/scripts/macOS/internal/2d_dmg.sh +++ b/scripts/macOS/internal/2d_dmg.sh @@ -47,6 +47,9 @@ mv $INSTALL_PATH/meshlab.app $INSTALL_PATH/MeshLab$ML_VERSION.app mkdir $PACKAGES_PATH -appdmg $RESOURCES_PATH/macos/meshlab_dmg_final.json $PACKAGES_PATH/MeshLab$ML_VERSION-macos.dmg +# get running architecture +ARCH=$(uname -m) + +appdmg $RESOURCES_PATH/macos/meshlab_dmg_final.json $PACKAGES_PATH/MeshLab$ML_VERSION-macos_$ARCH.dmg rm $RESOURCES_PATH/macos/meshlab_dmg_final.json \ No newline at end of file