How To Use - Shin-Aska/DosboxStagingReplacerForGOGGalaxy GitHub Wiki

๐Ÿš€ How to Use


๐Ÿ“ฅ Download and Setup

  1. Download the Latest Release:

    • Visit the Releases page.
    • Get the executable for your system (e.g., DosboxStagingReplacer.exe for Windows).
  2. Install GOG Galaxy

  3. Install DOSBox Staging:

  • You may install it or just use the portable version.
  1. Run the Tool: Open a command prompt or terminal:

    DosboxStagingReplacer --help
    
    
    

๐Ÿ› ๏ธ Command-Line Arguments

Option Long Form Description
-h --help Show help message and exit
-v --version Print version information and exit
-f --file Path to Galaxy database file Default: galaxy-2.0.db
-d --directory GOG Galaxy storage directory Default: C:\ProgramData\GOG.com\Galaxy\storage
-b --backup Create a backup of the Galaxy database
-r --restore Restore the backup of the Galaxy database
-lb --list-backups List all existing backups of the Galaxy database
-la --list-applications Show all installed applications detected by the tool
-do --dos-only Filter any listing operations to DOS-only applications
-lg --list-games List all installed GOG Galaxy games
-sp --show-playtasks Show PlayTasks registered to a specific game
-rd --replace-dosbox Replace the default DOSBox launcher with your chosen version
-alu --all-users Apply the operation to all users (default is current/most recent user)
-s --search Filter results in list operations (games/apps) Default: ""
-dv --dosbox-version Select an installed DOSBox by application name (from --list-applications)
-dvm --dosbox-version-manual Use a manual/portable DOSBox path instead
-rk --release-key Release key for the target game (from --list-games)
-fmt --format Output format (e.g., .json) Default: .json
-o --output Output file name. If empty, output is printed to console Default: ""

๐Ÿ“Œ Usage Examples

๐Ÿ” List Games

DosboxStagingReplacer --list-games

๐Ÿ”Ž Filtered List of DOS-only Games

DosboxStagingReplacer --list-games --dos-only --search "keen"

Assuming the output would be something like this

[
  {
    "productId": 2070676386,
    "title": "Commander Keen Complete Pack",
    "slug": "commander_keen_complete_pack",
    "gogId": 2070676386,
    "releaseKey": "gog_2070676386",
    "installationPath": "C:\\Program Files (x86)\\GOG Galaxy\\Games\\Commander Keen",
    "installationDate": "2024-07-12 15:25:27"
  }
]

๐Ÿ” Replace with Specific Installed DOSBox

DosboxStagingReplacer --replace-dosbox --release-key gog_2070676386 --dosbox-version "dosbox-staging"

๐Ÿ” Replace with Manual DOSBox Path

DosboxStagingReplacer --replace-dosbox --release-key gog_2070676386 --dosbox-version-manual "C:\tools\dosbox-staging\dosbox.exe"

๐Ÿ’พ Backup and Restore

DosboxStagingReplacer --backup
DosboxStagingReplacer --restore

๐Ÿ“„ Export Output to File

DosboxStagingReplacer --list-games --format .json > gog_games.json

๐Ÿ“Œ Sample Flow

This is a sample flow how to use this application to modify an already installed game. This also assumes you have already have done the Download and Setup page.

  1. Find the game via --list-games --dos-only parameters (You may use --search to narrow down the search)
DosboxStagingReplacer --list-games --dos-only --search "keen"
  1. Assuming you already have found the key, use the --replace-dosbox flag
DosboxStagingReplacer --replace-dosbox --release-key gog_2070676386 --dosbox-version "dosbox-staging"
  1. There you have it, the application will replace the necessary files and make the necessary modifications in the Gog galaxy database to replace the game from launching normally in Dosbox to Dosbox-Staging

  2. You may need to restart Gog Galaxy to see the changes (Usually you do not, see my mastodon post on how it works).

๐Ÿงช Tips

  • You can combine filters with list operations for more precise results.
  • If using --all-users, ensure your account has access to all GOG Galaxy profiles.
  • There is a GUI wrapper I made in powershell that uses this utility. You can get it here