Bugs with Quick Play #6
Labels
No Label
bug
duplicate
enhancement
help wanted
invalid
question
wontfix
No Milestone
No project
No Assignees
1 Participants
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: library-mirrors/gamejoltlua#6
Loading…
Reference in New Issue
Block a user
No description provided.
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
I got this to work in LÖVE, it is really simple, there are two methods to get the data (both of them are rather LÖVE specific)
Both of them should give you
data.username
anddata.token
if the game was run through Quick Play.Tested with LÖVE 0.9.1 in Windows 7 32bit
wouldn't this make more sense to write to the cache?
https://love2d.org/wiki/love.filesystem.getSaveDirectory
This function will probably not work as you won't be able to write to
/gjapi-credentials.txt
on linux, as it belongs to root.Quick Play does everything, I dont really understand what you mean.
You cant decide where Quick Play saves the file, it is saved next to the .exe, the working directory is only available through
io
. Although I read something @slime73 wrote about being able to mount the directory when fused... I dont remember how it was done though.Also I'm not sure If that would also work in Linux and Mac. This method's should work regardless
Sorry, I didn't read the code properly, but there's still an issue.
If a .love is installed in
/usr/share/
, thegetWorkingDirectory
will not be writable.e.g.;
https://aur.archlinux.org/packages/trainsported-git/
https://www.archlinux.org/packages/community/any/mari0/
I would suggest
getWorkingDirectory
withgetSaveDirectory
to ensure cross platform'ness.You dont need to write to it, you just need to read the
gjapi_credentials.txt
file, which is created by Quick Play, next to the executable file. It's not possible to change where Quick Play creates this file.Ah! Isn't QuickPlay windows only?
For what I know it is a Java app (which executes in the browser) that downloads the game to a temporary folder, creates the
gjapi_credentials.txt
file, and opens the game through the command prompt, with the username and token passed as arguments.I'm just guessing but It could very well execute a
.love
file with a shell script.Once the game is closed it deletes that temporary folder
This is all I see! I may be misled by the example, I suppose.
Yeah, but you could provide a zip file with an script that runs the .love file (or a .deb file?) so it should work, same for MacOS X, a zip with the app inside... It uses a standard command to open the game anyway so it should be the same.
Plus it's also written here:
It automatically detects the OS and downloads the correct file
You can also setup QuickPlay with files for any OS so it would be pointless to do this if you only could use it with .exe files
Okey I setted something up:
I have this script called
run.sh
next to the.love
file which is calledwhite.love
Basically you need to have LÖVE installed and it will execute it in fused mode, it will pass all the data passed by Quick Play and then wait until LÖVE finishes executing
Then I zipped the love and the script and uploaded it to GameJolt, I configured Quick Play to open
run.sh
Can you try out the Quick Play from here? I dont have a Linux machine to test it
Once the game is openned press
s
to see the username and token, it should be displayed twice.Once you close the game Quick Play should report "Game Closed" if it doesnt or if it does it before execution has finished then there is a problem.
Other problem may be the annoying terminal, but I have no idea on how to make it disappear, maybe someone that knows more about linux than I do
I installed
icedtea-web
and ran it from firefox.It gets stuck here:
Uploaded a new version where I fixed the freaking line endings and deleted that first line, sh files are opened by the bash interpreter by default anyway
@Positive07 It still get's stuck on the "Running Game..." screen. I notice that the
run.sh
does not have the executable permission (e.g. chmod a+x run.sh
) but zip does not store file permissions in the archive.I tested the current package, and it runs with
sh run.sh
but./run.sh
gives:Is there a workaround to this? All commands should be in that form
Okey I read a little and you are right, it is mandatory that the file is made executable with
chmod
, The best way would be to modify the Java Applet for Quick Play but we cant do that, the other is to make a launcher that runs across all Linux Distros supported by LÖVE (Debian based and Arch?) and can execute from the command line in the format specified above. Any Ideas on what can be used?what about running
sh ./run.sh
?How? you would have to modify Quick Play
Doesn't Quick Play use the executable line from the website? I do not know.
You must enter a valid file name, the file must be inside of the zip, for example if I have
run.sh
andwhite.love
then I can enter one of those, if I putsh ./run.sh
the page would tell me that the filesh ./run.sh
is not valid or could not be found inside of the zip file.I already made an issue at gj-quick-play in order to add an additional (optional) field where you can place a command to execute the file with, for example
sh
orlove
xdg-open something.love
would open the file in Love (assuming it is installed) and close the terminal, since xdg-open closes as soon as it activates whatever it needs to. The problem is that while I think xdg-open is common, it isn't everywhere, and obviously wouldn't work where it isn't.There are a few other something-open programs on Linux that do the same thing, but since you're having problems with just having a script (permissions issue chmod) this may be completely pointless..
That wouldnt work for the following reasons:
./command gjapi_username=USERNAME gjapi_token=TOKEN
at least until the issue I made at gj-quick-play gets solvedSo we will have to wait for GameJolt
Forgive me if I'm misunderstanding something, but what I was saying is to replace the
./command
withxdg-open something.love
for a command that will open the game without a terminal staying open.As for the other points, 3 is really the big problem.
Yeah but
xdg-open something.love
is not a valid file that can be found insde the zip.Also what I realy meant is: Would
gjapi_username=USERNAME
andgjapi_token=TOKEN
get passed to LÖVE?Now that you mention it, I'm not sure if they would, also I was responding to the idea of a script..even though we know that can't be done now. :/
Lets wait a couple of days for GameJolt, they would tell us what they think about this issue
pokes this issue from the far future :/ Guessing they never replied? Or did something else happen?