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0B,EAAE,IAAI,CAAC,CAAA;QAClE,YAAY,CAAC,IAAI,CAAC,wBAAwB,CAAC,CAAA;QAC3C,YAAY,CAAC,IAAI,CAAC,oBAAoB,CAAC,CAAA;KACxC;SAAM;QACL,YAAY,CAAC,IAAI,CAAC,IAAI,CAAC,CAAA;KACxB;IACD,OAAO,YAAY,CAAC,IAAI,CAAC,GAAG,CAAC,CAAA;AAC/B,CAAC;AAED,SAAS,eAAe,CAAC,UAAyB;IAChD,IAAI,sBAAsB,CAAC,UAAU,EAAE,kBAAkB,CAAC,EAAE;QAC1D,OAAO,uDAAuD,CAAA;KAC/D;SAAM;QACL,OAAO,EAAE,CAAA;KACV;AACH,CAAC;AAED,SAAS,sBAAsB,CAAC,UAAyB,EAAE,YAAoB;IAC7E,MAAM,gBAAgB,GAAG,YAAY,CAAC,SAAS,CAAC,CAAC,EAAE,YAAY,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC,CAAA;IAC7E,OAAO,UAAU,CAAC,IAAI,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,QAAQ,CAAC,gBAAgB,CAAC,CAAC,CAAA;AAC7D,CAAC;AAED,SAAS,sBAAsB,CAAC,UAAyB;IACvD,OAAO,UAAU,CAAC,IAAI,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,QAAQ,CAAC,SAAS,CAAC,IAAI,EAAE,CAAC,QAAQ,CAAC,cAAc,CAAC,CAAC,CAAA;AACrF,CAAC","sourcesContent":["import BluebirdPromise from \"bluebird-lst\"\nimport { Arch, asArray, deepAssign, InvalidConfigurationError, log } from \"builder-util\"\nimport { copyOrLinkFile, walk } from \"builder-util/out/fs\"\nimport { emptyDir, readdir, readFile, writeFile } from \"fs-extra\"\nimport * as path from \"path\"\nimport { AppXOptions } from \"../\"\nimport { getSignVendorPath, isOldWin6 } from \"../codeSign/windowsCodeSign\"\nimport { Target } from \"../core\"\nimport { getTemplatePath } from \"../util/pathManager\"\nimport { VmManager } from \"../vm/vm\"\nimport { WinPackager } from \"../winPackager\"\nimport { createStageDir } from \"./targetUtil\"\n\nconst APPX_ASSETS_DIR_NAME = \"appx\"\n\nconst vendorAssetsForDefaultAssets: { [key: string]: string } = {\n \"StoreLogo.png\": \"SampleAppx.50x50.png\",\n \"Square150x150Logo.png\": \"SampleAppx.150x150.png\",\n \"Square44x44Logo.png\": \"SampleAppx.44x44.png\",\n \"Wide310x150Logo.png\": \"SampleAppx.310x150.png\",\n}\n\nconst DEFAULT_RESOURCE_LANG = \"en-US\"\n\nexport default class AppXTarget extends Target {\n readonly options: AppXOptions = deepAssign({}, this.packager.platformSpecificBuildOptions, this.packager.config.appx)\n\n constructor(private readonly packager: WinPackager, readonly outDir: string) {\n super(\"appx\")\n\n if (process.platform !== \"darwin\" && (process.platform !== \"win32\" || isOldWin6())) {\n throw new Error(\"AppX is supported only on Windows 10 or Windows Server 2012 R2 (version number 6.3+)\")\n }\n }\n\n // https://docs.microsoft.com/en-us/windows/uwp/packaging/create-app-package-with-makeappx-tool#mapping-files\n async build(appOutDir: string, arch: Arch): Promise<any> {\n const packager = this.packager\n const artifactName = packager.expandArtifactBeautyNamePattern(this.options, \"appx\", arch)\n const artifactPath = path.join(this.outDir, artifactName)\n await packager.info.callArtifactBuildStarted({\n targetPresentableName: \"AppX\",\n file: artifactPath,\n arch,\n })\n\n const vendorPath = await getSignVendorPath()\n const vm = await packager.vm.value\n\n const stageDir = await createStageDir(this, packager, arch)\n\n const mappingFile = stageDir.getTempFile(\"mapping.txt\")\n const makeAppXArgs = [\"pack\", \"/o\" /* overwrite the output file if it exists */, \"/f\", vm.toVmFile(mappingFile), \"/p\", vm.toVmFile(artifactPath)]\n if (packager.compression === \"store\") {\n makeAppXArgs.push(\"/nc\")\n }\n\n const mappingList: Array<Array<string>> = []\n mappingList.push(\n await BluebirdPromise.map(walk(appOutDir), file => {\n let appxPath = file.substring(appOutDir.length + 1)\n if (path.sep !== \"\\\\\") {\n appxPath = appxPath.replace(/\\//g, \"\\\\\")\n }\n return `\"${vm.toVmFile(file)}\" \"app\\\\${appxPath}\"`\n })\n )\n\n const userAssetDir = await this.packager.getResource(undefined, APPX_ASSETS_DIR_NAME)\n const assetInfo = await AppXTarget.computeUserAssets(vm, vendorPath, userAssetDir)\n const userAssets = assetInfo.userAssets\n\n const manifestFile = stageDir.getTempFile(\"AppxManifest.xml\")\n await this.writeManifest(manifestFile, arch, await this.computePublisherName(), userAssets)\n await packager.info.callAppxManifestCreated(manifestFile)\n mappingList.push(assetInfo.mappings)\n mappingList.push([`\"${vm.toVmFile(manifestFile)}\" \"AppxManifest.xml\"`])\n const signToolArch = arch === Arch.arm64 ? \"x64\" : Arch[arch]\n\n if (isScaledAssetsProvided(userAssets)) {\n const outFile = vm.toVmFile(stageDir.getTempFile(\"resources.pri\"))\n const makePriPath = vm.toVmFile(path.join(vendorPath, \"windows-10\", signToolArch, \"makepri.exe\"))\n\n const assetRoot = stageDir.getTempFile(\"appx/assets\")\n await emptyDir(assetRoot)\n await BluebirdPromise.map(assetInfo.allAssets, it => copyOrLinkFile(it, path.join(assetRoot, path.basename(it))))\n\n await vm.exec(makePriPath, [\n \"new\",\n \"/Overwrite\",\n \"/Manifest\",\n vm.toVmFile(manifestFile),\n \"/ProjectRoot\",\n vm.toVmFile(path.dirname(assetRoot)),\n \"/ConfigXml\",\n vm.toVmFile(path.join(getTemplatePath(\"appx\"), \"priconfig.xml\")),\n \"/OutputFile\",\n outFile,\n ])\n\n // in addition to resources.pri, resources.scale-140.pri and other such files will be generated\n for (const resourceFile of (await readdir(stageDir.dir)).filter(it => it.startsWith(\"resources.\")).sort()) {\n mappingList.push([`\"${vm.toVmFile(stageDir.getTempFile(resourceFile))}\" \"${resourceFile}\"`])\n }\n makeAppXArgs.push(\"/l\")\n }\n\n let mapping = \"[Files]\"\n for (const list of mappingList) {\n mapping += \"\\r\\n\" + list.join(\"\\r\\n\")\n }\n await writeFile(mappingFile, mapping)\n packager.debugLogger.add(\"appx.mapping\", mapping)\n\n if (this.options.makeappxArgs != null) {\n makeAppXArgs.push(...this.options.makeappxArgs)\n }\n await vm.exec(vm.toVmFile(path.join(vendorPath, \"windows-10\", signToolArch, \"makeappx.exe\")), makeAppXArgs)\n await packager.sign(artifactPath)\n\n await stageDir.cleanup()\n\n await packager.info.callArtifactBuildCompleted({\n file: artifactPath,\n packager,\n arch,\n safeArtifactName: packager.computeSafeArtifactName(artifactName, \"appx\"),\n target: this,\n isWriteUpdateInfo: this.options.electronUpdaterAware,\n })\n }\n\n private static async computeUserAssets(vm: VmManager, vendorPath: string, userAssetDir: string | null) {\n const mappings: Array<string> = []\n let userAssets: Array<string>\n const allAssets: Array<string> = []\n if (userAssetDir == null) {\n userAssets = []\n } else {\n userAssets = (await readdir(userAssetDir)).filter(it => !it.startsWith(\".\") && !it.endsWith(\".db\") && it.includes(\".\"))\n for (const name of userAssets) {\n mappings.push(`\"${vm.toVmFile(userAssetDir)}${vm.pathSep}${name}\" \"assets\\\\${name}\"`)\n allAssets.push(path.join(userAssetDir, name))\n }\n }\n\n for (const defaultAsset of Object.keys(vendorAssetsForDefaultAssets)) {\n if (userAssets.length === 0 || !isDefaultAssetIncluded(userAssets, defaultAsset)) {\n const file = path.join(vendorPath, \"appxAssets\", vendorAssetsForDefaultAssets[defaultAsset])\n mappings.push(`\"${vm.toVmFile(file)}\" \"assets\\\\${defaultAsset}\"`)\n allAssets.push(file)\n }\n }\n\n // we do not use process.arch to build path to tools, because even if you are on x64, ia32 appx tool must be used if you build appx for ia32\n return { userAssets, mappings, allAssets }\n }\n\n // https://github.com/electron-userland/electron-builder/issues/2108#issuecomment-333200711\n private async computePublisherName() {\n if ((await this.packager.cscInfo.value) == null) {\n log.info({ reason: \"Windows Store only build\" }, \"AppX is not signed\")\n return this.options.publisher || \"CN=ms\"\n }\n\n const certInfo = await this.packager.lazyCertInfo.value\n const publisher = this.options.publisher || (certInfo == null ? null : certInfo.bloodyMicrosoftSubjectDn)\n if (publisher == null) {\n throw new Error(\"Internal error: cannot compute subject using certificate info\")\n }\n return publisher\n }\n\n private async writeManifest(outFile: string, arch: Arch, publisher: string, userAssets: Array<string>) {\n const appInfo = this.packager.appInfo\n const options = this.options\n const executable = `app\\\\${appInfo.productFilename}.exe`\n const displayName = options.displayName || appInfo.productName\n const extensions = await this.getExtensions(executable, displayName)\n\n const manifest = (await readFile(path.join(getTemplatePath(\"appx\"), \"appxmanifest.xml\"), \"utf8\")).replace(/\\${([a-zA-Z0-9]+)}/g, (match, p1): string => {\n switch (p1) {\n case \"publisher\":\n return publisher\n\n case \"publisherDisplayName\": {\n const name = options.publisherDisplayName || appInfo.companyName\n if (name == null) {\n throw new InvalidConfigurationError(`Please specify \"author\" in the application package.json — it is required because \"appx.publisherDisplayName\" is not set.`)\n }\n return name\n }\n\n case \"version\":\n return appInfo.getVersionInWeirdWindowsForm(options.setBuildNumber === true)\n\n case \"applicationId\": {\n const result = options.applicationId || options.identityName || appInfo.name\n if (!isNaN(parseInt(result[0], 10))) {\n let message = `AppX Application.Id can’t start with numbers: \"${result}\"`\n if (options.applicationId == null) {\n message += `\\nPlease set appx.applicationId (or correct appx.identityName or name)`\n }\n throw new InvalidConfigurationError(message)\n }\n return result\n }\n\n case \"identityName\":\n return options.identityName || appInfo.name\n\n case \"executable\":\n return executable\n\n case \"displayName\":\n return displayName\n\n case \"description\":\n return appInfo.description || appInfo.productName\n\n case \"backgroundColor\":\n return options.backgroundColor || \"#464646\"\n\n case \"logo\":\n return \"assets\\\\StoreLogo.png\"\n\n case \"square150x150Logo\":\n return \"assets\\\\Square150x150Logo.png\"\n\n case \"square44x44Logo\":\n return \"assets\\\\Square44x44Logo.png\"\n\n case \"lockScreen\":\n return lockScreenTag(userAssets)\n\n case \"defaultTile\":\n return defaultTileTag(userAssets, options.showNameOnTiles || false)\n\n case \"splashScreen\":\n return splashScreenTag(userAssets)\n\n case \"arch\":\n return arch === Arch.ia32 ? \"x86\" : arch === Arch.arm64 ? \"arm64\" : \"x64\"\n\n case \"resourceLanguages\":\n return resourceLanguageTag(asArray(options.languages))\n\n case \"extensions\":\n return extensions\n\n case \"minVersion\":\n return arch === Arch.arm64 ? \"10.0.16299.0\" : \"10.0.14316.0\"\n\n case \"maxVersionTested\":\n return arch === Arch.arm64 ? \"10.0.16299.0\" : \"10.0.14316.0\"\n\n default:\n throw new Error(`Macro ${p1} is not defined`)\n }\n })\n await writeFile(outFile, manifest)\n }\n\n private async getExtensions(executable: string, displayName: string): Promise<string> {\n const uriSchemes = asArray(this.packager.config.protocols).concat(asArray(this.packager.platformSpecificBuildOptions.protocols))\n\n const fileAssociations = asArray(this.packager.config.fileAssociations).concat(asArray(this.packager.platformSpecificBuildOptions.fileAssociations))\n\n let isAddAutoLaunchExtension = this.options.addAutoLaunchExtension\n if (isAddAutoLaunchExtension === undefined) {\n const deps = this.packager.info.metadata.dependencies\n isAddAutoLaunchExtension = deps != null && deps[\"electron-winstore-auto-launch\"] != null\n }\n\n if (!isAddAutoLaunchExtension && uriSchemes.length === 0 && fileAssociations.length === 0 && this.options.customExtensionsPath === undefined) {\n return \"\"\n }\n\n let extensions = \"<Extensions>\"\n\n if (isAddAutoLaunchExtension) {\n extensions += `\n <desktop:Extension Category=\"windows.startupTask\" Executable=\"${executable}\" EntryPoint=\"Windows.FullTrustApplication\">\n <desktop:StartupTask TaskId=\"SlackStartup\" Enabled=\"true\" DisplayName=\"${displayName}\" />\n </desktop:Extension>`\n }\n\n for (const protocol of uriSchemes) {\n for (const scheme of asArray(protocol.schemes)) {\n extensions += `\n <uap:Extension Category=\"windows.protocol\">\n <uap:Protocol Name=\"${scheme}\">\n <uap:DisplayName>${protocol.name}</uap:DisplayName>\n </uap:Protocol>\n </uap:Extension>`\n }\n }\n\n for (const fileAssociation of fileAssociations) {\n for (const ext of asArray(fileAssociation.ext)) {\n extensions += `\n <uap:Extension Category=\"windows.fileTypeAssociation\">\n <uap:FileTypeAssociation Name=\"${ext}\">\n <uap:SupportedFileTypes>\n <uap:FileType>.${ext}</uap:FileType>\n </uap:SupportedFileTypes>\n </uap:FileTypeAssociation>\n </uap:Extension>`\n }\n }\n\n if (this.options.customExtensionsPath !== undefined) {\n const extensionsPath = path.resolve(this.packager.info.appDir, this.options.customExtensionsPath)\n extensions += await readFile(extensionsPath, \"utf8\")\n }\n\n extensions += \"</Extensions>\"\n return extensions\n }\n}\n\n// get the resource - language tag, see https://docs.microsoft.com/en-us/windows/uwp/globalizing/manage-language-and-region#specify-the-supported-languages-in-the-apps-manifest\nfunction resourceLanguageTag(userLanguages: Array<string> | null | undefined): string {\n if (userLanguages == null || userLanguages.length === 0) {\n userLanguages = [DEFAULT_RESOURCE_LANG]\n }\n return userLanguages.map(it => `<Resource Language=\"${it.replace(/_/g, \"-\")}\" />`).join(\"\\n\")\n}\n\nfunction lockScreenTag(userAssets: Array<string>): string {\n if (isDefaultAssetIncluded(userAssets, \"BadgeLogo.png\")) {\n return '<uap:LockScreen Notification=\"badgeAndTileText\" BadgeLogo=\"assets\\\\BadgeLogo.png\" />'\n } else {\n return \"\"\n }\n}\n\nfunction defaultTileTag(userAssets: Array<string>, showNameOnTiles: boolean): string {\n const defaultTiles: Array<string> = [\"<uap:DefaultTile\", 'Wide310x150Logo=\"assets\\\\Wide310x150Logo.png\"']\n\n if (isDefaultAssetIncluded(userAssets, \"LargeTile.png\")) {\n defaultTiles.push('Square310x310Logo=\"assets\\\\LargeTile.png\"')\n }\n if (isDefaultAssetIncluded(userAssets, \"SmallTile.png\")) {\n defaultTiles.push('Square71x71Logo=\"assets\\\\SmallTile.png\"')\n }\n\n if (showNameOnTiles) {\n defaultTiles.push(\">\")\n defaultTiles.push(\"<uap:ShowNameOnTiles>\")\n defaultTiles.push(\"<uap:ShowOn\", 'Tile=\"wide310x150Logo\"', \"/>\")\n defaultTiles.push(\"<uap:ShowOn\", 'Tile=\"square150x150Logo\"', \"/>\")\n defaultTiles.push(\"</uap:ShowNameOnTiles>\")\n defaultTiles.push(\"</uap:DefaultTile>\")\n } else {\n defaultTiles.push(\"/>\")\n }\n return defaultTiles.join(\" \")\n}\n\nfunction splashScreenTag(userAssets: Array<string>): string {\n if (isDefaultAssetIncluded(userAssets, \"SplashScreen.png\")) {\n return '<uap:SplashScreen Image=\"assets\\\\SplashScreen.png\" />'\n } else {\n return \"\"\n }\n}\n\nfunction isDefaultAssetIncluded(userAssets: Array<string>, defaultAsset: string) {\n const defaultAssetName = defaultAsset.substring(0, defaultAsset.indexOf(\".\"))\n return userAssets.some(it => it.includes(defaultAssetName))\n}\n\nfunction isScaledAssetsProvided(userAssets: Array<string>) {\n return userAssets.some(it => it.includes(\".scale-\") || it.includes(\".targetsize-\"))\n}\n"]}