Commit 105db394 authored by David Gonçalves's avatar David Gonçalves 📖

electronbuilder

parent c58aa662
desktop.ini
Thumbs.db
swf2exe/Lib/*.exe
!swf2exe/Lib/SA.exe
dist
swf2exe/*.exe
!swf2exe/SA.exe
node_modules
game/out.exe
game/out.swf
game/hf.exe
uploads/*
ffdec/bash.exe.stackdump
desktop.ini
Thumbs.db
File added
......@@ -176,8 +176,8 @@ function compileExe() {
// MangaD note: Functions should be asynchronous because otherwise the loading animation will block
// Replace Story XML
let ffdec = spawn('java', ['-jar', `${__dirname}/ffdec/ffdec.jar`, '-replace',
`${__dirname}/game/hf.swf`, swf_filename, story_ids[story_number], xml_story_filename]);
let ffdec = spawn('java', ['-jar', `ffdec/ffdec.jar`, '-replace',
`game/hf.swf`, swf_filename, story_ids[story_number], xml_story_filename]);
ffdec.stdout.on('data', (data) => {
console.log(`stdout: ${data}`);
......@@ -195,7 +195,7 @@ function compileExe() {
}
// Replace Story List XML
let ffdec2 = spawn('java', ['-jar', `${__dirname}/ffdec/ffdec.jar`, '-replace',
let ffdec2 = spawn('java', ['-jar', `ffdec/ffdec.jar`, '-replace',
swf_filename, swf_filename, storylist_id, xml_storylist_filename]);
ffdec2.stdout.on('data', (data) => {
......@@ -214,7 +214,7 @@ function compileExe() {
}
// Compress SWF
let ffdec3 = spawn('java', ['-jar', `${__dirname}/ffdec/ffdec.jar`,
let ffdec3 = spawn('java', ['-jar', `ffdec/ffdec.jar`,
'-compress', 'zlib', swf_filename, swf_filename + "_compressed"]);
ffdec3.stdout.on('data', (data) => {
......@@ -228,6 +228,7 @@ function compileExe() {
ffdec3.on('exit', (code) => {
console.log(`child process exited with code ${code}`);
if (code != 0) {
$('body').removeClass("loading");
dialog.err(window.lang.replace_xml, window.lang.error);
return;
}
......@@ -256,7 +257,7 @@ function swf2exe(swfFile, outputFile) {
let footer = [0x56, 0x34, 0x12, 0xFA];
let projectorData = fs.readFileSync(`${__dirname}/swf2exe/SA.exe`);
let projectorData = fs.readFileSync(`swf2exe/SA.exe`);
let swfData = fs.readFileSync(swfFile);
// Tommy was having an error "EBUSY resource busy or locked" when using the
......
This diff is collapsed.
{
"name": "hf-story-editor",
"version": "1.0.0",
"description": "Hero Fighter Story Editor",
"main": "electron_main.js",
"scripts": {
"start": "electron ."
},
"repository": {
"type": "git",
"url": "git+https://gitlab.com/zlyfer/HF-Story-Editor.git"
},
"keywords": [
"Hero",
"Fighter",
"Story",
"Editor"
],
"author": "MangaD, zlyfer, Tommy Chan",
"license": "MIT",
"bugs": {
"url": "https://gitlab.com/zlyfer/HF-Story-Editor/issues"
},
"homepage": "https://gitlab.com/zlyfer/HF-Story-Editor#README",
"devDependencies": {
"electron": "^2.0.8",
"jquery": "^3.3.1"
},
"dependencies": {
"dialog": "^0.3.1",
"glob": "^7.1.2",
"google-translate-api": "^2.3.0"
}
"name": "hf-story-editor",
"version": "1.0.0",
"description": "Hero Fighter Story Editor",
"author": "MangaD <[email protected]> (https://davidg.tk)",
"contributors": [
"Tommy Chan",
"zlyfer (https://zlyfer.de)"
],
"license": "MIT",
"main": "electron_main.js",
"scripts": {
"start": "npm install && electron .",
"postinstall": "install-app-deps",
"pack": "build --dir",
"dist": "build -w --ia32"
},
"repository": {
"type": "git",
"url": "git+https://gitlab.com/zlyfer/HF-Story-Editor.git"
},
"keywords": [
"Hero",
"Fighter",
"Story",
"Editor"
],
"bugs": {
"url": "https://gitlab.com/zlyfer/HF-Story-Editor/issues"
},
"homepage": "https://gitlab.com/zlyfer/HF-Story-Editor#README",
"devDependencies": {
"electron": "^2.0.8",
"electron-builder": "^20.28.2"
},
"dependencies": {
"dialog": "^0.3.1",
"glob": "^7.1.2",
"google-translate-api": "^2.3.0",
"jquery": "^3.3.1"
},
"build": {
"appId": "hf-story-editor",
"productName": "HF Story Editor",
"copyright": "Copyright © Martial Studio Limited. All rights reserved.",
"files": [
"electron_main.js",
"index.html",
"ace/**/*",
"css/*",
"font/*",
"images/*",
"js/*"
],
"extraFiles": [
"game/*",
"languages/*",
"story/*",
"swf2exe/*",
"favicon/*",
"ffdec/**/*"
],
"mac": {
"icon": "build/icon.icns",
"type": "distribution",
"category": "public.app-category.games"
},
"mas": {
"icon": "build/icon.icns",
"type": "distribution",
"category": "public.app-category.games"
},
"linux": {
"icon": "build/icon.png",
"category": "Game",
"target": [
"AppImage",
"deb"
]
},
"win": {
"publisherName": "MangaD",
"target": [
"nsis"
],
"icon": "build/icon.ico"
}
}
}
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