Skip to content

Commit c83a635

Browse files
author
Shimi Dudkin
committed
fix: sign inner exe before NSIS packaging and add browser download note
- Sign screenmcp-windows.exe with osslsigncode before makensis packages it - Rebuild installer with the signed binary, then sign the installer itself - Add browser download warning note to Windows section of release notes
1 parent 755c2fb commit c83a635

1 file changed

Lines changed: 32 additions & 1 deletion

File tree

.github/workflows/release.yml

Lines changed: 32 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -258,14 +258,43 @@ jobs:
258258
working-directory: windows
259259
run: ./build-installer.sh "${GITHUB_REF_NAME#v}"
260260

261-
- name: Sign Windows installer
261+
- name: Sign inner Windows binary before packaging
262262
if: env.CODE_SIGNING_PFX != ''
263263
env:
264264
CODE_SIGNING_PFX: ${{ secrets.CODE_SIGNING_PFX }}
265265
CODE_SIGNING_PASSWORD: ${{ secrets.CODE_SIGNING_PASSWORD }}
266266
run: |
267267
sudo apt-get install -y osslsigncode
268268
echo "$CODE_SIGNING_PFX" | base64 -d > codesign.pfx
269+
file="windows/target/installer/screenmcp-windows.exe"
270+
osslsigncode sign \
271+
-pkcs12 codesign.pfx \
272+
-pass "$CODE_SIGNING_PASSWORD" \
273+
-ts http://timestamp.digicert.com \
274+
-h sha256 \
275+
-in "$file" \
276+
-out "${file}.signed"
277+
mv "${file}.signed" "$file"
278+
rm codesign.pfx
279+
280+
- name: Rebuild installer with signed binary
281+
if: env.CODE_SIGNING_PFX != ''
282+
env:
283+
CODE_SIGNING_PFX: ${{ secrets.CODE_SIGNING_PFX }}
284+
working-directory: windows/target/installer
285+
run: |
286+
version="${GITHUB_REF_NAME#v}"
287+
sed -i "s/^!define APP_VERSION.*$/!define APP_VERSION \"${version}\"/" installer.nsi
288+
makensis installer.nsi
289+
290+
- name: Sign Windows installer
291+
if: env.CODE_SIGNING_PFX != ''
292+
env:
293+
CODE_SIGNING_PFX: ${{ secrets.CODE_SIGNING_PFX }}
294+
CODE_SIGNING_PASSWORD: ${{ secrets.CODE_SIGNING_PASSWORD }}
295+
run: |
296+
which osslsigncode || sudo apt-get install -y osslsigncode
297+
echo "$CODE_SIGNING_PFX" | base64 -d > codesign.pfx
269298
version="${GITHUB_REF_NAME#v}"
270299
file="windows/target/installer/screenmcp-setup-${version}-x86_64.exe"
271300
osslsigncode sign \
@@ -450,6 +479,8 @@ jobs:
450479
451480
Extract the archive and run `screenmcp-windows.exe`, or use the NSIS installer.
452481
482+
> **Browser may block the download** — click the small arrow (⌄) next to the download and choose **"Keep"**. See [visual guide](https://github.com/shimondoodkin/screenmcp/blob/main/docs/on-windows-how-to-download-new-setup-file.png).
483+
453484
## Linux
454485
455486
Install the `.deb` package:

0 commit comments

Comments
 (0)