diff --git a/.idea/runConfigurations/winPackagerTest.xml b/.idea/runConfigurations/winPackagerTest.xml
index 96d010e19e8..2763e893ff3 100644
--- a/.idea/runConfigurations/winPackagerTest.xml
+++ b/.idea/runConfigurations/winPackagerTest.xml
@@ -2,7 +2,6 @@
-
diff --git a/.idea/runConfigurations/winPackagerTest__debug_logging_.xml b/.idea/runConfigurations/winPackagerTest__debug_logging_.xml
new file mode 100644
index 00000000000..f929ef4bf3b
--- /dev/null
+++ b/.idea/runConfigurations/winPackagerTest__debug_logging_.xml
@@ -0,0 +1,9 @@
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/src/winPackager.ts b/src/winPackager.ts
index 7bdd082a922..c30693d90f3 100644
--- a/src/winPackager.ts
+++ b/src/winPackager.ts
@@ -86,7 +86,7 @@ export default class WinPackager extends PlatformPackager {
const certificateFile = await this.certFilePromise
const version = this.metadata.version
const installerOutDir = this.computeDistOut(outDir, arch)
- const archSuffix = arch === "x64" ? "-x64" : ""
+ const archSuffix = arch === "x64" ? "" : ("-" + arch)
const options = Object.assign({
name: this.metadata.name,
productName: this.appName,
@@ -137,28 +137,34 @@ export default class WinPackager extends PlatformPackager {
const nupkgPathOriginal = this.metadata.name + "-" + version + "-full.nupkg"
const nupkgPathWithArch = this.metadata.name + "-" + version + archSuffix + "-full.nupkg"
- async function changeFileNameInTheReleasesFile() {
+ async function changeFileNameInTheReleasesFile(): Promise {
const data = (await readFile(releasesFile, "utf8")).replace(new RegExp(" " + nupkgPathOriginal + " ", "g"), " " + nupkgPathWithArch + " ")
+ debugger
await writeFile(releasesFile, data)
}
- await BluebirdPromise.all([
+ const promises: Array> = [
rename(path.join(installerOutDir, "Setup.exe"), installerExePath)
.then(it => this.dispatchArtifactCreated(it)),
- rename(path.join(installerOutDir, nupkgPathOriginal), path.join(installerOutDir, nupkgPathWithArch))
- .then(it => this.dispatchArtifactCreated(it)),
- changeFileNameInTheReleasesFile()
- .then(() => {
- if (arch === "x64") {
- this.dispatchArtifactCreated(releasesFile)
- return null
- }
- else {
- return copy(releasesFile, path.join(installerOutDir, "RELEASES-ia32"))
- .then(it => this.dispatchArtifactCreated(it))
- }
- }),
- ])
+ ]
+
+ if (archSuffix === "") {
+ this.dispatchArtifactCreated(path.join(installerOutDir, nupkgPathOriginal))
+ this.dispatchArtifactCreated(path.join(installerOutDir, "RELEASES"))
+ }
+ else {
+ promises.push(
+ rename(path.join(installerOutDir, nupkgPathOriginal), path.join(installerOutDir, nupkgPathWithArch))
+ .then(it => this.dispatchArtifactCreated(it))
+ )
+ promises.push(
+ changeFileNameInTheReleasesFile()
+ .then(() => copy(releasesFile, path.join(installerOutDir, "RELEASES-ia32")))
+ .then(it => this.dispatchArtifactCreated(it))
+ )
+ }
+
+ await BluebirdPromise.all(promises)
}
private async nsis(options: any, installerFile: string) {
diff --git a/test/fixtures/no-author-email/package.json b/test/fixtures/no-author-email/package.json
index 86849c8d459..2b0a385713c 100644
--- a/test/fixtures/no-author-email/package.json
+++ b/test/fixtures/no-author-email/package.json
@@ -5,7 +5,7 @@
"description": "Test Application",
"author": "Foo Bar",
"devDependencies": {
- "electron-prebuilt": "^0.36.10"
+ "electron-prebuilt": "^0.37.1"
},
"build": {
"app-bundle-id": "your.id",
diff --git a/test/fixtures/test-app-one/package.json b/test/fixtures/test-app-one/package.json
index 12c0bbe85a7..b9738928a59 100644
--- a/test/fixtures/test-app-one/package.json
+++ b/test/fixtures/test-app-one/package.json
@@ -8,7 +8,7 @@
},
"author": "Foo Bar ",
"devDependencies": {
- "electron-prebuilt": "^0.36.10"
+ "electron-prebuilt": "^0.37.1"
},
"build": {
"app-bundle-id": "your.id",
diff --git a/test/fixtures/test-app/package.json b/test/fixtures/test-app/package.json
index 375a414b2a7..b833a8c70d7 100644
--- a/test/fixtures/test-app/package.json
+++ b/test/fixtures/test-app/package.json
@@ -4,6 +4,6 @@
"start": "electron ."
},
"devDependencies": {
- "electron-prebuilt": "^0.36.10"
+ "electron-prebuilt": "^0.37.1"
}
}
diff --git a/test/src/helpers/packTester.ts b/test/src/helpers/packTester.ts
index 4c5467e668d..00984dc0b9f 100644
--- a/test/src/helpers/packTester.ts
+++ b/test/src/helpers/packTester.ts
@@ -139,21 +139,21 @@ async function checkOsXResult(packager: Packager, artifacts: Array) {
async function checkWindowsResult(packagerOptions: PackagerOptions, artifacts: Array) {
const expected32 = [
"RELEASES-ia32",
- "TestApp-1.0.0-full.nupkg",
- "TestAppSetup-1.0.0.exe"
+ "TestAppSetup-1.0.0-ia32.exe",
+ "TestApp-1.0.0-ia32-full.nupkg",
]
const expected64 = [
"RELEASES",
- "TestAppSetup-1.0.0-x64.exe",
- "TestApp-1.0.0-x64-full.nupkg"
+ "TestAppSetup-1.0.0.exe",
+ "TestApp-1.0.0-full.nupkg",
]
const expected = packagerOptions != null && packagerOptions.arch === "x64" ? expected64 : expected32.concat(expected64)
const filenames = artifacts.map(it => path.basename((it)))
assertThat(filenames.slice().sort()).deepEqual(expected.sort())
- let i = filenames.indexOf("RELEASES")
+ let i = filenames.indexOf("RELEASES-ia32")
if (i !== -1) {
- assertThat((await readText(artifacts[i])).indexOf("x64")).not.equal(-1)
+ assertThat((await readText(artifacts[i])).indexOf("ia32")).not.equal(-1)
}
}
diff --git a/test/src/helpers/runTests.ts b/test/src/helpers/runTests.ts
index a058a55db65..42cbf837dbd 100644
--- a/test/src/helpers/runTests.ts
+++ b/test/src/helpers/runTests.ts
@@ -14,7 +14,7 @@ const rootDir = path.join(__dirname, "..", "..", "..")
const testPackageDir = path.join(require("os").tmpdir(), "electron_builder_published")
const testNodeModules = path.join(testPackageDir, "node_modules")
-const electronVersion = "0.36.10"
+const electronVersion = "0.37.1"
BluebirdPromise.all([
deleteOldElectronVersion(),