From 4b19710015e64f47eadb8bfd4e57d60dedfc1b63 Mon Sep 17 00:00:00 2001 From: Nick Boyd Date: Sun, 9 Apr 2023 18:56:35 +0200 Subject: [PATCH 1/5] NSIS: hobovr_installer.nsi - Converted header for Conda NSIS has good integration with Conda, whichexists on GitHub in the form of Miniconda. We can leverage this for releases. Signed-off-by: Nick Boyd --- installers/win/hobovr_installer.nsi | 24 ++++++++++++++++++------ 1 file changed, 18 insertions(+), 6 deletions(-) diff --git a/installers/win/hobovr_installer.nsi b/installers/win/hobovr_installer.nsi index 1d6d83d..32db679 100644 --- a/installers/win/hobovr_installer.nsi +++ b/installers/win/hobovr_installer.nsi @@ -1,9 +1,21 @@ -# plugins required: -# Inetc: https://nsis.sourceforge.io/Inetc_plug-in -# Nsisunz: https://nsis.sourceforge.io/Nsisunz_plug-in -# ExecDos: https://nsis.sourceforge.io/ExecDos_plug-in -# Locate: https://nsis.sourceforge.io/Locate_plugin -# Download the zip files from each of those and copy the contents of the plugin.zip/Plugins directory to program files/NSIS/plugins +# conda execute +# env: +# - nsis 3.* +# - AccessControl +# - InetC +# - Nsisunz +# - ExecDos +# - Locate +# - Registry +# - nsDialogs +# - winmessages +# - MUI2 +# - Logiclib +# - x64 +# channels: +# - nsis +# run_with: makensis + !include nsDialogs.nsh !include MUI2.nsh !include "winmessages.nsh" From 59d51d54a700071b3bfdcfe28535d301fb35a647 Mon Sep 17 00:00:00 2001 From: Nick Boyd Date: Sun, 9 Apr 2023 18:56:56 +0200 Subject: [PATCH 2/5] GITHUB: nsis.yml - workflow to listen to pushes on Main branch and trigger NSIS compiler. Enumerates *.nsi files within the windows installer directory and attempts to run on them. Signed-off-by: Nick Boyd --- .github/workflows/nsis.yml | 68 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 68 insertions(+) create mode 100644 .github/workflows/nsis.yml diff --git a/.github/workflows/nsis.yml b/.github/workflows/nsis.yml new file mode 100644 index 0000000..73e5c91 --- /dev/null +++ b/.github/workflows/nsis.yml @@ -0,0 +1,68 @@ +name: nsis + +on: + workflow_run: + workflows: [ Build ] + types: [ completed ] + workflow_dispatch: + +jobs: + config: + if: ${{ github.event.workflow_run.conclusion == 'success' }} + runs-on: ubuntu-latest + outputs: + matrix: ${{ steps.files.outputs.matrix }} + branch: ${{ steps.branch-ref.outputs.name }} + steps: + - uses: actions/checkout@master + with: + ref: ${{ github.event.workflow_run.head_branch }} + + - name: Return Branch + id: branch-ref + run: echo "::set-output name=${{ github.event.workflow_run.head_branch }}" + + - name: Get Script Files + id: list-files + uses: Rishabh510/Path-lister-action@master + with: + path: installers/ + type: .nsi + + - name: Return Script Files + id: files + run: echo "::set-output name=matrix::$(echo "${{ steps.list-files.outputs.paths }}" | sed 's/\//\\/g' | jq --raw-input --compact-output '[splits(" ") | select(length > 0)]')" + + make-installer: + runs-on: windows-latest + needs: [ config ] + strategy: + fail-fast: false + matrix: + file: ${{ fromJson(needs.config.outputs.matrix) }} + steps: + - uses: actions/checkout@master + with: + ref: ${{ github.event.workflow_run.head_branch }} + + - name: Download artifact + uses: dawidd6/action-download-artifact@v2 + with: + workflow: ${{ github.event.workflow_run.workflow_id }} + workflow_conclusion: success + name: hobovr-build-windows-latest + path: ${{ github.workspace }} + + - name: Create nsis installer + id: create-installer + shell: powershell + run: | + "$CONDA\bin\conda.bat execute ${{ matrix.file }}" + working-directory: ${{ github.workspace }}\installers\win + + - name: Upload artifacts + uses: actions/upload-artifact@v3 + with: + name: "hobovr_setup.exe" # Get the Output Name + path: | + hobovr From 7f76df12797b5ffc07225740da5f24e1b55118c8 Mon Sep 17 00:00:00 2001 From: Nick Boyd Date: Wed, 19 Apr 2023 21:57:04 +0200 Subject: [PATCH 3/5] GITHUB: nsis.yml: Extracts OutFile data from the Designated Script for Upload Used SED to extract and prepare GitHub output variable. Piped output has to be different for windows powershell: instead of Signed-off-by: Nick Boyd --- .github/workflows/nsis.yml | 19 +++++++++++++++++-- 1 file changed, 17 insertions(+), 2 deletions(-) diff --git a/.github/workflows/nsis.yml b/.github/workflows/nsis.yml index 73e5c91..3550607 100644 --- a/.github/workflows/nsis.yml +++ b/.github/workflows/nsis.yml @@ -60,9 +60,24 @@ jobs: "$CONDA\bin\conda.bat execute ${{ matrix.file }}" working-directory: ${{ github.workspace }}\installers\win + - name: Identify Compiled Installer + id: find-installer + shell: powershell + run: | + $exec_file=sed -rn 's/OutFile \"(.*)\"$/\1/p' ./${{ matrix.file }} + echo "executable=$exec_file" >> $Env:GITHUB_OUTPUT + working-directory: ${{ github.workspace }} + + - name: DebugInstaller + id: debug-installer + shell: powershell + run: | + echo ${{ steps.find-installer.outputs.executable }} + working-directory: ${{ github.workspace }} + - name: Upload artifacts uses: actions/upload-artifact@v3 with: - name: "hobovr_setup.exe" # Get the Output Name + name: ${{ steps.find-installer.outputs.executable }} path: | - hobovr + ${{ github.workspace }} From fb41991974b7006596c0b33f94658ea02286fe94 Mon Sep 17 00:00:00 2001 From: Nick Boyd Date: Wed, 19 Apr 2023 22:02:15 +0200 Subject: [PATCH 4/5] =?UTF-8?q?GITHUB:=20nsis.yml:=20Updated=20the=20depre?= =?UTF-8?q?cated=C2=A0=20syntax:?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Piped output has to be different for windows powershell: instead of Signed-off-by: Nick Boyd --- .github/workflows/nsis.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/nsis.yml b/.github/workflows/nsis.yml index 3550607..c2cf188 100644 --- a/.github/workflows/nsis.yml +++ b/.github/workflows/nsis.yml @@ -20,7 +20,7 @@ jobs: - name: Return Branch id: branch-ref - run: echo "::set-output name=${{ github.event.workflow_run.head_branch }}" + run: echo "name=${{ github.event.workflow_run.head_branch }}" >> $GITHUB_OUTPUT - name: Get Script Files id: list-files @@ -31,7 +31,7 @@ jobs: - name: Return Script Files id: files - run: echo "::set-output name=matrix::$(echo "${{ steps.list-files.outputs.paths }}" | sed 's/\//\\/g' | jq --raw-input --compact-output '[splits(" ") | select(length > 0)]')" + run: echo "matrix=$(echo "${{ steps.list-files.outputs.paths }}" | sed 's/\//\\/g' | jq --raw-input --compact-output '[splits(" ") | select(length > 0)]')" >> $GITHUB_OUTPUT make-installer: runs-on: windows-latest From 998f65f9931dd318acb0094b826a6b79f4ae35cd Mon Sep 17 00:00:00 2001 From: Nick Boyd Date: Wed, 19 Apr 2023 22:07:11 +0200 Subject: [PATCH 5/5] GITHUB: nsis.yml: Removed Debug step Signed-off-by: Nick Boyd --- .github/workflows/nsis.yml | 7 ------- 1 file changed, 7 deletions(-) diff --git a/.github/workflows/nsis.yml b/.github/workflows/nsis.yml index c2cf188..4d2e232 100644 --- a/.github/workflows/nsis.yml +++ b/.github/workflows/nsis.yml @@ -68,13 +68,6 @@ jobs: echo "executable=$exec_file" >> $Env:GITHUB_OUTPUT working-directory: ${{ github.workspace }} - - name: DebugInstaller - id: debug-installer - shell: powershell - run: | - echo ${{ steps.find-installer.outputs.executable }} - working-directory: ${{ github.workspace }} - - name: Upload artifacts uses: actions/upload-artifact@v3 with: