From 58d9cdba3bfebdaf15c02f47b917b9d7c871d37d Mon Sep 17 00:00:00 2001 From: alemuntoni Date: Tue, 17 May 2022 15:38:54 +0200 Subject: [PATCH] move build and install dirs outside src on windows --- .github/workflows/AutoMergeMainOnDevel.yml | 3 +- .github/workflows/CreateRelease.yml | 20 +++++------ .github/workflows/Windows.yml | 16 ++++----- scripts/Windows/1_build.sh | 8 ++--- scripts/Windows/2_deploy.sh | 4 +-- scripts/Windows/3_installer.sh | 4 +-- scripts/Windows/internal/nsis_script.sh | 2 +- scripts/Windows/make_it.sh | 39 +++++++++++----------- 8 files changed, 47 insertions(+), 49 deletions(-) diff --git a/.github/workflows/AutoMergeMainOnDevel.yml b/.github/workflows/AutoMergeMainOnDevel.yml index dcb5f1b77..249c57c03 100644 --- a/.github/workflows/AutoMergeMainOnDevel.yml +++ b/.github/workflows/AutoMergeMainOnDevel.yml @@ -3,11 +3,10 @@ name: AutoMergeMainOnDevel on: push: branches: - - 'main' + - 'cnr-isti-vclab/main' jobs: auto_merge: - if: github.repository_owner == 'cnr-isti-vclab' name: Automatic Merge Main On Devel runs-on: ubuntu-latest diff --git a/.github/workflows/CreateRelease.yml b/.github/workflows/CreateRelease.yml index 179971067..31c439eae 100644 --- a/.github/workflows/CreateRelease.yml +++ b/.github/workflows/CreateRelease.yml @@ -189,7 +189,7 @@ jobs: bash scripts/${{ runner.os }}/1_build.sh --${{ matrix.precision }} - name: Sign Portable content run: | - .\scripts\Windows\internal\sign_dlls.ps1 -pssw '${{ secrets.WIN_CERTIFICATE_PSSW }}' -path 'src\install\' + .\scripts\Windows\internal\sign_dlls.ps1 -pssw '${{ secrets.WIN_CERTIFICATE_PSSW }}' -path 'install\' - name: Deploy shell: C:\shells\msys2bash.cmd {0} run: | @@ -201,28 +201,28 @@ jobs: - name: Create Installer uses: joncloud/makensis-action@v1 with: - script-file: "src/install/meshlab_final.nsi" + script-file: "install/meshlab_final.nsi" - name: Move Installer shell: bash run: | - mkdir src/installer - mv src/install/MeshLab*-windows.exe src/installer - rm src/install/meshlab_final.nsi - rm src/install/ExecWaitJob.nsh - rm src/install/FileAssociation.nsh + mkdir installer + mv install/MeshLab*-windows.exe installer + rm install/meshlab_final.nsi + rm install/ExecWaitJob.nsh + rm install/FileAssociation.nsh - name: Sign Installer run: | - .\scripts\Windows\internal\sign_dlls.ps1 -pssw '${{ secrets.WIN_CERTIFICATE_PSSW }}' -path 'src\installer\' + .\scripts\Windows\internal\sign_dlls.ps1 -pssw '${{ secrets.WIN_CERTIFICATE_PSSW }}' -path 'installer\' - name: Uploading MeshLab Portable uses: actions/upload-artifact@v2 with: name: meshlab_windows_portable${{steps.envs.outputs.artifact_suffix}} - path: src/install + path: install - name: Upload Meshlab Installer uses: actions/upload-artifact@v2 with: name: meshlab_windows_installer${{steps.envs.outputs.artifact_suffix}} - path: src/installer/MeshLab*-windows.exe + path: installer/MeshLab*-windows.exe #after building MeshLab for the three platforms, we create a release in github create_release: diff --git a/.github/workflows/Windows.yml b/.github/workflows/Windows.yml index 40db78f65..7a2ba585d 100644 --- a/.github/workflows/Windows.yml +++ b/.github/workflows/Windows.yml @@ -51,22 +51,22 @@ jobs: - name: Create Installer uses: joncloud/makensis-action@v1 with: - script-file: "src/install/meshlab_final.nsi" + script-file: "install/meshlab_final.nsi" - name: Move Installer shell: bash run: | - mkdir src/installer - mv src/install/MeshLab*-windows.exe src/installer/ - rm src/install/meshlab_final.nsi - rm src/install/ExecWaitJob.nsh - rm src/install/FileAssociation.nsh + mkdir installer + mv install/MeshLab*-windows.exe installer/ + rm install/meshlab_final.nsi + rm install/ExecWaitJob.nsh + rm install/FileAssociation.nsh - name: Uploading MeshLab Portable uses: actions/upload-artifact@v2 with: name: meshlab_windows_portable${{steps.envs.outputs.artifact_suffix}} - path: src/install + path: install - name: Upload Meshlab Installer uses: actions/upload-artifact@v2 with: name: meshlab_windows_installer${{steps.envs.outputs.artifact_suffix}} - path: src/installer/MeshLab*-windows.exe + path: installer/MeshLab*-windows.exe diff --git a/scripts/Windows/1_build.sh b/scripts/Windows/1_build.sh index d6af4ddda..b4cf242bd 100644 --- a/scripts/Windows/1_build.sh +++ b/scripts/Windows/1_build.sh @@ -3,8 +3,8 @@ # Requires a VS >= 2017 and Qt environments which are set-up properly, # and an accessible cmake binary. # -# Without given arguments, MeshLab will be built in the meshlab/src/build -# directory, and installed in $BUILD_PATH/../install. +# Without given arguments, MeshLab will be built in the meshlab/build +# directory, and installed in meshlab/install. # # You can give as argument the BUILD_PATH and the INSTALL_PATH in the # following way: @@ -14,8 +14,8 @@ #default paths wrt the script folder SCRIPTS_PATH="$(dirname "$(realpath "$0")")" SOURCE_PATH=$SCRIPTS_PATH/../../src -BUILD_PATH=$SOURCE_PATH/build -INSTALL_PATH=$SOURCE_PATH/install +BUILD_PATH=$SOURCE_PATH/../build +INSTALL_PATH=$SOURCE_PATH/../install DOUBLE_PRECISION_OPTION="" NIGHTLY_OPTION="" diff --git a/scripts/Windows/2_deploy.sh b/scripts/Windows/2_deploy.sh index 9ff507a91..2dced9b45 100644 --- a/scripts/Windows/2_deploy.sh +++ b/scripts/Windows/2_deploy.sh @@ -2,13 +2,13 @@ # This is a script shell for deploying a meshlab-portable folder. # Requires a properly built meshlab (see 1_build.sh). # -# Without given arguments, the folder that will be deployed is meshlab/src/install. +# Without given arguments, the folder that will be deployed is meshlab/install. # # You can give as argument the path where meshlab is installed. SCRIPTS_PATH="$(dirname "$(realpath "$0")")" RESOURCES_PATH=$SCRIPTS_PATH/../../resources -INSTALL_PATH=$SCRIPTS_PATH/../../src/install +INSTALL_PATH=$SCRIPTS_PATH/../../install #checking for parameters for i in "$@" diff --git a/scripts/Windows/3_installer.sh b/scripts/Windows/3_installer.sh index 91c4637ef..e788bfcd6 100644 --- a/scripts/Windows/3_installer.sh +++ b/scripts/Windows/3_installer.sh @@ -7,11 +7,11 @@ # # You can give as argument the INSTALL_PATH. # -# After running this script, the installer can be found inside the resources folder. +# After running this script, the installer can be found inside the install folder. SCRIPTS_PATH="$(dirname "$(realpath "$0")")" RESOURCES_PATH=$SCRIPTS_PATH/../../resources -INSTALL_PATH=$SCRIPTS_PATH/../../src/install +INSTALL_PATH=$SCRIPTS_PATH/../../install #checking for parameters diff --git a/scripts/Windows/internal/nsis_script.sh b/scripts/Windows/internal/nsis_script.sh index 854ba0178..855c94066 100644 --- a/scripts/Windows/internal/nsis_script.sh +++ b/scripts/Windows/internal/nsis_script.sh @@ -12,7 +12,7 @@ SCRIPTS_PATH="$(dirname "$(realpath "$0")")"/.. RESOURCES_PATH=$SCRIPTS_PATH/../../resources SOURCE_PATH=$SCRIPTS_PATH/../../src -INSTALL_PATH=$SOURCE_PATH/install +INSTALL_PATH=$SOURCE_PATH/../install #check parameters for i in "$@" diff --git a/scripts/Windows/make_it.sh b/scripts/Windows/make_it.sh index 5775da5a7..b315e465f 100644 --- a/scripts/Windows/make_it.sh +++ b/scripts/Windows/make_it.sh @@ -4,22 +4,21 @@ # Requires MSVC and Qt environment which is set-up properly, and accessible # cmake and makensis binaries. # -# Without given arguments, MeshLab will be built in the meshlab/src/build, -# the folder meshlab/src/install will be a portable version of MeshLab and -# the AppImage will be placed in meshlab/src. +# Without given arguments, MeshLab will be built in the meshlab/build, +# the folder meshlab/install will be a portable version of MeshLab and +# the Installer will be placed in meshlab/install. # # You can give as argument the build path, the install path (that will contain # the portable version of MeshLab), and the number of cores to use to build MeshLab # (default: 4). -# The installer will be placed in the parent directory of the install path. # # Example of call: # bash make_it.sh --build_path=path/to/build --install_path=path/to/install -j8 SCRIPTS_PATH="$(dirname "$(realpath "$0")")" SOURCE_PATH=$SCRIPTS_PATH/../../src -BUILD_PATH=$SOURCE_PATH/build -INSTALL_PATH=$SOURCE_PATH/install +BUILD_PATH=$SOURCE_PATH/../build +INSTALL_PATH=$SOURCE_PATH/../install CORES="-j4" DOUBLE_PRECISION_OPTION="" @@ -28,24 +27,24 @@ for i in "$@" do case $i in -b=*|--build_path=*) - BUILD_PATH="${i#*=}" - shift # past argument=value - ;; + BUILD_PATH="${i#*=}" + shift # past argument=value + ;; -i=*|--install_path=*) - INSTALL_PATH="${i#*=}"/usr/ - shift # past argument=value - ;; + INSTALL_PATH="${i#*=}"/usr/ + shift # past argument=value + ;; -j*) - CORES=$i - shift # past argument=value - ;; + CORES=$i + shift # past argument=value + ;; --double_precision) - DOUBLE_PRECISION_OPTION="--double_precision" - shift # past argument=value - ;; + DOUBLE_PRECISION_OPTION="--double_precision" + shift # past argument=value + ;; *) - # unknown option - ;; + # unknown option + ;; esac done