app-builder-lib 27.0.0-alpha.13 → 27.0.0-alpha.15
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/dist/codeSign/win/hsmSignManager.d.ts.map +1 -1
- package/dist/codeSign/win/hsmSignManager.js +3 -2
- package/dist/codeSign/win/hsmSignManager.js.map +1 -1
- package/dist/codeSign/win/pkcs11SignManager.d.ts.map +1 -1
- package/dist/codeSign/win/pkcs11SignManager.js +2 -1
- package/dist/codeSign/win/pkcs11SignManager.js.map +1 -1
- package/dist/codeSign/win/signtoolBaseSignManager.d.ts.map +1 -1
- package/dist/codeSign/win/signtoolBaseSignManager.js +15 -5
- package/dist/codeSign/win/signtoolBaseSignManager.js.map +1 -1
- package/dist/configuration.d.ts +78 -20
- package/dist/configuration.d.ts.map +1 -1
- package/dist/configuration.js.map +1 -1
- package/dist/indexInternal.d.ts +5 -3
- package/dist/indexInternal.d.ts.map +1 -1
- package/dist/indexInternal.js +4 -3
- package/dist/indexInternal.js.map +1 -1
- package/dist/options/FileAssociation.d.ts +1 -1
- package/dist/options/FileAssociation.js.map +1 -1
- package/dist/options/PlatformSpecificBuildOptions.d.ts +4 -1
- package/dist/options/PlatformSpecificBuildOptions.d.ts.map +1 -1
- package/dist/options/PlatformSpecificBuildOptions.js.map +1 -1
- package/dist/options/SnapOptions.d.ts +13 -3
- package/dist/options/SnapOptions.d.ts.map +1 -1
- package/dist/options/SnapOptions.js.map +1 -1
- package/dist/options/macOptions.d.ts +9 -6
- package/dist/options/macOptions.d.ts.map +1 -1
- package/dist/options/macOptions.js.map +1 -1
- package/dist/options/winOptions.d.ts +2 -2
- package/dist/options/winOptions.js.map +1 -1
- package/dist/packager.d.ts +22 -0
- package/dist/packager.d.ts.map +1 -1
- package/dist/packager.js +115 -66
- package/dist/packager.js.map +1 -1
- package/dist/platformPackager.d.ts.map +1 -1
- package/dist/platformPackager.js +10 -8
- package/dist/platformPackager.js.map +1 -1
- package/dist/publish/PublishManager.d.ts +5 -0
- package/dist/publish/PublishManager.d.ts.map +1 -1
- package/dist/publish/PublishManager.js +102 -24
- package/dist/publish/PublishManager.js.map +1 -1
- package/dist/publish/manifestUploadCheck.d.ts +12 -0
- package/dist/publish/manifestUploadCheck.d.ts.map +1 -1
- package/dist/publish/manifestUploadCheck.js +84 -12
- package/dist/publish/manifestUploadCheck.js.map +1 -1
- package/dist/publish/updateInfoBuilder.d.ts.map +1 -1
- package/dist/publish/updateInfoBuilder.js +12 -7
- package/dist/publish/updateInfoBuilder.js.map +1 -1
- package/dist/publish/updateManifestVerifier.d.ts +54 -0
- package/dist/publish/updateManifestVerifier.d.ts.map +1 -1
- package/dist/publish/updateManifestVerifier.js +121 -1
- package/dist/publish/updateManifestVerifier.js.map +1 -1
- package/dist/publish/updaterSettingsCheck.d.ts +8 -0
- package/dist/publish/updaterSettingsCheck.d.ts.map +1 -0
- package/dist/publish/updaterSettingsCheck.js +136 -0
- package/dist/publish/updaterSettingsCheck.js.map +1 -0
- package/dist/targets/ArchiveTarget.js +1 -1
- package/dist/targets/ArchiveTarget.js.map +1 -1
- package/dist/targets/archive.d.ts.map +1 -1
- package/dist/targets/archive.js +4 -3
- package/dist/targets/archive.js.map +1 -1
- package/dist/targets/blockmap/blockmap.d.ts +30 -0
- package/dist/targets/blockmap/blockmap.d.ts.map +1 -1
- package/dist/targets/blockmap/blockmap.js +99 -31
- package/dist/targets/blockmap/blockmap.js.map +1 -1
- package/dist/targets/blockmap/blockmapV3.d.ts +36 -0
- package/dist/targets/blockmap/blockmapV3.d.ts.map +1 -0
- package/dist/targets/blockmap/blockmapV3.js +41 -0
- package/dist/targets/blockmap/blockmapV3.js.map +1 -0
- package/dist/targets/blockmap/verbatimRange.d.ts +6 -0
- package/dist/targets/blockmap/verbatimRange.d.ts.map +1 -1
- package/dist/targets/blockmap/verbatimRange.js +11 -0
- package/dist/targets/blockmap/verbatimRange.js.map +1 -1
- package/dist/targets/differentialUpdateInfoBuilder.d.ts +92 -4
- package/dist/targets/differentialUpdateInfoBuilder.d.ts.map +1 -1
- package/dist/targets/differentialUpdateInfoBuilder.js +266 -10
- package/dist/targets/differentialUpdateInfoBuilder.js.map +1 -1
- package/dist/targets/linux/FlatpakTarget.js +1 -1
- package/dist/targets/linux/FlatpakTarget.js.map +1 -1
- package/dist/targets/linux/FpmTarget.d.ts.map +1 -1
- package/dist/targets/linux/FpmTarget.js +23 -31
- package/dist/targets/linux/FpmTarget.js.map +1 -1
- package/dist/targets/linux/LinuxTargetHelper.d.ts.map +1 -1
- package/dist/targets/linux/LinuxTargetHelper.js +6 -14
- package/dist/targets/linux/LinuxTargetHelper.js.map +1 -1
- package/dist/targets/linux/appimage/appLauncher.d.ts +4 -3
- package/dist/targets/linux/appimage/appLauncher.d.ts.map +1 -1
- package/dist/targets/linux/appimage/appLauncher.js +10 -6
- package/dist/targets/linux/appimage/appLauncher.js.map +1 -1
- package/dist/targets/linux/snap/coreLegacy.d.ts +8 -0
- package/dist/targets/linux/snap/coreLegacy.d.ts.map +1 -1
- package/dist/targets/linux/snap/coreLegacy.js +42 -9
- package/dist/targets/linux/snap/coreLegacy.js.map +1 -1
- package/dist/targets/mac/pkg.d.ts.map +1 -1
- package/dist/targets/mac/pkg.js +13 -9
- package/dist/targets/mac/pkg.js.map +1 -1
- package/dist/targets/targetFactory.d.ts +22 -3
- package/dist/targets/targetFactory.d.ts.map +1 -1
- package/dist/targets/targetFactory.js +70 -29
- package/dist/targets/targetFactory.js.map +1 -1
- package/dist/targets/win/MsiTarget.d.ts +7 -0
- package/dist/targets/win/MsiTarget.d.ts.map +1 -1
- package/dist/targets/win/MsiTarget.js +140 -21
- package/dist/targets/win/MsiTarget.js.map +1 -1
- package/dist/targets/win/nsis/Defines.d.ts +1 -0
- package/dist/targets/win/nsis/Defines.d.ts.map +1 -1
- package/dist/targets/win/nsis/Defines.js.map +1 -1
- package/dist/targets/win/nsis/NsisTarget.d.ts +3 -0
- package/dist/targets/win/nsis/NsisTarget.d.ts.map +1 -1
- package/dist/targets/win/nsis/NsisTarget.js +33 -12
- package/dist/targets/win/nsis/NsisTarget.js.map +1 -1
- package/dist/targets/win/nsis/nsisLicense.d.ts.map +1 -1
- package/dist/targets/win/nsis/nsisLicense.js +8 -5
- package/dist/targets/win/nsis/nsisLicense.js.map +1 -1
- package/dist/targets/win/nsis/nsisOptions.d.ts +31 -3
- package/dist/targets/win/nsis/nsisOptions.d.ts.map +1 -1
- package/dist/targets/win/nsis/nsisOptions.js.map +1 -1
- package/dist/targets/win/nsis/nsisScriptGenerator.d.ts +6 -0
- package/dist/targets/win/nsis/nsisScriptGenerator.d.ts.map +1 -1
- package/dist/targets/win/nsis/nsisScriptGenerator.js +16 -5
- package/dist/targets/win/nsis/nsisScriptGenerator.js.map +1 -1
- package/dist/targets/win/nsis/nsisUtil.d.ts.map +1 -1
- package/dist/targets/win/nsis/nsisUtil.js +11 -29
- package/dist/targets/win/nsis/nsisUtil.js.map +1 -1
- package/dist/toolsets/7zip.d.ts +10 -0
- package/dist/toolsets/7zip.d.ts.map +1 -1
- package/dist/toolsets/7zip.js +12 -1
- package/dist/toolsets/7zip.js.map +1 -1
- package/dist/toolsets/appimage.d.ts +3 -0
- package/dist/toolsets/appimage.d.ts.map +1 -1
- package/dist/toolsets/appimage.js +4 -1
- package/dist/toolsets/appimage.js.map +1 -1
- package/dist/toolsets/archive.d.ts +13 -0
- package/dist/toolsets/archive.d.ts.map +1 -0
- package/dist/toolsets/archive.js +55 -0
- package/dist/toolsets/archive.js.map +1 -0
- package/dist/toolsets/custom.d.ts.map +1 -1
- package/dist/toolsets/custom.js +19 -2
- package/dist/toolsets/custom.js.map +1 -1
- package/dist/toolsets/fpm.d.ts +23 -0
- package/dist/toolsets/fpm.d.ts.map +1 -1
- package/dist/toolsets/fpm.js +52 -19
- package/dist/toolsets/fpm.js.map +1 -1
- package/dist/toolsets/nsis.d.ts +23 -4
- package/dist/toolsets/nsis.d.ts.map +1 -1
- package/dist/toolsets/nsis.js +49 -14
- package/dist/toolsets/nsis.js.map +1 -1
- package/dist/toolsets/winCodeSign.d.ts +20 -1
- package/dist/toolsets/winCodeSign.d.ts.map +1 -1
- package/dist/toolsets/winCodeSign.js +32 -5
- package/dist/toolsets/winCodeSign.js.map +1 -1
- package/dist/toolsets/wix.d.ts +44 -0
- package/dist/toolsets/wix.d.ts.map +1 -0
- package/dist/toolsets/wix.js +91 -0
- package/dist/toolsets/wix.js.map +1 -0
- package/dist/util/buildOutputVerifier.d.ts +2 -1
- package/dist/util/buildOutputVerifier.d.ts.map +1 -1
- package/dist/util/buildOutputVerifier.js +41 -63
- package/dist/util/buildOutputVerifier.js.map +1 -1
- package/dist/util/bundledTool.d.ts +8 -0
- package/dist/util/bundledTool.d.ts.map +1 -1
- package/dist/util/bundledTool.js +34 -0
- package/dist/util/bundledTool.js.map +1 -1
- package/dist/util/electronGet.d.ts.map +1 -1
- package/dist/util/electronGet.js +107 -10
- package/dist/util/electronGet.js.map +1 -1
- package/dist/util/electronUpdaterCompatibility.d.ts +64 -0
- package/dist/util/electronUpdaterCompatibility.d.ts.map +1 -0
- package/dist/util/electronUpdaterCompatibility.js +82 -0
- package/dist/util/electronUpdaterCompatibility.js.map +1 -0
- package/dist/util/flags.d.ts +5 -0
- package/dist/util/flags.d.ts.map +1 -1
- package/dist/util/flags.js +8 -2
- package/dist/util/flags.js.map +1 -1
- package/dist/util/mac/macosVersion.d.ts +0 -1
- package/dist/util/mac/macosVersion.d.ts.map +1 -1
- package/dist/util/mac/macosVersion.js +0 -21
- package/dist/util/mac/macosVersion.js.map +1 -1
- package/dist/util/packageMetadata.d.ts +14 -1
- package/dist/util/packageMetadata.d.ts.map +1 -1
- package/dist/util/packageMetadata.js +115 -51
- package/dist/util/packageMetadata.js.map +1 -1
- package/dist/util/removedEnvVars.js +1 -1
- package/dist/util/removedEnvVars.js.map +1 -1
- package/dist/version.d.ts +1 -1
- package/dist/version.js +1 -1
- package/dist/version.js.map +1 -1
- package/package.json +8 -8
- package/scheme.json +182 -49
- package/templates/msi/template.xml +5 -5
- package/templates/msiWrapped/template.xml +1 -1
- package/templates/nsis/assistedInstaller.nsh +37 -1
- package/templates/nsis/common.nsh +142 -1
- package/templates/nsis/include/installUtil.nsh +12 -0
- package/templates/nsis/include/installer.nsh +12 -0
- package/templates/nsis/installSection.nsh +3 -0
- package/templates/nsis/installer.nsi +25 -13
- package/templates/nsis/multiUser.nsh +50 -10
- package/templates/nsis/portable.nsi +1 -1
- package/templates/nsis/uninstaller.nsh +6 -0
- package/dist/toolsets/linuxToolsMac.d.ts +0 -8
- package/dist/toolsets/linuxToolsMac.d.ts.map +0 -1
- package/dist/toolsets/linuxToolsMac.js +0 -44
- package/dist/toolsets/linuxToolsMac.js.map +0 -1
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
<?xml version="1.0" encoding="UTF-8"?>
|
|
2
|
-
<Wix xmlns="
|
|
2
|
+
<Wix xmlns="${wixNamespace}">
|
|
3
3
|
<!-- https://blogs.msdn.microsoft.com/gremlininthemachine/2006/12/05/msi-wix-and-unicode/ -->
|
|
4
4
|
<Product Id="*" Name="${productName}" UpgradeCode="${upgradeCode}" Version="${version}" Language="1033" Codepage="65001" Manufacturer="${manufacturer}">
|
|
5
5
|
<Package Compressed="yes" InstallerVersion="500"/>
|
|
@@ -82,11 +82,11 @@
|
|
|
82
82
|
|
|
83
83
|
<Directory Id="TARGETDIR" Name="SourceDir">
|
|
84
84
|
<Directory Id="${programFilesId}">
|
|
85
|
-
{{
|
|
86
|
-
<Directory Id="
|
|
85
|
+
{{ for (const companyDirectory of companyDirectories) { }}
|
|
86
|
+
<Directory Id="${companyDirectory.id}" Name="${companyDirectory.name}">
|
|
87
87
|
{{ } -}}
|
|
88
88
|
<Directory Id="APPLICATIONFOLDER" Name="${installationDirectoryWixName}"/>
|
|
89
|
-
{{
|
|
89
|
+
{{ for (const companyDirectory of companyDirectories) { }}
|
|
90
90
|
</Directory>
|
|
91
91
|
{{ } -}}
|
|
92
92
|
</Directory>
|
|
@@ -109,7 +109,7 @@
|
|
|
109
109
|
|
|
110
110
|
{{-dirs}}
|
|
111
111
|
|
|
112
|
-
<ComponentGroup Id="ProductComponents"
|
|
112
|
+
<ComponentGroup Id="ProductComponents"{{-componentGroupDirectoryAttribute}}>
|
|
113
113
|
{{-files}}
|
|
114
114
|
</ComponentGroup>
|
|
115
115
|
</Product>
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
<?xml version="1.0" encoding="UTF-8"?>
|
|
2
|
-
<Wix xmlns="
|
|
2
|
+
<Wix xmlns="${wixNamespace}">
|
|
3
3
|
<!-- https://blogs.msdn.microsoft.com/gremlininthemachine/2006/12/05/msi-wix-and-unicode/ -->
|
|
4
4
|
<!-- https://mistake.computer/2020/04/05/msi-exe-wrapper.html -->
|
|
5
5
|
<Product Id="${productId}" Name="${productName}" UpgradeCode="${upgradeCode}" Version="${version}" Language="1033" Codepage="65001" Manufacturer="${manufacturer}">
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
!include UAC.nsh
|
|
2
|
+
!include WordFunc.nsh
|
|
2
3
|
|
|
3
4
|
!ifndef INSTALL_MODE_PER_ALL_USERS
|
|
4
5
|
!include multiUserUi.nsh
|
|
@@ -11,7 +12,38 @@
|
|
|
11
12
|
!endif
|
|
12
13
|
|
|
13
14
|
!ifmacrodef licensePage
|
|
14
|
-
|
|
15
|
+
# Skip only a license accepted in the outer instance, not an .onInit elevation.
|
|
16
|
+
# Back must still reach it, otherwise NSIS closes the installer when all earlier pages are skipped.
|
|
17
|
+
Var isLicensePageSkippedInInnerInstance
|
|
18
|
+
Var isAssistedLicenseAccepted
|
|
19
|
+
|
|
20
|
+
Function assistedLicensePagePre
|
|
21
|
+
${if} ${isUpdated}
|
|
22
|
+
Abort
|
|
23
|
+
${endif}
|
|
24
|
+
|
|
25
|
+
${if} ${UAC_IsInnerInstance}
|
|
26
|
+
${andIf} $isLicensePageSkippedInInnerInstance != "1"
|
|
27
|
+
!insertmacro UAC_AsUser_GetGlobalVar $isAssistedLicenseAccepted
|
|
28
|
+
${if} $isAssistedLicenseAccepted == "1"
|
|
29
|
+
StrCpy $isLicensePageSkippedInInnerInstance "1"
|
|
30
|
+
Abort
|
|
31
|
+
${endif}
|
|
32
|
+
${endif}
|
|
33
|
+
FunctionEnd
|
|
34
|
+
|
|
35
|
+
Function assistedLicensePageLeave
|
|
36
|
+
!ifdef MUI_PAGE_CUSTOMFUNCTION_LEAVE
|
|
37
|
+
Call "${MUI_PAGE_CUSTOMFUNCTION_LEAVE}"
|
|
38
|
+
!undef MUI_PAGE_CUSTOMFUNCTION_LEAVE
|
|
39
|
+
!endif
|
|
40
|
+
${ifNot} ${UAC_IsInnerInstance}
|
|
41
|
+
StrCpy $isAssistedLicenseAccepted "1"
|
|
42
|
+
${endif}
|
|
43
|
+
FunctionEnd
|
|
44
|
+
|
|
45
|
+
!define MUI_PAGE_CUSTOMFUNCTION_PRE assistedLicensePagePre
|
|
46
|
+
!define MUI_PAGE_CUSTOMFUNCTION_LEAVE assistedLicensePageLeave
|
|
15
47
|
!insertmacro licensePage
|
|
16
48
|
!endif
|
|
17
49
|
|
|
@@ -110,11 +142,15 @@
|
|
|
110
142
|
|
|
111
143
|
# set installation mode to setting from a previous installation
|
|
112
144
|
ReadRegStr $perMachineInstallationFolder HKLM "${INSTALL_REGISTRY_KEY}" InstallLocation
|
|
145
|
+
# a double quote is invalid in a path: drop the closing quote that an earlier installer kept from a quoted /D= argument
|
|
146
|
+
${WordReplace} $perMachineInstallationFolder '"' "" "+" $perMachineInstallationFolder
|
|
113
147
|
${if} $perMachineInstallationFolder != ""
|
|
114
148
|
StrCpy $hasPerMachineInstallation "1"
|
|
115
149
|
${endif}
|
|
116
150
|
|
|
117
151
|
ReadRegStr $perUserInstallationFolder HKCU "${INSTALL_REGISTRY_KEY}" InstallLocation
|
|
152
|
+
# a double quote is invalid in a path: drop the closing quote that an earlier installer kept from a quoted /D= argument
|
|
153
|
+
${WordReplace} $perUserInstallationFolder '"' "" "+" $perUserInstallationFolder
|
|
118
154
|
${if} $perUserInstallationFolder != ""
|
|
119
155
|
StrCpy $hasPerUserInstallation "1"
|
|
120
156
|
${endif}
|
|
@@ -144,4 +144,145 @@ Name "${PRODUCT_NAME}" "${DoubleAmpersand}"
|
|
|
144
144
|
!ifdef ENABLE_LOGGING_ELECTRON_BUILDER
|
|
145
145
|
LogText ${INPUT_TEXT}
|
|
146
146
|
!endif
|
|
147
|
-
!macroend
|
|
147
|
+
!macroend
|
|
148
|
+
|
|
149
|
+
# nsis.allowUnelevatedPerMachineUpdate: only an assisted installer that also offers a per-user installation elevates for a silent update
|
|
150
|
+
# of a per-machine installation (a one-click or perMachine installer is per-machine from the start)
|
|
151
|
+
!ifdef ALLOW_UNELEVATED_PER_MACHINE_UPDATE
|
|
152
|
+
!ifndef ONE_CLICK
|
|
153
|
+
!ifndef INSTALL_MODE_PER_ALL_USERS
|
|
154
|
+
!define UNELEVATED_PER_MACHINE_UPDATE
|
|
155
|
+
!endif
|
|
156
|
+
!endif
|
|
157
|
+
!endif
|
|
158
|
+
|
|
159
|
+
!ifdef UNELEVATED_PER_MACHINE_UPDATE
|
|
160
|
+
# "1" when checkUnelevatedPerMachineUpdate found every right the update needs
|
|
161
|
+
Var unelevatedAccess
|
|
162
|
+
|
|
163
|
+
# FILE_ADD_FILE | FILE_ADD_SUBDIRECTORY | FILE_DELETE_CHILD | DELETE: the update removes the folder and its contents and re-creates them
|
|
164
|
+
!define UNELEVATED_DIR_ACCESS 0x10046
|
|
165
|
+
# FILE_ADD_SUBDIRECTORY: the removed folder is re-created in its parent
|
|
166
|
+
!define UNELEVATED_PARENT_DIR_ACCESS 0x4
|
|
167
|
+
# FILE_ADD_FILE | FILE_DELETE_CHILD: shortcuts are replaced in the folder
|
|
168
|
+
!define UNELEVATED_SHORTCUT_DIR_ACCESS 0x42
|
|
169
|
+
# GENERIC_WRITE | DELETE: an existing file is overwritten or deleted, which needs more than creating a new one
|
|
170
|
+
!define UNELEVATED_FILE_ACCESS 0x40010000
|
|
171
|
+
# KEY_QUERY_VALUE | KEY_SET_VALUE | KEY_CREATE_SUB_KEY | KEY_ENUMERATE_SUB_KEYS | DELETE: the key is deleted (DeleteRegKey) and written
|
|
172
|
+
!define UNELEVATED_REG_KEY_ACCESS 0x1000F
|
|
173
|
+
# KEY_CREATE_SUB_KEY: the deleted key is re-created under its parent
|
|
174
|
+
!define UNELEVATED_PARENT_REG_KEY_ACCESS 0x4
|
|
175
|
+
|
|
176
|
+
# Clears $unelevatedAccess unless this process holds the access to the existing file or folder. Nothing is created or changed.
|
|
177
|
+
# Uses $0 and $1.
|
|
178
|
+
!macro unelevatedProbeFile _PATH _ACCESS
|
|
179
|
+
# FILE_SHARE_READ | FILE_SHARE_WRITE | FILE_SHARE_DELETE, OPEN_EXISTING, FILE_FLAG_BACKUP_SEMANTICS (needed to open a folder)
|
|
180
|
+
System::Call 'kernel32::CreateFileW(w "${_PATH}", i ${_ACCESS}, i 7, p 0, i 3, i 0x02000000, p 0) p.r0 ?e'
|
|
181
|
+
Pop $1
|
|
182
|
+
${if} $0 <> -1
|
|
183
|
+
System::Call 'kernel32::CloseHandle(p r0)'
|
|
184
|
+
${elseIf} $1 <> 32
|
|
185
|
+
# ERROR_SHARING_VIOLATION is not a missing right, as access is checked before sharing: $INSTDIR is the current folder of this
|
|
186
|
+
# process or of the exiting app, and that handle doesn't share DELETE, and a running exe doesn't share write access
|
|
187
|
+
StrCpy $unelevatedAccess "0"
|
|
188
|
+
${endif}
|
|
189
|
+
!macroend
|
|
190
|
+
|
|
191
|
+
# Clears $unelevatedAccess unless this process can open the HKLM key with the access, in the registry view check64BitAndSetRegView
|
|
192
|
+
# selected. With _OPTIONAL "1", a missing key passes (deleting it is a no-op). Nothing is created or changed. Uses $0 and $1.
|
|
193
|
+
!macro unelevatedProbeRegKey _KEY _ACCESS _OPTIONAL
|
|
194
|
+
IntOp $1 ${_ACCESS} + 0
|
|
195
|
+
!ifdef APP_ARM64
|
|
196
|
+
${if} ${RunningX64}
|
|
197
|
+
${orIf} ${IsNativeARM64}
|
|
198
|
+
# KEY_WOW64_64KEY
|
|
199
|
+
IntOp $1 $1 | 0x100
|
|
200
|
+
${endif}
|
|
201
|
+
!else
|
|
202
|
+
!ifdef APP_64
|
|
203
|
+
${if} ${RunningX64}
|
|
204
|
+
IntOp $1 $1 | 0x100
|
|
205
|
+
${endif}
|
|
206
|
+
!endif
|
|
207
|
+
!endif
|
|
208
|
+
System::Call 'advapi32::RegOpenKeyExW(p 0x80000002, w "${_KEY}", i 0, i r1, *p .r1) i.r0'
|
|
209
|
+
${if} $0 = 0
|
|
210
|
+
System::Call 'advapi32::RegCloseKey(p r1)'
|
|
211
|
+
${elseIf} $0 = 2 # ERROR_FILE_NOT_FOUND
|
|
212
|
+
${andIf} "${_OPTIONAL}" == "1"
|
|
213
|
+
# nothing to delete
|
|
214
|
+
${else}
|
|
215
|
+
StrCpy $unelevatedAccess "0"
|
|
216
|
+
${endif}
|
|
217
|
+
!macroend
|
|
218
|
+
|
|
219
|
+
# Sets $unelevatedAccess to "1" when a silent update (--updated) of the per-machine installation in $INSTDIR can skip elevation: no
|
|
220
|
+
# per-user installation exists, the installed version was built with this option, and this process already holds every right the
|
|
221
|
+
# update uses. The update runs the old uninstaller, which removes $INSTDIR, the HKLM keys and the all-users shortcuts, and then
|
|
222
|
+
# re-creates them, so the rights to re-create them in their parents are needed too. Only probes: nothing is created or changed. Saves
|
|
223
|
+
# and restores the registers it uses.
|
|
224
|
+
!macro checkUnelevatedPerMachineUpdate
|
|
225
|
+
Push $0
|
|
226
|
+
Push $1
|
|
227
|
+
Push $2
|
|
228
|
+
StrCpy $unelevatedAccess "0"
|
|
229
|
+
|
|
230
|
+
${if} ${Silent}
|
|
231
|
+
${andIf} ${isUpdated}
|
|
232
|
+
${andIf} $installMode == "all"
|
|
233
|
+
# with a per-user installation too, the installer elevates and moves the per-user installation to per-machine
|
|
234
|
+
ReadRegStr $0 HKCU "${INSTALL_REGISTRY_KEY}" InstallLocation
|
|
235
|
+
${if} $0 == ""
|
|
236
|
+
StrCpy $unelevatedAccess "1"
|
|
237
|
+
${endif}
|
|
238
|
+
!ifndef BUILD_UNINSTALLER
|
|
239
|
+
# the update runs the installed version's uninstaller, which shows a UAC prompt by itself unless that version was built with
|
|
240
|
+
# this option too (registryAddInstallInfo)
|
|
241
|
+
ReadRegStr $0 HKLM "${INSTALL_REGISTRY_KEY}" UnelevatedUpdate
|
|
242
|
+
${if} $0 != "true"
|
|
243
|
+
StrCpy $unelevatedAccess "0"
|
|
244
|
+
${endif}
|
|
245
|
+
!endif
|
|
246
|
+
${endif}
|
|
247
|
+
|
|
248
|
+
${if} $unelevatedAccess == "1"
|
|
249
|
+
!insertmacro unelevatedProbeFile "$INSTDIR" ${UNELEVATED_DIR_ACCESS}
|
|
250
|
+
!insertmacro unelevatedProbeFile "$INSTDIR\${APP_EXECUTABLE_FILENAME}" ${UNELEVATED_FILE_ACCESS}
|
|
251
|
+
${GetParent} "$INSTDIR" $2
|
|
252
|
+
!insertmacro unelevatedProbeFile "$2" ${UNELEVATED_PARENT_DIR_ACCESS}
|
|
253
|
+
|
|
254
|
+
!insertmacro unelevatedProbeRegKey "${INSTALL_REGISTRY_KEY}" ${UNELEVATED_REG_KEY_ACCESS} "0"
|
|
255
|
+
${GetParent} "${INSTALL_REGISTRY_KEY}" $2
|
|
256
|
+
!insertmacro unelevatedProbeRegKey "$2" ${UNELEVATED_PARENT_REG_KEY_ACCESS} "0"
|
|
257
|
+
!insertmacro unelevatedProbeRegKey "${UNINSTALL_REGISTRY_KEY}" ${UNELEVATED_REG_KEY_ACCESS} "0"
|
|
258
|
+
${GetParent} "${UNINSTALL_REGISTRY_KEY}" $2
|
|
259
|
+
!insertmacro unelevatedProbeRegKey "$2" ${UNELEVATED_PARENT_REG_KEY_ACCESS} "0"
|
|
260
|
+
!ifdef UNINSTALL_REGISTRY_KEY_2
|
|
261
|
+
!insertmacro unelevatedProbeRegKey "${UNINSTALL_REGISTRY_KEY_2}" ${UNELEVATED_REG_KEY_ACCESS} "1"
|
|
262
|
+
!endif
|
|
263
|
+
|
|
264
|
+
# SetShellVarContext all: the all-users Start Menu and Public Desktop
|
|
265
|
+
!ifndef DO_NOT_CREATE_START_MENU_SHORTCUT
|
|
266
|
+
!ifdef MENU_FILENAME
|
|
267
|
+
StrCpy $2 "$SMPROGRAMS\${MENU_FILENAME}"
|
|
268
|
+
!else
|
|
269
|
+
StrCpy $2 "$SMPROGRAMS"
|
|
270
|
+
!endif
|
|
271
|
+
!insertmacro unelevatedProbeFile "$2" ${UNELEVATED_SHORTCUT_DIR_ACCESS}
|
|
272
|
+
${if} ${FileExists} "$2\${SHORTCUT_NAME}.lnk"
|
|
273
|
+
!insertmacro unelevatedProbeFile "$2\${SHORTCUT_NAME}.lnk" ${UNELEVATED_FILE_ACCESS}
|
|
274
|
+
${endif}
|
|
275
|
+
!endif
|
|
276
|
+
!ifndef DO_NOT_CREATE_DESKTOP_SHORTCUT
|
|
277
|
+
!insertmacro unelevatedProbeFile "$DESKTOP" ${UNELEVATED_SHORTCUT_DIR_ACCESS}
|
|
278
|
+
${if} ${FileExists} "$DESKTOP\${SHORTCUT_NAME}.lnk"
|
|
279
|
+
!insertmacro unelevatedProbeFile "$DESKTOP\${SHORTCUT_NAME}.lnk" ${UNELEVATED_FILE_ACCESS}
|
|
280
|
+
${endif}
|
|
281
|
+
!endif
|
|
282
|
+
${endif}
|
|
283
|
+
|
|
284
|
+
Pop $2
|
|
285
|
+
Pop $1
|
|
286
|
+
Pop $0
|
|
287
|
+
!macroend
|
|
288
|
+
!endif
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
!include WordFunc.nsh
|
|
2
|
+
|
|
1
3
|
!macro moveFile FROM TO
|
|
2
4
|
ClearErrors
|
|
3
5
|
Rename `${FROM}` `${TO}`
|
|
@@ -163,10 +165,20 @@ Function uninstallOldVersion
|
|
|
163
165
|
${endif}
|
|
164
166
|
${endif}
|
|
165
167
|
|
|
168
|
+
# a closing quote is followed by a space or the end, never by a backslash: drop the quote that an earlier installer kept from a
|
|
169
|
+
# quoted /D= argument ("C:\App"\Uninstall App.exe"), so the uninstaller path below is the full path. The first character, the opening
|
|
170
|
+
# quote, stays: a UNC path follows it with a backslash ("\\server\share\App\Uninstall App.exe")
|
|
171
|
+
StrCpy $uninstallerFileName $uninstallString 1
|
|
172
|
+
StrCpy $uninstallerFileNameTemp $uninstallString "" 1
|
|
173
|
+
${WordReplace} $uninstallerFileNameTemp '"\' "\" "+" $uninstallerFileNameTemp
|
|
174
|
+
StrCpy $uninstallString "$uninstallerFileName$uninstallerFileNameTemp"
|
|
175
|
+
|
|
166
176
|
# uninstaller should be copied out of app installation dir (because this dir will be deleted), so, extract uninstaller file name
|
|
167
177
|
!insertmacro GetInQuotes $uninstallerFileName "$uninstallString"
|
|
168
178
|
|
|
169
179
|
!insertmacro readReg $installationDir "$rootKey" "${INSTALL_REGISTRY_KEY}" InstallLocation
|
|
180
|
+
# a double quote is invalid in a path: drop the closing quote that an earlier installer kept from a quoted /D= argument
|
|
181
|
+
${WordReplace} $installationDir '"' "" "+" $installationDir
|
|
170
182
|
${if} $installationDir == ""
|
|
171
183
|
${andIf} $uninstallerFileName != ""
|
|
172
184
|
# https://github.com/electron-userland/electron-builder/issues/735#issuecomment-246918567
|
|
@@ -18,6 +18,14 @@
|
|
|
18
18
|
|
|
19
19
|
${StdUtils.GetParameter} $packageFile "package-file" ""
|
|
20
20
|
${if} $packageFile == ""
|
|
21
|
+
# electron-updater starts a web installer with --updated and passes the package it verified with --package-file. An update without
|
|
22
|
+
# one (the web installer was published as a full installer, with no package in the update info) is aborted: the package is not
|
|
23
|
+
# downloaded from the URL built into the installer.
|
|
24
|
+
${if} ${isUpdated}
|
|
25
|
+
MessageBox MB_OK|MB_ICONSTOP "This web installer was started as an update without a package file (--package-file). Installation aborted.$\r$\nhttps://www.electron.build/docs/migration/v27-runtime-changes#an-nsis-web-installer-started-as-an-update-needs-a-package-file" /SD IDOK
|
|
26
|
+
SetErrorLevel 2
|
|
27
|
+
Quit
|
|
28
|
+
${endIf}
|
|
21
29
|
!insertmacro selectWebPackage $packageFile $1
|
|
22
30
|
StrCpy $4 "$packageFile"
|
|
23
31
|
StrCpy $packageFile "$EXEDIR/$packageFile"
|
|
@@ -144,6 +152,10 @@
|
|
|
144
152
|
!macro registryAddInstallInfo
|
|
145
153
|
WriteRegStr SHELL_CONTEXT "${INSTALL_REGISTRY_KEY}" InstallLocation "$INSTDIR"
|
|
146
154
|
WriteRegStr SHELL_CONTEXT "${INSTALL_REGISTRY_KEY}" KeepShortcuts "true"
|
|
155
|
+
!ifdef UNELEVATED_PER_MACHINE_UPDATE
|
|
156
|
+
# the uninstaller of this version decides about elevation itself (checkUnelevatedPerMachineUpdate)
|
|
157
|
+
WriteRegStr SHELL_CONTEXT "${INSTALL_REGISTRY_KEY}" UnelevatedUpdate "true"
|
|
158
|
+
!endif
|
|
147
159
|
WriteRegStr SHELL_CONTEXT "${INSTALL_REGISTRY_KEY}" ShortcutName "${SHORTCUT_NAME}"
|
|
148
160
|
!ifdef MENU_FILENAME
|
|
149
161
|
WriteRegStr SHELL_CONTEXT "${INSTALL_REGISTRY_KEY}" MenuDirectory "${MENU_FILENAME}"
|
|
@@ -78,6 +78,9 @@ ${if} $installMode == "all"
|
|
|
78
78
|
${endIf}
|
|
79
79
|
|
|
80
80
|
SetOutPath $INSTDIR
|
|
81
|
+
# logging starts here, in the final $INSTDIR, which NSIS names the log after when it is turned on: in .onInit $INSTDIR is not set yet (the
|
|
82
|
+
# log went nowhere), or, with /D=, the installer held $INSTDIR\install.log open while the old version's uninstaller moved $INSTDIR aside
|
|
83
|
+
${LogSet} on
|
|
81
84
|
|
|
82
85
|
!ifdef UNINSTALLER_ICON
|
|
83
86
|
File /oname=uninstallerIcon.ico "${UNINSTALLER_ICON}"
|
|
@@ -50,7 +50,6 @@ Function .onInit
|
|
|
50
50
|
Call setInstallSectionSpaceRequired
|
|
51
51
|
|
|
52
52
|
SetOutPath $INSTDIR
|
|
53
|
-
${LogSet} on
|
|
54
53
|
|
|
55
54
|
!ifmacrodef preInit
|
|
56
55
|
!insertmacro preInit
|
|
@@ -98,21 +97,34 @@ Section "install" INSTALL_SECTION_ID
|
|
|
98
97
|
# but that won't be executed when silent.
|
|
99
98
|
!ifndef INSTALL_MODE_PER_ALL_USERS
|
|
100
99
|
!ifndef ONE_CLICK
|
|
100
|
+
!macro elevateSilentPerMachineUpdate
|
|
101
|
+
ShowWindow $HWNDPARENT ${SW_HIDE}
|
|
102
|
+
!insertmacro UAC_RunElevated
|
|
103
|
+
${Switch} $0
|
|
104
|
+
${Case} 0
|
|
105
|
+
${Break}
|
|
106
|
+
${Case} 1223 ;user aborted
|
|
107
|
+
${Break}
|
|
108
|
+
${Default}
|
|
109
|
+
MessageBox mb_IconStop|mb_TopMost|mb_SetForeground "Unable to elevate, error $0" /SD IDOK
|
|
110
|
+
${Break}
|
|
111
|
+
${EndSwitch}
|
|
112
|
+
Quit
|
|
113
|
+
!macroend
|
|
114
|
+
|
|
101
115
|
${if} $hasPerMachineInstallation == "1" # set in onInit by initMultiUser
|
|
102
116
|
${andIf} ${Silent}
|
|
103
117
|
${ifNot} ${UAC_IsAdmin}
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
${EndSwitch}
|
|
115
|
-
Quit
|
|
118
|
+
!ifdef UNELEVATED_PER_MACHINE_UPDATE
|
|
119
|
+
!insertmacro checkUnelevatedPerMachineUpdate
|
|
120
|
+
${if} $unelevatedAccess == "1"
|
|
121
|
+
${LogText} "Per-machine update without elevation (nsis.allowUnelevatedPerMachineUpdate): $INSTDIR and its registration are writable"
|
|
122
|
+
${else}
|
|
123
|
+
!insertmacro elevateSilentPerMachineUpdate
|
|
124
|
+
${endif}
|
|
125
|
+
!else
|
|
126
|
+
!insertmacro elevateSilentPerMachineUpdate
|
|
127
|
+
!endif
|
|
116
128
|
${else}
|
|
117
129
|
!insertmacro setInstallModePerAllUsers
|
|
118
130
|
${endIf}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
!include FileFunc.nsh
|
|
2
2
|
!include UAC.nsh
|
|
3
|
+
!include WordFunc.nsh
|
|
3
4
|
|
|
4
5
|
!define FOLDERID_UserProgramFiles {5CD7AEE2-2219-4A67-B85D-6C9CE15660CB}
|
|
5
6
|
!define KF_FLAG_CREATE 0x00008000
|
|
@@ -24,6 +25,8 @@ Var installMode
|
|
|
24
25
|
|
|
25
26
|
# сhecks registry for previous installation path
|
|
26
27
|
ReadRegStr $perUserInstallationFolder HKCU "${INSTALL_REGISTRY_KEY}" InstallLocation
|
|
28
|
+
# a double quote is invalid in a path: drop the closing quote that an earlier installer kept from a quoted /D= argument
|
|
29
|
+
${WordReplace} $perUserInstallationFolder '"' "" "+" $perUserInstallationFolder
|
|
27
30
|
${if} $perUserInstallationFolder != ""
|
|
28
31
|
StrCpy $INSTDIR $perUserInstallationFolder
|
|
29
32
|
${else}
|
|
@@ -64,15 +67,19 @@ Var installMode
|
|
|
64
67
|
SetShellVarContext all
|
|
65
68
|
|
|
66
69
|
!ifdef BUILD_UNINSTALLER
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
70
|
+
!ifndef UNELEVATED_PER_MACHINE_UPDATE
|
|
71
|
+
${IfNot} ${UAC_IsAdmin}
|
|
72
|
+
ShowWindow $HWNDPARENT ${SW_HIDE}
|
|
73
|
+
!insertmacro UAC_RunElevated
|
|
74
|
+
Quit
|
|
75
|
+
${endif}
|
|
76
|
+
!endif
|
|
72
77
|
!endif
|
|
73
78
|
|
|
74
79
|
# сheck registry for previous installation path
|
|
75
80
|
ReadRegStr $perMachineInstallationFolder HKLM "${INSTALL_REGISTRY_KEY}" InstallLocation
|
|
81
|
+
# a double quote is invalid in a path: drop the closing quote that an earlier installer kept from a quoted /D= argument
|
|
82
|
+
${WordReplace} $perMachineInstallationFolder '"' "" "+" $perMachineInstallationFolder
|
|
76
83
|
${if} $perMachineInstallationFolder != ""
|
|
77
84
|
StrCpy $INSTDIR $perMachineInstallationFolder
|
|
78
85
|
${else}
|
|
@@ -96,12 +103,34 @@ Var installMode
|
|
|
96
103
|
StrCpy $INSTDIR $R0
|
|
97
104
|
${endif}
|
|
98
105
|
|
|
106
|
+
!ifdef BUILD_UNINSTALLER
|
|
107
|
+
!ifdef UNELEVATED_PER_MACHINE_UPDATE
|
|
108
|
+
# the probes need $INSTDIR, so elevation is decided here rather than before it is read
|
|
109
|
+
${IfNot} ${UAC_IsAdmin}
|
|
110
|
+
!insertmacro checkUnelevatedPerMachineUpdate
|
|
111
|
+
${if} $unelevatedAccess == "1"
|
|
112
|
+
${LogText} "Per-machine uninstall for an update without elevation (nsis.allowUnelevatedPerMachineUpdate): $INSTDIR and its registration are writable"
|
|
113
|
+
${else}
|
|
114
|
+
ShowWindow $HWNDPARENT ${SW_HIDE}
|
|
115
|
+
!insertmacro UAC_RunElevated
|
|
116
|
+
# the installer waits for this process: exit with the elevated uninstaller's result
|
|
117
|
+
${if} $0 = 0
|
|
118
|
+
${andIf} $1 = 1
|
|
119
|
+
SetErrorLevel $2
|
|
120
|
+
${endif}
|
|
121
|
+
Quit
|
|
122
|
+
${endif}
|
|
123
|
+
${endif}
|
|
124
|
+
!endif
|
|
125
|
+
!endif
|
|
99
126
|
!macroend
|
|
100
127
|
!endif
|
|
101
128
|
|
|
102
129
|
# Custom function to handle /D parameter with spaces
|
|
103
|
-
# The /D parameter is special in NSIS - it must be the last parameter and
|
|
104
|
-
# Use StdUtils.
|
|
130
|
+
# The /D parameter is special in NSIS - it must be the last parameter and is not quoted: /S /D=C:\Program Files\App
|
|
131
|
+
# Use StdUtils.GetAllParameters to get the full command line, then parse /D= manually
|
|
132
|
+
# A caller that quotes the whole argument ("/D=C:\Program Files\App", as child_process.spawn does for a path with a space)
|
|
133
|
+
# leaves the closing quote in the rest of the command line, so the parsed argument is used for that form
|
|
105
134
|
!macro GetDParameter outVar
|
|
106
135
|
Push $R8
|
|
107
136
|
Push $R9
|
|
@@ -124,9 +153,20 @@ Var installMode
|
|
|
124
153
|
StrCpy $R5 $R8 3 $R6 # Get 3 characters starting at position $R6
|
|
125
154
|
${If} $R5 == "/D="
|
|
126
155
|
${OrIf} $R5 == "/d="
|
|
127
|
-
#
|
|
128
|
-
|
|
129
|
-
|
|
156
|
+
# the character before /D= tells whether the caller quoted the argument
|
|
157
|
+
StrCpy $R7 ""
|
|
158
|
+
${If} $R6 > 0
|
|
159
|
+
IntOp $R7 $R6 - 1
|
|
160
|
+
StrCpy $R7 $R8 1 $R7
|
|
161
|
+
${EndIf}
|
|
162
|
+
${If} $R7 == '"'
|
|
163
|
+
# quoted: the rest of the command line ends with the closing quote, take the parsed argument instead
|
|
164
|
+
${StdUtils.GetParameter} $R9 "D" ""
|
|
165
|
+
${Else}
|
|
166
|
+
# Found /D= or /d=, extract everything after it
|
|
167
|
+
IntOp $R6 $R6 + 3
|
|
168
|
+
StrCpy $R9 $R8 "" $R6
|
|
169
|
+
${EndIf}
|
|
130
170
|
${Break}
|
|
131
171
|
${EndIf}
|
|
132
172
|
IntOp $R6 $R6 + 1
|
|
@@ -4,6 +4,8 @@ FunctionEnd
|
|
|
4
4
|
|
|
5
5
|
Function un.onInit
|
|
6
6
|
SetOutPath $INSTDIR
|
|
7
|
+
# With installerDebugLogging, NSIS keeps $INSTDIR\install.log open from here on, and un.atomicRMDir leaves it in place. It stays in
|
|
8
|
+
# $INSTDIR, which only admins can write for a per-machine install: the elevated uninstaller must not log to a fixed path in %TEMP%.
|
|
7
9
|
${LogSet} on
|
|
8
10
|
|
|
9
11
|
!insertmacro check64BitAndSetRegView
|
|
@@ -66,6 +68,10 @@ Function un.atomicRMDir
|
|
|
66
68
|
Goto continue
|
|
67
69
|
|
|
68
70
|
isNotDir:
|
|
71
|
+
!ifdef ENABLE_LOGGING_ELECTRON_BUILDER
|
|
72
|
+
# held open by this uninstaller's log (or, with /D=, by the installer's): moving it aside fails, and the update aborted
|
|
73
|
+
StrCmp "$R0\$R2" "\install.log" continue
|
|
74
|
+
!endif
|
|
69
75
|
ClearErrors
|
|
70
76
|
Rename "$INSTDIR$R0\$R2" "$PLUGINSDIR\old-install$R0\$R2"
|
|
71
77
|
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import { ToolsetConfig } from "../configuration.js";
|
|
2
|
-
export declare function getLinuxToolsPath(toolset?: ToolsetConfig["linuxToolsMac"], resourcesDir?: string): Promise<string>;
|
|
3
|
-
export declare function getLinuxToolsMacToolset(toolset?: ToolsetConfig["linuxToolsMac"], resourcesDir?: string): Promise<{
|
|
4
|
-
ar: string;
|
|
5
|
-
lzip: string;
|
|
6
|
-
gtar: string;
|
|
7
|
-
}>;
|
|
8
|
-
//# sourceMappingURL=linuxToolsMac.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"linuxToolsMac.d.ts","sourceRoot":"","sources":["../../src/toolsets/linuxToolsMac.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAA;AAsBnD,wBAAsB,iBAAiB,CAAC,OAAO,CAAC,EAAE,aAAa,CAAC,eAAe,CAAC,EAAE,YAAY,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC,CAcxH;AAED,wBAAsB,uBAAuB,CAAC,OAAO,CAAC,EAAE,aAAa,CAAC,eAAe,CAAC,EAAE,YAAY,CAAC,EAAE,MAAM;;;;GAQ5G"}
|
|
@@ -1,44 +0,0 @@
|
|
|
1
|
-
import * as path from "path";
|
|
2
|
-
import { downloadBuilderToolset } from "../util/electronGet.js";
|
|
3
|
-
import { getCustomToolsetPath } from "./custom.js";
|
|
4
|
-
import { resolveToolsetVersion } from "./version.js";
|
|
5
|
-
// Newest linux-tools-mac bundle — selected when the config is unset / null / "latest".
|
|
6
|
-
const LINUX_TOOLS_MAC_LATEST = "1.0.1";
|
|
7
|
-
// no legacy toolset as macos arm64 BSD gtar/ar/lzip are not compatible with linux targets, so we always use newer toolset on macos for linux archives
|
|
8
|
-
const linuxToolsMacChecksums = {
|
|
9
|
-
// built against macOS 26 — binaries abort on older hosts (see https://github.com/electron-userland/electron-builder/issues/10084)
|
|
10
|
-
"1.0.0": {
|
|
11
|
-
"linux-tools-mac-darwin-arm64.tar.gz": "204e76f08364352edb28a6a4be87e8f9bd9340213865d9a0d1c664aa46fcf053",
|
|
12
|
-
"linux-tools-mac-darwin-x86_64.tar.gz": "7ee26dfbd0d2a4c2c83b55a9416a30cc84876eef01c6497ca49bb016a190c726",
|
|
13
|
-
},
|
|
14
|
-
// rebuilt on macOS 15 runners — binaries run on macOS 15+
|
|
15
|
-
"1.0.1": {
|
|
16
|
-
"linux-tools-mac-darwin-arm64.tar.gz": "3dcb43a12b8630919b8d5cc9045be102108b0edd9b0354e0a7409ee5b53141ac",
|
|
17
|
-
"linux-tools-mac-darwin-x86_64.tar.gz": "d62f5e2f6949c6420fdda8b18d2e70b0e14eeb959128c0cea11acada2c105ad9",
|
|
18
|
-
},
|
|
19
|
-
};
|
|
20
|
-
export async function getLinuxToolsPath(toolset, resourcesDir) {
|
|
21
|
-
if (typeof toolset === "object" && toolset != null) {
|
|
22
|
-
return getCustomToolsetPath(toolset, resourcesDir ?? "");
|
|
23
|
-
}
|
|
24
|
-
const arch = process.arch === "arm64" ? "arm64" : "x86_64";
|
|
25
|
-
const version = resolveToolsetVersion(toolset, LINUX_TOOLS_MAC_LATEST);
|
|
26
|
-
const checksums = linuxToolsMacChecksums[version];
|
|
27
|
-
const filename = `linux-tools-mac-darwin-${arch}.tar.gz`;
|
|
28
|
-
return downloadBuilderToolset({
|
|
29
|
-
releaseName: `linux-tools-mac@${version}`,
|
|
30
|
-
filenameWithExt: filename,
|
|
31
|
-
checksums,
|
|
32
|
-
githubOrgRepo: "electron-userland/electron-builder-binaries",
|
|
33
|
-
});
|
|
34
|
-
}
|
|
35
|
-
export async function getLinuxToolsMacToolset(toolset, resourcesDir) {
|
|
36
|
-
const linuxToolsPath = await getLinuxToolsPath(toolset, resourcesDir);
|
|
37
|
-
const bin = (pkg) => path.join(linuxToolsPath, "bin", pkg);
|
|
38
|
-
return {
|
|
39
|
-
ar: bin("ar"),
|
|
40
|
-
lzip: bin("lzip"),
|
|
41
|
-
gtar: bin("gtar"),
|
|
42
|
-
};
|
|
43
|
-
}
|
|
44
|
-
//# sourceMappingURL=linuxToolsMac.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"linuxToolsMac.js","sourceRoot":"","sources":["../../src/toolsets/linuxToolsMac.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,IAAI,MAAM,MAAM,CAAA;AAE5B,OAAO,EAAE,sBAAsB,EAAE,MAAM,wBAAwB,CAAA;AAC/D,OAAO,EAAE,oBAAoB,EAAE,MAAM,aAAa,CAAA;AAClD,OAAO,EAAE,qBAAqB,EAAE,MAAM,cAAc,CAAA;AAEpD,uFAAuF;AACvF,MAAM,sBAAsB,GAAG,OAAO,CAAA;AAEtC,sJAAsJ;AACtJ,MAAM,sBAAsB,GAAG;IAC7B,kIAAkI;IAClI,OAAO,EAAE;QACP,qCAAqC,EAAE,kEAAkE;QACzG,sCAAsC,EAAE,kEAAkE;KAC3G;IACD,0DAA0D;IAC1D,OAAO,EAAE;QACP,qCAAqC,EAAE,kEAAkE;QACzG,sCAAsC,EAAE,kEAAkE;KAC3G;CACO,CAAA;AAEV,MAAM,CAAC,KAAK,UAAU,iBAAiB,CAAC,OAAwC,EAAE,YAAqB;IACrG,IAAI,OAAO,OAAO,KAAK,QAAQ,IAAI,OAAO,IAAI,IAAI,EAAE,CAAC;QACnD,OAAO,oBAAoB,CAAC,OAAO,EAAE,YAAY,IAAI,EAAE,CAAC,CAAA;IAC1D,CAAC;IACD,MAAM,IAAI,GAAG,OAAO,CAAC,IAAI,KAAK,OAAO,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,QAAQ,CAAA;IAC1D,MAAM,OAAO,GAAG,qBAAqB,CAAC,OAAO,EAAE,sBAAsB,CAAC,CAAA;IACtE,MAAM,SAAS,GAAG,sBAAsB,CAAC,OAAO,CAAC,CAAA;IACjD,MAAM,QAAQ,GAA2B,0BAA0B,IAAI,SAAS,CAAA;IAChF,OAAO,sBAAsB,CAAC;QAC5B,WAAW,EAAE,mBAAmB,OAAO,EAAE;QACzC,eAAe,EAAE,QAAQ;QACzB,SAAS;QACT,aAAa,EAAE,6CAA6C;KAC7D,CAAC,CAAA;AACJ,CAAC;AAED,MAAM,CAAC,KAAK,UAAU,uBAAuB,CAAC,OAAwC,EAAE,YAAqB;IAC3G,MAAM,cAAc,GAAG,MAAM,iBAAiB,CAAC,OAAO,EAAE,YAAY,CAAC,CAAA;IACrE,MAAM,GAAG,GAAG,CAAC,GAAW,EAAE,EAAE,CAAC,IAAI,CAAC,IAAI,CAAC,cAAc,EAAE,KAAK,EAAE,GAAG,CAAC,CAAA;IAClE,OAAO;QACL,EAAE,EAAE,GAAG,CAAC,IAAI,CAAC;QACb,IAAI,EAAE,GAAG,CAAC,MAAM,CAAC;QACjB,IAAI,EAAE,GAAG,CAAC,MAAM,CAAC;KAClB,CAAA;AACH,CAAC","sourcesContent":["import * as path from \"path\"\nimport { ToolsetConfig } from \"../configuration.js\"\nimport { downloadBuilderToolset } from \"../util/electronGet.js\"\nimport { getCustomToolsetPath } from \"./custom.js\"\nimport { resolveToolsetVersion } from \"./version.js\"\n\n// Newest linux-tools-mac bundle — selected when the config is unset / null / \"latest\".\nconst LINUX_TOOLS_MAC_LATEST = \"1.0.1\"\n\n// no legacy toolset as macos arm64 BSD gtar/ar/lzip are not compatible with linux targets, so we always use newer toolset on macos for linux archives\nconst linuxToolsMacChecksums = {\n // built against macOS 26 — binaries abort on older hosts (see https://github.com/electron-userland/electron-builder/issues/10084)\n \"1.0.0\": {\n \"linux-tools-mac-darwin-arm64.tar.gz\": \"204e76f08364352edb28a6a4be87e8f9bd9340213865d9a0d1c664aa46fcf053\",\n \"linux-tools-mac-darwin-x86_64.tar.gz\": \"7ee26dfbd0d2a4c2c83b55a9416a30cc84876eef01c6497ca49bb016a190c726\",\n },\n // rebuilt on macOS 15 runners — binaries run on macOS 15+\n \"1.0.1\": {\n \"linux-tools-mac-darwin-arm64.tar.gz\": \"3dcb43a12b8630919b8d5cc9045be102108b0edd9b0354e0a7409ee5b53141ac\",\n \"linux-tools-mac-darwin-x86_64.tar.gz\": \"d62f5e2f6949c6420fdda8b18d2e70b0e14eeb959128c0cea11acada2c105ad9\",\n },\n} as const\n\nexport async function getLinuxToolsPath(toolset?: ToolsetConfig[\"linuxToolsMac\"], resourcesDir?: string): Promise<string> {\n if (typeof toolset === \"object\" && toolset != null) {\n return getCustomToolsetPath(toolset, resourcesDir ?? \"\")\n }\n const arch = process.arch === \"arm64\" ? \"arm64\" : \"x86_64\"\n const version = resolveToolsetVersion(toolset, LINUX_TOOLS_MAC_LATEST)\n const checksums = linuxToolsMacChecksums[version]\n const filename: keyof typeof checksums = `linux-tools-mac-darwin-${arch}.tar.gz`\n return downloadBuilderToolset({\n releaseName: `linux-tools-mac@${version}`,\n filenameWithExt: filename,\n checksums,\n githubOrgRepo: \"electron-userland/electron-builder-binaries\",\n })\n}\n\nexport async function getLinuxToolsMacToolset(toolset?: ToolsetConfig[\"linuxToolsMac\"], resourcesDir?: string) {\n const linuxToolsPath = await getLinuxToolsPath(toolset, resourcesDir)\n const bin = (pkg: string) => path.join(linuxToolsPath, \"bin\", pkg)\n return {\n ar: bin(\"ar\"),\n lzip: bin(\"lzip\"),\n gtar: bin(\"gtar\"),\n }\n}\n"]}
|