Commit 5d6cce6f authored by David Gonçalves's avatar David Gonçalves 📖

1st version

parent 2126299d
......@@ -13,7 +13,7 @@ function createWindow() {
icon: path.join(__dirname, '/favicon/android-chrome-192x192.png')
});
win.loadFile('index.html');
win.webContents.openDevTools(); // Debug
//win.webContents.openDevTools(); // Debug
}
app.on('ready', createWindow);
......
......@@ -89,11 +89,15 @@ function generateExe() {
if (isWin) {
let version_w;
let key = 'HKLM\\SOFTWARE\\JavaSoft\\Java Runtime Environment';
require('./node_modules/regedit').list(key,
// Electron builder can't access this file if it is inside app.asar,
// So we need to add "node_modules/regedit/vbs/*" to "extraFiles" in
// package.json and set the path here
require('regedit').setExternalVBSLocation('./node_modules/regedit/vbs/');
require('regedit').list(key,
function(err, result) {
if (err) {
key = 'HKLM\\SOFTWARE\\Wow6432Node\\JavaSoft\\Java Runtime Environment';
require('./node_modules/regedit').list(key,
require('regedit').list(key,
function(err, result) {
if (err) {
$('body').removeClass("loading");
......@@ -103,7 +107,7 @@ function generateExe() {
}
version_w = result[key]['values']['CurrentVersion']['value'];
key = key + '\\' + version_w;
require('./node_modules/regedit').list(key, function(err, result) {
require('regedit').list(key, function(err, result) {
if (err) {
$('body').removeClass("loading");
popupS.alert({title: window.lang.error, content: window.lang.java_error});
......@@ -118,7 +122,7 @@ function generateExe() {
}
version_w = result[key]['values']['CurrentVersion']['value'];
key = key + '\\' + version_w;
require('./node_modules/regedit').list(key, function(err, result) {
require('regedit').list(key, function(err, result) {
if (err) {
$('body').removeClass("loading");
popupS.alert({title: window.lang.error, content: window.lang.java_error});
......@@ -226,9 +230,8 @@ function generateExe3() {
]
let storylist_id = "234";
// MangaD note: Functions should be asynchronous because otherwise the loading animation will block
// NOTE: Functions should be asynchronous because otherwise the loading animation will block
console.log(javaExe)
// Replace Story XML
let ffdec = spawn(javaExe, ['-jar', 'ffdec/ffdec.jar', '-replace',
'game/hf.swf', swf_filename, story_ids[story_number], xml_story_filename]);
......
......@@ -98,22 +98,22 @@
"dev": true
},
"app-builder-lib": {
"version": "20.28.2",
"resolved": "https://registry.npmjs.org/app-builder-lib/-/app-builder-lib-20.28.2.tgz",
"integrity": "sha512-oSnjjcLWPyJDEm8SW1AAI1fpKixf+ptx/renfIRJYdkeRi0frZikqSjgSKKIPVNnmnDIhAtMbYdNk0Kwx41/sg==",
"version": "20.28.3",
"resolved": "https://registry.npmjs.org/app-builder-lib/-/app-builder-lib-20.28.3.tgz",
"integrity": "sha512-oZqv3+oi5bfKbN5eFfEbNovSuMTXn3yu8yJbmqDCNXcI1caOF+hCNAUpgMFohNGO0uY80veAwQTysZ74/VFjCA==",
"dev": true,
"requires": {
"7zip-bin": "~4.0.2",
"app-builder-bin": "2.1.2",
"async-exit-hook": "^2.0.1",
"bluebird-lst": "^1.0.5",
"builder-util": "6.1.2",
"builder-util": "6.1.3",
"builder-util-runtime": "4.4.1",
"chromium-pickle-js": "^0.2.0",
"debug": "^3.1.0",
"ejs": "^2.6.1",
"electron-osx-sign": "0.4.10",
"electron-publish": "20.28.0",
"electron-publish": "20.28.3",
"fs-extra-p": "^4.6.1",
"hosted-git-info": "^2.7.1",
"is-ci": "^1.2.0",
......@@ -125,7 +125,7 @@
"plist": "^3.0.1",
"read-config-file": "3.1.2",
"sanitize-filename": "^1.6.1",
"semver": "^5.5.0",
"semver": "^5.5.1",
"temp-file": "^3.1.3"
},
"dependencies": {
......@@ -322,9 +322,9 @@
"dev": true
},
"builder-util": {
"version": "6.1.2",
"resolved": "https://registry.npmjs.org/builder-util/-/builder-util-6.1.2.tgz",
"integrity": "sha512-ZtOOPnzKmdJSXTo2yEWatZrkftBwOIOzc4lvqSoGf6yz9SdLsjPLvh0E1sA0Xohrio+Mz7AVB0XT67GgfZ6/hw==",
"version": "6.1.3",
"resolved": "https://registry.npmjs.org/builder-util/-/builder-util-6.1.3.tgz",
"integrity": "sha512-MXeARNff9KHlzJYGJcAhLI/tpE57PmUnleaYfL22IE+viRt192Yr3wQL444ztsA+LUHJ8d12moUoG00jh1hfLA==",
"dev": true,
"requires": {
"7zip-bin": "~4.0.2",
......@@ -337,8 +337,8 @@
"is-ci": "^1.2.0",
"js-yaml": "^3.12.0",
"lazy-val": "^1.0.3",
"semver": "^5.5.0",
"source-map-support": "^0.5.8",
"semver": "^5.5.1",
"source-map-support": "^0.5.9",
"stat-mode": "^0.2.2",
"temp-file": "^3.1.3"
},
......@@ -496,18 +496,18 @@
"dev": true
},
"color-convert": {
"version": "1.9.2",
"resolved": "https://registry.npmjs.org/color-convert/-/color-convert-1.9.2.tgz",
"integrity": "sha512-3NUJZdhMhcdPn8vJ9v2UQJoH0qqoGUkYTgFEPZaPjEtwmmKUfNV46zZmgB2M5M4DCEQHMaCfWHCxiBflLm04Tg==",
"version": "1.9.3",
"resolved": "https://registry.npmjs.org/color-convert/-/color-convert-1.9.3.tgz",
"integrity": "sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg==",
"dev": true,
"requires": {
"color-name": "1.1.1"
"color-name": "1.1.3"
}
},
"color-name": {
"version": "1.1.1",
"resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.1.tgz",
"integrity": "sha1-SxQVMEz1ACjqgWQ2Q72C6gWANok=",
"version": "1.1.3",
"resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.3.tgz",
"integrity": "sha1-p9BVi9icQveV3UIyj3QIMcpTvCU=",
"dev": true
},
"combined-stream": {
......@@ -672,16 +672,16 @@
"dev": true
},
"dmg-builder": {
"version": "5.3.0",
"resolved": "https://registry.npmjs.org/dmg-builder/-/dmg-builder-5.3.0.tgz",
"integrity": "sha512-vzjrc7UmPQ+rb4tH8wbQdMq6Fu9M5chFndzhK2831xIpRsRlNlGEIWMiFRZ/MlboVL0vWxG0/2JCd2YMAevEpA==",
"version": "5.3.1",
"resolved": "https://registry.npmjs.org/dmg-builder/-/dmg-builder-5.3.1.tgz",
"integrity": "sha512-/+vtqlgvTtha/4Gc76XIRKS2KzYO58sTWXhZ/kgfNr05ZXY6bIw26v7xDu8ZBpTYnfWI09JRZTMv1yIXT/vvfg==",
"dev": true,
"requires": {
"app-builder-lib": "~20.28.0",
"app-builder-lib": "~20.28.3",
"bluebird-lst": "^1.0.5",
"builder-util": "~6.1.0",
"builder-util": "~6.1.3",
"fs-extra-p": "^4.6.1",
"iconv-lite": "^0.4.23",
"iconv-lite": "^0.4.24",
"js-yaml": "^3.12.0",
"parse-color": "^1.0.0",
"sanitize-filename": "^1.6.1"
......@@ -741,17 +741,17 @@
}
},
"electron-builder": {
"version": "20.28.2",
"resolved": "https://registry.npmjs.org/electron-builder/-/electron-builder-20.28.2.tgz",
"integrity": "sha512-HdHp4Gsod+E2hXAYu1/Jww+JeJrRSdp2HA4yr03RqH29Hdluuep7bzmIcTCiAcibdYBzTojY3jmqwQJRUX0DBQ==",
"version": "20.28.3",
"resolved": "https://registry.npmjs.org/electron-builder/-/electron-builder-20.28.3.tgz",
"integrity": "sha512-Sbe7E18Fl88la642PpcMU4jxv/1/vI3PCT/+Szly3O97DtKwuuVmk5MhW+FDBKgNS2f0xJgA6vRRraDK6HYvrw==",
"dev": true,
"requires": {
"app-builder-lib": "20.28.2",
"app-builder-lib": "20.28.3",
"bluebird-lst": "^1.0.5",
"builder-util": "6.1.2",
"builder-util": "6.1.3",
"builder-util-runtime": "4.4.1",
"chalk": "^2.4.1",
"dmg-builder": "5.3.0",
"dmg-builder": "5.3.1",
"fs-extra-p": "^4.6.1",
"is-ci": "^1.2.0",
"lazy-val": "^1.0.3",
......@@ -806,13 +806,13 @@
}
},
"electron-publish": {
"version": "20.28.0",
"resolved": "https://registry.npmjs.org/electron-publish/-/electron-publish-20.28.0.tgz",
"integrity": "sha512-ZGwzXyWuEGIvaCCGD0tebhjYGf7lxjdmkFAW3oFjRXOBXsBl91elOzOwfRSs/7zUE9mvvE0MnyJeBlqO7SAUvA==",
"version": "20.28.3",
"resolved": "https://registry.npmjs.org/electron-publish/-/electron-publish-20.28.3.tgz",
"integrity": "sha512-/2t5zk9EKgH7p7rFZ+ynTKLmpKGF9bktMP2UR6u4bbPz9w4r3WEUbPOeZ1TLqUCAqdfZECcj4ThjrlcAJTghCA==",
"dev": true,
"requires": {
"bluebird-lst": "^1.0.5",
"builder-util": "~6.1.0",
"builder-util": "~6.1.3",
"builder-util-runtime": "^4.4.1",
"chalk": "^2.4.1",
"fs-extra-p": "^4.6.1",
......@@ -1011,9 +1011,9 @@
}
},
"glob": {
"version": "7.1.2",
"resolved": "https://registry.npmjs.org/glob/-/glob-7.1.2.tgz",
"integrity": "sha512-MJTUg1kjuLeQCJ+ccE4Vpa6kKVXkPYJ2mOCQyUuKLcLQsdrMCpBPUi8qVE6+YuaJkozeA9NusTAw3hLr8Xe5EQ==",
"version": "7.1.3",
"resolved": "https://registry.npmjs.org/glob/-/glob-7.1.3.tgz",
"integrity": "sha512-vcfuiIxogLV4DlGBHIUOwI0IbrJ8HWPc4MU7HzviGeNho/UJDfi6B5p3sHeWIQ0KGIU0Jpxi5ZHxemQfLkkAwQ==",
"requires": {
"fs.realpath": "^1.0.0",
"inflight": "^1.0.4",
......@@ -2655,7 +2655,7 @@
},
"wrap-ansi": {
"version": "2.1.0",
"resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-2.1.0.tgz",
"resolved": "http://registry.npmjs.org/wrap-ansi/-/wrap-ansi-2.1.0.tgz",
"integrity": "sha1-2Pw9KE3QV5T+hJc8rs3Rz4JP3YU=",
"dev": true,
"requires": {
......
......@@ -31,11 +31,11 @@
"homepage": "https://gitlab.com/zlyfer/HF-Story-Editor#README",
"devDependencies": {
"electron": "^2.0.8",
"electron-builder": "^20.28.2",
"electron-builder": "^20.28.3",
"winresourcer": "^0.9.0"
},
"dependencies": {
"glob": "^7.1.2",
"glob": "^7.1.3",
"google-translate-api": "^2.3.0",
"jquery": "^3.3.1",
"popups": "^1.1.3",
......@@ -60,10 +60,8 @@
"languages/*",
"swf2exe/*",
"favicon/*",
"ffdec/**/*"
],
"extraResources": [
"node_modules/regedit/**/*"
"ffdec/**/*",
"node_modules/regedit/vbs/*"
],
"mac": {
"icon": "build/icon.icns",
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment