0
0
mirror of https://github.com/cucumber-sp/yandex-music-linux.git synced 2024-12-23 22:22:59 +03:00

save forge.config.js and desktop.ejs as files

This commit is contained in:
Maxim Slipenko 2024-01-29 14:56:48 +00:00 committed by GitHub
parent a9b515cb52
commit 9438d8880b
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 58 additions and 64 deletions

11
desktop.ejs Normal file
View File

@ -0,0 +1,11 @@
[Desktop Entry]
Name=Yandex Music
Name[ru]=Яндекс Музыка
Comment=Yandex Music — we collect music for you
Comment[ru]=Яндекс Музыка — собираем музыку для вас
GenericName=YandexMusic
Exec=<%= name %> %U<% if (execArguments && execArguments.length) { %> <%= execArguments.join(' ') %><% } %>
Icon=YandexMusic
Type=Application
StartupNotify=true
Categories=Audio;Music;Player;AudioVideo

45
forge.config.js Normal file
View File

@ -0,0 +1,45 @@
const commonOptions = {
icon: {
"48x48": "build/next-desktop/favicon.png",
"scalable": "build/next-desktop/favicon.svg"
},
desktopTemplate: "./desktop.ejs"
}
module.exports = {
packagerConfig: {
asar: true,
},
rebuildConfig: {},
makers: [
{
name: '@electron-forge/maker-zip',
platforms: ['linux']
},
{
name: '@electron-forge/maker-deb',
config: {
options: {
...commonOptions,
maintainer: 'Cucumber Space',
homepage: 'https://github.com/cucumber-sp/yandex-music-linux'
}
}
},
{
name: '@electron-forge/maker-rpm',
config: {
options: {
...commonOptions,
homepage: 'https://github.com/cucumber-sp/yandex-music-linux'
}
}
}
],
plugins: [
{
name: '@electron-forge/plugin-auto-unpack-natives',
config: {},
},
],
};

View File

@ -97,70 +97,8 @@ npm install @electron/notarize --save-dev
npm install --save-dev @electron-forge/cli
npx electron-forge import
# set some building parameters from config
forge_config="const commonOptions = {
icon: {
"48x48": "build/next-desktop/favicon.png",
"scalable": "build/next-desktop/favicon.svg"
},
desktopTemplate: "./desktop.ejs"
}
module.exports = {
packagerConfig: {
asar: true,
},
rebuildConfig: {},
makers: [
{
name: '@electron-forge/maker-zip',
platforms: ['linux']
},
{
name: '@electron-forge/maker-deb',
config: {
options: {
...commonOptions,
maintainer: 'Cucumber Space',
homepage: 'https://github.com/cucumber-sp/yandex-music-linux'
}
}
},
{
name: '@electron-forge/maker-rpm',
config: {
options: {
...commonOptions,
homepage: 'https://github.com/cucumber-sp/yandex-music-linux'
}
}
}
],
plugins: [
{
name: '@electron-forge/plugin-auto-unpack-natives',
config: {},
},
],
};
"
echo Writing Forge Config...
echo "$forge_config" > ./forge.config.js
desktop_config="[Desktop Entry]
Name=Yandex Music
Name[ru]=Яндекс Музыка
Comment=Yandex Music — we collect music for you
Comment[ru]=Яндекс Музыка — собираем музыку для вас
GenericName=YandexMusic
Exec=<%= name %> %U<% if (execArguments && execArguments.length) { %> <%= execArguments.join(' ') %><% } %>
Icon=YandexMusic
Type=Application
StartupNotify=true
Categories=Audio;Music;Player;AudioVideo"
echo Writing desktop config...
echo "$desktop_config" > ./desktop.ejs
echo Copy forge.config.js and desktop.ejs...
cp forge.config.js desktop.ejs ./app
update_license=0
if prompt_yes_no "In order to build the app we'll need to update the license field in package.json. Continue?"; then