diff --git a/forge.config.js b/forge.config.js new file mode 100644 index 0000000..571a0ab --- /dev/null +++ b/forge.config.js @@ -0,0 +1,46 @@ +const fs = require("fs"); + +module.exports = { + packagerConfig: { + ignore: [".github", ".gitignore", "install.sh", "forge.config.js"], + }, + makers: [ + { + name: "@electron-forge/maker-deb", + config: { + options: { + productName: "TouchKio", + productDescription: "Kiosk mode application for a Home Assistant dashboard", + categories: ["Network"], + icon: "img/icon.png", + }, + }, + }, + { + name: "@electron-forge/maker-zip", + }, + ], + publishers: [ + { + name: "@electron-forge/publisher-github", + config: { + repository: { + owner: "leukipp", + name: "touchkio", + }, + draft: true, + }, + }, + ], + hooks: { + postMake: async (config, results) => { + for (const result of results) { + result.artifacts.forEach((artifact) => { + if (artifact.includes("amd64")) { + fs.renameSync(artifact, artifact.replace("amd64", "x64")); + } + }); + } + }, + }, +}; diff --git a/install.sh b/install.sh index f12d58d..fc86d9c 100755 --- a/install.sh +++ b/install.sh @@ -8,7 +8,7 @@ case "$(uname -m)" in ARCH="arm64" ;; x86_64) - ARCH="amd64" + ARCH="x64" ;; *) echo "System architecture $(uname -m) not supported." diff --git a/package.json b/package.json index 2e6cfc1..755ac6a 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,7 @@ { "name": "touchkio", "description": "Home Assistant Touch Kiosk", + "homepage": "https://github.com/leukipp/touchkio", "author": "leukipp", "version": "1.0.1", "license": "MIT", @@ -9,46 +10,6 @@ "start": "electron . --web-url=https://demo.home-assistant.io", "build": "electron-forge make" }, - "config": { - "forge": { - "packagerConfig": { - "ignore": [ - ".gitignore", - ".github/", - "docs/" - ] - }, - "makers": [ - { - "name": "@electron-forge/maker-zip" - }, - { - "name": "@electron-forge/maker-deb", - "config": { - "options": { - "productName": "TouchKio", - "icon": "img/icon.png", - "categories": [ - "Network" - ] - } - } - } - ], - "publishers": [ - { - "name": "@electron-forge/publisher-github", - "config": { - "repository": { - "owner": "leukipp", - "name": "touchkio" - }, - "draft": true - } - } - ] - } - }, "prettier": { "printWidth": 120 },