1
0
mirror of https://github.com/laurent22/joplin.git synced 2025-01-02 12:47:41 +02:00

Desktop: Resolves #8258: Upgrade to Electron 25 (#8451)

This commit is contained in:
Henry Heino 2023-07-12 08:00:30 -07:00 committed by GitHub
parent c0fe29ec82
commit a354feb626
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
6 changed files with 371 additions and 700 deletions

View File

@ -194,7 +194,12 @@ if [[ $GIT_TAG_NAME = v* ]]; then
# It can be removed once we upgrade to electron-builder@23, however we # It can be removed once we upgrade to electron-builder@23, however we
# cannot currently do this due to this error: # cannot currently do this due to this error:
# https://github.com/laurent22/joplin/issues/8149 # https://github.com/laurent22/joplin/issues/8149
PYTHON_PATH=$(which python) USE_HARD_LINKS=false yarn run dist #
# electron-builder@24, however, still expects the python binary to be named
# "python" and seems to no longer respect the PYTHON_PATH environment variable.
# We work around this by aliasing python.
alias python=$(which python3)
USE_HARD_LINKS=false yarn run dist
else else
USE_HARD_LINKS=false yarn run dist USE_HARD_LINKS=false yarn run dist
fi fi
@ -207,7 +212,8 @@ else
if [ "$IS_MACOS" == "1" ]; then if [ "$IS_MACOS" == "1" ]; then
# See above why we need to specify Python # See above why we need to specify Python
PYTHON_PATH=$(which python) USE_HARD_LINKS=false yarn run dist --publish=never alias python=$(which python3)
USE_HARD_LINKS=false yarn run dist --publish=never
else else
USE_HARD_LINKS=false yarn run dist --publish=never USE_HARD_LINKS=false yarn run dist --publish=never
fi fi

View File

@ -0,0 +1,13 @@
diff --git a/templates/nsis/include/allowOnlyOneInstallerInstance.nsh b/templates/nsis/include/allowOnlyOneInstallerInstance.nsh
index a1fd1875d852ff69c087a3103eff827c20d37ca5..5222614ddad3276876857e7a9dde4017a6b9fc85 100644
--- a/templates/nsis/include/allowOnlyOneInstallerInstance.nsh
+++ b/templates/nsis/include/allowOnlyOneInstallerInstance.nsh
@@ -42,7 +42,7 @@
${nsProcess::FindProcess} "${_FILE}" ${_ERR}
!else
# find process owned by current user
- nsExec::Exec `cmd /c tasklist /FI "USERNAME eq %USERNAME%" /FI "IMAGENAME eq ${_FILE}" | %SYSTEMROOT%\System32\find.exe "${_FILE}"`
+ nsExec::Exec `cmd /c tasklist /FI "USERNAME eq %USERNAME%" /FI "PID ne $pid" /FI "IMAGENAME eq ${_FILE}" | %SYSTEMROOT%\System32\find.exe "${_FILE}"`
Pop ${_ERR}
!endif
!macroend

View File

@ -98,6 +98,7 @@
"react-native-camera@4.2.1": "patch:react-native-camera@npm%3A4.2.1#./.yarn/patches/react-native-camera-npm-4.2.1-24b2600a7e.patch", "react-native-camera@4.2.1": "patch:react-native-camera@npm%3A4.2.1#./.yarn/patches/react-native-camera-npm-4.2.1-24b2600a7e.patch",
"react-native-vosk@0.1.12": "patch:react-native-vosk@npm%3A0.1.12#./.yarn/patches/react-native-vosk-npm-0.1.12-76b1caaae8.patch", "react-native-vosk@0.1.12": "patch:react-native-vosk@npm%3A0.1.12#./.yarn/patches/react-native-vosk-npm-0.1.12-76b1caaae8.patch",
"eslint@8.39.0": "patch:eslint@npm%3A8.39.0#./.yarn/patches/eslint-npm-8.39.0-d92bace04d.patch", "eslint@8.39.0": "patch:eslint@npm%3A8.39.0#./.yarn/patches/eslint-npm-8.39.0-d92bace04d.patch",
"eslint@^8.13.0": "patch:eslint@npm%3A8.39.0#./.yarn/patches/eslint-npm-8.39.0-d92bace04d.patch" "eslint@^8.13.0": "patch:eslint@npm%3A8.39.0#./.yarn/patches/eslint-npm-8.39.0-d92bace04d.patch",
"app-builder-lib@24.4.0": "patch:app-builder-lib@npm%3A24.4.0#./.yarn/patches/app-builder-lib-npm-24.4.0-05322ff057.patch"
} }
} }

View File

@ -107,6 +107,7 @@
}, },
"homepage": "https://github.com/laurent22/joplin#readme", "homepage": "https://github.com/laurent22/joplin#readme",
"devDependencies": { "devDependencies": {
"@electron/rebuild": "3.2.13",
"@joplin/tools": "~2.12", "@joplin/tools": "~2.12",
"@testing-library/react-hooks": "8.0.1", "@testing-library/react-hooks": "8.0.1",
"@types/jest": "29.5.1", "@types/jest": "29.5.1",
@ -114,9 +115,8 @@
"@types/react": "16.14.41", "@types/react": "16.14.41",
"@types/react-redux": "7.1.25", "@types/react-redux": "7.1.25",
"@types/styled-components": "5.1.26", "@types/styled-components": "5.1.26",
"electron": "19.1.4", "electron": "25.2.0",
"electron-builder": "22.11.7", "electron-builder": "24.4.0",
"electron-rebuild": "3.2.9",
"glob": "10.2.7", "glob": "10.2.7",
"gulp": "4.0.2", "gulp": "4.0.2",
"jest": "29.5.0", "jest": "29.5.0",

View File

@ -21,7 +21,7 @@ async function main() {
// wrong one. However it means it will have to be manually upgraded for each // wrong one. However it means it will have to be manually upgraded for each
// new Electron release. Some ABI map there: // new Electron release. Some ABI map there:
// https://github.com/electron/node-abi/tree/master/test // https://github.com/electron/node-abi/tree/master/test
const forceAbiArgs = '--force-abi 89'; const forceAbiArgs = '--force-abi 116';
if (isWindows()) { if (isWindows()) {
// Cannot run this in parallel, or the 64-bit version might end up // Cannot run this in parallel, or the 64-bit version might end up

1037
yarn.lock

File diff suppressed because it is too large Load Diff