mirror of
https://github.com/FreeTubeApp/FreeTube
synced 2024-12-09 19:19:36 +01:00
029c492cf8
added Linux category
79 lines
1.5 KiB
JavaScript
79 lines
1.5 KiB
JavaScript
const os = require('os')
|
|
const builder = require('electron-builder')
|
|
|
|
const Platform = builder.Platform
|
|
const { name, productName } = require('../package.json')
|
|
|
|
let targets
|
|
var platform = os.platform()
|
|
|
|
if (platform == 'darwin') {
|
|
targets = Platform.MAC.createTarget()
|
|
} else if (platform == 'win32') {
|
|
targets = Platform.WINDOWS.createTarget()
|
|
} else if (platform == 'linux') {
|
|
targets = Platform.LINUX.createTarget()
|
|
}
|
|
|
|
const config = {
|
|
appId: `io.freetubeapp.${name}`,
|
|
copyright: 'Copyleft © 2020 freetubeapp@protonmail.com',
|
|
// asar: false,
|
|
// compression: 'store',
|
|
productName,
|
|
directories: {
|
|
output: './build/',
|
|
},
|
|
files: ['_icons/iconColor.*', './dist/**/*', '!./dist/web/**/*'],
|
|
dmg: {
|
|
contents: [
|
|
{
|
|
path: '/Applications',
|
|
type: 'link',
|
|
x: 410,
|
|
y: 230,
|
|
},
|
|
{
|
|
type: 'file',
|
|
x: 130,
|
|
y: 230,
|
|
},
|
|
],
|
|
window: {
|
|
height: 380,
|
|
width: 540,
|
|
},
|
|
},
|
|
linux: {
|
|
category: 'Network',
|
|
icon: '_icons/icon.png',
|
|
target: ['deb', 'rpm', 'zip', 'AppImage'],
|
|
},
|
|
mac: {
|
|
category: 'public.app-category.utilities',
|
|
icon: '_icons/iconColor.icns',
|
|
target: ['dmg', 'zip'],
|
|
type: 'distribution',
|
|
},
|
|
win: {
|
|
icon: '_icons/iconColor.ico',
|
|
target: ['nsis', 'zip', 'portable', 'squirrel'],
|
|
},
|
|
nsis: {
|
|
allowToChangeInstallationDirectory: true,
|
|
oneClick: false,
|
|
},
|
|
}
|
|
|
|
builder
|
|
.build({
|
|
targets,
|
|
config,
|
|
})
|
|
.then(m => {
|
|
console.log(m)
|
|
})
|
|
.catch(e => {
|
|
console.error(e)
|
|
})
|