timppu: Out of curiosity, what do you do after that? Manually copy the uncompressed files to some directory and run the game exe there (with WINE in your case), or run some installer within the installer?
Does this work with all GOG games (as long as you have the relevant dependencies/libraries in place like VC+++++ something something or DirectX9.0c), or do some games require extra steps, adding something to registry, creating a separate save game folder under My Documents that the game expects to be in place, or whatever?
If you're thinking of manually creating your own zip / 7z files from the game folder, that generally works for all games with the following notes:-
- I keep a list of common Windows Dependencies
updated here, they usually need installing once per Windows install, not once per game.
- All GOG installers write Galaxy metadata registry entries usually under HKLM\SOFTWARE\GOG.com\Games\xxxxxxxxxx but most games don't need that stuff to run. Unity Engine games store resolution settings data under HKCU\Software\nameofgame but you don't need to manually add these, they create them themselves on first run.
- A few games do need the registry. Eg, Oblivion and Fallout 3 "Play" will be greyed out in their startup launchers if it can't find a certain "Installed Path" registry entry. In these cases if InnoExtract doesn't extract it, then
InnoUnp can extract the install_script.iss file from the GOG installer and that contains all the needed registry entries.
- Games usually create their own data folders under My Documents, AppData, etc. You don't need to manually create those.
- If you're using a HiDPI display with Windows scaling at something other than 100%, then another (optional but useful) one added is HKCU\SOFTWARE\Microsoft\Windows NT\CurrentVersion\AppCompatFlags\Layers HIGHDPIAWARE flag but that's just where Windows stores the info you set when you right-click, Properties, Compatibility, and change scaling to "Application" so, eg, on a 1920x1200 laptop, Windows will run the game "natively" / pixel perfect at that resolution instead of trying to 'help' auto-scale it by 125% (effective 1536x960), 150% (1280x800), etc.
So if you wanted to create your own 7z file then automate a lot of the above to install in 2-clicks, you could create a 7z of the game folder, then place an install.bat file next to it containing:- REM This line auto-unzips the game from your backup drive to System / Gaming drive (%~dp0 in front of the filename means "the path to the 7z file is in same folder as where this batch script is run from"):-
"C:\Program Files\7-Zip\7z.exe" x "%~dp0Oblivion.7z" -o"C:\GOG Games\Oblivion" -r
REM This line disables Windows DPI scaling for this game
REG ADD "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\AppCompatFlags\Layers" /v "C:\GOG Games\Oblivion\Oblivion.exe" /t REG_SZ /d "HIGHDPIAWARE" /f
REM This line adds any required registry entries the game needs. You'll find these in the install_script.iss inside the GOG installer
REG ADD "HKLM\SOFTWARE\Wow6432Node\Bethesda Softworks\Oblivion" /v "Installed Path" /t REG_SZ /d "C:\GOG Games\Oblivion/" /f
REM If you've created a Shortcut link to the game's exe in the game folder, you can auto-copy that to the Windows Start Menu Games folder with:-
COPY "C:\GOG Games\Oblivion\Oblivion.lnk" "%USERPROFILE%\AppData\Roaming\Microsoft\Windows\Start Menu\Programs\Games"
^ And that would generally be enough to reliably replace the GOG installer with a script that auto-unzips the game, applies required registry tweaks, creates a Start Menu shortcut link, etc, in 2-clicks.