Funkin icon indicating copy to clipboard operation
Funkin copied to clipboard

Makes the donate button actually work on Linux.

Open natis1 opened this issue 4 years ago • 9 comments

& is not needed as xdg-open will automatically quit after successfully opening the link returning you to the game. Also & doesn't work here. it's given as an argument to xdg-open not an instruction to the system telling it to run the program in the background.

If you absolutely want to run this command in the background you need to use sys.io.process according to this documentation here: https://api.haxe.org/Sys.html

But this isn't even needed. as xdg-open will close on its own after the page starts loading.

natis1 avatar Jan 09 '21 23:01 natis1

lemme test dis myself and then i'll prob merge hehe

ninjamuffin99 avatar Jan 13 '21 04:01 ninjamuffin99

The version checker also has this problem btw

Peter0x44 avatar Feb 26 '21 10:02 Peter0x44

Could you also replace /usr/bin/xdg-open with /usr/bin/env and an added first argument of "xdg-open" please? The current code doesn't even find xdg-open on my system because it's in a completely different place.

sh: /usr/bin/xdg-open: No such file or directory

env is more portable because it performs a lookup in the user's PATH to find xdg-open, and although /usr/bin/env isn't a guaranteed path either it's common-enough.

OPNA2608 avatar Mar 18 '21 23:03 OPNA2608

env is more portable because it performs a lookup in the user's PATH to find xdg-open, and although /usr/bin/env isn't a guaranteed path either it's common-enough.

why not just straight up use xdg-open without specifying a path? what's the use in having env here?

Peter0x44 avatar Mar 21 '21 14:03 Peter0x44

I was assuming it needed an absolute path, but if just xdg-open works then yeah go for that.

OPNA2608 avatar Mar 21 '21 14:03 OPNA2608

yeah, a full path isn't needed this should just be:

 Sys.command('xdg-open', ["https://ninja-muffin24.itch.io/funkin"]);

Peter0x44 avatar Mar 21 '21 15:03 Peter0x44

yeah, a full path isn't needed this should just be:

 Sys.command('xdg-open', ["https://ninja-muffin24.itch.io/funkin"]);

Alright. I switched it to this. You’re probably right even if most distros would place it in /usr/bin it’s not something one can be 100% sure of and plus it’s simpler

natis1 avatar Mar 21 '21 18:03 natis1

Also added the other change in your pr

natis1 avatar Mar 21 '21 18:03 natis1

Will this be merged soon or has it been fixed upstream since? @ninjamuffin99

Coolguy3289 avatar Apr 06 '21 22:04 Coolguy3289

Who knew this would eventually turn into https://github.com/FunkinCrew/Funkin/pull/2490 lol

NotHyper-474 avatar Aug 05 '24 17:08 NotHyper-474