From 07dab9f4ecbce45f57a4c6997229df20c4a54ff4 Mon Sep 17 00:00:00 2001 From: Kylart Date: Fri, 22 Nov 2019 17:25:15 +0100 Subject: [PATCH] Fix #67: Now adds the possibility to have a portable windows version --- README.md | 4 ++++ appveyor.yml | 2 +- package.json | 2 ++ src/main/utils/dir.js | 2 +- 4 files changed, 8 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index d32c747..dbb63c2 100644 --- a/README.md +++ b/README.md @@ -127,6 +127,10 @@ npm run dist:linux #### For Windows OS only ``` npm run dist:win + +# Or, to have a portable version. This will give you a `KawAnime.exe` +# file that you can move around, e.g. on a USB key +npm run dist:portable ``` Distributable will then be in the `dist` folder. diff --git a/appveyor.yml b/appveyor.yml index 9cd9cda..374c01e 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -46,4 +46,4 @@ test_script: - npm run test deploy_script: - - IF [%APPVEYOR_REPO_BRANCH%]==[master] npm run publish:win \ No newline at end of file + - IF [%APPVEYOR_REPO_BRANCH%]==[master] npm run publish:win && npm run publish:portable \ No newline at end of file diff --git a/package.json b/package.json index 736a9af..e75aee7 100644 --- a/package.json +++ b/package.json @@ -19,10 +19,12 @@ "dist": "npm run dist:mac && npm run dist:win && npm run dist:linux", "dist:mac": "npm run build -- --mac", "dist:win": "npm run build -- --win --x64 --ia32", + "dist:portable": "npm run build -- --win portable", "dist:linux": "npm run build -- --linux deb AppImage", "publish:mac": "npm run build -- --mac -p always", "publish:linux": "npm run build -- --linux deb AppImage -p always", "publish:win": "npm run build -- --win --x64 --ia32 -p always", + "publish:portable": "npm run build -- --win portable -p always", "lint": "vue-cli-service lint", "compile:bindings": "cmake-js compile -d bindings -O bindings/build", "install:deps": "bash bindings/scripts/install.sh", diff --git a/src/main/utils/dir.js b/src/main/utils/dir.js index 631259d..cf0267d 100644 --- a/src/main/utils/dir.js +++ b/src/main/utils/dir.js @@ -2,5 +2,5 @@ import { app } from 'electron' import { join } from 'path' export default process.env.IS_TEST !== 'true' - ? join(app.getPath('userData'), 'appFiles') + ? join(process.env.PORTABLE_EXECUTABLE_DIR || app.getPath('userData'), 'appFiles') : join(app.getPath('home'), '.KawAnime-test')