Skip to content

Commit

Permalink
fix: get rid of nuget to pack win
Browse files Browse the repository at this point in the history
  • Loading branch information
develar committed Apr 19, 2016
1 parent b7a8340 commit c987439
Show file tree
Hide file tree
Showing 5 changed files with 20 additions and 13 deletions.
15 changes: 9 additions & 6 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -54,13 +54,13 @@
"bugs": "https://github.com/electron-userland/electron-builder/issues",
"homepage": "https://github.com/electron-userland/electron-builder",
"dependencies": {
"7zip-bin": "^0.0.3",
"7zip-bin": "^0.0.4",
"bluebird": "^3.3.5",
"command-line-args": "^2.1.6",
"deep-assign": "^2.0.0",
"electron-packager": "^7.0.0",
"electron-winstaller-fixed": "^2.2.1-beta.0",
"fs-extra": "^0.27.0",
"electron-winstaller-fixed": "~2.3.0-beta.0",
"fs-extra": "^0.28.0",
"fs-extra-p": "^0.2.0",
"globby": "^4.0.0",
"hosted-git-info": "^2.1.4",
Expand All @@ -74,7 +74,7 @@
"tmp": "0.0.28"
},
"optionalDependencies": {
"appdmg": "^0.3.6"
"appdmg": "^0.3.7"
},
"devDependencies": {
"ava-tf": "^0.12.4-beta.6",
Expand All @@ -93,7 +93,7 @@
"tsconfig-glob": "^0.4.3",
"tslint": "next",
"typescript": "^1.9.0-dev.20160414",
"validate-commit-msg": "^2.6.0"
"validate-commit-msg": "^2.6.1"
},
"babel": {
"plugins": [
Expand All @@ -112,5 +112,8 @@
"typings": "./out/electron-builder.d.ts",
"precommit": [
"validate-commit-msg"
]
],
"publishConfig": {
"tag": "next"
}
}
3 changes: 1 addition & 2 deletions src/macPackager.ts
Original file line number Diff line number Diff line change
Expand Up @@ -107,8 +107,7 @@ export default class MacPackager extends PlatformPackager<OsXBuildOptions> {
log("Creating ZIP for Squirrel.Mac")
// we use app name here - see https://github.com/electron-userland/electron-builder/pull/204
const resultPath = `${this.appName}-${this.metadata.version}-mac.zip`
// -y param is important - "store symbolic links as the link instead of the referenced file"
const args = ["a", "-mm=" + (this.devMetadata.build.compression === "store" ? "Copy" : "Deflate"), "-r", "-bb0", "-bd"]
const args = ["a", "-mm=" + (this.devMetadata.build.compression === "store" ? "Copy" : "Deflate"), "-bb0", "-bd"]
if (this.devMetadata.build.compression === "maximum") {
// http://superuser.com/a/742034
//noinspection SpellCheckingInspection
Expand Down
4 changes: 3 additions & 1 deletion test/src/BuildTest.ts
Original file line number Diff line number Diff line change
Expand Up @@ -120,16 +120,18 @@ test("copy extra resource", async () => {
"lib/net45/libEGL.dll",
"lib/net45/libGLESv2.dll",
"lib/net45/LICENSE",
"lib/net45/LICENSES.chromium.html",
"lib/net45/msvcp120.dll",
"lib/net45/msvcr120.dll",
"lib/net45/natives_blob.bin",
"lib/net45/node.dll",
"lib/net45/platformSpecific",
"lib/net45/snapshot_blob.bin",
"lib/net45/squirrel.exe",
"lib/net45/TestApp.exe",
"lib/net45/ui_resources_200_percent.pak",
"lib/net45/Update.exe",
"lib/net45/vccorlib120.dll",
"lib/net45/version",
"lib/net45/xinput1_3.dll",
"lib/net45/bar/hello.txt",
"lib/net45/bar/x64.txt",
Expand Down
4 changes: 3 additions & 1 deletion test/src/helpers/expectedContents.ts
Original file line number Diff line number Diff line change
Expand Up @@ -64,15 +64,17 @@ export const expectedWinContents = [
"lib/net45/libEGL.dll",
"lib/net45/libGLESv2.dll",
"lib/net45/LICENSE",
"lib/net45/LICENSES.chromium.html",
"lib/net45/msvcp120.dll",
"lib/net45/msvcr120.dll",
"lib/net45/natives_blob.bin",
"lib/net45/node.dll",
"lib/net45/snapshot_blob.bin",
"lib/net45/squirrel.exe",
"lib/net45/TestApp.exe",
"lib/net45/ui_resources_200_percent.pak",
"lib/net45/Update.exe",
"lib/net45/vccorlib120.dll",
"lib/net45/version",
"lib/net45/xinput1_3.dll",
"lib/net45/locales/en-US.pak",
"lib/net45/resources/app.asar",
Expand Down
7 changes: 4 additions & 3 deletions test/src/helpers/packTester.ts
Original file line number Diff line number Diff line change
Expand Up @@ -240,19 +240,20 @@ async function checkWindowsResult(packager: Packager, packagerOptions: PackagerO
await unZipper.extractFile(fileDescriptors.filter(it => it.path === "TestApp.nuspec")[0], {
path: path.dirname(packageFile),
})
assertThat((await readFile(path.join(path.dirname(packageFile), "TestApp.nuspec"), "utf8")).replace(/\r\n/g, "\n")).equal(`<?xml version="1.0"?>
const expectedSpec = await readFile(path.join(path.dirname(packageFile), "TestApp.nuspec"), "utf8")
assertThat((expectedSpec).replace(/\r\n/g, "\n")).equal(`<?xml version="1.0"?>
<package xmlns="http://schemas.microsoft.com/packaging/2011/08/nuspec.xsd">
<metadata>
<id>TestApp</id>
<version>1.1.0</version>
<title>${productName}</title>
<version>1.1.0</version>
<authors>Foo Bar</authors>
<owners>Foo Bar</owners>
<projectUrl>http://foo.example.com</projectUrl>
<iconUrl>https://raw.githubusercontent.com/szwacz/electron-boilerplate/master/resources/windows/icon.ico</iconUrl>
<requireLicenseAcceptance>false</requireLicenseAcceptance>
<description>Test Application</description>
<copyright>Copyright © ${new Date().getFullYear()} Foo Bar</copyright>
<projectUrl>http://foo.example.com</projectUrl>
</metadata>
</package>`)
}
Expand Down

0 comments on commit c987439

Please sign in to comment.