Skip to content

Commit c25f83b

Browse files
automated-signaljamiebuilds-signal
andauthoredJan 7, 2025
Upgrade electron-builder
Co-authored-by: Jamie Kyle <113370520+jamiebuilds-signal@users.noreply.github.com>
1 parent 2e9dc38 commit c25f83b

File tree

7 files changed

+1461
-1134
lines changed

7 files changed

+1461
-1134
lines changed
 

‎package-lock.json

Lines changed: 1378 additions & 861 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

‎package.json

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
{
2+
"$schema": "./package.schema.json",
23
"name": "signal-desktop",
34
"productName": "Signal",
45
"description": "Private messaging from your desktop",
@@ -283,7 +284,7 @@
283284
"danger": "12.3.3",
284285
"debug": "4.3.7",
285286
"electron": "33.2.1",
286-
"electron-builder": "24.13.3",
287+
"electron-builder": "26.0.0-alpha.8",
287288
"electron-mocha": "13.0.1",
288289
"endanger": "7.0.4",
289290
"enquirer": "2.4.1",
@@ -303,8 +304,8 @@
303304
"log-symbols": "4.1.0",
304305
"mini-css-extract-plugin": "2.9.2",
305306
"mocha": "10.8.2",
306-
"node-gyp": "10.2.0",
307-
"node-gyp-build": "4.8.3",
307+
"node-gyp": "11.0.0",
308+
"node-gyp-build": "4.8.4",
308309
"npm-run-all": "4.1.5",
309310
"p-limit": "3.1.0",
310311
"patch-package": "8.0.0",
@@ -441,9 +442,6 @@
441442
},
442443
"linux": {
443444
"category": "Network;InstantMessaging;Chat",
444-
"desktop": {
445-
"StartupWMClass": "Signal"
446-
},
447445
"target": [
448446
"deb"
449447
],

‎package.schema.json

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
{
2+
"allOf": [
3+
{
4+
"$ref": "https://json.schemastore.org/package.json"
5+
},
6+
{
7+
"type": "object",
8+
"properties": {
9+
"build": {
10+
"$ref": "./node_modules/app-builder-lib/scheme.json"
11+
}
12+
}
13+
}
14+
]
15+
}

‎patches/app-builder-lib+24.13.3.patch

Lines changed: 0 additions & 260 deletions
This file was deleted.
Lines changed: 63 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,63 @@
1+
diff --git a/node_modules/app-builder-lib/templates/nsis/include/installer.nsh b/node_modules/app-builder-lib/templates/nsis/include/installer.nsh
2+
index 34e91df..73bfffc 100644
3+
--- a/node_modules/app-builder-lib/templates/nsis/include/installer.nsh
4+
+++ b/node_modules/app-builder-lib/templates/nsis/include/installer.nsh
5+
@@ -90,7 +90,13 @@
6+
${if} $installMode == "all"
7+
SetShellVarContext current
8+
${endif}
9+
- !insertmacro copyFile "$EXEPATH" "$LOCALAPPDATA\${APP_INSTALLER_STORE_FILE}"
10+
+ # SIGNAL CHANGE START
11+
+ # This file is needed for electron-builder's native incremental updates,
12+
+ # but we have our own system so no need to place it. Clean it up instead.
13+
+ #
14+
+ # !insertmacro copyFile "$EXEPATH" "$LOCALAPPDATA\${APP_INSTALLER_STORE_FILE}"
15+
+ RMDir /r /REBOOTOK "$LOCALAPPDATA\signal-desktop-updater"
16+
+ # SIGNAL CHANGE END
17+
${if} $installMode == "all"
18+
SetShellVarContext all
19+
${endif}
20+
diff --git a/node_modules/app-builder-lib/templates/nsis/installSection.nsh b/node_modules/app-builder-lib/templates/nsis/installSection.nsh
21+
index 053772f..a58ea8c 100644
22+
--- a/node_modules/app-builder-lib/templates/nsis/installSection.nsh
23+
+++ b/node_modules/app-builder-lib/templates/nsis/installSection.nsh
24+
@@ -22,11 +22,37 @@ StrCpy $appExe "$INSTDIR\${APP_EXECUTABLE_FILENAME}"
25+
SpiderBanner::Show /MODERN
26+
!endif
27+
28+
+ # Set text (1000 is the id of text element of SpiderBanner)
29+
FindWindow $0 "#32770" "" $hwndparent
30+
FindWindow $0 "#32770" "" $hwndparent $0
31+
- GetDlgItem $0 $0 1000
32+
- SendMessage $0 ${WM_SETTEXT} 0 "STR:$(installing)"
33+
34+
+ GetDlgItem $1 $0 1000
35+
+ SendMessage $1 ${WM_SETTEXT} 0 "STR:$(installing)"
36+
+
37+
+ # Set header image compatible with "ManifestDPIAware" mode.
38+
+ !ifdef HEADER_ICO
39+
+ # Convert 24 Dialog Units to pixels:
40+
+ # See https://github.com/mozilla/gecko-dev/blob/8de0e699002872d969aebf1bc8407e5c839a4472/toolkit/mozapps/installer/windows/nsis/common.nsh#L8801
41+
+
42+
+ # rect = LPRect { .left = 0, .top = 0, .right = 24, .bottom = 0 }
43+
+ # See https://nsis.sourceforge.io/Docs/System/System.html#faq
44+
+ System::Call "*(i 0, i 0, i 24, i 0) p.r1"
45+
+
46+
+ # Call `MapDialogRect(window, &rect)`
47+
+ System::Call `user32::MapDialogRect(p $0, p r1)`
48+
+
49+
+ # rect.right now contains the converted value (24du => ?px).
50+
+ # Place `rect.right` into `r2`
51+
+ System::Call "*$1(i, i, i.r2, i)"
52+
+ System::Free $1
53+
+
54+
+ # Load image and pass `r2` as both width and height, get the image handle
55+
+ # back to `r2` register.
56+
+ System::Call `user32::LoadImage(i 0, t "$PLUGINSDIR\installerHeaderico.ico", i ${IMAGE_ICON}, i r2, i r2, i ${LR_LOADFROMFILE}) i.r2`
57+
+ # 1025 is the id of the icon of SpiderBanner.
58+
+ GetDlgItem $1 $0 1025
59+
+ SendMessage $1 ${STM_SETIMAGE} ${IMAGE_ICON} $2
60+
+ !endif
61+
StrCpy $1 $hwndparent
62+
System::Call 'user32::ShutdownBlockReasonCreate(${SYSTYPE_PTR}r1, w "$(installing)")'
63+
${endif}

‎patches/dmg-builder+24.13.3.patch renamed to ‎patches/dmg-builder+26.0.0-alpha.8.patch

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
diff --git a/node_modules/dmg-builder/out/dmgLicense.js b/node_modules/dmg-builder/out/dmgLicense.js
2-
index b91be7d..dad9ceb 100644
2+
index 9263c2b..40706e5 100644
33
--- a/node_modules/dmg-builder/out/dmgLicense.js
44
+++ b/node_modules/dmg-builder/out/dmgLicense.js
55
@@ -6,7 +6,7 @@ const js_yaml_1 = require("js-yaml");

‎scripts/prepare_alpha_build.js

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -36,10 +36,6 @@ const APP_ID_PATH = 'build.appId';
3636
const PRODUCTION_APP_ID = 'org.whispersystems.signal-desktop';
3737
const ALPHA_APP_ID = 'org.whispersystems.signal-desktop-alpha';
3838

39-
const STARTUP_WM_CLASS_PATH = 'build.linux.desktop.StartupWMClass';
40-
const PRODUCTION_STARTUP_WM_CLASS = 'Signal';
41-
const ALPHA_STARTUP_WM_CLASS = 'Signal Alpha';
42-
4339
const DESKTOP_NAME_PATH = 'desktopName';
4440

4541
// Note: we're avoiding dashes in our .desktop name due to xdg-settings behavior
@@ -61,15 +57,13 @@ function checkValue(object, objectPath, expected) {
6157
checkValue(packageJson, NAME_PATH, PRODUCTION_NAME);
6258
checkValue(packageJson, PRODUCT_NAME_PATH, PRODUCTION_PRODUCT_NAME);
6359
checkValue(packageJson, APP_ID_PATH, PRODUCTION_APP_ID);
64-
checkValue(packageJson, STARTUP_WM_CLASS_PATH, PRODUCTION_STARTUP_WM_CLASS);
6560
checkValue(packageJson, DESKTOP_NAME_PATH, PRODUCTION_DESKTOP_NAME);
6661

6762
// -------
6863

6964
_.set(packageJson, NAME_PATH, ALPHA_NAME);
7065
_.set(packageJson, PRODUCT_NAME_PATH, ALPHA_PRODUCT_NAME);
7166
_.set(packageJson, APP_ID_PATH, ALPHA_APP_ID);
72-
_.set(packageJson, STARTUP_WM_CLASS_PATH, ALPHA_STARTUP_WM_CLASS);
7367
_.set(packageJson, DESKTOP_NAME_PATH, ALPHA_DESKTOP_NAME);
7468

7569
// -------

0 commit comments

Comments
 (0)
Please sign in to comment.