Update electron, electron-builder, @electron/fuses
This commit is contained in:
parent
c68fd3d727
commit
674ea824c2
5 changed files with 259 additions and 290 deletions
|
@ -1,87 +0,0 @@
|
|||
diff --git a/node_modules/app-builder-lib/out/targets/LinuxTargetHelper.js b/node_modules/app-builder-lib/out/targets/LinuxTargetHelper.js
|
||||
index 1ff7e89..e1b188c 100644
|
||||
--- a/node_modules/app-builder-lib/out/targets/LinuxTargetHelper.js
|
||||
+++ b/node_modules/app-builder-lib/out/targets/LinuxTargetHelper.js
|
||||
@@ -135,7 +135,7 @@ class LinuxTargetHelper {
|
||||
exec += executableArgs.join(" ");
|
||||
}
|
||||
|
||||
- exec += " %U";
|
||||
+ exec += " --no-sandbox %U";
|
||||
}
|
||||
|
||||
const desktopMeta = {
|
||||
diff --git a/node_modules/app-builder-lib/templates/linux/after-install.tpl b/node_modules/app-builder-lib/templates/linux/after-install.tpl
|
||||
index 16eab30..0077182 100644
|
||||
--- a/node_modules/app-builder-lib/templates/linux/after-install.tpl
|
||||
+++ b/node_modules/app-builder-lib/templates/linux/after-install.tpl
|
||||
@@ -3,8 +3,5 @@
|
||||
# Link to the binary
|
||||
ln -sf '/opt/${productFilename}/${executable}' '/usr/bin/${executable}'
|
||||
|
||||
-# SUID chrome-sandbox for Electron 5+
|
||||
-chmod 4755 '/opt/${productFilename}/chrome-sandbox' || true
|
||||
-
|
||||
update-mime-database /usr/share/mime || true
|
||||
update-desktop-database /usr/share/applications || true
|
||||
diff --git a/node_modules/app-builder-lib/templates/nsis/include/allowOnlyOneInstallerInstance.nsh b/node_modules/app-builder-lib/templates/nsis/include/allowOnlyOneInstallerInstance.nsh
|
||||
index b52822068..3824c785f 100644
|
||||
--- a/node_modules/app-builder-lib/templates/nsis/include/allowOnlyOneInstallerInstance.nsh
|
||||
+++ b/node_modules/app-builder-lib/templates/nsis/include/allowOnlyOneInstallerInstance.nsh
|
||||
@@ -62,16 +62,34 @@
|
||||
# to ensure that files are not "in-use"
|
||||
Sleep 300
|
||||
|
||||
- ${nsProcess::FindProcess} "${APP_EXECUTABLE_FILENAME}" $R0
|
||||
- ${if} $R0 == 0
|
||||
- # wait to give a chance to exit gracefully
|
||||
- Sleep 1000
|
||||
- nsExec::Exec `taskkill /f /im "${APP_EXECUTABLE_FILENAME}" /fi "PID ne $pid"` $R0
|
||||
- ${If} $R0 != 0
|
||||
- DetailPrint `Waiting for "${PRODUCT_NAME}" to close (taskkill exit code $R0).`
|
||||
- Sleep 2000
|
||||
+ # Retry counter
|
||||
+ StrCpy $R1 0
|
||||
+
|
||||
+ loop:
|
||||
+ IntOp $R1 $R1 + 1
|
||||
+
|
||||
+ ${nsProcess::FindProcess} "${APP_EXECUTABLE_FILENAME}" $R0
|
||||
+ ${if} $R0 == 0
|
||||
+ # wait to give a chance to exit gracefully
|
||||
+ Sleep 1000
|
||||
+ nsExec::Exec `taskkill /f /im "${APP_EXECUTABLE_FILENAME}" /fi "PID ne $pid"` $R0
|
||||
+ ${If} $R0 != 0
|
||||
+ DetailPrint `Waiting for "${PRODUCT_NAME}" to close (taskkill exit code $R0).`
|
||||
+ Sleep 2000
|
||||
+ ${endIf}
|
||||
+ ${else}
|
||||
+ Goto not_running
|
||||
${endIf}
|
||||
- ${endIf}
|
||||
+
|
||||
+ # App likely running with elevated permissions.
|
||||
+ # Ask user to close it manually
|
||||
+ ${if} $R1 > 1
|
||||
+ MessageBox MB_RETRYCANCEL|MB_ICONEXCLAMATION "$(appCannotBeClosed)" /SD IDCANCEL IDRETRY loop
|
||||
+ Quit
|
||||
+ ${else}
|
||||
+ Goto loop
|
||||
+ ${endIf}
|
||||
+ not_running:
|
||||
${endIf}
|
||||
${endIf}
|
||||
!macroend
|
||||
diff --git a/node_modules/app-builder-lib/templates/nsis/messages.yml b/node_modules/app-builder-lib/templates/nsis/messages.yml
|
||||
index c35df3573..94c8e9e0c 100644
|
||||
--- a/node_modules/app-builder-lib/templates/nsis/messages.yml
|
||||
+++ b/node_modules/app-builder-lib/templates/nsis/messages.yml
|
||||
@@ -66,6 +66,8 @@ appRunning:
|
||||
fi: "${PRODUCT_NAME} on käynnissä. Napsauta OK sulkeaksesi sen."
|
||||
es: "${PRODUCT_NAME} se está ejecutando. Haz clic en Aceptar para cerrarlo."
|
||||
da: "${PRODUCT_NAME} er i gang. Klik OK for at lukke."
|
||||
+appCannotBeClosed:
|
||||
+ en: "${PRODUCT_NAME} cannot be closed. \nPlease close it manually and click Retry to continue"
|
||||
installing:
|
||||
en: Installing, please wait...
|
||||
de: Installation läuft, bitte warten...
|
26
patches/app-builder-lib+22.11.7.patch
Normal file
26
patches/app-builder-lib+22.11.7.patch
Normal file
|
@ -0,0 +1,26 @@
|
|||
diff --git a/node_modules/app-builder-lib/out/targets/LinuxTargetHelper.js b/node_modules/app-builder-lib/out/targets/LinuxTargetHelper.js
|
||||
index ed6b8d3..a74e35b 100644
|
||||
--- a/node_modules/app-builder-lib/out/targets/LinuxTargetHelper.js
|
||||
+++ b/node_modules/app-builder-lib/out/targets/LinuxTargetHelper.js
|
||||
@@ -85,7 +85,7 @@ class LinuxTargetHelper {
|
||||
exec += " ";
|
||||
exec += executableArgs.join(" ");
|
||||
}
|
||||
- exec += " %U";
|
||||
+ exec += " --no-sandbox %U";
|
||||
}
|
||||
const desktopMeta = {
|
||||
Name: appInfo.productName,
|
||||
diff --git a/node_modules/app-builder-lib/templates/linux/after-install.tpl b/node_modules/app-builder-lib/templates/linux/after-install.tpl
|
||||
index 1536059..555f8f5 100644
|
||||
--- a/node_modules/app-builder-lib/templates/linux/after-install.tpl
|
||||
+++ b/node_modules/app-builder-lib/templates/linux/after-install.tpl
|
||||
@@ -3,8 +3,5 @@
|
||||
# Link to the binary
|
||||
ln -sf '/opt/${sanitizedProductName}/${executable}' '/usr/bin/${executable}'
|
||||
|
||||
-# SUID chrome-sandbox for Electron 5+
|
||||
-chmod 4755 '/opt/${sanitizedProductName}/chrome-sandbox' || true
|
||||
-
|
||||
update-mime-database /usr/share/mime || true
|
||||
update-desktop-database /usr/share/applications || true
|
Loading…
Add table
Add a link
Reference in a new issue