Fixing packager for "old" (6) node versions

This commit is contained in:
WolverinDEV 2019-07-05 22:45:59 +02:00
parent 0209b0253f
commit b14d0b9685
3 changed files with 15 additions and 5 deletions

View File

@ -315,7 +315,9 @@ async function create_default_ui_pack(target_directory: string) {
} }
let path; let path;
packager(options).then(async app_paths => { (async () => {
await new Promise((resolve, reject) => packager(options, (err, appPaths) => err ? reject(err) : resolve(appPaths)))
})().then(async app_paths => {
console.log("Copying changelog file!"); console.log("Copying changelog file!");
await util.promisify(fs.copyFile)(path_helper.join(options.dir, "github", "ChangeLog.txt"), path_helper.join(app_paths[0], "ChangeLog.txt")); await util.promisify(fs.copyFile)(path_helper.join(options.dir, "github", "ChangeLog.txt"), path_helper.join(app_paths[0], "ChangeLog.txt"));
return app_paths; return app_paths;

View File

@ -20,9 +20,17 @@ function compile_scripts() {
check_err_exit ${project_name} "Failed to build shared ui import declarations!" check_err_exit ${project_name} "Failed to build shared ui import declarations!"
npm run compile-tsc -- -p modules/tsconfig_main.json npm run compile-tsc -- -p modules/tsconfig_main.json
check_err_exit ${project_name} "Failed to compile typescript main files!"
npm run compile-tsc -- -p modules/tsconfig_renderer.json npm run compile-tsc -- -p modules/tsconfig_renderer.json
check_err_exit ${project_name} "Failed to compile typescript renderer files!"
if [[ ${build_os_type} == "win32" ]]; then
npm run compile-tsc -- -p installer/tsconfig_windows.json
check_err_exit ${project_name} "Failed to compile typescript installer files!"
else
npm run compile-tsc -- -p installer/tsconfig_linux.json npm run compile-tsc -- -p installer/tsconfig_linux.json
check_err_exit ${project_name} "Failed to compile typescript files!" check_err_exit ${project_name} "Failed to compile typescript installer files!"
fi
npm run compile-sass npm run compile-sass
check_err_exit ${project_name} "Failed to compile sass files!" check_err_exit ${project_name} "Failed to compile sass files!"

View File

@ -21,7 +21,7 @@
"license": "ISC", "license": "ISC",
"devDependencies": { "devDependencies": {
"@types/ejs": "^2.6.3", "@types/ejs": "^2.6.3",
"@types/electron-packager": "^14.0.0", "@types/electron-packager": "8.7.2",
"@types/fs-extra": "^8.0.0", "@types/fs-extra": "^8.0.0",
"@types/jquery": "^3.3.30", "@types/jquery": "^3.3.30",
"@types/request": "^2.48.1", "@types/request": "^2.48.1",
@ -30,7 +30,7 @@
"asar": "^2.0.1", "asar": "^2.0.1",
"cmake-js": "^4.0.1", "cmake-js": "^4.0.1",
"ejs": "^2.6.2", "ejs": "^2.6.2",
"electron-packager": "^14.0.1", "electron-packager": "8.7.2",
"nodemon": "^1.19.1", "nodemon": "^1.19.1",
"sass": "^1.22.2", "sass": "^1.22.2",
"typescript": "^3.5.2" "typescript": "^3.5.2"