app-builder-lib 22.14.10 → 22.14.11

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -1,5 +1,12 @@
1
1
  # app-builder-lib
2
2
 
3
+ ## 22.14.11
4
+
5
+ ### Patch Changes
6
+
7
+ - [#6472](https://github.com/electron-userland/electron-builder/pull/6472) [`e3d06afa`](https://github.com/electron-userland/electron-builder/commit/e3d06afae1236d44e4b6e670b453b260b1f74d84) Thanks [@I-Otsuki](https://github.com/I-Otsuki)! - fix(nsis): Ignore other users processes when installing for only current user
8
+ Closes #6104
9
+
3
10
  ## 22.14.10
4
11
 
5
12
  ### Patch Changes
package/out/version.d.ts CHANGED
@@ -1 +1 @@
1
- export declare const PACKAGE_VERSION = "22.14.10";
1
+ export declare const PACKAGE_VERSION = "22.14.11";
package/out/version.js CHANGED
@@ -1,5 +1,5 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.PACKAGE_VERSION = void 0;
4
- exports.PACKAGE_VERSION = "22.14.10";
4
+ exports.PACKAGE_VERSION = "22.14.11";
5
5
  //# sourceMappingURL=version.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"version.js","sourceRoot":"","sources":["../src/version.ts"],"names":[],"mappings":";;;AAAa,QAAA,eAAe,GAAG,UAAU,CAAA","sourcesContent":["export const PACKAGE_VERSION = \"22.14.10\"\n"]}
1
+ {"version":3,"file":"version.js","sourceRoot":"","sources":["../src/version.ts"],"names":[],"mappings":";;;AAAa,QAAA,eAAe,GAAG,UAAU,CAAA","sourcesContent":["export const PACKAGE_VERSION = \"22.14.11\"\n"]}
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "app-builder-lib",
3
3
  "description": "electron-builder lib",
4
- "version": "22.14.10",
4
+ "version": "22.14.11",
5
5
  "main": "out/index.js",
6
6
  "files": [
7
7
  "out",
@@ -96,13 +96,13 @@
96
96
  "@babel/preset-react": "7.14.5",
97
97
  "@types/debug": "4.1.7",
98
98
  "@types/ejs": "3.1.0",
99
- "@types/fs-extra": "9.0.12",
99
+ "@types/fs-extra": "9.0.13",
100
100
  "@types/hosted-git-info": "3.0.2",
101
101
  "@types/is-ci": "3.0.0",
102
102
  "@types/js-yaml": "4.0.3",
103
103
  "@types/semver": "7.3.8",
104
- "dmg-builder": "22.14.10",
105
- "electron-builder-squirrel-windows": "22.14.10"
104
+ "dmg-builder": "22.14.11",
105
+ "electron-builder-squirrel-windows": "22.14.11"
106
106
  },
107
107
  "//": "electron-builder-squirrel-windows and dmg-builder added as dev dep for tests (as otherwise `require` doesn't work using Yarn 2)",
108
108
  "typings": "./out/index.d.ts"
@@ -35,6 +35,16 @@
35
35
  !endif
36
36
  !macroend
37
37
 
38
+ !macro FIND_PROCESS _FILE _ERR
39
+ !ifdef INSTALL_MODE_PER_ALL_USERS
40
+ ${nsProcess::FindProcess} "${_FILE}" ${_ERR}
41
+ !else
42
+ # find process owned by current user
43
+ nsExec::Exec `cmd /c tasklist /FI "USERNAME eq %USERNAME%" /FI "IMAGENAME eq ${_FILE}" | find "${_FILE}"`
44
+ Pop ${_ERR}
45
+ !endif
46
+ !macroend
47
+
38
48
  !macro _CHECK_APP_RUNNING
39
49
  ${GetProcessInfo} 0 $pid $1 $2 $3 $4
40
50
  ${if} $3 != "${APP_EXECUTABLE_FILENAME}"
@@ -43,7 +53,7 @@
43
53
  Sleep 300
44
54
  ${endIf}
45
55
 
46
- ${nsProcess::FindProcess} "${APP_EXECUTABLE_FILENAME}" $R0
56
+ !insertmacro FIND_PROCESS "${APP_EXECUTABLE_FILENAME}" $R0
47
57
  ${if} $R0 == 0
48
58
  ${if} ${isUpdated}
49
59
  # allow app to exit without explicit kill
@@ -58,7 +68,11 @@
58
68
  DetailPrint `Closing running "${PRODUCT_NAME}"...`
59
69
 
60
70
  # https://github.com/electron-userland/electron-builder/issues/2516#issuecomment-372009092
61
- nsExec::Exec `taskkill /im "${APP_EXECUTABLE_FILENAME}" /fi "PID ne $pid"` $R0
71
+ !ifdef INSTALL_MODE_PER_ALL_USERS
72
+ nsExec::Exec `taskkill /im "${APP_EXECUTABLE_FILENAME}" /fi "PID ne $pid"`
73
+ !else
74
+ nsExec::Exec `cmd /c taskkill /im "${APP_EXECUTABLE_FILENAME}" /fi "PID ne $pid" /fi "USERNAME eq %USERNAME%"`
75
+ !endif
62
76
  # to ensure that files are not "in-use"
63
77
  Sleep 300
64
78
 
@@ -68,13 +82,18 @@
68
82
  loop:
69
83
  IntOp $R1 $R1 + 1
70
84
 
71
- ${nsProcess::FindProcess} "${APP_EXECUTABLE_FILENAME}" $R0
85
+ !insertmacro FIND_PROCESS "${APP_EXECUTABLE_FILENAME}" $R0
72
86
  ${if} $R0 == 0
73
87
  # wait to give a chance to exit gracefully
74
88
  Sleep 1000
75
- nsExec::Exec `taskkill /f /im "${APP_EXECUTABLE_FILENAME}" /fi "PID ne $pid"` $R0
76
- ${If} $R0 != 0
77
- DetailPrint `Waiting for "${PRODUCT_NAME}" to close (taskkill exit code $R0).`
89
+ !ifdef INSTALL_MODE_PER_ALL_USERS
90
+ nsExec::Exec `taskkill /f /im "${APP_EXECUTABLE_FILENAME}" /fi "PID ne $pid"`
91
+ !else
92
+ nsExec::Exec `cmd /c taskkill /f /im "${APP_EXECUTABLE_FILENAME}" /fi "PID ne $pid" /fi "USERNAME eq %USERNAME%"`
93
+ !endif
94
+ !insertmacro FIND_PROCESS "${APP_EXECUTABLE_FILENAME}" $R0
95
+ ${If} $R0 == 0
96
+ DetailPrint `Waiting for "${PRODUCT_NAME}" to close.`
78
97
  Sleep 2000
79
98
  ${else}
80
99
  Goto not_running