From dbf024cce642c5ee7003edf86acfcca39a2c67f6 Mon Sep 17 00:00:00 2001 From: Daniel Scalzi Date: Mon, 27 Nov 2017 16:56:26 -0500 Subject: [PATCH] Added buildscripts to npm package.json --- README.md | 13 +++++++++++++ package-lock.json | 27 ++++++++++++++++++++++++--- package.bat | 4 ---- package.json | 7 ++++++- 4 files changed, 43 insertions(+), 8 deletions(-) delete mode 100644 package.bat diff --git a/README.md b/README.md index b76d63f..b2c97d3 100644 --- a/README.md +++ b/README.md @@ -82,6 +82,19 @@ wcdev Please note that if you are debugging the application with VS Code and have launched the program using the **Debug Renderer Process** configuration you cannot open the DevTools window. If you attempt to do so, the program will crash. Remote debugging cannot be done with multiple DevTools clients. +# Building + +Run either of the build scrips noted below. On some operating systems you may need to run these commands through a terminal with administrator privileges. + +### Supported Platforms + +* Windows x64 (win32 x64) + * `npm run buildwin` +* MacOS (darwin x64) + * `npm run builddarwin` +* Linux (linux x64) + * `npm run buildlinux` + # Issues / Further Support # If you run into any issue which cannot be resolved via a quick google search, create an issue using the tab above. diff --git a/package-lock.json b/package-lock.json index 7b7cbf7..951bf2a 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1453,8 +1453,7 @@ "punycode": { "version": "1.4.1", "resolved": "https://registry.npmjs.org/punycode/-/punycode-1.4.1.tgz", - "integrity": "sha1-wNWmOycYgArY4esPpSachN1BhF4=", - "dev": true + "integrity": "sha1-wNWmOycYgArY4esPpSachN1BhF4=" }, "q": { "version": "1.5.1", @@ -1568,6 +1567,24 @@ "uuid": "https://registry.npmjs.org/uuid/-/uuid-3.1.0.tgz" } }, + "request-promise-core": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/request-promise-core/-/request-promise-core-1.1.1.tgz", + "integrity": "sha1-Pu4AssWqgyOc+wTFcA2jb4HNCLY=", + "requires": { + "lodash": "4.17.4" + } + }, + "request-promise-native": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/request-promise-native/-/request-promise-native-1.0.5.tgz", + "integrity": "sha1-UoF3D2jgyXGeUWP9P6tIIhX0/aU=", + "requires": { + "request-promise-core": "1.1.1", + "stealthy-require": "1.1.1", + "tough-cookie": "2.3.3" + } + }, "resolve": { "version": "1.5.0", "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.5.0.tgz", @@ -1680,6 +1697,11 @@ "tweetnacl": "0.14.5" } }, + "stealthy-require": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/stealthy-require/-/stealthy-require-1.1.1.tgz", + "integrity": "sha1-NbCYdbT/SfJqd35QmzCQoyJr8ks=" + }, "string-width": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/string-width/-/string-width-1.0.2.tgz", @@ -1795,7 +1817,6 @@ "version": "2.3.3", "resolved": "https://registry.npmjs.org/tough-cookie/-/tough-cookie-2.3.3.tgz", "integrity": "sha1-C2GKVWW23qkL80JdBNVe3EdadWE=", - "dev": true, "requires": { "punycode": "1.4.1" } diff --git a/package.bat b/package.bat deleted file mode 100644 index 065324d..0000000 --- a/package.bat +++ /dev/null @@ -1,4 +0,0 @@ -@echo off -cmd /k electron-packager . WesterosCraftLauncher --overwrite --asar --platform=win32 --arch=x64 --ignore="\.git(ignore|modules)|package\.bat|node_modules|target" --out="./target" --icon="app/assets/images/WesterosSealSquare.ico" -echo Startup canceled. -pause \ No newline at end of file diff --git a/package.json b/package.json index e0f5838..10bdbd0 100644 --- a/package.json +++ b/package.json @@ -5,7 +5,11 @@ "productName": "WesterosCraft Launcher", "main": "index.js", "scripts": { - "start": "electron index.js" + "start": "electron index.js", + "buildwin": "electron-packager . WesteroscraftLauncher --overwrite --asar --platform=win32 --arch=x64 --ignore=\"\\.git(ignore|modules)|package\\.bat|node_modules|docs|target\" --out=\"./target\" --icon=\"app/assets/images/WesterosSealSquare.ico\"", + "builddarwin": "electron-packager . WesteroscraftLauncher --overwrite --asar --platform=darwin --ignore=\"\\.git(ignore|modules)|package\\.bat|node_modules|docs|target\" --out=\"./target\" --icon=\"app/assets/images/WesterosSealSquare.ico\"", + "buildlinux": "electron-packager . WesteroscraftLauncher --overwrite --asar --platform=linux --arch=x64 --ignore=\"\\.git(ignore|modules)|package\\.bat|node_modules|docs|target\" --out=\"./target\" --icon=\"app/assets/images/WesterosSealSquare.ico\"", + "buildlinuxarm": "electron-packager . WesteroscraftLauncher --overwrite --asar --platform=linux --arch=arm64 --ignore=\"\\.git(ignore|modules)|package\\.bat|node_modules|docs|target\" --out=\"./target\" --icon=\"app/assets/images/WesterosSealSquare.ico\"" }, "engines": { "node": "8.9.x" @@ -28,6 +32,7 @@ "find-java-home": "^0.2.0", "jquery": "^3.2.1", "mojang": "^0.4.1", + "request-promise-native": "^1.0.5", "uuid": "^3.1.0" }, "devDependencies": {