Add proper Electron launcher and building process #6

Merged
grey merged 6 commits from electron into master 2022-11-15 18:28:59 +01:00
5 changed files with 2984 additions and 2960 deletions
Showing only changes of commit 3eab7cc6eb - Show all commits

1
.gitignore vendored
View File

@ -8,3 +8,4 @@ bom.json
log-journal.json
openCountdown
openCountdown.exe
buildout

19
build.sh Executable file
View File

@ -0,0 +1,19 @@
#!/bin/bash
#npx electron-packager . --platform=win32 --overwrite --out=./buildout
npx electron-packager . --platform=win32,linux --overwrite --out=./buildout
cd "./buildout/" || exit 1
resources=(
"electronAssets"
"lang"
"static"
"templates"
"package.json"
)
for dir in */; do
for i in "${resources[@]}"; do
echo "$dir -> $i"
cp -r "$dir/resources/app/$i" "$dir"
done
done

View File

@ -1 +0,0 @@
nexe index.js --build --python python3 --resource "./static/*" --resource "./templates/*"

4
package-lock.json generated
View File

@ -1,12 +1,12 @@
{
"name": "opencountdown",
"version": "1.0.3",
"version": "1.0.4",
"lockfileVersion": 2,
"requires": true,
"packages": {
"": {
"name": "opencountdown",
"version": "1.0.3",
"version": "1.0.4",
"license": "LGPL-3.0",
"dependencies": {
"body-parser": "^1.19.2",

View File

@ -1,11 +1,10 @@
{
"name": "opencountdown",
"version": "1.0.3",
"version": "1.0.4",
"description": "An opensource countdown",
"main": "index.js",
"main": "newStartHandler.js",
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1",
"build": "nexe index.js --build",
"start": "electron newStartHandler.js"
},
"author": "TheGreydiamond",
@ -30,5 +29,11 @@
},
"devDependencies": {
"electron": "^20.0.3"
},
"build": {
"extraMetadata": {
"main": "newStartHandler.js"
}
}
}