cucumber-sp / yandex-music-linux

Linux client of Yandex Music
Other
222 stars 5 forks source link

Add user flags config #63

Closed Skiftsu closed 3 months ago

Skiftsu commented 4 months ago
  1. Added to the launch script the ability to use user config for flags. E.g. electron flags to use wayland: --enable-features=UseOzonePlatform --ozone-platform=wayland

  2. Changed version of Electron27 to Electron28, without this app launch with errors.

ein-shved commented 4 months ago

Can you install your script within nix/default.nix too?

cucumber-sp commented 4 months ago

Windows app uses electron 27. That's why we use it too. Is there any reason for changing it to version 28?

Skiftsu commented 4 months ago

Windows app uses electron 27. That's why we use it too. Is there any reason for changing it to version 28?

If use electron27 the application starts with errors. I checked with electron28 works the same, I didn't notice any problems. Log if run on electron27 with flags: https://pastebin.com/axmn3D5U

Skiftsu commented 4 months ago

Can you install your script within nix/default.nix too?

Sorry, I don't use Nix and won't be able to test if this will work

ein-shved commented 4 months ago

Can you install your script within nix/default.nix too?

Sorry, I don't use Nix and won't be able to test if this will work

CI and I will test it for you.

Skiftsu commented 4 months ago

Can you install your script within nix/default.nix too?

Sorry, I don't use Nix and won't be able to test if this will work

CI and I will test it for you.

In nixos, flags seem to be set immediately during package installation. This is from the .nix file for the Obsidian application: https://github.com/NixOS/nixpkgs/blob/nixos-23.11/pkgs/applications/misc/obsidian/default.nix

makeWrapper ${electron}/bin/electron $out/bin/obsidian \
        --add-flags $out/share/obsidian/app.asar \
        --add-flags "\''${NIXOS_OZONE_WL:+\''${WAYLAND_DISPLAY:+--ozone-platform=wayland}}"
ein-shved commented 4 months ago

In nixos, flags seem to be set immediately during package installation.

Yes, but it is better to use same code (same new script) for each package manager.

Skiftsu commented 4 months ago

In nixos, flags seem to be set immediately during package installation.

Yes, but it is better to use same code (same new script) for each package manager.

Maybe do similarly to the nixos obsidian package for PKGBUILD and nix/default.nix? I mean, add flags for wayland at launch if env XDG_SESSION_TYPE is "wayland" or NIXOS_OZONE_WL is 1. But in any case should choose which version of electron to use so that there would be no errors

ein-shved commented 3 months ago

for PKGBUILD and nix/default.nix

Why do you consider only pacman and nix package managers? Why not deb? I suggest you to use one launching script for all, because we may extend its functionality in future (e.g. add extra options). And it is better to do one way in one place instead of many different ways in many different places.

cucumber-sp commented 3 months ago

Idea is good, but implementation is quite bad. You should've open new issue and discuss it first. I'm gonna create a few new now (while closing this PR).

cucumber-sp commented 3 months ago

https://github.com/cucumber-sp/yandex-music-linux/issues/64

cucumber-sp commented 3 months ago

https://github.com/cucumber-sp/yandex-music-linux/issues/65