From 6da59ccea271041212c0bea97f7f14bd8e5d86aa Mon Sep 17 00:00:00 2001 From: totalretribution Date: Sun, 15 Mar 2026 17:15:59 +0000 Subject: [PATCH 1/5] Add Windows installer support and update release workflow --- .github/workflows/release.yml | 19 +++++++++++++++++- install.nsi | 37 +++++++++++++++++++++++++++++++++++ 2 files changed, 55 insertions(+), 1 deletion(-) create mode 100644 install.nsi diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 651c521..55597bc 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -97,12 +97,28 @@ jobs: ) Compress-Archive -Path $files -DestinationPath "$PWD/ssh-agent-echo-win-x64.zip" -Force + - name: Install NSIS + if: matrix.platform == 'windows' + run: | + iwr -useb get.scoop.sh -outfile 'install.ps1' + .\install.ps1 -RunAsAdmin + scoop update + scoop bucket add extras + scoop install nsis + + - name: Generate Windows Installer + if: matrix.platform == 'windows' + shell: pwsh + run: makensis.exe .\install.nsi + - name: Upload artifact if: matrix.platform == 'windows' uses: actions/upload-artifact@v6 with: name: ${{ matrix.platform }}-binaries - path: ${{ matrix.artifact }} + path: | + ${{ matrix.artifact }} + SshAgentEcho-Installer.exe - name: Upload artifact if: matrix.platform == 'linux' @@ -136,5 +152,6 @@ jobs: artifacts/windows-binaries/ssh-agent-echo-win-x64.zip artifacts/linux-binaries/publish/*.deb artifacts/linux-binaries/publish/*.rpm + artifacts/windows-binaries/SshAgentEcho-Installer.exe env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} diff --git a/install.nsi b/install.nsi new file mode 100644 index 0000000..ecf4b26 --- /dev/null +++ b/install.nsi @@ -0,0 +1,37 @@ +; Simple SSH Agent Echo Installer +!include "MUI2.nsh" + +Name "SSH Agent Echo" +OutFile "publish\SshAgentEcho-Installer.exe" +InstallDir "$LOCALAPPDATA\SshAgentEcho" +Icon "Assets\icon.ico" +UninstallIcon "Assets\icon.ico" + +!insertmacro MUI_PAGE_INSTFILES +!insertmacro MUI_LANGUAGE "English" + +Section "Install" + SetOutPath "$INSTDIR" + File "publish\ssh-agent-echo.exe" + File "publish\ssh-agent-echo-gui.exe" + + WriteUninstaller "$INSTDIR\uninstall.exe" + + CreateDirectory "$SMPROGRAMS\SSH Agent Echo" + CreateShortCut "$SMPROGRAMS\SSH Agent Echo\SSH Agent Echo.lnk" "$INSTDIR\ssh-agent-echo-gui.exe" + CreateShortCut "$SMPROGRAMS\SSH Agent Echo\Uninstall.lnk" "$INSTDIR\uninstall.exe" + + ReadRegStr $0 HKCU "Environment" "Path" + StrCpy $1 "$0;$INSTDIR" + WriteRegStr HKCU "Environment" "Path" "$1" + SendMessage 0xffff 0x001A 0 "STR:Environment" /TIMEOUT=5000 +SectionEnd + +Section "Uninstall" + RMDir /r "$INSTDIR" + RMDir /r "$SMPROGRAMS\SSH Agent Echo" + + ReadRegStr $0 HKCU "Environment" "Path" + WriteRegStr HKCU "Environment" "Path" "$0" + SendMessage 0xffff 0x001A 0 "STR:Environment" /TIMEOUT=5000 +SectionEnd From 5bc16f9ec3f04f6d4077852c2683bce8d84ae1c2 Mon Sep 17 00:00:00 2001 From: totalretribution Date: Sun, 15 Mar 2026 17:21:42 +0000 Subject: [PATCH 2/5] Fix command for generating Windows installer in release workflow --- .github/workflows/release.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 55597bc..cf2c8e0 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -109,7 +109,7 @@ jobs: - name: Generate Windows Installer if: matrix.platform == 'windows' shell: pwsh - run: makensis.exe .\install.nsi + run: makensis .\install.nsi - name: Upload artifact if: matrix.platform == 'windows' From 4bf4e5824a966781dd214f544bd07959e1c8b9ff Mon Sep 17 00:00:00 2001 From: totalretribution Date: Sun, 15 Mar 2026 17:30:31 +0000 Subject: [PATCH 3/5] Fix path for NSIS executable in Windows installer generation step --- .github/workflows/release.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index cf2c8e0..4686bdf 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -109,7 +109,8 @@ jobs: - name: Generate Windows Installer if: matrix.platform == 'windows' shell: pwsh - run: makensis .\install.nsi + run: | + & "$env:USERPROFILE\scoop\apps\nsis\current\makensis.exe" .\install.nsi - name: Upload artifact if: matrix.platform == 'windows' From b30e24c7e7d1c69ef265fe4bcda2063a343f3cf2 Mon Sep 17 00:00:00 2001 From: totalretribution Date: Sun, 15 Mar 2026 18:54:56 +0000 Subject: [PATCH 4/5] Fix path for Windows installer artifact in release workflow --- .github/workflows/release.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 4686bdf..e30aa4b 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -119,7 +119,7 @@ jobs: name: ${{ matrix.platform }}-binaries path: | ${{ matrix.artifact }} - SshAgentEcho-Installer.exe + publish/SshAgentEcho-Installer.exe - name: Upload artifact if: matrix.platform == 'linux' From 7bf78290c4265c6cc9a295759799357d4944e501 Mon Sep 17 00:00:00 2001 From: totalretribution Date: Sun, 15 Mar 2026 19:04:29 +0000 Subject: [PATCH 5/5] Added ability to run gui after install --- install.nsi | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/install.nsi b/install.nsi index ecf4b26..2fc94b0 100644 --- a/install.nsi +++ b/install.nsi @@ -7,7 +7,11 @@ InstallDir "$LOCALAPPDATA\SshAgentEcho" Icon "Assets\icon.ico" UninstallIcon "Assets\icon.ico" +!define MUI_FINISHPAGE_RUN "$INSTDIR\ssh-agent-echo-gui.exe" +!define MUI_FINISHPAGE_RUN_CHECKED + !insertmacro MUI_PAGE_INSTFILES +!insertmacro MUI_PAGE_FINISH !insertmacro MUI_LANGUAGE "English" Section "Install"