From 5cb085de5cabd3cc6335d79fcc0caeb3c7993b4a Mon Sep 17 00:00:00 2001 From: develar Date: Sun, 7 Jul 2019 11:40:28 +0200 Subject: [PATCH] feat: update rcedit, use rcedit x64 on Windows x64 #3889 --- appveyor.yml | 2 +- package.json | 2 +- packages/app-builder-lib/src/winPackager.ts | 8 +++----- packages/builder-util/package.json | 2 +- yarn.lock | 8 ++++---- 5 files changed, 10 insertions(+), 12 deletions(-) diff --git a/appveyor.yml b/appveyor.yml index a99457e87ce..9a34e9dba2d 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -11,7 +11,7 @@ environment: install: - ps: Install-Product node 10 x64 - - yarn + - yarn --frozen-lockfile build: off diff --git a/package.json b/package.json index ffa5faa8baf..5103a2ae9c0 100644 --- a/package.json +++ b/package.json @@ -34,7 +34,7 @@ "@types/debug": "^4.1.4", "@types/is-ci": "^2.0.0", "@types/semver": "^6.0.1", - "app-builder-bin": "3.1.6", + "app-builder-bin": "3.2.0", "archiver": "^3.0.0", "async-exit-hook": "^2.0.1", "bluebird-lst": "^1.0.9", diff --git a/packages/app-builder-lib/src/winPackager.ts b/packages/app-builder-lib/src/winPackager.ts index 9960c71a12d..71e36861ab1 100644 --- a/packages/app-builder-lib/src/winPackager.ts +++ b/packages/app-builder-lib/src/winPackager.ts @@ -1,5 +1,5 @@ import BluebirdPromise from "bluebird-lst" -import { Arch, asArray, InvalidConfigurationError, log, use } from "builder-util" +import { Arch, asArray, InvalidConfigurationError, log, use, executeAppBuilder } from "builder-util" import { parseDn } from "builder-util-runtime" import { CopyFileTransformer, FileTransformer, walk } from "builder-util/out/fs" import { createHash } from "crypto" @@ -8,7 +8,7 @@ import isCI from "is-ci" import { Lazy } from "lazy-val" import * as path from "path" import { downloadCertificate } from "./codeSign/codesign" -import { CertificateFromStoreInfo, CertificateInfo, FileCodeSigningInfo, getCertificateFromStoreInfo, getCertInfo, getSignVendorPath, sign, WindowsSignOptions } from "./codeSign/windowsCodeSign" +import { CertificateFromStoreInfo, CertificateInfo, FileCodeSigningInfo, getCertificateFromStoreInfo, getCertInfo, sign, WindowsSignOptions } from "./codeSign/windowsCodeSign" import { AfterPackContext } from "./configuration" import { DIR_TARGET, Platform, Target } from "./core" import { RequestedExecutionLevel, WindowsConfiguration } from "./options/winOptions" @@ -23,7 +23,6 @@ import { BuildCacheManager, digest } from "./util/cacheManager" import { isBuildCacheEnabled } from "./util/flags" import { time } from "./util/timer" import { getWindowsVm, VmManager } from "./vm/vm" -import { execWine } from "./wine" export class WinPackager extends PlatformPackager { readonly cscInfo = new Lazy(() => { @@ -318,8 +317,7 @@ export class WinPackager extends PlatformPackager { const timer = time("wine&sign") // rcedit crashed of executed using wine, resourcehacker works if (process.platform === "win32" || this.info.framework.name === "electron") { - const vendorPath = await getSignVendorPath() - await execWine(path.join(vendorPath, "rcedit-ia32.exe"), path.join(vendorPath, "rcedit-x64.exe"), args) + await executeAppBuilder(["rcedit", "--args", JSON.stringify(args)]) } await this.sign(file) diff --git a/packages/builder-util/package.json b/packages/builder-util/package.json index 1ad55fead02..f43fee7c17a 100644 --- a/packages/builder-util/package.json +++ b/packages/builder-util/package.json @@ -11,7 +11,7 @@ "out" ], "dependencies": { - "app-builder-bin": "3.1.6", + "app-builder-bin": "3.2.0", "temp-file": "^3.3.3", "fs-extra": "^8.1.0", "is-ci": "^2.0.0", diff --git a/yarn.lock b/yarn.lock index 60437fdc820..e857d4e7df4 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1390,10 +1390,10 @@ anymatch@^2.0.0: micromatch "^3.1.4" normalize-path "^2.1.1" -app-builder-bin@3.1.6: - version "3.1.6" - resolved "https://registry.yarnpkg.com/app-builder-bin/-/app-builder-bin-3.1.6.tgz#1d35ca0a81dfba15181481fbe8adf68954fedfb9" - integrity sha512-jq07wuzB3WXJ7kDtMS7ANQLEH/ZPKtVS5Vtg8xjM2+vc2wdN2qCApvkBRLKuCjaQhVBdN4ZkEVrXzztavuuj4Q== +app-builder-bin@3.2.0: + version "3.2.0" + resolved "https://registry.yarnpkg.com/app-builder-bin/-/app-builder-bin-3.2.0.tgz#3ba41721fa38375a4c0ed8f63325dc33f46c20ed" + integrity sha512-KmT/k5sKYKixeTUp/chXJ608ddV7M6tsC31BskJ9WWMund+NU+2J5EYTnfysnP+oy6qRtClgPlRgRVFnJOYgzg== aproba@^1.0.3: version "1.2.0"