-
Notifications
You must be signed in to change notification settings - Fork 128
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Implement itch.io as a new game service #65
Comments
It doesn't look like they have required functionality in their API. Also OAuth applications can only request profile (https://itch.io/docs/api/oauth#the-authorization-step/scopes). |
Can you just use butler to download and update games? (I know it is not the best solution..) |
An interesting feature to consider from the itch.io client is the use of a sandbox. |
It looks like the official client uses a different API, used and sort-of-documented here. Specific endpoints of interest might be /login, /profile/owned-keys, /games/<gameid>/uploads, /games/<gameid>/download-sessions, and /profile/game-sessions/summaries/<gameid>. Additionally, it seems like Playnite was able to get started by contacting the itch devs directly. |
Hi, I have made some progress on this. https://github.com/hagabaka/GameHub/tree/itch Currently I'm able to login with an API key, and fetch a list of games, although I haven't figured out why they're not showing up in the GameHub UI (it's able to print a list of their names in console). This is much more complicated than other data sources, because The code is missing a lot of error checking, and I'm probably doing a lot of things the wrong way. I'd appreciate any help and directions. |
@hagabaka thanks. I have fetched your branch to https://github.com/tkashkin/GameHub/tree/itch. I have added some error checks and improved I can't actually test this since I don't have anything on itch.io. I assume Run GameHub with |
Code style changes and fixes
Thanks. I've merged the commits and will keep working on it.
|
I've added the functionality to list, install, and run itch.io games. Here are some of the remaining issues:
|
Yes, Maybe
Is it possible to get game's executable path from butler? It should be possible to use compatibility layers in that case. |
@tkashkin Thanks. To update status during game install and launch, I think we need to split |
Summoning @fasterthanlime, he may be able to help, though his status say's he's on break. |
@hagabaka Using separate connections for tasks like launching/installing/etc. is a good idea indeed! Closing the connection will "cancel" these operations. This is the concept of "conversations" as implemented in https://github.com/itchio/node-butlerd Here's an example usage of node-butlerd: Having a separate connection lets you route logging (the Like @aaronfranke said, I'm on semi-break, but happy to review butlerd client implementation before it goes live (I will be afk Sep 1-9 though). |
I've added status update during game download. There are a couple ugly details:
|
@hagabaka I have refactored download status so it doesn't need workarounds like this. |
@tkashkin Cool! That works great for me. I added handling of It seems to me that the only main missing feature is running with compatibility layer. Butler doesn't have an API to tell us the name of the game executable. We could try to guess it, but there would be risk of running "uninstall.exe" etc. Butler has code to handle this (through dash), but it doesn't tell us the result, and it filters by platform by default. I created an issue to ask for the butler API to provide this information, which will make launching with compatibility much easier to implement. There's also an issue requesting for itch/butler itself to support compatibility tools. |
@tkashkin What other missing features or implements do you think we need to implement before merging this?
I implemented game updates before launching. It works, but the UI isn't very intuitive as it looks the same as freshly installing a game. Is there a way to make the InstallDialog display "Install update"? |
Looking forward to using this! What else needs to be done before we merge it in? If you need me to test anything, I can give it a shot. Thanks for the work on this, and for gamehub in general, I really like the project. |
@spinningD20 testing would be nice. |
There might be a previous settings file somewhere, but the above is what I'm getting when I do I'm on ArchLinux fwiw. EDIT: I removed |
@spinningD20 export GSETTINGS_SCHEMA_DIR="$APPDIR/usr/share/glib-2.0/schemas/:$GSETTINGS_SCHEMA_DIR" |
https://gist.github.com/spinningD20/f4e20c16b4cdf14e784d0eab67bd5a97 Should I try it on a fresh system that hasn't seen gamehub yet? I also tried running gamehub after exporting the env vars above as you had specified, still a seg fault. |
Thanks for helping with testing. I also get a segfault if |
https://gist.github.com/spinningD20/db4a7da0472a68c08c21c6a27bc7e96e I am beyond the segfault now, thanks for the pointer about butler. Observations so far:
|
I noticed a few different flags for running gamehub, and got it to give me some DEBUG level logging in the terminal. after the FATAL json null error, I got this json response: https://gist.github.com/spinningD20/0411ec16bd1751f15dcf38d9b041a63f The only thing I noticed that was EDIT: Also, I am running this directly from your fork's itch branch, hagabaka. |
I reverted the commit which added game updates but unfortunately also causes this problem with some games. Can you try if the latest commit works? Also, it might help with testing to know that after you've installed the itch branch one time, the setting schema will be updated, and you don't need to install it every time after rebuilding, but can just run the newly built binary directly. |
we're getting further! :) With the latest commit, I am able to download and install Baba Is You. I went and installed Celeste as well. So with the happy path out of the way, I started going down some other scenarios... one of them is canceling the download after it is started. When I do this, it does technically stop the Download, but the UI state of the tile text is not updated, still shows me the (last update of) the download progress. If I close gamehub and reopen it, it correctly shows not installed, and will let me go install it. The only other side-effect of starting the download, canceling, closing gamehub, and reopening and reinstalling, is that it won't clean up the canceled download: Not sure what the priority is, if we want any of the above fixed before it is merged in or not? Testing this same scenario with GOG games, it uses a file in the GOG collection directory to store the downloaded data, and when canceled and re-started, it uses the same file (canceling the download does not make gamehub delete the progress it made in a previous download attempt). More just letting you guys know this detail I noticed. Otherwise, it seems to work as intended! (disclaimer, I've only installed/uninstalled/downloaded/cancelled download, I am sure there are other things to test too :) |
With the latest commit on my branch, status should be updated correctly when cancelling an installation. For clearing or reusing files from cancelled installations, I think there should be an easier way to let butler handle it, but I'm still trying to get the information from the Itch developer. I feel this could be done in a separate issue after the main features have been merged. |
Thanks @hagabaka ! While I only have a few games to test with from itch.io (most purchases I've done through them are for art assets), I would say it's ready to merge, and we'll tackle more undiscovered, involved issues as they arise. @tkashkin or hagabaka, just let me know if you'd like me to do anything further, if there's anything more I can do to help out. |
I have merged it into |
clicking on itch io does not open up the login page [WARN] [ButlerClient: err 2] {"id":2,"error":{"code":-32603,"message":"apiKey: cannot be blank.","data":{"butlerVersion":"v15.17.0, built on Aug 13 2019 @ 23:04:11, ref 94c194ef1888b0363e399983355bf981dee38ff8","stack":"apiKey: cannot be blank."}},"jsonrpc":"2.0"} |
@BarFin There is no login page, you need to open Settings and set your itch.io API key. |
oh i see now it worked |
Is it possible to make the login page open the itch.io settings page, or show an information dialog? I think we can do that in |
Thank you for Itch support! Linux natives games seem to run splendidly, at least all the ones I've tested so far, free or paid. But Windows games don't seem to launch at all. I don't even get an "executable cannot be found message", and even after setting it manually I get no "running with compatibility layer" text like the other Proton games. Does the Itch service not have any support for this yet? |
@5310 Yes, compatibility layers are not supported for itch games yet. GameHub does not run games directly and butler does not expose available game executables. |
As @spinningD20 has already pointed out in his comment, clicking on "authentication is required" in the list of services does nothing. The user has to generate an api key, the link for which is buried in the settings. This is confusing to an user who doesn't already know what to do. Can the behaviour of "authentication is required" tab be changed to that of the "generate key" link? Or opening a window explaining the steps may also be useful. |
This doesn't seem to work for me. I've pasted the generated key, I get a notice "Some settings will be applied after application restart". I restart GameHub, but the itch.io status still says I've tried twice with different keys |
@captn3m0 I suspect (but not completely sure) that the Itch client (or Butler) has to be installed for Gamehub to move from |
That was it! Seems to have fixed it for now, thanks. It ought to be able to just run off my generated key though? |
Since the itch client is open source is it possible to have itch support built in to Gamehub without having to install the Itch client? |
Code style changes and fixes Former-commit-id: 255f07b
Code style changes and fixes Former-commit-id: 025edd0
It still says "not installed" after pasting the key and installing both itch and butler. Butler is soft-linked to /usr/bin and /usr/bin/local and itch was installed normally. |
May I ask what the status of this is? |
Implemented and i believe it should be closed; |
Reference implementations:
The text was updated successfully, but these errors were encountered: