Comments (15)
Probably it's possible, assuming dosbox configs are in consistent location. It may not work if Windows game's dosbox have some game-specific tweaks, but it probably should be somewhat compatible.
from gamehub.
AFAIK, some dosbox configs use Windows only paths to run (for instance using \
instead of /
or with case insensitive filenames). That's the biggest issue for 'automatic porting'.
from gamehub.
There's now DOSBox
CompatTool.
It should be available if dosbox
is installed.
It supports loading additional configs like this for forcing windowed mode.
CompatTools now can be forced even for native games.
Btw I'm wondering if it's still appropriate to call it "compat tools", since there's "custom script" tool. 🤔
from gamehub.
There's now DOSBox CompatTool.
It should be available if dosbox is installed.
Great! I tested with some games. It works, but it requires to a few adjustments in the dosbox confs (this is expected, so we don't have to worry). Allowing to edit the .conf files could be a good idea.
There is one thing that is annoying: some GOG games define more than two .conf files to configure games or run then in multiplayer (having _client.conf and _server.conf files). GameHub combine all the .conf files while it should only select two of them. It's not completely straightforward how to do it: it must select the GAMEID.conf and GAMEID_single.conf files. Unfortunately, the GAMEID for every game is not documented: for instance, some games like Magic Carpet use "MC" as GAMEID.
Also, the select executable option makes no sense for Dosbox.
Btw I'm wondering if it's still appropriate to call it "compat tools", since there's "custom script" tool.
Maybe dosbox and scummvm are "port tools"?
from gamehub.
Also, I'm not sure how GameHub should deal with some special GOG games that include several titles inside (like Dangerous Dave pack)
from gamehub.
I don't know, I don't have too many DOS games in GOG library.
It would help if you provide files structure for some games you have.
Example: Akalabeth: World of Doom (idk what that is, it's just easy to test as it's on top of games list 🙂)
Akalabeth: World of Doom (Linux):
dosboxAkalabeth.conf
dosboxAkalabeth_single.conf
- usesmount C "data"
data
- game rootdosbox/dosbox{,_i686,_x86_64}
- dosbox binary.
- working dir
Akalabeth: World of Doom (Windows):
dosboxAkalabeth.conf
dosboxAkalabeth_single.conf
- usesmount C ".."
.
- game rootDOSBOX/DOSBox.exe
- dosbox binaryDOSBOX
- working dir
from gamehub.
Some GOG games using dosbox:
GOG.txt
One HumbleBundle game using dosbox (installing using wine, because innoextract was failing):
Humble.txt
Any directory named 'confs' was created by name to keep the original .conf files and let GameHub launch the games.
from gamehub.
Post contents of goggame-<id>.info
file of any game with many (>2) DOSBox configs.
from gamehub.
So Dangerous Dave pack
you've mentioned is just multiple games in subdirectories (unlike other games with multiple configs).
I don't really know how to handle such cases.
I also don't see goggame-<id>.info
file.
Was it installed using the most recent installer? I've thought all GOG installers should be updated and have similar structure (especially after Galaxy launch). Is it even working in Galaxy?
from gamehub.
Some .info files are here:
goggame-1207658971.info.txt
goggame-1207660963.info.txt
goggame-1207658935.info.txt
from gamehub.
So it seems it doesn't run DOSBox for multiplayer directly and uses GOGDOSConfig
instead (possibly MP in this game won't even work if DOSBox will be launched directly):
"playTasks": [
{
"isPrimary" : true,
"type" : "FileTask",
"path" : "DOSBOX\\dosbox.exe",
"workingDir" : "DOSBOX",
"arguments" : "-conf \"..\\dosboxMC.conf\" -conf \"..\\dosboxMC_single.conf\" -noconsole -c \"exit\""
},
{
"name" : "Graphic Mode Setup",
"type" : "FileTask",
"path" : "DOSBOX\\GOGDOSConfig.exe",
"workingDir" : "DOSBOX",
"arguments" : "1207658935"
},
{
"name" : "Run Multiplayer Game",
"type" : "FileTask",
"path" : "DOSBOX\\GOGDOSConfig.exe",
"workingDir" : "DOSBOX",
"arguments" : "1207658935 NET"
},
{
"name" : "Reset Game Language",
"type" : "FileTask",
"path" : "reset_language.bat",
"workingDir" : ""
}
]
There is one thing that is annoying: some GOG games define more than two .conf files
I have thought about a few solutions for this:
- Try to detect
dosbox<game>.conf
anddosbox<game>_single.conf
and ignore other confs - Just show a checklist with all found confs (seems not very user-friendly)
- Try to get required confs from
goggame-<id>.info
if exists (DOSBox only, ignore other tasks) - Try to parse
goggame-<id>.info
for all tools (including Wine/Proton) if exists and show a list with tasks (or run default task automatically like Galaxy does, but display list somewhere)
from gamehub.
Try to detect dosbox.conf and dosbox_single.conf and ignore other confs
I think this is the more straightforward solution. Try to parse .info files is more precise and useful for the future features, but it will take more effort ..
from gamehub.
In the case of Dangerous Dave, maybe you can just iterate over the subdirectories and look for dosbox.conf and dosbox_single.conf (and ignore other confs). This should be enough for that, but I don't know if this will work for games without .info files.
from gamehub.
I think this works quite good so I will close it now. Please note that some games requires manual editing of the single.conf
file because they mount some directory or file. Basically, the paths are different: Windows is using \
instead of /
and the filenames are case-sensitives in Linux. Maybe a patch to dosbox could help to address these remaining issues?
from gamehub.
This patch allows to detect multiple configs one per directory (for instance Dangerous Dave or Redneck Rampage). The user should select one of these somehow, but I don't know how to implement the actual selection:
diff --git a/src/data/compat/DOSBox.vala b/src/data/compat/DOSBox.vala
index 4bd0abc..da63f46 100644
--- a/src/data/compat/DOSBox.vala
+++ b/src/data/compat/DOSBox.vala
@@ -28,6 +28,7 @@ namespace GameHub.Data.Compat
private File conf_windowed;
private CompatTool.Option? opt_windowed;
+ private ArrayList<ArrayList<string>> multi_config;
public DOSBox(string binary="dosbox")
{
@@ -39,6 +40,7 @@ namespace GameHub.Data.Compat
private CompatTool.Option? opt_windowed;
private File conf_windowed;
private CompatTool.Option? opt_windowed;
+ private ArrayList<ArrayList<string>> multi_config;
public DOSBox(string binary="dosbox")
{
@@ -39,6 +40,7 @@ namespace GameHub.Data.Compat
id = @"dosbox";
name = @"DOSBox";
icon = "tool-dosbox-symbolic";
+ multi_config = new ArrayList<ArrayList<string>>();
executable = Utils.find_executable(binary);
installed = executable != null && executable.query_exists();
@@ -97,23 +99,48 @@ namespace GameHub.Data.Compat
public override bool can_run(Game game)
{
- return installed && find_configs(game.install_dir).size > 0;
+ var configs = find_configs(game.install_dir);
+ var has_configs = configs.size > 0;
+ if (has_configs) {
+ warning("Found dir %s with dosbox conf", game.install_dir.get_path());
+ multi_config.add(configs);
+ }
+ FileInfo? finfo = null;
+ var enumerator = game.install_dir.enumerate_children("standard::*", FileQueryInfoFlags.NOFOLLOW_SYMLINKS);
+ while((finfo = enumerator.next_file()) != null)
+ {
+ if (finfo.get_file_type () == FileType.DIRECTORY) {
+ File subdir = game.install_dir.resolve_relative_path (finfo.get_name ());
+ configs = find_configs(subdir);
+ has_configs = has_configs || configs.size > 0;
+
+ if (configs.size > 0) {
+ warning("Found dir %s with dosbox conf", subdir.get_path());
+ multi_config.add(configs);
+ }
+
+ }
+ }
+
+ return installed && has_configs;
}
public override async void run(Game game)
{
if(!can_run(game)) return;
+ warning("multi_config size %d", multi_config.size);
string[] cmd = { executable.get_path() };
var wdir = game.install_dir;
- var configs = find_configs(game.install_dir);
-
+ var configs = multi_config.get(0); // select some configs
+
if(configs.size > 2 && game is GameHub.Data.Sources.GOG.GOGGame)
{
foreach(var conf in configs)
{
+ warning("Found .conf file: %s", conf);
if(conf.has_suffix("_single.conf"))
{
configs.clear();
from gamehub.
Related Issues (20)
- Won't detect ROMs HOT 1
- Can't log into Humble Bundle or itch.io accounts HOT 5
- "Open installation directory" opens VS Code instead of Dolphin HOT 3
- Add GameHub to Flathub HOT 1
- Proton compatibility layer suddenly missing on non-Steam games HOT 15
- when choose "skip" at the main menu , then the gamehub crashes everytime HOT 1
- GOG bonus content not downloaded to the correct directory
- Interface stutters on main window scroll HOT 3
- Can't Download or install Games from GOG HOT 4
- Crash just on launching AppImage "Master" version
- Itch.io games lose vertical images, don't load in correctly
- AppImage crash
- QT frontend for kde plasma? HOT 2
- Games Crash If they Are Installed On Another Partition
- Immediate crash when downloading/installing HOT 4
- Please stop using webkit2gtk 4.0
- Authentication links don't work when built without webkitgtk
- Crash after try to download a game
- Fetch images using lutris
- Images in Grid view are unloaded too quickly.
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from gamehub.