app-builder-lib 26.0.17 → 26.0.19
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/out/binDownload.d.ts +1 -1
- package/out/binDownload.js +5 -3
- package/out/binDownload.js.map +1 -1
- package/out/codeSign/macCodeSign.js +5 -1
- package/out/codeSign/macCodeSign.js.map +1 -1
- package/out/codeSign/windowsCodeSign.js +17 -12
- package/out/codeSign/windowsCodeSign.js.map +1 -1
- package/out/codeSign/windowsSignToolManager.js +13 -8
- package/out/codeSign/windowsSignToolManager.js.map +1 -1
- package/out/node-module-collector/index.d.ts +3 -2
- package/out/node-module-collector/index.js +9 -16
- package/out/node-module-collector/index.js.map +1 -1
- package/out/node-module-collector/nodeModulesCollector.d.ts +5 -1
- package/out/node-module-collector/nodeModulesCollector.js +90 -6
- package/out/node-module-collector/nodeModulesCollector.js.map +1 -1
- package/out/node-module-collector/npmNodeModulesCollector.d.ts +0 -1
- package/out/node-module-collector/npmNodeModulesCollector.js +2 -2
- package/out/node-module-collector/npmNodeModulesCollector.js.map +1 -1
- package/out/node-module-collector/packageManager.js +5 -2
- package/out/node-module-collector/packageManager.js.map +1 -1
- package/out/node-module-collector/pnpmNodeModulesCollector.d.ts +1 -1
- package/out/node-module-collector/pnpmNodeModulesCollector.js +8 -2
- package/out/node-module-collector/pnpmNodeModulesCollector.js.map +1 -1
- package/out/node-module-collector/yarnNodeModulesCollector.d.ts +0 -1
- package/out/node-module-collector/yarnNodeModulesCollector.js +4 -3
- package/out/node-module-collector/yarnNodeModulesCollector.js.map +1 -1
- package/out/targets/FpmTarget.js +0 -3
- package/out/targets/FpmTarget.js.map +1 -1
- package/out/targets/nsis/nsisOptions.d.ts +5 -5
- package/out/targets/nsis/nsisOptions.js.map +1 -1
- package/out/targets/tools.js +25 -13
- package/out/targets/tools.js.map +1 -1
- package/out/util/appFileCopier.js +2 -2
- package/out/util/appFileCopier.js.map +1 -1
- package/out/util/config/load.js +3 -8
- package/out/util/config/load.js.map +1 -1
- package/out/version.d.ts +1 -1
- package/out/version.js +1 -1
- package/out/version.js.map +1 -1
- package/package.json +9 -9
- package/scheme.json +182 -10
- package/templates/nsis/include/allowOnlyOneInstallerInstance.nsh +71 -25
- package/templates/nsis/installer.nsi +7 -0
- package/templates/nsis/messages.yml +3 -0
- package/templates/nsis/multiUser.nsh +43 -2
- package/templates/nsis/uninstaller.nsh +10 -1
package/scheme.json
CHANGED
|
@@ -7,6 +7,9 @@
|
|
|
7
7
|
{
|
|
8
8
|
"$ref": "#/definitions/GithubOptions"
|
|
9
9
|
},
|
|
10
|
+
{
|
|
11
|
+
"$ref": "#/definitions/GitlabOptions"
|
|
12
|
+
},
|
|
10
13
|
{
|
|
11
14
|
"$ref": "#/definitions/S3Options"
|
|
12
15
|
},
|
|
@@ -108,6 +111,9 @@
|
|
|
108
111
|
{
|
|
109
112
|
"$ref": "#/definitions/GithubOptions"
|
|
110
113
|
},
|
|
114
|
+
{
|
|
115
|
+
"$ref": "#/definitions/GitlabOptions"
|
|
116
|
+
},
|
|
111
117
|
{
|
|
112
118
|
"$ref": "#/definitions/S3Options"
|
|
113
119
|
},
|
|
@@ -256,6 +262,9 @@
|
|
|
256
262
|
{
|
|
257
263
|
"$ref": "#/definitions/GithubOptions"
|
|
258
264
|
},
|
|
265
|
+
{
|
|
266
|
+
"$ref": "#/definitions/GitlabOptions"
|
|
267
|
+
},
|
|
259
268
|
{
|
|
260
269
|
"$ref": "#/definitions/S3Options"
|
|
261
270
|
},
|
|
@@ -732,6 +741,9 @@
|
|
|
732
741
|
{
|
|
733
742
|
"$ref": "#/definitions/GithubOptions"
|
|
734
743
|
},
|
|
744
|
+
{
|
|
745
|
+
"$ref": "#/definitions/GitlabOptions"
|
|
746
|
+
},
|
|
735
747
|
{
|
|
736
748
|
"$ref": "#/definitions/S3Options"
|
|
737
749
|
},
|
|
@@ -911,6 +923,9 @@
|
|
|
911
923
|
{
|
|
912
924
|
"$ref": "#/definitions/GithubOptions"
|
|
913
925
|
},
|
|
926
|
+
{
|
|
927
|
+
"$ref": "#/definitions/GitlabOptions"
|
|
928
|
+
},
|
|
914
929
|
{
|
|
915
930
|
"$ref": "#/definitions/S3Options"
|
|
916
931
|
},
|
|
@@ -1270,6 +1285,9 @@
|
|
|
1270
1285
|
{
|
|
1271
1286
|
"$ref": "#/definitions/GithubOptions"
|
|
1272
1287
|
},
|
|
1288
|
+
{
|
|
1289
|
+
"$ref": "#/definitions/GitlabOptions"
|
|
1290
|
+
},
|
|
1273
1291
|
{
|
|
1274
1292
|
"$ref": "#/definitions/S3Options"
|
|
1275
1293
|
},
|
|
@@ -1592,6 +1610,88 @@
|
|
|
1592
1610
|
],
|
|
1593
1611
|
"type": "object"
|
|
1594
1612
|
},
|
|
1613
|
+
"GitlabOptions": {
|
|
1614
|
+
"additionalProperties": false,
|
|
1615
|
+
"description": "[GitLab](https://docs.gitlab.com/ee/user/project/releases/) options.\n\nGitLab [personal access token](https://docs.gitlab.com/ee/user/profile/personal_access_tokens.html) is required for private repositories. You can generate one by going to your GitLab profile settings.\nDefine `GITLAB_TOKEN` environment variable.",
|
|
1616
|
+
"properties": {
|
|
1617
|
+
"channel": {
|
|
1618
|
+
"default": "latest",
|
|
1619
|
+
"description": "The channel.",
|
|
1620
|
+
"type": [
|
|
1621
|
+
"null",
|
|
1622
|
+
"string"
|
|
1623
|
+
]
|
|
1624
|
+
},
|
|
1625
|
+
"host": {
|
|
1626
|
+
"default": "gitlab.com",
|
|
1627
|
+
"description": "The host (including the port if needed).",
|
|
1628
|
+
"type": [
|
|
1629
|
+
"null",
|
|
1630
|
+
"string"
|
|
1631
|
+
]
|
|
1632
|
+
},
|
|
1633
|
+
"projectId": {
|
|
1634
|
+
"description": "The GitLab project ID or namespace/project-name.",
|
|
1635
|
+
"type": [
|
|
1636
|
+
"string",
|
|
1637
|
+
"number"
|
|
1638
|
+
]
|
|
1639
|
+
},
|
|
1640
|
+
"provider": {
|
|
1641
|
+
"const": "gitlab",
|
|
1642
|
+
"description": "The provider. Must be `gitlab`.",
|
|
1643
|
+
"type": "string"
|
|
1644
|
+
},
|
|
1645
|
+
"publishAutoUpdate": {
|
|
1646
|
+
"default": true,
|
|
1647
|
+
"description": "Whether to publish auto update info files.\n\nAuto update relies only on the first provider in the list (you can specify several publishers).\nThus, probably, there`s no need to upload the metadata files for the other configured providers. But by default will be uploaded.",
|
|
1648
|
+
"type": "boolean"
|
|
1649
|
+
},
|
|
1650
|
+
"publisherName": {
|
|
1651
|
+
"anyOf": [
|
|
1652
|
+
{
|
|
1653
|
+
"items": {
|
|
1654
|
+
"type": "string"
|
|
1655
|
+
},
|
|
1656
|
+
"type": "array"
|
|
1657
|
+
},
|
|
1658
|
+
{
|
|
1659
|
+
"type": "null"
|
|
1660
|
+
}
|
|
1661
|
+
]
|
|
1662
|
+
},
|
|
1663
|
+
"requestHeaders": {
|
|
1664
|
+
"$ref": "#/definitions/OutgoingHttpHeaders",
|
|
1665
|
+
"description": "Any custom request headers"
|
|
1666
|
+
},
|
|
1667
|
+
"timeout": {
|
|
1668
|
+
"default": 120000,
|
|
1669
|
+
"description": "Request timeout in milliseconds. (Default is 2 minutes; O is ignored)",
|
|
1670
|
+
"type": [
|
|
1671
|
+
"null",
|
|
1672
|
+
"number"
|
|
1673
|
+
]
|
|
1674
|
+
},
|
|
1675
|
+
"token": {
|
|
1676
|
+
"description": "The access token to support auto-update from private GitLab repositories. Never specify it in the configuration files. Only for [setFeedURL](./auto-update.md#appupdatersetfeedurloptions).",
|
|
1677
|
+
"type": [
|
|
1678
|
+
"null",
|
|
1679
|
+
"string"
|
|
1680
|
+
]
|
|
1681
|
+
},
|
|
1682
|
+
"updaterCacheDirName": {
|
|
1683
|
+
"type": [
|
|
1684
|
+
"null",
|
|
1685
|
+
"string"
|
|
1686
|
+
]
|
|
1687
|
+
}
|
|
1688
|
+
},
|
|
1689
|
+
"required": [
|
|
1690
|
+
"projectId",
|
|
1691
|
+
"provider"
|
|
1692
|
+
],
|
|
1693
|
+
"type": "object"
|
|
1694
|
+
},
|
|
1595
1695
|
"KeygenOptions": {
|
|
1596
1696
|
"additionalProperties": false,
|
|
1597
1697
|
"description": "Keygen options.\nhttps://keygen.sh/\nDefine `KEYGEN_TOKEN` environment variable.",
|
|
@@ -2001,6 +2101,9 @@
|
|
|
2001
2101
|
{
|
|
2002
2102
|
"$ref": "#/definitions/GithubOptions"
|
|
2003
2103
|
},
|
|
2104
|
+
{
|
|
2105
|
+
"$ref": "#/definitions/GitlabOptions"
|
|
2106
|
+
},
|
|
2004
2107
|
{
|
|
2005
2108
|
"$ref": "#/definitions/S3Options"
|
|
2006
2109
|
},
|
|
@@ -2273,6 +2376,9 @@
|
|
|
2273
2376
|
{
|
|
2274
2377
|
"$ref": "#/definitions/GithubOptions"
|
|
2275
2378
|
},
|
|
2379
|
+
{
|
|
2380
|
+
"$ref": "#/definitions/GitlabOptions"
|
|
2381
|
+
},
|
|
2276
2382
|
{
|
|
2277
2383
|
"$ref": "#/definitions/S3Options"
|
|
2278
2384
|
},
|
|
@@ -2778,6 +2884,9 @@
|
|
|
2778
2884
|
{
|
|
2779
2885
|
"$ref": "#/definitions/GithubOptions"
|
|
2780
2886
|
},
|
|
2887
|
+
{
|
|
2888
|
+
"$ref": "#/definitions/GitlabOptions"
|
|
2889
|
+
},
|
|
2781
2890
|
{
|
|
2782
2891
|
"$ref": "#/definitions/S3Options"
|
|
2783
2892
|
},
|
|
@@ -3410,6 +3519,9 @@
|
|
|
3410
3519
|
{
|
|
3411
3520
|
"$ref": "#/definitions/GithubOptions"
|
|
3412
3521
|
},
|
|
3522
|
+
{
|
|
3523
|
+
"$ref": "#/definitions/GitlabOptions"
|
|
3524
|
+
},
|
|
3413
3525
|
{
|
|
3414
3526
|
"$ref": "#/definitions/S3Options"
|
|
3415
3527
|
},
|
|
@@ -3692,6 +3804,9 @@
|
|
|
3692
3804
|
{
|
|
3693
3805
|
"$ref": "#/definitions/GithubOptions"
|
|
3694
3806
|
},
|
|
3807
|
+
{
|
|
3808
|
+
"$ref": "#/definitions/GitlabOptions"
|
|
3809
|
+
},
|
|
3695
3810
|
{
|
|
3696
3811
|
"$ref": "#/definitions/S3Options"
|
|
3697
3812
|
},
|
|
@@ -3818,6 +3933,9 @@
|
|
|
3818
3933
|
{
|
|
3819
3934
|
"$ref": "#/definitions/GithubOptions"
|
|
3820
3935
|
},
|
|
3936
|
+
{
|
|
3937
|
+
"$ref": "#/definitions/GitlabOptions"
|
|
3938
|
+
},
|
|
3821
3939
|
{
|
|
3822
3940
|
"$ref": "#/definitions/S3Options"
|
|
3823
3941
|
},
|
|
@@ -4095,6 +4213,9 @@
|
|
|
4095
4213
|
{
|
|
4096
4214
|
"$ref": "#/definitions/GithubOptions"
|
|
4097
4215
|
},
|
|
4216
|
+
{
|
|
4217
|
+
"$ref": "#/definitions/GitlabOptions"
|
|
4218
|
+
},
|
|
4098
4219
|
{
|
|
4099
4220
|
"$ref": "#/definitions/S3Options"
|
|
4100
4221
|
},
|
|
@@ -4167,23 +4288,38 @@
|
|
|
4167
4288
|
"uninstallDisplayName": {
|
|
4168
4289
|
"default": "${productName} ${version}",
|
|
4169
4290
|
"description": "The uninstaller display name in the control panel.",
|
|
4170
|
-
"type":
|
|
4291
|
+
"type": [
|
|
4292
|
+
"null",
|
|
4293
|
+
"string"
|
|
4294
|
+
]
|
|
4171
4295
|
},
|
|
4172
4296
|
"uninstallUrlHelp": {
|
|
4173
4297
|
"description": "The URL to the uninstaller help page in the control panel. Defaults to [homepage](./configuration.md#homepage) from application package.json.",
|
|
4174
|
-
"type":
|
|
4298
|
+
"type": [
|
|
4299
|
+
"null",
|
|
4300
|
+
"string"
|
|
4301
|
+
]
|
|
4175
4302
|
},
|
|
4176
4303
|
"uninstallUrlInfoAbout": {
|
|
4177
4304
|
"description": "The URL to the uninstaller info about page in the control panel. Defaults to [homepage](./configuration.md#homepage) from application package.json.",
|
|
4178
|
-
"type":
|
|
4305
|
+
"type": [
|
|
4306
|
+
"null",
|
|
4307
|
+
"string"
|
|
4308
|
+
]
|
|
4179
4309
|
},
|
|
4180
4310
|
"uninstallUrlReadme": {
|
|
4181
4311
|
"description": "The URL to the uninstaller readme page in the control panel. Defaults to [homepage](./configuration.md#homepage) from application package.json.",
|
|
4182
|
-
"type":
|
|
4312
|
+
"type": [
|
|
4313
|
+
"null",
|
|
4314
|
+
"string"
|
|
4315
|
+
]
|
|
4183
4316
|
},
|
|
4184
4317
|
"uninstallUrlUpdateInfo": {
|
|
4185
4318
|
"description": "The URL to the uninstaller update info page in the control panel. Defaults to [homepage](./configuration.md#homepage) from application package.json.",
|
|
4186
|
-
"type":
|
|
4319
|
+
"type": [
|
|
4320
|
+
"null",
|
|
4321
|
+
"string"
|
|
4322
|
+
]
|
|
4187
4323
|
},
|
|
4188
4324
|
"uninstallerIcon": {
|
|
4189
4325
|
"description": "The path to uninstaller icon, relative to the [build resources](./contents.md#extraresources) or to the project directory.\nDefaults to `build/uninstallerIcon.ico` or application icon.",
|
|
@@ -4428,6 +4564,9 @@
|
|
|
4428
4564
|
{
|
|
4429
4565
|
"$ref": "#/definitions/GithubOptions"
|
|
4430
4566
|
},
|
|
4567
|
+
{
|
|
4568
|
+
"$ref": "#/definitions/GitlabOptions"
|
|
4569
|
+
},
|
|
4431
4570
|
{
|
|
4432
4571
|
"$ref": "#/definitions/S3Options"
|
|
4433
4572
|
},
|
|
@@ -4500,23 +4639,38 @@
|
|
|
4500
4639
|
"uninstallDisplayName": {
|
|
4501
4640
|
"default": "${productName} ${version}",
|
|
4502
4641
|
"description": "The uninstaller display name in the control panel.",
|
|
4503
|
-
"type":
|
|
4642
|
+
"type": [
|
|
4643
|
+
"null",
|
|
4644
|
+
"string"
|
|
4645
|
+
]
|
|
4504
4646
|
},
|
|
4505
4647
|
"uninstallUrlHelp": {
|
|
4506
4648
|
"description": "The URL to the uninstaller help page in the control panel. Defaults to [homepage](./configuration.md#homepage) from application package.json.",
|
|
4507
|
-
"type":
|
|
4649
|
+
"type": [
|
|
4650
|
+
"null",
|
|
4651
|
+
"string"
|
|
4652
|
+
]
|
|
4508
4653
|
},
|
|
4509
4654
|
"uninstallUrlInfoAbout": {
|
|
4510
4655
|
"description": "The URL to the uninstaller info about page in the control panel. Defaults to [homepage](./configuration.md#homepage) from application package.json.",
|
|
4511
|
-
"type":
|
|
4656
|
+
"type": [
|
|
4657
|
+
"null",
|
|
4658
|
+
"string"
|
|
4659
|
+
]
|
|
4512
4660
|
},
|
|
4513
4661
|
"uninstallUrlReadme": {
|
|
4514
4662
|
"description": "The URL to the uninstaller readme page in the control panel. Defaults to [homepage](./configuration.md#homepage) from application package.json.",
|
|
4515
|
-
"type":
|
|
4663
|
+
"type": [
|
|
4664
|
+
"null",
|
|
4665
|
+
"string"
|
|
4666
|
+
]
|
|
4516
4667
|
},
|
|
4517
4668
|
"uninstallUrlUpdateInfo": {
|
|
4518
4669
|
"description": "The URL to the uninstaller update info page in the control panel. Defaults to [homepage](./configuration.md#homepage) from application package.json.",
|
|
4519
|
-
"type":
|
|
4670
|
+
"type": [
|
|
4671
|
+
"null",
|
|
4672
|
+
"string"
|
|
4673
|
+
]
|
|
4520
4674
|
},
|
|
4521
4675
|
"uninstallerIcon": {
|
|
4522
4676
|
"description": "The path to uninstaller icon, relative to the [build resources](./contents.md#extraresources) or to the project directory.\nDefaults to `build/uninstallerIcon.ico` or application icon.",
|
|
@@ -5164,6 +5318,9 @@
|
|
|
5164
5318
|
{
|
|
5165
5319
|
"$ref": "#/definitions/GithubOptions"
|
|
5166
5320
|
},
|
|
5321
|
+
{
|
|
5322
|
+
"$ref": "#/definitions/GitlabOptions"
|
|
5323
|
+
},
|
|
5167
5324
|
{
|
|
5168
5325
|
"$ref": "#/definitions/S3Options"
|
|
5169
5326
|
},
|
|
@@ -5280,6 +5437,9 @@
|
|
|
5280
5437
|
{
|
|
5281
5438
|
"$ref": "#/definitions/GithubOptions"
|
|
5282
5439
|
},
|
|
5440
|
+
{
|
|
5441
|
+
"$ref": "#/definitions/GitlabOptions"
|
|
5442
|
+
},
|
|
5283
5443
|
{
|
|
5284
5444
|
"$ref": "#/definitions/S3Options"
|
|
5285
5445
|
},
|
|
@@ -5837,6 +5997,9 @@
|
|
|
5837
5997
|
{
|
|
5838
5998
|
"$ref": "#/definitions/GithubOptions"
|
|
5839
5999
|
},
|
|
6000
|
+
{
|
|
6001
|
+
"$ref": "#/definitions/GitlabOptions"
|
|
6002
|
+
},
|
|
5840
6003
|
{
|
|
5841
6004
|
"$ref": "#/definitions/S3Options"
|
|
5842
6005
|
},
|
|
@@ -6147,6 +6310,9 @@
|
|
|
6147
6310
|
{
|
|
6148
6311
|
"$ref": "#/definitions/GithubOptions"
|
|
6149
6312
|
},
|
|
6313
|
+
{
|
|
6314
|
+
"$ref": "#/definitions/GitlabOptions"
|
|
6315
|
+
},
|
|
6150
6316
|
{
|
|
6151
6317
|
"$ref": "#/definitions/S3Options"
|
|
6152
6318
|
},
|
|
@@ -6558,6 +6724,9 @@
|
|
|
6558
6724
|
{
|
|
6559
6725
|
"$ref": "#/definitions/GithubOptions"
|
|
6560
6726
|
},
|
|
6727
|
+
{
|
|
6728
|
+
"$ref": "#/definitions/GitlabOptions"
|
|
6729
|
+
},
|
|
6561
6730
|
{
|
|
6562
6731
|
"$ref": "#/definitions/S3Options"
|
|
6563
6732
|
},
|
|
@@ -7594,6 +7763,9 @@
|
|
|
7594
7763
|
{
|
|
7595
7764
|
"$ref": "#/definitions/GithubOptions"
|
|
7596
7765
|
},
|
|
7766
|
+
{
|
|
7767
|
+
"$ref": "#/definitions/GitlabOptions"
|
|
7768
|
+
},
|
|
7597
7769
|
{
|
|
7598
7770
|
"$ref": "#/definitions/S3Options"
|
|
7599
7771
|
},
|
|
@@ -30,22 +30,77 @@
|
|
|
30
30
|
!macroend
|
|
31
31
|
|
|
32
32
|
!macro CHECK_APP_RUNNING
|
|
33
|
-
|
|
34
|
-
|
|
33
|
+
Var /GLOBAL CmdPath
|
|
34
|
+
Var /GLOBAL FindPath
|
|
35
|
+
Var /GLOBAL PowerShellPath
|
|
36
|
+
!ifmacrodef customCheckAppRunning
|
|
37
|
+
!insertmacro customCheckAppRunning
|
|
38
|
+
!else
|
|
39
|
+
StrCpy $CmdPath "$SYSDIR\cmd.exe"
|
|
40
|
+
StrCpy $FindPath "$SYSDIR\find.exe"
|
|
41
|
+
StrCpy $PowerShellPath "$SYSDIR\WindowsPowerShell\v1.0\powershell.exe"
|
|
42
|
+
!insertmacro IS_POWERSHELL_AVAILABLE
|
|
43
|
+
!insertmacro _CHECK_APP_RUNNING
|
|
44
|
+
!endif
|
|
45
|
+
!macroend
|
|
46
|
+
|
|
47
|
+
!macro IS_POWERSHELL_AVAILABLE
|
|
48
|
+
Var /GLOBAL IsPowerShellAvailable ; 0 = available, 1 = not available
|
|
49
|
+
# Try running PowerShell with a simple command to check if it's available
|
|
50
|
+
nsExec::Exec `"$PowerShellPath" -C "if (Get-Command Get-CimInstance -ErrorAction SilentlyContinue) { exit 0 } else { exit 1 }"`
|
|
51
|
+
Pop $0 # Return code (0 = success, other = error)
|
|
52
|
+
|
|
53
|
+
${if} $0 == 0
|
|
54
|
+
# PowerShell is available, check if it's not blocked by policies
|
|
55
|
+
nsExec::Exec `"$PowerShellPath" -C "if ((Get-ExecutionPolicy -Scope Process) -eq 'Restricted') { exit 1 } else { exit 0 }"`
|
|
56
|
+
Pop $0
|
|
57
|
+
${endIf}
|
|
58
|
+
|
|
59
|
+
${if} $0 != 0
|
|
60
|
+
StrCpy $0 1
|
|
61
|
+
${endIf}
|
|
62
|
+
|
|
63
|
+
StrCpy $IsPowerShellAvailable $0
|
|
64
|
+
!macroend
|
|
65
|
+
|
|
66
|
+
!macro FIND_PROCESS _FILE _RETURN
|
|
67
|
+
${if} $IsPowerShellAvailable == 0
|
|
68
|
+
nsExec::Exec `"$PowerShellPath" -C "if ((Get-CimInstance -ClassName Win32_Process | ? {$$_.Path -and $$_.Path.StartsWith('$INSTDIR', 'CurrentCultureIgnoreCase')}).Count -gt 0) { exit 0 } else { exit 1 }"`
|
|
69
|
+
Pop ${_RETURN}
|
|
70
|
+
${else}
|
|
71
|
+
!ifdef INSTALL_MODE_PER_ALL_USERS
|
|
72
|
+
${nsProcess::FindProcess} "${_FILE}" ${_RETURN}
|
|
35
73
|
!else
|
|
36
|
-
|
|
74
|
+
# find process owned by current user
|
|
75
|
+
nsExec::Exec `"$CmdPath" /C tasklist /FI "USERNAME eq %USERNAME%" /FI "IMAGENAME eq ${_FILE}" /FO CSV | "$FindPath" "${_FILE}"`
|
|
76
|
+
Pop ${_RETURN}
|
|
37
77
|
!endif
|
|
78
|
+
${endIf}
|
|
38
79
|
!macroend
|
|
39
80
|
|
|
40
|
-
!macro
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
81
|
+
!macro KILL_PROCESS _FILE _FORCE
|
|
82
|
+
Push $0
|
|
83
|
+
${if} ${_FORCE} == 1
|
|
84
|
+
${if} $IsPowerShellAvailable == 0
|
|
85
|
+
StrCpy $0 "-Force"
|
|
86
|
+
${else}
|
|
87
|
+
StrCpy $0 "/F"
|
|
88
|
+
${endIf}
|
|
89
|
+
${else}
|
|
90
|
+
StrCpy $0 ""
|
|
91
|
+
${endIf}
|
|
92
|
+
|
|
93
|
+
${if} $IsPowerShellAvailable == 0
|
|
94
|
+
nsExec::Exec `"$PowerShellPath" -C "Get-CimInstance -ClassName Win32_Process | ? {$$_.Path -and $$_.Path.StartsWith('$INSTDIR', 'CurrentCultureIgnoreCase')} | % { Stop-Process -Id $$_.ProcessId $0 }"`
|
|
95
|
+
${else}
|
|
96
|
+
!ifdef INSTALL_MODE_PER_ALL_USERS
|
|
97
|
+
nsExec::Exec `taskkill /IM "${_FILE}" /FI "PID ne $pid"`
|
|
98
|
+
!else
|
|
99
|
+
nsExec::Exec `"$CmdPath" /C taskkill $0 /IM "${_FILE}" /FI "PID ne $pid" /FI "USERNAME eq %USERNAME%"`
|
|
100
|
+
!endif
|
|
101
|
+
${endIf}
|
|
102
|
+
Pop $0
|
|
103
|
+
!macroend
|
|
49
104
|
|
|
50
105
|
!macro _CHECK_APP_RUNNING
|
|
51
106
|
${GetProcessInfo} 0 $pid $1 $2 $3 $4
|
|
@@ -67,14 +122,9 @@
|
|
|
67
122
|
|
|
68
123
|
doStopProcess:
|
|
69
124
|
|
|
70
|
-
DetailPrint
|
|
125
|
+
DetailPrint "$(appClosing)"
|
|
71
126
|
|
|
72
|
-
|
|
73
|
-
!ifdef INSTALL_MODE_PER_ALL_USERS
|
|
74
|
-
nsExec::Exec `taskkill /im "${APP_EXECUTABLE_FILENAME}" /fi "PID ne $pid"`
|
|
75
|
-
!else
|
|
76
|
-
nsExec::Exec `"$SYSDIR\cmd.exe" /c taskkill /im "${APP_EXECUTABLE_FILENAME}" /fi "PID ne $pid" /fi "USERNAME eq %USERNAME%"`
|
|
77
|
-
!endif
|
|
127
|
+
!insertmacro KILL_PROCESS "${APP_EXECUTABLE_FILENAME}" 0
|
|
78
128
|
# to ensure that files are not "in-use"
|
|
79
129
|
Sleep 300
|
|
80
130
|
|
|
@@ -88,13 +138,9 @@
|
|
|
88
138
|
${if} $R0 == 0
|
|
89
139
|
# wait to give a chance to exit gracefully
|
|
90
140
|
Sleep 1000
|
|
91
|
-
!
|
|
92
|
-
nsExec::Exec `taskkill /f /im "${APP_EXECUTABLE_FILENAME}" /fi "PID ne $pid"`
|
|
93
|
-
!else
|
|
94
|
-
nsExec::Exec `"$SYSDIR\cmd.exe" /c taskkill /f /im "${APP_EXECUTABLE_FILENAME}" /fi "PID ne $pid" /fi "USERNAME eq %USERNAME%"`
|
|
95
|
-
!endif
|
|
141
|
+
!insertmacro KILL_PROCESS "${APP_EXECUTABLE_FILENAME}" 1 # 1 = force kill
|
|
96
142
|
!insertmacro FIND_PROCESS "${APP_EXECUTABLE_FILENAME}" $R0
|
|
97
|
-
${
|
|
143
|
+
${if} $R0 == 0
|
|
98
144
|
DetailPrint `Waiting for "${PRODUCT_NAME}" to close.`
|
|
99
145
|
Sleep 2000
|
|
100
146
|
${else}
|
|
@@ -10,6 +10,13 @@ Var oldMenuDirectory
|
|
|
10
10
|
!include "multiUser.nsh"
|
|
11
11
|
!include "allowOnlyOneInstallerInstance.nsh"
|
|
12
12
|
|
|
13
|
+
!ifdef BUILD_UNINSTALLER
|
|
14
|
+
!ifmacrodef customUnInstallSection
|
|
15
|
+
!define MUI_COMPONENTSPAGE_NODESC
|
|
16
|
+
!insertmacro MUI_UNPAGE_COMPONENTS
|
|
17
|
+
!endif
|
|
18
|
+
!endif
|
|
19
|
+
|
|
13
20
|
!ifdef INSTALL_MODE_PER_ALL_USERS
|
|
14
21
|
!ifdef BUILD_UNINSTALLER
|
|
15
22
|
RequestExecutionLevel user
|
|
@@ -235,3 +235,6 @@ uninstallFailed:
|
|
|
235
235
|
sv: Det gick inte att avinstallera gamla programfiler. Försök att köra installationsprogrammet igen.
|
|
236
236
|
uk: Не вдалось видалити старі файли застосунку. Будь ласка, спробуйте запустити встановлювач знов.
|
|
237
237
|
zh_TW: 無法俺安裝舊的應用程式檔案。 請嘗試再次執行安裝程式。
|
|
238
|
+
appClosing:
|
|
239
|
+
en: "Closing running ${PRODUCT_NAME}..."
|
|
240
|
+
cs: "Ukončuji aplikaci ${PRODUCT_NAME}..."
|
|
@@ -41,7 +41,7 @@ Var installMode
|
|
|
41
41
|
${endif}
|
|
42
42
|
|
|
43
43
|
# allow /D switch to override installation path https://github.com/electron-userland/electron-builder/issues/1551
|
|
44
|
-
|
|
44
|
+
!insertmacro GetDParameter $R0
|
|
45
45
|
${If} $R0 != ""
|
|
46
46
|
StrCpy $INSTDIR $R0
|
|
47
47
|
${endif}
|
|
@@ -84,10 +84,51 @@ Var installMode
|
|
|
84
84
|
${endif}
|
|
85
85
|
|
|
86
86
|
# allow /D switch to override installation path https://github.com/electron-userland/electron-builder/issues/1551
|
|
87
|
-
|
|
87
|
+
!insertmacro GetDParameter $R0
|
|
88
88
|
${If} $R0 != ""
|
|
89
89
|
StrCpy $INSTDIR $R0
|
|
90
90
|
${endif}
|
|
91
91
|
|
|
92
92
|
!macroend
|
|
93
93
|
!endif
|
|
94
|
+
|
|
95
|
+
# Custom function to handle /D parameter with spaces
|
|
96
|
+
# The /D parameter is special in NSIS - it must be the last parameter and cannot have quotes
|
|
97
|
+
# Use StdUtils.GetParameter to get the full command line, then parse /D= manually
|
|
98
|
+
!macro GetDParameter outVar
|
|
99
|
+
Push $R8
|
|
100
|
+
Push $R9
|
|
101
|
+
Push $R7
|
|
102
|
+
Push $R6
|
|
103
|
+
Push $R5
|
|
104
|
+
|
|
105
|
+
# Get the complete command line using StdUtils (including /D parameter)
|
|
106
|
+
${StdUtils.GetAllParameters} $R8 "0"
|
|
107
|
+
|
|
108
|
+
# Initialize result
|
|
109
|
+
StrCpy $R9 ""
|
|
110
|
+
|
|
111
|
+
# Search for /D= or /d= using a simple loop
|
|
112
|
+
StrLen $R7 $R8
|
|
113
|
+
IntOp $R7 $R7 - 2 # Don't check last 2 characters
|
|
114
|
+
StrCpy $R6 0
|
|
115
|
+
|
|
116
|
+
${Do}
|
|
117
|
+
StrCpy $R5 $R8 3 $R6 # Get 3 characters starting at position $R6
|
|
118
|
+
${If} $R5 == "/D="
|
|
119
|
+
${OrIf} $R5 == "/d="
|
|
120
|
+
# Found /D= or /d=, extract everything after it
|
|
121
|
+
IntOp $R6 $R6 + 3
|
|
122
|
+
StrCpy $R9 $R8 "" $R6
|
|
123
|
+
${Break}
|
|
124
|
+
${EndIf}
|
|
125
|
+
IntOp $R6 $R6 + 1
|
|
126
|
+
${LoopUntil} $R6 > $R7
|
|
127
|
+
|
|
128
|
+
StrCpy ${outVar} $R9
|
|
129
|
+
Pop $R5
|
|
130
|
+
Pop $R6
|
|
131
|
+
Pop $R7
|
|
132
|
+
Pop $R9
|
|
133
|
+
Pop $R8
|
|
134
|
+
!macroend
|
|
@@ -131,7 +131,12 @@ Function un.restoreFiles
|
|
|
131
131
|
Exch $R0
|
|
132
132
|
FunctionEnd
|
|
133
133
|
|
|
134
|
-
|
|
134
|
+
!ifndef UNINSTALL_SECTION_NAME
|
|
135
|
+
!define UNINSTALL_SECTION_NAME "Uninstall"
|
|
136
|
+
!endif
|
|
137
|
+
|
|
138
|
+
Section "un.${UNINSTALL_SECTION_NAME}"
|
|
139
|
+
SectionIn RO
|
|
135
140
|
# for assisted installer we check it here to show progress
|
|
136
141
|
!ifndef ONE_CLICK
|
|
137
142
|
${IfNot} ${Silent}
|
|
@@ -243,3 +248,7 @@ Section "un.install"
|
|
|
243
248
|
!insertmacro quitSuccess
|
|
244
249
|
!endif
|
|
245
250
|
SectionEnd
|
|
251
|
+
|
|
252
|
+
!ifmacrodef customUnInstallSection
|
|
253
|
+
!insertmacro customUnInstallSection
|
|
254
|
+
!endif
|