I have a desktop and a steam deck. I would like to setup some old games I have on disc on the desktop. Then compress them and decompress on my Steam Deck without doing the full install again. I understand that with wine/proton prefixes they should be installed to a “fake c:/ windows hierarchy” can I just compress that and copy to a different Linux machine? Does it save which proton version was used? If I use something like Lutris or bottles can I import into them?

  • MentalEdge@sopuli.xyz
    link
    fedilink
    arrow-up
    17
    ·
    edit-2
    5 months ago

    No, actually.

    Your game files do not need to be inside a prefix, and I generally do not set things up that way.

    Same as on windows you can have your c drive, but then install games to a different drive. You can mount any file location as an additional drive in wine. There is usually already a “z” drive mounted, which gives the prefix access to the filesystem outside the prefix.

    This means there’s not actually any need to place things inside the prefix, except for save files which need to be in specific locations like appdata or documents.

    So to move things over and run them, you’d just copy the game files anywhere you like. To run a game, instead of a location on the c drive, you’d use the corresponding z drive path to the exe.

    With bottles, this is super easy. Set up a bottle, and copy any save files into the prefix. Easily done with “browse files” from the config page of a bottle, which will open the fake c drive in a file browser.

    With a configured bottle, simply navigate to the game .exe. Right click it, and select run with bottles. Bottles will ask which bottle to run it with, and that’s that. Alternatively, use the “Run executable” button found on the config page of the bottle. For ease of use, add the exe to the bottle as a shortcut.

    Shortcuts can then also be added as start menu items, or even added to steam.

    No need to fiddle with putting all the game files inside the fake c drive.

    Setting things up this way means you have your prefix, with save files and such, separate from the game files. You can easily delete or add games, without touching the save-file-containing prefix, and move games around to wherever you need and still have them work.

    You can re-use the same bottle for many games, and keep the save files for those games in one prefix.

    If a given game needs a bit more massaging to work, bottles makes it very easy set up and manage additional bottles for any such games.

    • λλλ@programming.devOP
      link
      fedilink
      arrow-up
      4
      ·
      5 months ago

      Does it install winetricks and wine? Or is it up to you to install that? I believe the steam comes with it pre-installed though, so it’'s probably not necessary.

      • MentalEdge@sopuli.xyz
        link
        fedilink
        arrow-up
        6
        ·
        edit-2
        5 months ago

        Bottles has a wine manager that allows you to install various wine versions, and switch between them. You can also use the system installed version or even more versions installed by protonup-qt.

        Winetricks is included.

    • λλλ@programming.devOP
      link
      fedilink
      arrow-up
      4
      ·
      5 months ago

      Very informative thanks! Do you have a specific article that you’d suggest on bottles? Or does it have a decent wiki?

  • user134450@feddit.org
    link
    fedilink
    English
    arrow-up
    14
    ·
    5 months ago

    If they are all installed in the same wine prefix you could back up everything in one go by archiving the “.wine” folder in your home. that will include all applications installed in wine and all settings for those applications.

    if you want to separate them into one archive per app you should look into wine prefixes, otherwise you would need to identify every folder a given app created during installation and archive those together manually, which can be very tedious.

    • λλλ@programming.devOP
      link
      fedilink
      arrow-up
      4
      ·
      5 months ago

      What about graphics drivers? What if the desktop has an Nvidia GPU and the steam deck is AMD. Would that even matter?

      • cmnybo@discuss.tchncs.de
        link
        fedilink
        English
        arrow-up
        9
        ·
        5 months ago

        No, you can copy wine prefixes around all you want. You may have to adjust the graphics settings in the games though.

        • λλλ@programming.devOP
          link
          fedilink
          arrow-up
          2
          ·
          5 months ago

          Makes sense. I wouldn’t want to have all of my games in one wine prefix. I would like to keep them separate like steam/proton does. From looking it up, it seems the issue is that there is a lot of duplicate data that would need to be deduplicated. Steam supposedly does symlinks to solve this. But, if the symlinks points to /home/user/ as the base then that would break on /home/deck.

          If you have any experience with Lutris/bottles. Do they do separate wine prefixes? If so, how do they handle it?

          • cmnybo@discuss.tchncs.de
            link
            fedilink
            English
            arrow-up
            2
            ·
            5 months ago

            Lutris uses separate prefixes and doesn’t do any deduplication. You will need a separate tool for that or just use a filesystem like btrfs that supports deduplication.

            I’ve never used bottles, so I don’t know how it handles deduplication.

  • AnEilifintChorcra@sopuli.xyz
    link
    fedilink
    arrow-up
    5
    ·
    edit-2
    5 months ago

    I use Lutris and set up my directories a “GameName” and then 2 subdirectories “game” “prefix” and point Lutris to these.

    All of the game files go in “game” and the prefix is created in “prefix” when I press play in Lutris. Any extras dlls that are needed can be installed with winetricks within Lutris to that specific prefix

    This way you can just compress and decompress “GameName” folder and point Lutris to these locations on whichever machine.

    You can choose which prefix version you want in Lutris and it will download that version for you. I’m pretty sure it saves the version to somewhere in ~.local/share/lutris I’m not at my PC now so not 100% sure of the path.

    It saves it to ~.local/share/lutris/runners/wine and you can put a custom wine build here and Lutris should recognise it when configuring the runner options

    So you could copy this over to the corresponding location on the deck and Lutris will automatically detect this version as installed and won’t have to download it again but its not necessary unless you don’t have internet on the deck, or you’re like me and want to keep an archive of the working prefix for the future in case the prefix version is no longer available for whatever reason and other version just won’t work.

    If you’re new to Lutris, I wrote a step by step guide on how I use Lutris on a different community

    https://sopuli.xyz/comment/9858101

    • λλλ@programming.devOP
      link
      fedilink
      arrow-up
      3
      ·
      5 months ago

      Wow. You wrote a guide on it. I’ll try to find time to read it tonight! I do have a question, what if a game makes use of the windows registry? Would that change the prefix?

      • AnEilifintChorcra@sopuli.xyz
        link
        fedilink
        arrow-up
        2
        ·
        5 months ago

        Guide is maybe not the right word lol, it just exactly what I click to set up the majority of my games

        I’m not 100% sure, but from my understanding yes the regisrty in the “prefix” folder would be changed. You can manually edit the wine prefix registry with regedit https://www.winehq.org/docs/wineusr-guid<br />e/using-regedit and Lutris supports this, just click the arrow that brings up the winetricks option and its under Wine Registry

        • λλλ@programming.devOP
          link
          fedilink
          arrow-up
          2
          ·
          5 months ago

          Sounds like a guide to me ☺️

          The registry is one of the reasons I was thinking I would need separate prefixes that I can copy. But, I also understand that games that actually use the registry are few and far between. If I actually come across one that needs registry edits I can just pack that differently.

    • Eyck_of_denesle
      link
      fedilink
      arrow-up
      1
      ·
      5 months ago

      I just use the same prefix for every game. That cause any known issues? Also awesome comment thanks. Saved.

      • AnEilifintChorcra@sopuli.xyz
        link
        fedilink
        arrow-up
        1
        ·
        5 months ago

        I’ve run into issues where a game will work with a specific version of wine but then not work with a newer version but then other games that don’t work with the older version, work with the new one.

        Theres also potentially issues of dependencies for one game breaking another game. Separate prefixes just make it easier to troubleshoot a game not working since you can just install/uninstall whatever dependencies that it might need without worrying about messing up other games.

        Its also just easier to delete the entire prefix when you realise you’ve installed too many useless dlls and you’ve finally found the one thing you do need to make the game work lol

        I also like to archive games I like since companies can just decide to remove their games from existence whenever they want. So I just add the separate prefix that has any extra dlls or tweaks to the archive so that the game should still work in 3 years without having to try and download dependencies that may not be as easy to find in the future

        But if you don’t have issues I don’t think its a big deal and if you do have issues with a game, you can just make a separate one for that anyway.

  • simple@lemm.ee
    link
    fedilink
    arrow-up
    3
    ·
    5 months ago

    I understand that with wine/proton prefixes they should be installed to a “fake c:/ windows hierarchy” can I just compress that and copy to a different Linux machine?

    Yup, your save games are in your wine prefix so feel free to back them up and just use them again. Note that the game itself isn’t necessarily in the prefix, you could have installed it elsewhere.

    Does it save which proton version was used?

    I don’t think so, but it shouldn’t matter. You can change versions any time and it’ll just update your prefix.

    If I use something like Lutris or bottles can I import into them?

    Yes, you can set the prefix path to that folder you copied and it should pick up where you left things.

    • λλλ@programming.devOP
      link
      fedilink
      arrow-up
      1
      ·
      5 months ago

      Cool, thank you! A lot of games on ProtonDB list specific versions of proton that work best for different games. That’s why I asked. But, I could just add a file in the root of the prefix with the version that worked (for troubleshooting purposes).

      Do you have any preference for Lutris, bottles, vanilla proton?

      • simple@lemm.ee
        link
        fedilink
        arrow-up
        2
        ·
        5 months ago

        I use Heroic Launcher, it supports GOG and the Epic Store, but adding DRM-free games to it is also as easy as Lutris.

  • Eyck_of_denesle
    link
    fedilink
    arrow-up
    1
    ·
    5 months ago

    Lot of great answers. Must save post for Linux newbies. If you play native linix games their saves will most probably in /.local/share/ or /.config. If you use repacks like jc141 they have their own prefix in /games/jc141/.