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CAAC,gBAAgB,EAAE,IAAI,EAAE,UAAU,EAAE,MAAM,EAAE,QAAQ,CAAC,CAAC,CAAA;QAC9E,OAAO,QAAQ,CAAA;IACjB,CAAC;IAED,OAAO,IAAI,CAAA;AACb,CAAC","sourcesContent":["import { DmgOptions, Target } from \"app-builder-lib\"\nimport { findIdentity, isSignAllowed } from \"app-builder-lib/out/codeSign/macCodeSign\"\nimport MacPackager from \"app-builder-lib/out/macPackager\"\nimport { createBlockmap } from \"app-builder-lib/out/targets/differentialUpdateInfoBuilder\"\nimport { executeAppBuilderAsJson } from \"app-builder-lib/out/util/appBuilder\"\nimport { sanitizeFileName } from \"app-builder-lib/out/util/filename\"\nimport { Arch, AsyncTaskManager, exec, getArchSuffix, InvalidConfigurationError, isEmptyOrSpaces, log, spawn, retry } from \"builder-util\"\nimport { CancellationToken } from \"builder-util-runtime\"\nimport { copyDir, copyFile, exists, statOrNull } from \"builder-util/out/fs\"\nimport { stat } from \"fs-extra\"\nimport * as path from \"path\"\nimport { TmpDir } from \"temp-file\"\nimport { addLicenseToDmg } from \"./dmgLicense\"\nimport { attachAndExecute, computeBackground, detach, getDmgVendorPath } from \"./dmgUtil\"\nimport { release as getOsRelease } from \"os\"\n\nexport class DmgTarget extends Target {\n readonly options: DmgOptions = this.packager.config.dmg || Object.create(null)\n\n constructor(\n private readonly packager: MacPackager,\n readonly outDir: string\n ) {\n super(\"dmg\")\n }\n\n async build(appPath: string, arch: Arch) {\n const packager = this.packager\n // tslint:disable-next-line:no-invalid-template-strings\n const artifactName = packager.expandArtifactNamePattern(\n this.options,\n \"dmg\",\n arch,\n \"${productName}-\" + (packager.platformSpecificBuildOptions.bundleShortVersion || \"${version}\") + \"-${arch}.${ext}\",\n true,\n packager.platformSpecificBuildOptions.defaultArch\n )\n const artifactPath = path.join(this.outDir, artifactName)\n await packager.info.callArtifactBuildStarted({\n targetPresentableName: \"DMG\",\n file: artifactPath,\n arch,\n })\n\n const volumeName = sanitizeFileName(this.computeVolumeName(arch, this.options.title))\n\n const tempDmg = await createStageDmg(await packager.getTempFile(\".dmg\"), appPath, volumeName)\n\n const specification = await this.computeDmgOptions()\n // https://github.com/electron-userland/electron-builder/issues/2115\n const backgroundFile = specification.background == null ? null : await transformBackgroundFileIfNeed(specification.background, packager.info.tempDirManager)\n const finalSize = await computeAssetSize(packager.info.cancellationToken, tempDmg, specification, backgroundFile)\n const expandingFinalSize = finalSize * 0.1 + finalSize\n await exec(\"hdiutil\", [\"resize\", \"-size\", expandingFinalSize.toString(), tempDmg])\n\n const volumePath = path.join(\"/Volumes\", volumeName)\n if (await exists(volumePath)) {\n log.debug({ volumePath }, \"unmounting previous disk image\")\n await detach(volumePath)\n }\n\n if (!(await attachAndExecute(tempDmg, true, () => customizeDmg(volumePath, specification, packager, backgroundFile)))) {\n return\n }\n\n // dmg file must not exist otherwise hdiutil failed (https://github.com/electron-userland/electron-builder/issues/1308#issuecomment-282847594), so, -ov must be specified\n const args = [\"convert\", tempDmg, \"-ov\", \"-format\", specification.format!, \"-o\", artifactPath]\n if (specification.format === \"UDZO\") {\n args.push(\"-imagekey\", `zlib-level=${process.env.ELECTRON_BUILDER_COMPRESSION_LEVEL || \"9\"}`)\n }\n await spawn(\"hdiutil\", addLogLevel(args))\n if (this.options.internetEnabled && parseInt(getOsRelease().split(\".\")[0], 10) < 19) {\n await exec(\"hdiutil\", addLogLevel([\"internet-enable\"]).concat(artifactPath))\n }\n\n const licenseData = await addLicenseToDmg(packager, artifactPath)\n if (packager.packagerOptions.effectiveOptionComputed != null) {\n await packager.packagerOptions.effectiveOptionComputed({ licenseData })\n }\n\n if (this.options.sign === true) {\n await this.signDmg(artifactPath)\n }\n\n const safeArtifactName = packager.computeSafeArtifactName(artifactName, \"dmg\")\n const updateInfo = this.options.writeUpdateInfo === false ? null : await createBlockmap(artifactPath, this, packager, safeArtifactName)\n await packager.info.callArtifactBuildCompleted({\n file: artifactPath,\n safeArtifactName,\n target: this,\n arch,\n packager,\n isWriteUpdateInfo: updateInfo != null,\n updateInfo,\n })\n }\n\n private async signDmg(artifactPath: string) {\n if (!isSignAllowed(false)) {\n return\n }\n\n const packager = this.packager\n const qualifier = packager.platformSpecificBuildOptions.identity\n // explicitly disabled if set to null\n if (qualifier === null) {\n // macPackager already somehow handle this situation, so, here just return\n return\n }\n\n const keychainFile = (await packager.codeSigningInfo.value).keychainFile\n const certificateType = \"Developer ID Application\"\n let identity = await findIdentity(certificateType, qualifier, keychainFile)\n if (identity == null) {\n identity = await findIdentity(\"Mac Developer\", qualifier, keychainFile)\n if (identity == null) {\n return\n }\n }\n\n const args = [\"--sign\", identity.hash!]\n if (keychainFile != null) {\n args.push(\"--keychain\", keychainFile)\n }\n args.push(artifactPath)\n await exec(\"codesign\", args)\n }\n\n computeVolumeName(arch: Arch, custom?: string | null): string {\n const appInfo = this.packager.appInfo\n const shortVersion = this.packager.platformSpecificBuildOptions.bundleShortVersion || appInfo.version\n const archString = getArchSuffix(arch, this.packager.platformSpecificBuildOptions.defaultArch)\n\n if (custom == null) {\n return `${appInfo.productFilename} ${shortVersion}${archString}`\n }\n\n return custom\n .replace(/\\${arch}/g, archString)\n .replace(/\\${shortVersion}/g, shortVersion)\n .replace(/\\${version}/g, appInfo.version)\n .replace(/\\${name}/g, appInfo.name)\n .replace(/\\${productName}/g, appInfo.productName)\n }\n\n // public to test\n async computeDmgOptions(): Promise<DmgOptions> {\n const packager = this.packager\n const specification: DmgOptions = { ...this.options }\n if (specification.icon == null && specification.icon !== null) {\n specification.icon = await packager.getIconPath()\n }\n\n if (specification.icon != null && isEmptyOrSpaces(specification.icon)) {\n throw new InvalidConfigurationError(\"dmg.icon cannot be specified as empty string\")\n }\n\n const background = specification.background\n if (specification.backgroundColor != null) {\n if (background != null) {\n throw new InvalidConfigurationError(\"Both dmg.backgroundColor and dmg.background are specified — please set the only one\")\n }\n } else if (background == null) {\n specification.background = await computeBackground(packager)\n } else {\n specification.background = path.resolve(packager.info.projectDir, background)\n }\n\n if (specification.format == null) {\n if (process.env.ELECTRON_BUILDER_COMPRESSION_LEVEL != null) {\n ;(specification as any).format = \"UDZO\"\n } else if (packager.compression === \"store\") {\n specification.format = \"UDRO\"\n } else {\n specification.format = packager.compression === \"maximum\" ? \"UDBZ\" : \"UDZO\"\n }\n }\n\n if (specification.contents == null) {\n specification.contents = [\n {\n x: 130,\n y: 220,\n },\n {\n x: 410,\n y: 220,\n type: \"link\",\n path: \"/Applications\",\n },\n ]\n }\n return specification\n }\n}\n\nasync function createStageDmg(tempDmg: string, appPath: string, volumeName: string) {\n //noinspection SpellCheckingInspection\n const imageArgs = addLogLevel([\"create\", \"-srcfolder\", appPath, \"-volname\", volumeName, \"-anyowners\", \"-nospotlight\", \"-format\", \"UDRW\"])\n if (log.isDebugEnabled) {\n imageArgs.push(\"-debug\")\n }\n\n let filesystem = [\"HFS+\", \"-fsargs\", \"-c c=64,a=16,e=16\"]\n if (process.arch === \"arm64\") {\n // Apple Silicon `hdiutil` dropped support for HFS+, so we force the latest type\n // https://github.com/electron-userland/electron-builder/issues/4606\n filesystem = [\"APFS\"]\n log.warn(null, \"Detected arm64 process, HFS+ is unavailable. Creating dmg with APFS - supports Mac OSX 10.12+\")\n }\n imageArgs.push(\"-fs\", ...filesystem)\n imageArgs.push(tempDmg)\n // The reason for retrying up to ten times is that hdiutil create in some cases fail to unmount due to \"resource busy\".\n // https://github.com/electron-userland/electron-builder/issues/5431\n await retry(() => spawn(\"hdiutil\", imageArgs), 5, 1000)\n return tempDmg\n}\n\nfunction addLogLevel(args: Array<string>): Array<string> {\n args.push(process.env.DEBUG_DMG === \"true\" ? \"-verbose\" : \"-quiet\")\n return args\n}\n\nasync function computeAssetSize(cancellationToken: CancellationToken, dmgFile: string, specification: DmgOptions, backgroundFile: string | null | undefined) {\n const asyncTaskManager = new AsyncTaskManager(cancellationToken)\n asyncTaskManager.addTask(stat(dmgFile))\n\n if (specification.icon != null) {\n asyncTaskManager.addTask(statOrNull(specification.icon))\n }\n\n if (backgroundFile != null) {\n asyncTaskManager.addTask(stat(backgroundFile))\n }\n\n let result = 32 * 1024\n for (const stat of await asyncTaskManager.awaitTasks()) {\n if (stat != null) {\n result += stat.size\n }\n }\n return result\n}\n\nasync function customizeDmg(volumePath: string, specification: DmgOptions, packager: MacPackager, backgroundFile: string | null | undefined) {\n const window = specification.window\n const isValidIconTextSize = !!specification.iconTextSize && specification.iconTextSize >= 10 && specification.iconTextSize <= 16\n const iconTextSize = isValidIconTextSize ? specification.iconTextSize : 12\n const env: any = {\n ...process.env,\n volumePath,\n appFileName: `${packager.appInfo.productFilename}.app`,\n iconSize: specification.iconSize || 80,\n iconTextSize,\n\n PYTHONIOENCODING: \"utf8\",\n }\n\n if (specification.backgroundColor != null || specification.background == null) {\n env.backgroundColor = specification.backgroundColor || \"#ffffff\"\n\n if (window != null) {\n env.windowX = (window.x == null ? 100 : window.x).toString()\n env.windowY = (window.y == null ? 400 : window.y).toString()\n env.windowWidth = (window.width || 540).toString()\n env.windowHeight = (window.height || 380).toString()\n }\n } else {\n delete env.backgroundColor\n }\n\n const args = [\"dmg\", \"--volume\", volumePath]\n if (specification.icon != null) {\n args.push(\"--icon\", (await packager.getResource(specification.icon))!)\n }\n if (backgroundFile != null) {\n args.push(\"--background\", backgroundFile)\n }\n\n const data: any = await executeAppBuilderAsJson(args)\n if (data.backgroundWidth != null) {\n env.windowWidth = window == null ? null : window.width\n env.windowHeight = window == null ? null : window.height\n\n if (env.windowWidth == null) {\n env.windowWidth = data.backgroundWidth.toString()\n }\n if (env.windowHeight == null) {\n env.windowHeight = data.backgroundHeight.toString()\n }\n\n if (env.windowX == null) {\n env.windowX = 400\n }\n if (env.windowY == null) {\n env.windowY = Math.round((1440 - env.windowHeight) / 2).toString()\n }\n }\n\n Object.assign(env, data)\n\n const asyncTaskManager = new AsyncTaskManager(packager.info.cancellationToken)\n env.iconLocations = await computeDmgEntries(specification, volumePath, packager, asyncTaskManager)\n await asyncTaskManager.awaitTasks()\n const executePython = async (execName: string) => {\n let pythonPath = process.env.PYTHON_PATH\n if (!pythonPath) {\n pythonPath = (await exec(\"which\", [execName])).trim()\n }\n await exec(pythonPath, [path.join(getDmgVendorPath(), \"dmgbuild/core.py\")], {\n cwd: getDmgVendorPath(),\n env,\n })\n }\n try {\n await executePython(\"python3\")\n } catch (error: any) {\n await executePython(\"python\")\n }\n return packager.packagerOptions.effectiveOptionComputed == null || !(await packager.packagerOptions.effectiveOptionComputed({ volumePath, specification, packager }))\n}\n\nasync function computeDmgEntries(specification: DmgOptions, volumePath: string, packager: MacPackager, asyncTaskManager: AsyncTaskManager): Promise<string> {\n let result = \"\"\n for (const c of specification.contents!) {\n if (c.path != null && c.path.endsWith(\".app\") && c.type !== \"link\") {\n log.warn({ path: c.path, reason: \"actual path to app will be used instead\" }, \"do not specify path for application\")\n }\n\n const entryPath = c.path || `${packager.appInfo.productFilename}.app`\n const entryName = c.name || path.basename(entryPath)\n const escapedEntryName = entryName.replace(/['\\\\]/g, match => `\\\\${match}`)\n if (result.length !== 0) {\n result += \",\\n\"\n }\n result += `'${escapedEntryName}': (${c.x}, ${c.y})`\n\n if (c.type === \"link\") {\n asyncTaskManager.addTask(exec(\"ln\", [\"-s\", `/${entryPath.startsWith(\"/\") ? entryPath.substring(1) : entryPath}`, `${volumePath}/${entryName}`]))\n }\n // use c.path instead of entryPath (to be sure that this logic is not applied to .app bundle) https://github.com/electron-userland/electron-builder/issues/2147\n else if (!isEmptyOrSpaces(c.path) && (c.type === \"file\" || c.type === \"dir\")) {\n const source = await packager.getResource(c.path)\n if (source == null) {\n log.warn({ entryPath, reason: \"doesn't exist\" }, \"skipped DMG item copying\")\n continue\n }\n\n const destination = `${volumePath}/${entryName}`\n asyncTaskManager.addTask(c.type === \"dir\" || (await stat(source)).isDirectory() ? copyDir(source, destination) : copyFile(source, destination))\n }\n }\n return result\n}\n\nasync function transformBackgroundFileIfNeed(file: string, tmpDir: TmpDir): Promise<string> {\n if (file.endsWith(\".tiff\") || file.endsWith(\".TIFF\")) {\n return file\n }\n\n const retinaFile = file.replace(/\\.([a-z]+)$/, \"@2x.$1\")\n if (await exists(retinaFile)) {\n const tiffFile = await tmpDir.getTempFile({ suffix: \".tiff\" })\n await exec(\"tiffutil\", [\"-cathidpicheck\", file, retinaFile, \"-out\", tiffFile])\n return tiffFile\n }\n\n return file\n}\n"]}