Added AppImage bundler

This commit is contained in:
Observer KRypt0n_ 2022-01-02 02:03:18 +02:00
parent 4a2250277d
commit cd3f2e5346
No known key found for this signature in database
GPG key ID: DC5D4EC1303465DA
3 changed files with 45 additions and 0 deletions

1
.gitignore vendored
View file

@ -2,6 +2,7 @@
yarn.lock
package-lock.json
Audio_English(US)_2.3.0.zip
*.AppImage
/bin
/dist

42
bundle-appimage.cjs Normal file
View file

@ -0,0 +1,42 @@
const path = require('path');
// Require bundler
const { Bundler } = require('neutralino-appimage-bundler');
// Create an object with some params
const bundler = new Bundler({
// .desktop file properties
desktop: {
// Name field
name: 'An Anime Game Launcher',
// Path to the icon
icon: path.join(__dirname, 'public/icons/64x64.png'),
// Categories (defult is Utilities)
categories: ['Game']
},
// Neutralino binary info
binary: {
// Name of the binary (cli.binaryName)
name: 'an-anime-game-launcher',
// Dist folder path
dist: path.join(__dirname, 'dist')
},
// Some files or folders to copy inside of the the AppImage
copy: {
'public': path.join(__dirname, 'dist/an-anime-game-launcher/public')
},
// Path to the appimage to save
output: path.join(__dirname, 'dist/An Anime Game Launcher.AppImage'),
// Application version
version: '2.0.0'
});
// Bundle project
bundler.bundle();

View file

@ -7,6 +7,7 @@
"neu": "neu",
"dev": "vite build && neu run --disable-auto-reload",
"build": "vite build && rm -rf dist/an-anime-game-launcher/public && mkdir dist/an-anime-game-launcher/public && cp public/runners.json dist/an-anime-game-launcher/public && cp public/dxvks.json dist/an-anime-game-launcher/public && cp -r public/locales dist/an-anime-game-launcher/public/locales && cp -r public/shaders dist/an-anime-game-launcher/public/shaders && neu build --release",
"bundle": "node bundle-appimage.cjs",
"check": "svelte-check --tsconfig ./tsconfig.json"
},
"dependencies": {
@ -19,6 +20,7 @@
"@sveltejs/vite-plugin-svelte": "^1.0.0-next.33",
"@tsconfig/svelte": "^3.0.0",
"@types/js-md5": "^0.4.3",
"neutralino-appimage-bundler": "^1.1.1",
"sass": "^1.45.2",
"svelte": "^3.44.3",
"svelte-check": "^2.2.11",