How To Use - Shin-Aska/DosboxStagingReplacerForGOGGalaxy GitHub Wiki
How to Use
Download and Setup
-
Download the Latest Release:
- Visit the Releases page.
- Get the executable for your system (e.g.,
DosboxStagingReplacer.exefor Windows).
-
Install GOG Galaxy
-
Install DOSBox Staging:
- Install it from https://www.dosbox-staging.org/.
- You may install it or just use the portable version.
-
Run the Tool: Open a command prompt or terminal:
DosboxStagingReplacer --help
Command-Line Arguments
| Option | Long Form | Description |
|---|---|---|
-h |
--help |
Shows help message and exits |
-v |
--version |
Prints version information and exits |
-f |
--file |
The Galaxy database file [default: "galaxy-2.0.db"] |
-d |
--directory |
The 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 backups of the Galaxy database |
-la |
--list-applications |
Print all installed applications |
-do |
--dos-only |
This flag signifies that any list operations will only be DOS related. |
-lg |
--list-games |
Print all installed games |
-sp |
--show-playtasks |
Shows all play tasks registered for a game |
-rd |
--replace-dosbox |
Replace the DOSBox version used by the game with the one you specified |
-alu |
--all-users |
This flag signifies that the operation will be performed for all users. Otherwise, it will get the most recent User. |
-s |
--search |
Filter the list results when listing applications or games. [default: ""] |
-dv |
--dosbox-version |
The version of DOSBox to use, specified by the application name from --list-applications. The specified version must be installed on the system. [default: ""] |
-dvm |
--dosbox-version-manual |
The version of DOSBox to use, specified by the absolute path to the executable. Use for portable versions. [default: ""] |
-rk |
--release-key |
The release key of the selected game, found using the --list-games flag. [default: ""] |
-fmt |
--format |
The format used when doing any print operation [default: ".json"] |
-o |
--output |
The name of the output file. If empty, the output will be printed to the console. [default: ""] |
-cfsdf |
--change-fullscreen-default |
Replaces the predefined fullscreen value in the Dosbox config file with the Dosbox default [default: "yes"] |
-crsdf |
--change-resolution-default |
Replaces the predefined resolution values (fullresolution, windowresolution) in the Dosbox config file with the Dosbox defaults [default: "yes"] |
-cmpdf |
--change-mapping-default |
Removes the mapping value in the Dosbox config file [default: "yes"] |
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.
- Find the game via
--list-games --dos-onlyparameters (You may use --search to narrow down the search)
DosboxStagingReplacer --list-games --dos-only --search "keen"
- Assuming you already have found the key, use the
--replace-dosboxflag
DosboxStagingReplacer --replace-dosbox --release-key gog_2070676386 --dosbox-version "dosbox-staging"
-
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
-
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