Skip to content
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

Import already install wine games WINEPREFIX #160

Closed
liz-desartiges opened this issue Jan 5, 2019 · 21 comments
Closed

Import already install wine games WINEPREFIX #160

liz-desartiges opened this issue Jan 5, 2019 · 21 comments

Comments

@liz-desartiges
Copy link

As for now gamehub is missing an helper to install wine games like PlayOnLinux or lutris.
But as a nicer GUI and support for gog achievement so it might be useful to be able to import custom WINEPREFIX and not just the install directory and the game

@tkashkin
Copy link
Owner

@frstrikerman now it should be possible to import game, set its executable and override Wine/Proton prefix in compat options.

@lewellyn
Copy link
Contributor

lewellyn commented Apr 8, 2019

I came trawling the Issues for this very thing. I have some (non-GOG) games I installed (from CD-ROM) into their own WINEPREFIXes prior to learning about GameHub.

I cannot figure out how to define the WINEPREFIX to use for launching the games, and I can't get a custom script to work (customs scripts seem to be poorly documented, plus my Exectuable field keeps clearing, presumably because I'm doing something wrong).

Additionally, trying to reinstall doesn't yield any useful output to the console, nor do the games install. So I can't just wipe their prefixes and move them to GameHub.

So, being able to use already installed games is extremely valuable to me. In the mean time, I still keep their icons on my desktop to run outside of GameHub.

I see that the commit supposedly added support for this, but I simply can't see how to do it in the UI.

@tkashkin
Copy link
Owner

tkashkin commented Apr 8, 2019

@lewellyn

I cannot figure out how to define the WINEPREFIX to use for launching the games

It's currently implemented as a CompatTool option. Default is <game_dir>/_gamehub/compat/<tool_id>. You can change it in run dialog (right click in list/grid/details title):

image

I can't get a custom script to work (customs scripts seem to be poorly documented.

"Custom script" tool just executes your shell script and passes some variables to it. These variables are named in default script template.

plus my Exectuable field keeps clearing, presumably because I'm doing something wrong

It shouldn't, unless there's a bug I don't know about. Try to press Enter after selecting an executable.

@lewellyn
Copy link
Contributor

lewellyn commented Apr 8, 2019

As a concrete example, let's use the Pokemon TCG, as it's freely downloadable and exhibits the behaviors I note.

When I add it using the +, and then open the Properties, I go through and set all the options appropriately, to the best of my ability.

image

I see no options for a Proton prefix, though I selected Proton manually (changed from Custom Script).

After I close the window (hitting Enter on each field, for good measure, as you suggested), the Properties window doesn't retain all my information selected and still has no place for a WINEPREFIX. (Though it does retain the Image of all the data I input, strangely.)

image

The Details window, sadly, does not have anything except an Install button (which doesn't seem to actually do anything other than hang the app for a moment) and a Properties button. It also shows as a Linux game rather than a Windows game.

image

Hopefully the screenshots help illustrate the flow I'm expecting should work (which may be wrong?) and help convey my desires and expectations better. :) (And please don't mind my retro GUI theme... I could re-take the screenshots with Adwaita, but the functionality does not change.)

@tkashkin
Copy link
Owner

tkashkin commented Apr 8, 2019

@lewellyn executable path should be Unix-style, not Windows-style. / instead of \.

It works fine for me:

image

@lewellyn
Copy link
Contributor

lewellyn commented Apr 8, 2019

But where do I put the WINEPREFIX, which is the question in this issue? :)

@tkashkin
Copy link
Owner

tkashkin commented Apr 8, 2019

@lewellyn set executable correctly first. Game will have installed state when executable is correct and exists.
image

@lewellyn
Copy link
Contributor

lewellyn commented Apr 8, 2019

I must be doing something completely wrong. I set the executable to /home/lewellyn/.local/share/wineprefixes/Pokemon-TCGO/drive_c/users/lewellyn/Application Data/Pokémon Trading Card Game Online/PokemonTradingCardGameOnline/Pokemon Trading Card Game Online.exe which is the insane path to the windows binary, on disk. I tried selecting it in the picker. Neither gets the executable saved, and therefore none of the extra behaviors you mentioned. :(

The only message I see in the console is (com.github.tkashkin.gamehub:15836): Gtk-WARNING **: 14:38:37.303: gtk_window_set_titlebar() called on a realized window which I see extremely often during other normal use and I assume is unrelated to this.

@tkashkin
Copy link
Owner

tkashkin commented Apr 8, 2019

The only message I see in the console is (com.github.tkashkin.gamehub:15836): Gtk-WARNING **: 14:38:37.303: gtk_window_set_titlebar() called on a realized window which I see extremely often during other normal use and I assume is unrelated to this.

Yes, it's unrelated.

I have tested it with a very long path and it still works correctly:

[DEBUG]  [Utils.run] {'/mnt/LinuxStorage/SteamLibrary/steamapps/common/Proton 4.2/proton' 'run' '/mnt/LinuxStorage/Games/User/test/verylongpath/wqeqweqtewrgdfgd/dsgdsgdfsgfdbfdnbdfgnfgdnfgtnfg/rehredernernren/test/verylongpath/wqeqweqtewrgdfgd/dsgdsgdfsgfdbfdnbdfgnfgdnfgtnfg/rehredernernren/Pokémon Trading Card Game Online/Pokemon Trading Card Game Online.exe'}; dir: '/mnt/LinuxStorage/Games/User/test/verylongpath/wqeqweqtewrgdfgd/dsgdsgdfsgfdbfdnbdfgnfgdnfgtnfg/rehredernernren/test/verylongpath/wqeqweqtewrgdfgd/dsgdsgdfsgfdbfdnbdfgnfgdnfgtnfg/rehredernernren/Pokémon Trading Card Game Online'

Try to remove it from GameHub and readd. Click Add game, select executable with picker and it should fill game directory field automatically. Then confirm adding and try to run it.

@lewellyn
Copy link
Contributor

lewellyn commented Apr 8, 2019

Re-adding via the picker gets me closer (it feels like there's a bug somewhere that I was hitting, no?), but still no way to specify the WINEPREFIX to use. I simply cannot find that window you posted with the prefix and environment variables. I deleted and re-added eight games, all with the same outcome, so I'm not sure what I'm doing wrong. :(

image

image

@tkashkin
Copy link
Owner

tkashkin commented Apr 8, 2019

I simply cannot find that window you posted with the prefix and environment variables

Press "Run with compatibility layer" button and it will show this dialog first time. If you need to change something later, open it from context menu.

@lewellyn
Copy link
Contributor

lewellyn commented Apr 8, 2019

Aha! I can't say that was very obvious, but it's repeatable! 💃

Do you mind if I add a wiki page with the directions, for the benefit of others looking for how to make this happen? (And I'll use a standard theme for screenshots, of course.)

I guess this issue is ripe for closing since it has everything needed for a future spelunker to get their own already-installed games put into GameHub. :D

@tkashkin tkashkin closed this as completed Apr 8, 2019
@tkashkin
Copy link
Owner

tkashkin commented Apr 8, 2019

Do you mind if I add a wiki page with the directions, for the benefit of others looking for how to make this happen? (And I'll use a standard theme for screenshots, of course.)

Sure, why not? It can be useful for new users. Let me know if you encounter something not obvious.

@Lucki
Copy link
Contributor

Lucki commented Apr 8, 2019

Wow, this is really hidden, I didn't even know I could get this prefix setting window show up a second time…
I suggest to rename the context menu option as it is called the same as the other button but is doing something completely different. I thought it is doing exactly the same and didn't even tried to use the context menu entry.

Bildschirmfoto-20190408235157-377x209

Edit: Can I open the same window for custom emulator? There's no context menu available for them.

@tkashkin
Copy link
Owner

tkashkin commented Apr 8, 2019

@Lucki

Wow, this is really hidden, I didn't even know I could get this prefix setting window show up a second time…
I suggest to rename the context menu option as it is called the same as the other button but is doing something completely different. I thought it is doing exactly the same and didn't even tried to use the context menu entry.

Button and menu option are same, but dialog shows only for the first time if opened with button.

The idea is that you configure it once and then launch game instantly by clicking button or grid card. If you need to change compatibility options, open dialog from menu explicitly. It may be not so obvious, but I couldn't think about better solution.

I suggest to rename the context menu option

Any specific suggestions?

Edit: Can I open the same window for custom emulator? There's no context menu available for them.

Currently there's no way to open it explicitly. It will show before first emulator launch. I may add a button somewhere.

@lewellyn
Copy link
Contributor

lewellyn commented Apr 8, 2019

I suggest to rename the context menu option

Any specific suggestions?

"Configure compatibility layer" would probably save some confusion all around. Just my two cents, plus or minus inflation. I expect that should translate into the supported languages fairly well, too.

@Lucki
Copy link
Contributor

Lucki commented Apr 8, 2019

Any specific suggestions?

Maybe Configure and run.

@lewellyn
Copy link
Contributor

lewellyn commented Apr 8, 2019

I think part of the problem with "Configure and run" is that it is less obvious that just closing the window without running will save the configuration options. I expect most people aren't right-clicking to run things (I'd hope, at least!), so the Run button on the resultant dialog strikes me more as a "bonus" than the required way to execute.

@Lucki
Copy link
Contributor

Lucki commented Apr 8, 2019

Yea, good point. But I honestly I would expect that settings window to be accessible in the compatibility section in the game properties and that context menu entry to just do the same as the button.

@lewellyn
Copy link
Contributor

lewellyn commented Apr 8, 2019

I would be inclined to agree. Hiding it in a context menu is less discoverable than putting it in the Properties.

This is my mockup of how I'd expect the Properties window to look (with no changes to the configuration window). This would allow removal of the confusing menu option altogether, making for a cleaner and more intuitive UI. :)

image

@tkashkin
Copy link
Owner

tkashkin commented Apr 9, 2019

Configure button added in latest commit:

image

image

Lucki pushed a commit to Lucki/GameHub that referenced this issue Oct 30, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants