Skip to content

Commit 54510b2

Browse files
committed
Enhance Homebrew workflow and update ssh-studio formula dependencies
1 parent eec434b commit 54510b2

File tree

4 files changed

+184
-3
lines changed

4 files changed

+184
-3
lines changed

.github/workflows/brew.yml

Lines changed: 14 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,15 @@ name: Homebrew Formula
22

33
on:
44
workflow_dispatch:
5+
repository_dispatch:
6+
types: [website-build]
57
pull_request:
68
paths:
7-
- 'Formula/ssh-studio.rb'
9+
- 'Formula/**'
810
- '.github/workflows/brew.yml'
911
push:
1012
branches: [ master ]
13+
tags: [ '[0-9]*.[0-9]*.[0-9]*' ]
1114

1215
jobs:
1316
test-formula:
@@ -45,15 +48,23 @@ jobs:
4548
4649
- name: Test formula
4750
run: |
48-
ssh-studio
51+
ssh-studio &
52+
sleep 2
4953
brew test local/ssh-studio/ssh-studio
54+
# Close the GUI app
55+
pkill -f "SSH Studio" || true
56+
pkill -f "ssh-studio" || true
5057
5158
- name: Test app bundle
5259
run: |
5360
# Test the .app bundle was created
5461
ls -la "$(brew --prefix local/ssh-studio/ssh-studio)/Applications/SSH Studio.app"
5562
# Test the launcher script
56-
"$(brew --prefix local/ssh-studio/ssh-studio)/Applications/SSH Studio.app/Contents/MacOS/ssh-studio" --help
63+
"$(brew --prefix local/ssh-studio/ssh-studio)/Applications/SSH Studio.app/Contents/MacOS/ssh-studio" --help &
64+
sleep 2
65+
# Close the GUI app
66+
pkill -f "SSH Studio" || true
67+
pkill -f "ssh-studio" || true
5768
5869
- name: Create bottle (optional)
5970
run: |

.github/workflows/windows.yml

Lines changed: 120 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,120 @@
1+
name: Windows Installer
2+
3+
on:
4+
workflow_dispatch:
5+
push:
6+
tags:
7+
- "[0-9]+.[0-9]+.[0-9]+"
8+
9+
jobs:
10+
build-windows-installer:
11+
runs-on: windows-latest
12+
env:
13+
APP_ID: io.github.BuddySirJava.SSH-Studio
14+
APP_NAME: SSH Studio
15+
steps:
16+
- name: Checkout
17+
uses: actions/checkout@v4
18+
19+
- name: Setup MSYS2 (UCRT64)
20+
uses: msys2/setup-msys2@v2
21+
with:
22+
msystem: UCRT64
23+
update: true
24+
install: >-
25+
base-devel
26+
git
27+
mingw-w64-ucrt-x86_64-toolchain
28+
mingw-w64-ucrt-x86_64-meson
29+
mingw-w64-ucrt-x86_64-ninja
30+
mingw-w64-ucrt-x86_64-pkg-config
31+
mingw-w64-ucrt-x86_64-python
32+
mingw-w64-ucrt-x86_64-python-pip
33+
mingw-w64-ucrt-x86_64-python-gobject
34+
mingw-w64-ucrt-x86_64-gtk4
35+
mingw-w64-ucrt-x86_64-libadwaita
36+
mingw-w64-ucrt-x86_64-glib2
37+
mingw-w64-ucrt-x86_64-gobject-introspection
38+
mingw-w64-ucrt-x86_64-gsettings-desktop-schemas
39+
mingw-w64-ucrt-x86_64-gtk-update-icon-cache
40+
p7zip
41+
nsis
42+
43+
- name: Show tool versions
44+
shell: msys2 {0}
45+
run: |
46+
python --version
47+
meson --version
48+
ninja --version
49+
pkg-config --version
50+
51+
- name: Build blueprint-compiler from git (v0.18.0)
52+
shell: msys2 {0}
53+
run: |
54+
set -e
55+
rm -rf /c/_deps && mkdir -p /c/_deps
56+
cd /c/_deps
57+
git clone --depth 1 --branch v0.18.0 https://gitlab.gnome.org/GNOME/blueprint-compiler.git
58+
cd blueprint-compiler
59+
meson setup build --prefix=/opt/blueprint-compiler --buildtype=release
60+
meson compile -C build
61+
meson install -C build
62+
echo "/opt/blueprint-compiler/bin" >> $GITHUB_PATH
63+
blueprint-compiler --version
64+
65+
- name: Configure & build SSH Studio (Meson)
66+
shell: msys2 {0}
67+
run: |
68+
set -e
69+
rm -rf builddir && mkdir -p builddir
70+
meson setup builddir --prefix=/opt/ssh-studio --buildtype=release
71+
meson compile -C builddir
72+
meson install -C builddir
73+
74+
- name: Stage install tree for packaging
75+
id: stage
76+
shell: msys2 {0}
77+
run: |
78+
set -e
79+
STAGE=/c/_stage/ssh-studio
80+
rm -rf "$STAGE" && mkdir -p "$STAGE"
81+
# Copy installed prefix
82+
cp -r /opt/ssh-studio/* "$STAGE"/
83+
# Create a simple Windows launcher that runs via MSYS2 bash
84+
cat > "$STAGE/SSH-Studio (MSYS2).bat" << 'BAT'
85+
@echo off
86+
setlocal
87+
set "MSYSBASH=C:\\msys64\\ucrt64\\bin\\bash.exe"
88+
if exist "%MSYSBASH%" (
89+
for %%I in ("%~dp0.") do set "APPDIR_WIN=%%~fI"
90+
"%MSYSBASH%" -lc "APPDIR=\$(cygpath -u '$APPDIR_WIN'); APPDIR=\${APPDIR%/}; \"$APPDIR/bin/ssh-studio\" $*"
91+
) else (
92+
echo MSYS2 UCRT64 not found at C:\\msys64. Please install MSYS2 and required GTK/PyGObject runtime.
93+
pause
94+
)
95+
endlocal
96+
BAT
97+
# Produce a portable zip as well
98+
cd /c/_stage
99+
7z a SSH-Studio-portable.zip ssh-studio > /dev/null
100+
echo STAGE_WIN_PATH=C:\\_stage\\ssh-studio >> $GITHUB_OUTPUT
101+
102+
- name: Build NSIS installer
103+
shell: msys2 {0}
104+
run: |
105+
set -e
106+
VERSION="${GITHUB_REF_NAME}"
107+
if [ -z "$VERSION" ]; then VERSION="dev"; fi
108+
mkdir -p installer/out
109+
makensis -DSourceDir=/c/_stage/ssh-studio -DVersion="$VERSION" -DAppName="${APP_NAME}" installer/ssh-studio.nsi
110+
cp installer/*.exe installer/out/ || true
111+
112+
- name: Upload artifacts
113+
uses: actions/upload-artifact@v4
114+
with:
115+
name: windows-artifacts
116+
path: |
117+
C:/_stage/SSH-Studio-portable.zip
118+
installer/*.exe
119+
120+

Formula/ssh-studio.rb

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ class SshStudio < Formula
1313
depends_on "glib"
1414
depends_on "gtk4"
1515
depends_on "libadwaita"
16+
depends_on "adwaita-icon-theme"
1617
depends_on "pygobject3"
1718
depends_on "[email protected]"
1819

installer/ssh-studio.nsi

Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
; NSIS installer script for SSH Studio
2+
!define AppName "${AppName}"
3+
!define AppVersion "${Version}"
4+
!define CompanyName "BuddySirJava"
5+
!define InstallDir "$PROGRAMFILES\${AppName}"
6+
7+
OutFile "installer\${AppName}-${Version}-Setup.exe"
8+
InstallDir "${InstallDir}"
9+
ShowInstDetails show
10+
11+
RequestExecutionLevel admin
12+
13+
Page directory
14+
Page instfiles
15+
16+
Section "Install"
17+
SetOutPath "$INSTDIR"
18+
File /r "${SourceDir}\*"
19+
20+
; Create a hidden VBS launcher to avoid console window flicker
21+
FileOpen $0 "$INSTDIR\${AppName}.vbs" w
22+
FileWrite $0 "Set oShell = CreateObject(\"WScript.Shell\")\r\n"
23+
FileWrite $0 "oShell.Run Chr(34) & \"$INSTDIR\\SSH-Studio (MSYS2).bat\" & Chr(34), 0\r\n"
24+
FileClose $0
25+
26+
; Create Start Menu folder
27+
CreateDirectory "$SMPROGRAMS\${AppName}"
28+
29+
; Create shortcuts pointing to the VBS (no console)
30+
CreateShortCut "$DESKTOP\${AppName}.lnk" "$INSTDIR\${AppName}.vbs"
31+
CreateShortCut "$SMPROGRAMS\${AppName}\${AppName}.lnk" "$INSTDIR\${AppName}.vbs"
32+
SectionEnd
33+
34+
Section -Post
35+
WriteUninstaller "$INSTDIR\Uninstall.exe"
36+
WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\${AppName}" "DisplayName" "${AppName}"
37+
WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\${AppName}" "UninstallString" "$INSTDIR\Uninstall.exe"
38+
WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\${AppName}" "DisplayVersion" "${AppVersion}"
39+
WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\${AppName}" "Publisher" "${CompanyName}"
40+
CreateShortCut "$SMPROGRAMS\${AppName}\Uninstall ${AppName}.lnk" "$INSTDIR\Uninstall.exe"
41+
SectionEnd
42+
43+
Section "Uninstall"
44+
RMDir /r "$INSTDIR"
45+
DeleteRegKey HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\${AppName}"
46+
RMDir /r "$SMPROGRAMS\${AppName}"
47+
SectionEnd
48+
49+

0 commit comments

Comments
 (0)