app-builder-lib 22.10.1 → 22.10.5
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/electron-osx-sign/index.d.ts +2 -0
- package/electron-osx-sign/index.js +10 -1
- package/electron-osx-sign/sign.js +22 -14
- package/electron-osx-sign/util.js +32 -14
- package/out/appInfo.d.ts +1 -0
- package/out/appInfo.js +3 -2
- package/out/appInfo.js.map +1 -1
- package/out/asar/asarUtil.js +4 -2
- package/out/asar/asarUtil.js.map +1 -1
- package/out/asar/unpackDetector.js +12 -12
- package/out/asar/unpackDetector.js.map +1 -1
- package/out/configuration.d.ts +3 -2
- package/out/electron/ElectronFramework.js +21 -8
- package/out/electron/ElectronFramework.js.map +1 -1
- package/out/electron/electronMac.js +1 -1
- package/out/electron/electronMac.js.map +1 -1
- package/out/macPackager.d.ts +2 -1
- package/out/macPackager.js +72 -8
- package/out/macPackager.js.map +1 -1
- package/out/options/CommonWindowsInstallerConfiguration.js +1 -1
- package/out/options/CommonWindowsInstallerConfiguration.js.map +1 -1
- package/out/options/PlatformSpecificBuildOptions.d.ts +5 -0
- package/out/options/linuxOptions.d.ts +0 -5
- package/out/packager.d.ts +1 -1
- package/out/packager.js +1 -7
- package/out/packager.js.map +1 -1
- package/out/platformPackager.d.ts +4 -3
- package/out/platformPackager.js +35 -8
- package/out/platformPackager.js.map +1 -1
- package/out/targets/ArchiveTarget.js +4 -3
- package/out/targets/ArchiveTarget.js.map +1 -1
- package/out/targets/LinuxTargetHelper.js +1 -2
- package/out/targets/LinuxTargetHelper.js.map +1 -1
- package/out/targets/fpm.js +1 -1
- package/out/targets/fpm.js.map +1 -1
- package/out/targets/nsis/nsisLang.js +1 -1
- package/out/targets/nsis/nsisLang.js.map +1 -1
- package/out/targets/snap.js +1 -1
- package/out/targets/snap.js.map +1 -1
- package/out/util/config.js +1 -1
- package/out/util/macroExpander.js +1 -1
- package/out/util/macroExpander.js.map +1 -1
- package/package.json +30 -29
- package/scheme.json +65 -6
- package/templates/nsis/include/allowOnlyOneInstallerInstance.nsh +3 -3
- package/templates/nsis/include/extractAppPackage.nsh +48 -49
package/scheme.json
CHANGED
|
@@ -1304,6 +1304,9 @@
|
|
|
1304
1304
|
"string"
|
|
1305
1305
|
]
|
|
1306
1306
|
},
|
|
1307
|
+
"defaultArch": {
|
|
1308
|
+
"type": "string"
|
|
1309
|
+
},
|
|
1307
1310
|
"description": {
|
|
1308
1311
|
"description": "As [description](/configuration/configuration#Metadata-description) from application package.json, but allows you to specify different for Linux.",
|
|
1309
1312
|
"type": [
|
|
@@ -1341,7 +1344,7 @@
|
|
|
1341
1344
|
"description": "The executable parameters. Pass to executableName"
|
|
1342
1345
|
},
|
|
1343
1346
|
"executableName": {
|
|
1344
|
-
"description": "The executable name. Defaults to `productName
|
|
1347
|
+
"description": "The executable name. Defaults to `productName`.",
|
|
1345
1348
|
"type": [
|
|
1346
1349
|
"null",
|
|
1347
1350
|
"string"
|
|
@@ -1942,6 +1945,9 @@
|
|
|
1942
1945
|
"description": "Whether a dark mode is supported. If your app does have a dark mode, you can make your app follow the system-wide dark mode setting.",
|
|
1943
1946
|
"type": "boolean"
|
|
1944
1947
|
},
|
|
1948
|
+
"defaultArch": {
|
|
1949
|
+
"type": "string"
|
|
1950
|
+
},
|
|
1945
1951
|
"detectUpdateChannel": {
|
|
1946
1952
|
"default": true,
|
|
1947
1953
|
"description": "Whether to infer update channel from application version pre-release components. e.g. if version `0.12.1-alpha.1`, channel will be set to `alpha`. Otherwise to `latest`.",
|
|
@@ -1989,6 +1995,13 @@
|
|
|
1989
1995
|
"string"
|
|
1990
1996
|
]
|
|
1991
1997
|
},
|
|
1998
|
+
"executableName": {
|
|
1999
|
+
"description": "The executable name. Defaults to `productName`.",
|
|
2000
|
+
"type": [
|
|
2001
|
+
"null",
|
|
2002
|
+
"string"
|
|
2003
|
+
]
|
|
2004
|
+
},
|
|
1992
2005
|
"extendInfo": {
|
|
1993
2006
|
"description": "The extra entries for `Info.plist`."
|
|
1994
2007
|
},
|
|
@@ -2524,6 +2537,9 @@
|
|
|
2524
2537
|
"description": "Whether a dark mode is supported. If your app does have a dark mode, you can make your app follow the system-wide dark mode setting.",
|
|
2525
2538
|
"type": "boolean"
|
|
2526
2539
|
},
|
|
2540
|
+
"defaultArch": {
|
|
2541
|
+
"type": "string"
|
|
2542
|
+
},
|
|
2527
2543
|
"detectUpdateChannel": {
|
|
2528
2544
|
"default": true,
|
|
2529
2545
|
"description": "Whether to infer update channel from application version pre-release components. e.g. if version `0.12.1-alpha.1`, channel will be set to `alpha`. Otherwise to `latest`.",
|
|
@@ -2571,6 +2587,13 @@
|
|
|
2571
2587
|
"string"
|
|
2572
2588
|
]
|
|
2573
2589
|
},
|
|
2590
|
+
"executableName": {
|
|
2591
|
+
"description": "The executable name. Defaults to `productName`.",
|
|
2592
|
+
"type": [
|
|
2593
|
+
"null",
|
|
2594
|
+
"string"
|
|
2595
|
+
]
|
|
2596
|
+
},
|
|
2574
2597
|
"extendInfo": {
|
|
2575
2598
|
"description": "The extra entries for `Info.plist`."
|
|
2576
2599
|
},
|
|
@@ -4515,7 +4538,14 @@
|
|
|
4515
4538
|
]
|
|
4516
4539
|
},
|
|
4517
4540
|
"layout": {
|
|
4518
|
-
"
|
|
4541
|
+
"anyOf": [
|
|
4542
|
+
{
|
|
4543
|
+
"typeof": "function"
|
|
4544
|
+
},
|
|
4545
|
+
{
|
|
4546
|
+
"type": "null"
|
|
4547
|
+
}
|
|
4548
|
+
],
|
|
4519
4549
|
"description": "Specifies any files to make accessible from locations such as `/usr`, `/var`, and `/etc`. See [snap layouts](https://snapcraft.io/docs/snap-layouts) to learn more."
|
|
4520
4550
|
},
|
|
4521
4551
|
"mimeTypes": {
|
|
@@ -4554,7 +4584,7 @@
|
|
|
4554
4584
|
"type": "null"
|
|
4555
4585
|
}
|
|
4556
4586
|
],
|
|
4557
|
-
"description": "The list of [plugs](https://snapcraft.io/docs/reference/interfaces).\nDefaults to `[\"desktop\", \"desktop-legacy\", \"home\", \"x11\", \"unity7\", \"browser-support\", \"network\", \"gsettings\", \"audio-playback\", \"pulseaudio\", \"opengl\"]`.\n\nIf list contains `default`, it will be replaced to default list, so, `[\"default\", \"foo\"]` can be used to add custom plug `foo` in addition to defaults.\n\nAdditional attributes can be specified using object instead of just name of plug:\n```\n[\n
|
|
4587
|
+
"description": "The list of [plugs](https://snapcraft.io/docs/reference/interfaces).\nDefaults to `[\"desktop\", \"desktop-legacy\", \"home\", \"x11\", \"unity7\", \"browser-support\", \"network\", \"gsettings\", \"audio-playback\", \"pulseaudio\", \"opengl\"]`.\n\nIf list contains `default`, it will be replaced to default list, so, `[\"default\", \"foo\"]` can be used to add custom plug `foo` in addition to defaults.\n\nAdditional attributes can be specified using object instead of just name of plug:\n```\n[\n {\n \"browser-sandbox\": {\n \"interface\": \"browser-support\",\n \"allow-sandbox\": true\n },\n },\n \"another-simple-plug-name\"\n]\n```"
|
|
4558
4588
|
},
|
|
4559
4589
|
"publish": {
|
|
4560
4590
|
"anyOf": [
|
|
@@ -4640,7 +4670,7 @@
|
|
|
4640
4670
|
"type": "null"
|
|
4641
4671
|
}
|
|
4642
4672
|
],
|
|
4643
|
-
"description": "The list of [slots](https://snapcraft.io/docs/reference/interfaces).\n\nAdditional attributes can be specified using object instead of just name of slot:\n```\n[\n
|
|
4673
|
+
"description": "The list of [slots](https://snapcraft.io/docs/reference/interfaces).\n\nAdditional attributes can be specified using object instead of just name of slot:\n```\n[\n {\n \"mpris\": {\n \"name\": \"chromium\"\n },\n }\n]\n\nIn case you want your application to be a compliant MPris player, you will need to definie\nThe mpris slot with \"chromium\" name.\nThis electron has it [hardcoded](https://source.chromium.org/chromium/chromium/src/+/master:components/system_media_controls/linux/system_media_controls_linux.cc;l=51;bpv=0;bpt=1),\nand we need to pass this name so snap [will allow it](https://forum.snapcraft.io/t/unable-to-use-mpris-interface/15360/7) in strict confinement."
|
|
4644
4674
|
},
|
|
4645
4675
|
"stagePackages": {
|
|
4646
4676
|
"anyOf": [
|
|
@@ -4960,6 +4990,7 @@
|
|
|
4960
4990
|
"arm64",
|
|
4961
4991
|
"armv7l",
|
|
4962
4992
|
"ia32",
|
|
4993
|
+
"universal",
|
|
4963
4994
|
"x64"
|
|
4964
4995
|
],
|
|
4965
4996
|
"type": "string"
|
|
@@ -4971,6 +5002,7 @@
|
|
|
4971
5002
|
"arm64",
|
|
4972
5003
|
"armv7l",
|
|
4973
5004
|
"ia32",
|
|
5005
|
+
"universal",
|
|
4974
5006
|
"x64"
|
|
4975
5007
|
],
|
|
4976
5008
|
"type": "string"
|
|
@@ -5102,6 +5134,9 @@
|
|
|
5102
5134
|
"string"
|
|
5103
5135
|
]
|
|
5104
5136
|
},
|
|
5137
|
+
"defaultArch": {
|
|
5138
|
+
"type": "string"
|
|
5139
|
+
},
|
|
5105
5140
|
"detectUpdateChannel": {
|
|
5106
5141
|
"default": true,
|
|
5107
5142
|
"description": "Whether to infer update channel from application version pre-release components. e.g. if version `0.12.1-alpha.1`, channel will be set to `alpha`. Otherwise to `latest`.",
|
|
@@ -5114,6 +5149,13 @@
|
|
|
5114
5149
|
"string"
|
|
5115
5150
|
]
|
|
5116
5151
|
},
|
|
5152
|
+
"executableName": {
|
|
5153
|
+
"description": "The executable name. Defaults to `productName`.",
|
|
5154
|
+
"type": [
|
|
5155
|
+
"null",
|
|
5156
|
+
"string"
|
|
5157
|
+
]
|
|
5158
|
+
},
|
|
5117
5159
|
"extraFiles": {
|
|
5118
5160
|
"anyOf": [
|
|
5119
5161
|
{
|
|
@@ -5678,6 +5720,9 @@
|
|
|
5678
5720
|
],
|
|
5679
5721
|
"description": "Debian package options."
|
|
5680
5722
|
},
|
|
5723
|
+
"defaultArch": {
|
|
5724
|
+
"type": "string"
|
|
5725
|
+
},
|
|
5681
5726
|
"detectUpdateChannel": {
|
|
5682
5727
|
"default": true,
|
|
5683
5728
|
"description": "Whether to infer update channel from application version pre-release components. e.g. if version `0.12.1-alpha.1`, channel will be set to `alpha`. Otherwise to `latest`.",
|
|
@@ -5709,8 +5754,15 @@
|
|
|
5709
5754
|
"type": "boolean"
|
|
5710
5755
|
},
|
|
5711
5756
|
"electronDist": {
|
|
5712
|
-
"
|
|
5713
|
-
|
|
5757
|
+
"anyOf": [
|
|
5758
|
+
{
|
|
5759
|
+
"typeof": "function"
|
|
5760
|
+
},
|
|
5761
|
+
{
|
|
5762
|
+
"type": "string"
|
|
5763
|
+
}
|
|
5764
|
+
],
|
|
5765
|
+
"description": "Returns the path to custom Electron build (e.g. `~/electron/out/R`). Zip files must follow the pattern `electron-v${version}-${platformName}-${arch}.zip`, otherwise it will be assumed to be an unpacked Electron app directory"
|
|
5714
5766
|
},
|
|
5715
5767
|
"electronDownload": {
|
|
5716
5768
|
"$ref": "#/definitions/ElectronDownloadOptions",
|
|
@@ -5730,6 +5782,13 @@
|
|
|
5730
5782
|
"string"
|
|
5731
5783
|
]
|
|
5732
5784
|
},
|
|
5785
|
+
"executableName": {
|
|
5786
|
+
"description": "The executable name. Defaults to `productName`.",
|
|
5787
|
+
"type": [
|
|
5788
|
+
"null",
|
|
5789
|
+
"string"
|
|
5790
|
+
]
|
|
5791
|
+
},
|
|
5733
5792
|
"extends": {
|
|
5734
5793
|
"description": "The name of a built-in configuration preset or path to config file (relative to project dir). Currently, only `react-cra` is supported.\n\nIf `react-scripts` in the app dependencies, `react-cra` will be set automatically. Set to `null` to disable automatic detection.",
|
|
5735
5794
|
"type": [
|
|
@@ -58,7 +58,7 @@
|
|
|
58
58
|
DetailPrint `Closing running "${PRODUCT_NAME}"...`
|
|
59
59
|
|
|
60
60
|
# https://github.com/electron-userland/electron-builder/issues/2516#issuecomment-372009092
|
|
61
|
-
nsExec::Exec `taskkill /
|
|
61
|
+
nsExec::Exec `taskkill /im "${APP_EXECUTABLE_FILENAME}" /fi "PID ne $pid"` $R0
|
|
62
62
|
# to ensure that files are not "in-use"
|
|
63
63
|
Sleep 300
|
|
64
64
|
|
|
@@ -66,7 +66,7 @@
|
|
|
66
66
|
${if} $R0 == 0
|
|
67
67
|
# wait to give a chance to exit gracefully
|
|
68
68
|
Sleep 1000
|
|
69
|
-
nsExec::Exec `taskkill /f /
|
|
69
|
+
nsExec::Exec `taskkill /f /im "${APP_EXECUTABLE_FILENAME}" /fi "PID ne $pid"` $R0
|
|
70
70
|
${If} $R0 != 0
|
|
71
71
|
DetailPrint `Waiting for "${PRODUCT_NAME}" to close (taskkill exit code $R0).`
|
|
72
72
|
Sleep 2000
|
|
@@ -74,4 +74,4 @@
|
|
|
74
74
|
${endIf}
|
|
75
75
|
${endIf}
|
|
76
76
|
${endIf}
|
|
77
|
-
!macroend
|
|
77
|
+
!macroend
|
|
@@ -4,30 +4,52 @@
|
|
|
4
4
|
!endif
|
|
5
5
|
|
|
6
6
|
Var /GLOBAL packageArch
|
|
7
|
-
|
|
8
|
-
!
|
|
9
|
-
|
|
10
|
-
StrCpy $packageArch "ARM64"
|
|
11
|
-
!else
|
|
12
|
-
StrCpy $packageArch "64"
|
|
13
|
-
!endif
|
|
14
|
-
|
|
15
|
-
!insertmacro compute_files_for_current_arch
|
|
16
|
-
!else
|
|
17
|
-
!insertmacro ia32_app_files
|
|
18
|
-
!endif
|
|
7
|
+
|
|
8
|
+
!insertmacro identify_package
|
|
9
|
+
!insertmacro compute_files_for_current_arch
|
|
19
10
|
|
|
20
11
|
!ifdef COMPRESS
|
|
21
12
|
SetCompress "${COMPRESS}"
|
|
22
13
|
!endif
|
|
23
14
|
|
|
24
|
-
!
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
15
|
+
!insertmacro decompress
|
|
16
|
+
!insertmacro custom_files_post_decompression
|
|
17
|
+
!macroend
|
|
18
|
+
|
|
19
|
+
!macro identify_package
|
|
20
|
+
!ifdef APP_32
|
|
21
|
+
StrCpy $packageArch "32"
|
|
22
|
+
!endif
|
|
23
|
+
!ifdef APP_64
|
|
24
|
+
${if} ${RunningX64}
|
|
25
|
+
${OrIf} ${IsNativeARM64}
|
|
26
|
+
StrCpy $packageArch "64"
|
|
27
|
+
${endif}
|
|
28
|
+
!endif
|
|
29
|
+
!ifdef APP_ARM64
|
|
30
|
+
${if} ${IsNativeARM64}
|
|
31
|
+
StrCpy $packageArch "ARM64"
|
|
32
|
+
${endif}
|
|
28
33
|
!endif
|
|
34
|
+
!macroend
|
|
35
|
+
|
|
36
|
+
!macro compute_files_for_current_arch
|
|
37
|
+
${if} $packageArch == "ARM64"
|
|
38
|
+
!ifdef APP_ARM64
|
|
39
|
+
!insertmacro arm64_app_files
|
|
40
|
+
!endif
|
|
41
|
+
${elseif} $packageArch == "64"
|
|
42
|
+
!ifdef APP_64
|
|
43
|
+
!insertmacro x64_app_files
|
|
44
|
+
!endif
|
|
45
|
+
${else}
|
|
46
|
+
!ifdef APP_32
|
|
47
|
+
!insertmacro ia32_app_files
|
|
48
|
+
!endif
|
|
49
|
+
${endIf}
|
|
50
|
+
!macroend
|
|
29
51
|
|
|
30
|
-
|
|
52
|
+
!macro custom_files_post_decompression
|
|
31
53
|
${if} $packageArch == "ARM64"
|
|
32
54
|
!ifmacrodef customFiles_arm64
|
|
33
55
|
!insertmacro customFiles_arm64
|
|
@@ -43,36 +65,6 @@
|
|
|
43
65
|
${endIf}
|
|
44
66
|
!macroend
|
|
45
67
|
|
|
46
|
-
!macro compute_files_for_current_arch
|
|
47
|
-
!ifdef APP_32
|
|
48
|
-
!ifdef APP_ARM64
|
|
49
|
-
${if} ${IsNativeARM64}
|
|
50
|
-
!insertmacro arm64_app_files
|
|
51
|
-
${elseif} ${RunningX64}
|
|
52
|
-
!insertmacro x64_app_files
|
|
53
|
-
${else}
|
|
54
|
-
!insertmacro ia32_app_files
|
|
55
|
-
${endIf}
|
|
56
|
-
!else
|
|
57
|
-
${if} ${RunningX64}
|
|
58
|
-
!insertmacro x64_app_files
|
|
59
|
-
${else}
|
|
60
|
-
!insertmacro ia32_app_files
|
|
61
|
-
${endIf}
|
|
62
|
-
!endif
|
|
63
|
-
!else
|
|
64
|
-
!ifdef APP_ARM64
|
|
65
|
-
${if} ${IsNativeARM64}
|
|
66
|
-
!insertmacro arm64_app_files
|
|
67
|
-
${else}
|
|
68
|
-
!insertmacro x64_app_files
|
|
69
|
-
${endIf}
|
|
70
|
-
!else
|
|
71
|
-
!insertmacro x64_app_files
|
|
72
|
-
!endif
|
|
73
|
-
!endif
|
|
74
|
-
!macroend
|
|
75
|
-
|
|
76
68
|
!macro arm64_app_files
|
|
77
69
|
File /oname=$PLUGINSDIR\app-arm64.${COMPRESSION_METHOD} "${APP_ARM64}"
|
|
78
70
|
!macroend
|
|
@@ -82,10 +74,17 @@
|
|
|
82
74
|
!macroend
|
|
83
75
|
|
|
84
76
|
!macro ia32_app_files
|
|
85
|
-
StrCpy $packageArch "32"
|
|
86
77
|
File /oname=$PLUGINSDIR\app-32.${COMPRESSION_METHOD} "${APP_32}"
|
|
87
78
|
!macroend
|
|
88
79
|
|
|
80
|
+
!macro decompress
|
|
81
|
+
!ifdef ZIP_COMPRESSION
|
|
82
|
+
nsisunz::Unzip "$PLUGINSDIR\app-$packageArch.zip" "$INSTDIR"
|
|
83
|
+
!else
|
|
84
|
+
!insertmacro extractUsing7za "$PLUGINSDIR\app-$packageArch.7z"
|
|
85
|
+
!endif
|
|
86
|
+
!macroend
|
|
87
|
+
|
|
89
88
|
!macro extractUsing7za FILE
|
|
90
|
-
|
|
89
|
+
Nsis7z::Extract "${FILE}"
|
|
91
90
|
!macroend
|