10

Does the Linux version of Steam use the same .vpk files as the Windows version? And if so where is the Steam install located by default on a *nix system? /usr/share/ or /home/user/.steam or somewhere else?

To expound on my question: What I'm trying to accomplish is taking the majority of Steam's files, and moving the compatible bits to Linux. It is my understanding that when Steam is presented with partial/incomplete data, it will download only what it needs, leaving the usable pieces intact, thus saving bandwidth.

So what I'm wondering is: am I able to copy the Steam folder from a Windows install to a Linux install and nothing break? Will Steam download the proper Linux binary version of the game? Do I need to delete the Windows binaries? Do I need to delete file associated with Windows-only games? Et cetaera.

  • I'm tempted to update this question and change the .gcf to .vpk – Powerlord Jan 7 '16 at 21:41
7

Yes, you can for many of the files.

I've migrated most of my Couter-Strike:Source files to Linux.

You should pick the biggest files, such as textures, sounds, models and maps to copy. Then, under your Steam directory in Linux (~/.local/share/Steam/SteamApps) create the directory structures that will hold these files, following the structure on your Windows partition.

Then when you go to install the game on Linux, after saying "Preparing to install game..." it will say "Discovering existing files...".

  • Assuming the steam library location is on an ntfs drive, is it possible for a game that is available on both Linux and windows have both versions installed in that same path? – Irfan Nov 12 '16 at 12:46
4

The default steam game install directory on Linux (Not *nix, because there's no non-Linux *nix Steam binary) is /home/user/.local/share/Steam/SteamApps/common.

The default location for the .gcf files is /home/user/.local/share/steam/SteamApps/.

There's no way to just move games from Windows to Linux and expect them to run. Even if the game is Linux compatible, the Windows-binary version won't run in Linux. You must download the Linux version of that game from Steam on Linux.

However, the .gcf files themselves may migrate over without problems. The Valve Developer Wiki article for GCF has an interesting line:

GCF files cannot be altered, and if they could Steam would correct them when it next ran, but their contents can be viewed.

This seems to imply that Steam will fix anything that looks wrong with a .gcf file. However, I don't know if that means it will replace the binaries.

As far as games that don't have an associated .gcf file: You can copy much of the data and assets over. Depending on the game and its install method, Your Results May Vary.

  • Since the question mentions gcf files, I'm pretty sure they're just asking about moving the bulk of the data successfully, then letting Steam verify integrity to replace executables and such with Linux versions (and so get a much faster/smaller download). – SevenSidedDie Nov 6 '13 at 18:01
  • @SevenSidedDie Yes. That's what I'm getting at. Edited OP. – KJ O Nov 6 '13 at 18:11
  • I haven't tried it with win - linux, but look at gaming.stackexchange.com/questions/56313/… – Kexlox Nov 6 '13 at 18:14
  • @SevenSidedDie, Ah. That makes me a bit unsure of my answer. The Valve Developer Wiki article for GCF has a line that reads "GCF files cannot be altered, and if they could Steam would correct them when it next ran, but their contents can be viewed." So perhaps it would be able to correct the necessary components.... but perhaps not? It seems to contradict itself. – dotVezz Nov 6 '13 at 18:15
  • @Kexlox As far as moving data from Windows to Linux, it may depend on the game. I've had troubles with some games, but no problems with Kerbal Space Program. I'll update my answer in regards to your updated question. – dotVezz Nov 6 '13 at 18:16
1

Yes it's possible if the game supports both platforms. Personally I did it the opposite way but I saw someone on a reddit post who did it your way.

You just need to make steam create a backup of the game then "restore" that backup on your windows machine. Steam will download the missing libraries automatically. This guide has a detailed example.

0

You can actually download games for a different platform/architecture using either the Steam client itself or SteamCMD.


To setup the Steam client for this:

  • Open Steam with the -console option
    • On Mac open the terminal and type/paste in open -a Steam.app --args -console
    • On Windows you can add launch options to a shortcut or run Steam from the command line by cd'ing into your Steam folder and running Steam.exe -console. Alternatively you could do something like C:\\Program Files (x86)\\Steam\\Steam.exe -console without needing to change into the directory; the Program Files (x86) folder is for 64-bit versions of Windows, on a 32-bit version of Windows the default installation folder will be C:\\Program Files\\Steam instead.
    • On Linux open the terminal and type/paste in ~/.steam/bin32/steam -console or cd into the ~/.steam/bin32 folder and then run steam -console

To change your platform/architecture using either SteamCMD after you install and start it, or the client on the Console tab choose the proper configuration options to match the desired download, i.e. Windows 32-bit:

  • @sSteamCmdForcePlatformType type (where type is windows, macos, or linux)
  • @sSteamCmdForcePlatformBitness bitness (where bitness is 32 or 64)

Then to download the game, in the client you can just use your Library to start the install normally, or through the Console/using SteamCMD you can:

  • Enter the command login username where username is your username. It should auto-login if you've logged in to Steam previously on your machine. If using SteamCMD the terminal freezes (as it did in my testing for this) press Ctrl + C to exit the SteamCMD script/tool and then you can try again.

  • If you don't want the app installed to whichever folder you have set as the default Steam Library Folder for your system (yes, it will use your existing Steam client settings, hence the auto-login) you can use force_install_dir path/to/use/ to instead install the game to a different path. force_install_dir is pretty screwed up on Mac; easier to use the default settings and then move the game to another Steam Library folder afterwards (both the appmanifest_#.acf file from the steamapps folder where it's installed and the game's install data from the steamapps/common folder) or to set a different default folder through the client before using SteamCMD, lol.

  • Find the appid and enter app_update appid. Optionally you can run app_update appid validate to both download an app and validate it after it's installed.

Notes about using the Steam client for this:

  • You will not be able to launch your installed games ("missing executable" error) until you change back to your real platform + architecture (either through commands or restarting the client). The one exception to this would likely be if you are using 64-bit Windows and make it act like 32-bit Windows instead.

  • If you pause a download for this different platform + architecture and restart the client or SteamCMD and then allow it to continue the download without switching back to the desired platform + architecture you will lose data when Steam decides you have the wrong version of most of it for your machine. The same goes for starting an update or continuing a paused download for your real platform + architecture. So, be careful.

-1

You can force the download of windows games into steam using this or the method provided: https://github.com/dotfloat/steam-appmanifest

However, if you wish to run them then you'll have to navigate to their directory and use wine.

Currently, I'm trying to solve a problem that prevents you from running them directly in the steam client: Enable "Play" button for Undertale on Linux Steam

EDIT: Or you could just install Steam through wine...

  • They were asking if they could just copy files for a game that runs on both Windows and Linux from one to the other to save download time/bandwidth. – Powerlord Jan 7 '16 at 21:38

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.