diff --git a/.gitignore b/.gitignore index 55f9996..16328e0 100644 --- a/.gitignore +++ b/.gitignore @@ -1,14 +1,13 @@ node_modules .flatpak-builder build -/dist +repo +generated-sources.json source app -extra app-32.7z deezer-*.exe package-lock.json package.json app.7z -repo *.AppImage \ No newline at end of file diff --git a/Makefile b/Makefile index 275c9ee..9a7b1d1 100644 --- a/Makefile +++ b/Makefile @@ -61,17 +61,14 @@ prepare: install_build_deps cd source && 7z x -y -bsp0 -bso0 app-32.7z # Extract app sources from the app asar extract source/resources/app.asar app - - # Add extra resources to be used at runtime - mkdir -p extra/linux - cp source/resources/win/systray.png extra/linux/ - + # Prettier the sources to patch successfully prettier --write "app/build/*.js" - # Patch hide to tray (https://github.com/SibrenVasse/deezer/issues/4) - patch -p1 -dapp < quit.patch - # Add start in tray cli option (https://github.com/SibrenVasse/deezer/pull/12) - patch -p1 -dapp < start-hidden-in-tray.patch + + # Apply patches from ./patches, default ones: + # Hide to tray when closing (https://github.com/SibrenVasse/deezer/issues/4) + # Start in tray cli option (https://github.com/SibrenVasse/deezer/pull/12) + $(foreach p, $(wildcard ./patches/*), patch -p1 -dapp < $(p);) # Append `pkg_json_append` to the `package.json` of the app # Adds electron, elecron-builder dependencies, and build directives @@ -110,4 +107,4 @@ run_flatpak: flatpak run dev.aunetx.deezer clean: - rm -rf app extra flatpak/{.flatpak-builder,build} node_modules source app-32.7z app.7z deezer-*.exe package-lock.json \ No newline at end of file + rm -rf app flatpak/{.flatpak-builder,build} node_modules source app-32.7z app.7z deezer-*.exe package-lock.json \ No newline at end of file diff --git a/extra/linux/systray.png b/extra/linux/systray.png new file mode 100644 index 0000000..4e97125 Binary files /dev/null and b/extra/linux/systray.png differ diff --git a/quit.patch b/patches/quit.patch similarity index 100% rename from quit.patch rename to patches/quit.patch diff --git a/start-hidden-in-tray.patch b/patches/start-hidden-in-tray.patch similarity index 100% rename from start-hidden-in-tray.patch rename to patches/start-hidden-in-tray.patch