Skip to content

Commit d0c38cb

Browse files
committed
Refactor Windows CI workflow to replace NSIS installer with Inno Setup, and update packaging tool installation process
1 parent 19cab19 commit d0c38cb

File tree

3 files changed

+48
-64
lines changed

3 files changed

+48
-64
lines changed

.github/workflows/windows.yml

Lines changed: 11 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -37,17 +37,11 @@ jobs:
3737
mingw-w64-ucrt-x86_64-gsettings-desktop-schemas \
3838
mingw-w64-ucrt-x86_64-gtk-update-icon-cache
3939
40-
- name: Install MSYS packaging tools
41-
uses: msys2/setup-msys2@v2
42-
with:
43-
msystem: MSYS
44-
update: true
45-
4640
- name: Install packaging tools
4741
shell: msys2 {0}
4842
run: |
4943
pacman -Sy --noconfirm
50-
pacman --noconfirm -S --needed p7zip nsis
44+
pacman --noconfirm -S --needed p7zip
5145
5246
- name: Show tool versions
5347
shell: msys2 {0}
@@ -108,15 +102,17 @@ jobs:
108102
7z a SSH-Studio-portable.zip ssh-studio > /dev/null
109103
echo STAGE_WIN_PATH=C:\\_stage\\ssh-studio >> $GITHUB_OUTPUT
110104
111-
- name: Build NSIS installer
112-
shell: msys2 {0}
105+
- name: Download Inno Setup
113106
run: |
114-
set -e
115-
VERSION="${GITHUB_REF_NAME}"
116-
if [ -z "$VERSION" ]; then VERSION="dev"; fi
117-
mkdir -p installer/out
118-
makensis -DSourceDir=/c/_stage/ssh-studio -DVersion="$VERSION" -DAppName="${APP_NAME}" installer/ssh-studio.nsi
119-
cp installer/*.exe installer/out/ || true
107+
$url = "https://files.jrsoftware.org/is/6/innosetup-6.2.2.exe"
108+
$output = "C:\innosetup.exe"
109+
Invoke-WebRequest -Uri $url -OutFile $output
110+
Start-Process -FilePath $output -ArgumentList "/SILENT" -Wait
111+
112+
- name: Build Inno Setup installer
113+
run: |
114+
$version = if ($env:GITHUB_REF_NAME) { $env:GITHUB_REF_NAME } else { "dev" }
115+
& "C:\Program Files (x86)\Inno Setup 6\ISCC.exe" /DAppName="SSH Studio" /DVersion="$version" /DSourceDir="C:\_stage\ssh-studio" "installer\ssh-studio.iss"
120116
121117
- name: Upload artifacts
122118
uses: actions/upload-artifact@v4

installer/ssh-studio.iss

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
[Setup]
2+
AppName={#AppName}
3+
AppVersion={#Version}
4+
AppPublisher=BuddySirJava
5+
AppPublisherURL=https://github.com/BuddySirJava/SSH-Studio
6+
AppSupportURL=https://github.com/BuddySirJava/SSH-Studio/issues
7+
AppUpdatesURL=https://github.com/BuddySirJava/SSH-Studio/releases
8+
DefaultDirName={autopf}\{#AppName}
9+
DefaultGroupName={#AppName}
10+
AllowNoIcons=yes
11+
OutputDir=installer\out
12+
OutputBaseFilename=SSH-Studio-{#Version}-Setup
13+
Compression=lzma
14+
SolidCompression=yes
15+
WizardStyle=modern
16+
PrivilegesRequired=admin
17+
ArchitecturesAllowed=x64
18+
ArchitecturesInstallIn64BitMode=x64
19+
20+
[Languages]
21+
Name: "english"; MessagesFile: "compiler:Default.isl"
22+
23+
[Tasks]
24+
Name: "desktopicon"; Description: "{cm:CreateDesktopIcon}"; GroupDescription: "{cm:AdditionalIcons}"; Flags: unchecked
25+
Name: "quicklaunchicon"; Description: "{cm:CreateQuickLaunchIcon}"; GroupDescription: "{cm:AdditionalIcons}"; Flags: unchecked; OnlyBelowVersion: 6.1
26+
27+
[Files]
28+
Source: "{#SourceDir}\*"; DestDir: "{app}"; Flags: ignoreversion recursesubdirs createallsubdirs
29+
30+
[Icons]
31+
Name: "{group}\{#AppName}"; Filename: "{app}\SSH-Studio (MSYS2).bat"
32+
Name: "{group}\{cm:UninstallProgram,{#AppName}}"; Filename: "{uninstallexe}"
33+
Name: "{autodesktop}\{#AppName}"; Filename: "{app}\SSH-Studio (MSYS2).bat"; Tasks: desktopicon
34+
Name: "{userappdata}\Microsoft\Internet Explorer\Quick Launch\{#AppName}"; Filename: "{app}\SSH-Studio (MSYS2).bat"; Tasks: quicklaunchicon
35+
36+
[Run]
37+
Filename: "{app}\SSH-Studio (MSYS2).bat"; Description: "{cm:LaunchProgram,{#AppName}}"; Flags: nowait postinstall skipifsilent

installer/ssh-studio.nsi

Lines changed: 0 additions & 49 deletions
This file was deleted.

0 commit comments

Comments
 (0)