diff --git a/.gitignore b/.gitignore index 8178dee..2cf9be5 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,4 @@ package-lock.json node_modules -dist/* \ No newline at end of file +dist/* +out \ No newline at end of file diff --git a/index.js b/index.js index 156b740..738e2a0 100644 --- a/index.js +++ b/index.js @@ -60,7 +60,7 @@ function createStartupInfo() { win2.setFullScreen(false); win2.setAlwaysOnTop(false); - win2.loadFile("dist/ui_templates/about.html"); + win2.loadFile(path.join(__dirname, "dist/ui_templates/about.html")); win2.show(); return win2; } @@ -77,7 +77,7 @@ function createWindow() { win.loadURL( url.format({ - pathname: "dist/ui_templates/index.html", + pathname: path.join(__dirname, "dist/ui_templates/index.html"), protocol: "file:", slashes: true, }) diff --git a/package.json b/package.json index f1f8571..84f1dba 100644 --- a/package.json +++ b/package.json @@ -14,10 +14,39 @@ "startDev": "npm run buildCss && npm run minify && electron .", "minify": "minify src/main.js > dist/main.js && minify src/ui_templates/index.html > dist/ui_templates/index.html && minify src/ui_templates/about.html > dist/ui_templates/about.html", "buildCss": "npx tailwindcss -i ./src/main.css -o ./dist/output.css", - "buildCssWatch": "npx tailwindcss -i ./src/main.css -o ./dist/output.css --watch" + "buildCssWatch": "npx tailwindcss -i ./src/main.css -o ./dist/output.css --watch", + "package": "electron-forge package", + "make": "electron-forge make" }, "author": "TheGreydiamond", "license": "GPL-3.0", + "config": { + "forge": { + "packagerConfig": {}, + "makers": [ + { + "name": "@electron-forge/maker-squirrel", + "config": { + "name": "open360viewer" + } + }, + { + "name": "@electron-forge/maker-zip", + "platforms": [ + "darwin" + ] + }, + { + "name": "@electron-forge/maker-deb", + "config": {} + }, + { + "name": "@electron-forge/maker-rpm", + "config": {} + } + ] + } + }, "dependencies": { "@fortawesome/fontawesome-free": "^5.15.4", "@themesberg/flowbite": "^1.2.0", @@ -26,6 +55,12 @@ }, "devDependencies": { "minify": "^8.0.3", - "tailwindcss": "^3.0.8" + "tailwindcss": "^3.0.8", + "@electron-forge/cli": "^6.0.0-beta.61", + "@electron-forge/maker-deb": "^6.0.0-beta.61", + "@electron-forge/maker-rpm": "^6.0.0-beta.61", + "@electron-forge/maker-squirrel": "^6.0.0-beta.61", + "@electron-forge/maker-zip": "^6.0.0-beta.61", + "electron": "^16.0.5" } } diff --git a/src/ui_templates/index.html b/src/ui_templates/index.html index 920d046..470cd99 100644 --- a/src/ui_templates/index.html +++ b/src/ui_templates/index.html @@ -12,6 +12,17 @@ + +