Skip to content

[Feature] Allow running games without Wine #4608

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 6 commits into
base: main
Choose a base branch
from
Open

Conversation

arielj
Copy link
Collaborator

@arielj arielj commented Jun 4, 2025

There are cases where old games won't run through wine on linux/mac but community patches exist to make them work.

In many cases, the patch not only makes the game work but also provide executables to make the game run the windows version natively (without wine).

Some cases are:

  • Star Wars Jedi Knight - Jedi Academy that doesn't work with Wine but can be executed when using the OpenJK patches, and it provides patches for windows, mac, and linux, so the game can be executed with a linux binary for example to avoid the need of a prefix (saves are stored in the game's install directory so cloud saves should still work).
  • Fallout 1 and 2 that don't work on MacOS but the there are the fallout1-ce and fallout2-ce projects that provide binaries to fix the game.

This PR adds the option to disable wine for these games (with the new Do not use wine option in the Wine tab) to be combined with the native executable set as alternative exe in the Advanced tab.

How to test this:

  • Download Star Wars Jedi Knight - Jedi Academy (I think it was free on GOG at some point?)
  • Download the linux x86_64 patch from https://github.com/jacoders/openjk/releases
  • Extract the content of the file inside the GameData folder inside the game's install dir
  • Set the openjk executable that was just copied as alternative exe in the Advanced tab
  • Toggle Do not use wine in the Wine tab
  • Run the game

Check the logs and it should be executed with the --no-wine flag and you'll see it's not using wine nor umu nor any of those.

IMPORTANT FOR MAC: looks like python can't run .app files so it fails to run those files on MacOS. I guess there might be a way to handle that, but I can't find a simple way so I added a warning in the frontend and in the logs to let the user know that they should pick the .app's content's script file instead of the .app, could be improved in the future

This PR closes #2472

Use the following Checklist if you have changed something on the Backend or Frontend:

  • Tested the feature and it's working on a current and clean install.
  • Tested the main App features and they are still working on a current and clean install. (Login, Install, Play, Uninstall, Move games, etc.)
  • Created / Updated Tests (If necessary)
  • Created / Updated documentation (If necessary)

@arielj arielj requested review from Etaash-mathamsetty, a team, flavioislima, CommandMC, biliesilva, Nocccer and imLinguin and removed request for a team June 4, 2025 22:47
@arielj arielj added the pr:ready-for-review Feature-complete, ready for the grind! :P label Jun 4, 2025
@arielj arielj added pr:wip WIP, don't merge. and removed pr:ready-for-review Feature-complete, ready for the grind! :P labels Jun 4, 2025
@arielj arielj marked this pull request as draft June 4, 2025 23:56
@Schweppesale
Copy link

Schweppesale commented Jul 20, 2025

@arielj FYI this doesn't seem to work on Linux

Latest Commit

john@fedora:~/Applications/git/Heroic-Games-Launcher/HeroicGamesLauncher$ git log | head
commit 21b2773
Author: Ariel Juodziukynas arieljuod@gmail.com
Date: Wed Jun 4 19:52:31 2025 -0300
....

After run (I removed the prefix beforehand):

john@fedora:~/Applications/git/Heroic-Games-Launcher/HeroicGamesLauncher$ ls -l "/home/john/Games/Heroic/Prefixes/default/Betrayal at Krondor/"
total 96
-rw-r--r--. 1 john john 441 Jul 20 00:38 config_info
.....

Heroic Launch Logs:

Launching "Betrayal at Krondor" (gog)
Native? No
Installed in: /mnt/hdd/Program Files (x86)/GalaxyClient/Games/Betrayal at Krondor

System Info:
CPU: 16x AMD Ryzen 7 7800X3D 8-Core Processor
Memory: 33.26 GB (used: 16.11 GB)
GPUs:
GPU 0:
Name: NVIDIA Corporation AD102 [GeForce RTX 4090]
IDs: D=2684 V=10de SD=13ae SV=196e
Driver: nvidia
OS: Fedora Linux 42 (KDE Plasma Desktop Edition) (linux)

The current system is not a Steam Deck
We are not running inside a Flatpak container

Software Versions:
Heroic: 2.17.1 Cutty Flam Franky
Legendary: 0.20.37 Exit 17 (Heroic)
gogdl: 1.1.2
comet: comet 0.2.0
Nile: 1.1.2 Will A. Zeppeli

Game Settings: {
"autoInstallDxvkNvapi": true,
"preferSystemLibs": true,
"enableEsync": true,
"enableFsync": true,
"launcherArgs": "--set mididevice=fluidsynth ../KRONDOR.exe",
"nvidiaPrime": false,
"enviromentOptions": [
{
"key": "PULSE_LATENCY_MSEC",
"value": "60"
}
],
"wrapperOptions": [
{
"exe": "anti_m",
"args": "BaK"
}
],
"showFps": false,
"showMangohud": false,
"targetExe": "",
"useGameMode": true,
"useSteamRuntime": false,
"battlEyeRuntime": true,
"eacRuntime": true,
"language": "",
"beforeLaunchScriptPath": "",
"afterLaunchScriptPath": "",
"gamescope": {
"enableUpscaling": false,
"enableLimiter": false,
"additionalOptions": "-s 2 --hdr-itm-enabled --hdr-itm-target-nits 800 --adaptive-sync",
"enableForceGrabCursor": false
},
"verboseLogs": true,
"advertiseAvxForRosetta": false,
"wineVersion": {
"bin": "/home/john/.local/share/Steam/compatibilitytools.d/GE-Proton9-27/proton",
"name": "Proton - GE-Proton9-27",
"type": "proton"
},
"winePrefix": "/home/john/Games/Heroic/Prefixes/default/Betrayal at Krondor",
"doNotUseWine": true
}

Game launched at: Sun Jul 20 2025 00:38:53 GMT-0400 (Eastern Daylight Time)

Winetricks packages:

Launch Command: HEROIC_APP_NAME=1207660953 HEROIC_APP_RUNNER=gog GAMEID=umu-0 HEROIC_APP_SOURCE=gog STORE=gog STEAM_COMPAT_INSTALL_PATH="/mnt/hdd/Program Files (x86)/GalaxyClient/Games/Betrayal at Krondor" PULSE_LATENCY_MSEC=60 LD_PRELOAD= STEAM_COMPAT_CLIENT_INSTALL_PATH=/home/john/.steam/steam WINEPREFIX="/home/john/Games/Heroic/Prefixes/default/Betrayal at Krondor" STEAM_COMPAT_DATA_PATH="/home/john/Games/Heroic/Prefixes/default/Betrayal at Krondor" PROTONPATH=/home/john/.local/share/Steam/compatibilitytools.d/GE-Proton9-27 WINE_FULLSCREEN_FSR=0 PROTON_ENABLE_NVAPI=1 DXVK_NVAPI_ALLOW_OTHER_DRIVERS=1 PROTON_EAC_RUNTIME=/home/john/.config/heroic/tools/runtimes/eac_runtime PROTON_BATTLEYE_RUNTIME=/home/john/.config/heroic/tools/runtimes/battleye_runtime STEAM_COMPAT_APP_ID=0 SteamAppId=0 SteamGameId="heroic-Betrayal at Krondor" PROTON_LOG_DIR=/home/john WINEDEBUG=+fixme DXVK_LOG_LEVEL=info VKD3D_DEBUG=fixme /tmp/.mount_Heroic4svgNl/resources/app.asar.unpacked/build/bin/x64/linux/gogdl launch "/mnt/hdd/Program Files (x86)/GalaxyClient/Games/Betrayal at Krondor" 1207660953 --no-wine --platform windows --set mididevice=fluidsynth ../KRONDOR.exe

Game Log:
date time |
2025-07-20 00:39:06.162 | arguments: /usr/bin/dosbox -conf ../dosboxBAK.conf -conf ../dosboxBAK_single.conf -noconsole -c exit --set mididevice=fluidsynth ../KRONDOR.exe
2025-07-20 00:39:06.162 | Current dir: /mnt/hdd/Program Files (x86)/GalaxyClient/Games/Betrayal at Krondor/DOSBOX
2025-07-20 00:39:06.162 | stderr verbosity: 0
2025-07-20 00:39:06.162 | -----------------------------------
2025-07-20 00:39:06.162 | dosbox-staging version 0.82.2 ()
2025-07-20 00:39:06.162 | ---
2025-07-20 00:39:06.162 | LOG: Loguru version 2.1.0 initialised
2025-07-20 00:39:06.163 | CONFIG: Deprecated option 'cycles'

The 'cycles' setting is deprecated but still accepted; please use the
'cpu_cycles', 'cpu_cycles_protected' and 'cpu_throttle' settings instead as
support will be removed in the future.

2025-07-20 00:39:06.163 | CONFIG: Deprecated option 'voodoo_multithreading'

Renamed to 'voodoo_threads'

2025-07-20 00:39:06.164 | CONFIG: Loaded primary config file '/home/john/.config/dosbox/dosbox-staging.conf'
2025-07-20 00:39:06.179 | CONFIG: Invalid option 'fulldouble'
2025-07-20 00:39:06.179 | CONFIG: Invalid 'output' setting: 'overlay', using 'opengl'
2025-07-20 00:39:06.179 | CONFIG: Invalid option 'autolock'
2025-07-20 00:39:06.179 | CONFIG: Deprecated option 'sensitivity'

Moved to [mouse] section and renamed to 'mouse_sensitivity'.

2025-07-20 00:39:06.179 | CONFIG: Invalid 'active' setting: 'higher,normal', using 'auto'
2025-07-20 00:39:06.179 | CONFIG: Invalid option 'usescancodes'
2025-07-20 00:39:06.179 | CONFIG: Deprecated option 'captures'

Moved to [capture] section and renamed to 'capture_dir'.

2025-07-20 00:39:06.179 | CONFIG: Deprecated option 'frameskip'

Consider capping frame rates using the 'host_rate' setting.

2025-07-20 00:39:06.179 | CONFIG: Deprecated option 'scaler'

Software scalers are deprecated in favour of hardware-accelerated options:

  • If you used the normal2x/3x scalers, set the desired 'windowresolution'
    or 'viewport' instead, or consider using 'integer_scaling'.
  • If you used an advanced scaler, consider one of the 'glshader'
    options instead.

2025-07-20 00:39:06.179 | CONFIG: Setting 'cputype = 386_slow' is deprecated, falling back to the alternate: 'cputype = 386'
2025-07-20 00:39:06.179 | CONFIG: Deprecated option 'cycles'

The 'cycles' setting is deprecated but still accepted; please use the
'cpu_cycles', 'cpu_cycles_protected' and 'cpu_throttle' settings instead as
support will be removed in the future.

2025-07-20 00:39:06.179 | CONFIG: Invalid 'prebuffer' setting: '120'. Value outside of the valid range 0-100, using '100'
2025-07-20 00:39:06.179 | CONFIG: Invalid 'mididevice' setting: 'default', using 'auto'
2025-07-20 00:39:06.179 | CONFIG: Deprecated option 'oplemu'

Only 'nuked' OPL emulation is supported now.

2025-07-20 00:39:06.179 | CONFIG: Deprecated option 'oplrate'

The OPL output is now transparently resampled to the mixer's sample rate.

2025-07-20 00:39:06.179 | CONFIG: Invalid option 'gusrate'
2025-07-20 00:39:06.179 | CONFIG: Invalid option 'irq1'
2025-07-20 00:39:06.179 | CONFIG: Invalid option 'irq2'
2025-07-20 00:39:06.179 | CONFIG: Invalid option 'dma1'
2025-07-20 00:39:06.179 | CONFIG: Invalid option 'dma2'
2025-07-20 00:39:06.179 | CONFIG: Invalid 'pcspeaker' setting: 'true', using 'impulse'
2025-07-20 00:39:06.179 | CONFIG: Invalid option 'pcrate'
2025-07-20 00:39:06.179 | CONFIG: Invalid option 'tandyrate'
2025-07-20 00:39:06.179 | CONFIG: Deprecated option 'disney'

Use 'lpt_dac = disney' to enable the Disney Sound Source.

2025-07-20 00:39:06.179 | CONFIG: Loaded custom config file '../dosboxBAK.conf'
2025-07-20 00:39:06.179 | CONFIG: Loaded custom config file '../dosboxBAK_single.conf'
2025-07-20 00:39:06.179 | LANG: Using internal English language messages
2025-07-20 00:39:06.207 | SDL: version 2.32.56 initialised (wayland video and pipewire audio)
2025-07-20 00:39:06.207 | DISPLAY: Invalid 'windowresolution' setting: 'original', using 'default'
2025-07-20 00:39:06.207 | DISPLAY: Using 2132x1599 window size in windowed mode on display-0
2025-07-20 00:39:06.429 | OPENGL: Vendor: NVIDIA Corporation
2025-07-20 00:39:06.429 | OPENGL: Version: 4.6.0 NVIDIA 575.64.03
2025-07-20 00:39:06.429 | OPENGL: GLSL version: 4.60 NVIDIA
2025-07-20 00:39:06.429 | OPENGL: NPOT textures supported
2025-07-20 00:39:06.429 | RENDER: Using adaptive CRT shader based on the graphics standard of the video mode
2025-07-20 00:39:06.431 | RENDER: Auto-switched to shader 'crt/hercules'
2025-07-20 00:39:06.431 | VGA: Pixel doubling enabled
2025-07-20 00:39:06.431 | VIDEO: Using the DOS video mode's frame rate
2025-07-20 00:39:06.436 | MEMORY: Using 2048 DOS memory pages (8 MB) at address: 0x7f39a767f010
2025-07-20 00:39:06.436 | VIDEO: Initialised S3 Trio64 VESA 2.0 compatible with 4 MB of FP DRAM supporting 89 modes
2025-07-20 00:39:06.440 | VGA: Double scanning VGA video modes enabled
2025-07-20 00:39:06.440 | VOODOO: Initialized with 4 MB of RAM, 16 threads, and no bilinear filtering
2025-07-20 00:39:06.440 | CAPTURE: Image capturer started
2025-07-20 00:39:06.455 | MIXER: Initialised stereo 22050 Hz audio with 2048 sample frame buffer
2025-07-20 00:39:06.455 | MIXER: Master compressor enabled
2025-07-20 00:39:06.549 | FSYNTH: Using SoundFont '/home/john/Games/dosbox/soundfont/EmperorGrieferus_Roland_SC-55_v3.7.sf2'
2025-07-20 00:39:06.549 | FSYNTH: Chorus enabled with 3 voices at level 1.20, 0.30 Hz speed, 8.00 depth, and sine-wave modulation
2025-07-20 00:39:06.549 | FSYNTH: Reverb enabled with a 0.61 room size, 0.23 damping, 0.76 width, and level 0.56
2025-07-20 00:39:06.550 | FSYNTH: Operating at 22050 Hz without resampling
2025-07-20 00:39:06.550 | MIDI: Opened device: fluidsynth
2025-07-20 00:39:06.550 | MPU-401: Running in intelligent mode on ports 330h and 331h
2025-07-20 00:39:06.550 | OPL: Operating at 49716 Hz and downsampling to the output rate
2025-07-20 00:39:06.550 | OPL: Running OPL3 on ports 220h and 388h
2025-07-20 00:39:06.550 | OPL: Sound Blaster 16 OPL output filter enabled
2025-07-20 00:39:06.550 | DMA: Initialised primary controller
2025-07-20 00:39:06.550 | DMA: Initialised secondary controller
2025-07-20 00:39:06.550 | SB: Operating at 22050 Hz without resampling
2025-07-20 00:39:06.550 | SB16: Modern DAC output filter enabled
2025-07-20 00:39:06.550 | SB16: Setting 'BLASTER' environment variable to 'A220 I7 D1 H5 T6'
2025-07-20 00:39:06.550 | SB16: Running on port 220h, IRQ 7, DMA 1, and high DMA 5
2025-07-20 00:39:06.551 | PCSPEAKER: Operating at 32000 Hz and downsampling to the output rate
2025-07-20 00:39:06.551 | PCSPEAKER: Initialised impulse model
2025-07-20 00:39:06.551 | PCSPEAKER: High-pass filter enabled (18 dB/oct at 120 Hz)
2025-07-20 00:39:06.551 | PCSPEAKER: Low-pass filter enabled (18 dB/oct at 4300 Hz)
2025-07-20 00:39:06.551 | MOUSE: Will be captured immediately on start
2025-07-20 00:39:06.551 | MOUSE: Middle button will capture/release the mouse (clicks not sent to the game/program)
2025-07-20 00:39:06.551 | MOUSE (PS/2): Standard, 3 buttons
2025-07-20 00:39:06.558 | DOS: Loaded modern locale for country 1, 'United States'
2025-07-20 00:39:06.559 | SLIRP: Slirp version: 4.8.0
2025-07-20 00:39:06.559 | SLIRP: Successfully initialized
2025-07-20 00:39:06.559 | NE2000: Initialised on port 300h and IRQ 3
2025-07-20 00:39:06.559 | CONFIG: Loaded auto-mounted drive config file '/usr/share/dosbox-staging/drives/y.conf'
2025-07-20 00:39:06.560 | AUTOEXEC: Using autoexec from one or more joined sections
2025-07-20 00:39:06.884 | MAPPER: No joysticks found
2025-07-20 00:39:06.884 | MAPPER: Failed loading mapperfile 'mapper.txt' directly or from resources
2025-07-20 00:39:06.884 | MAPPER: Loaded default key bindings
2025-07-20 00:39:06.885 | MOUNT: Path '/usr/share/dosbox-staging/drives/y' found
2025-07-20 00:39:06.885 | IMGMOUNT: Path '../bak.inst' found, while looking for '..\bak.inst'
2025-07-20 00:39:06.885 | CDAUDIO: Operating at 22050 Hz without resampling
2025-07-20 00:39:06.934 | CDROM: Loaded bak02.ogg [44100 Hz, 2-channel, 1.6 minutes]
2025-07-20 00:39:06.949 | CDROM: Loaded bak03.ogg [44100 Hz, 2-channel, 1.9 minutes]
2025-07-20 00:39:06.953 | CDROM: Loaded bak04.ogg [44100 Hz, 2-channel, 1.0 minutes]
2025-07-20 00:39:06.955 | CDROM: Loaded bak05.ogg [44100 Hz, 2-channel, 0.8 minutes]
2025-07-20 00:39:06.959 | CDROM: Loaded bak06.ogg [44100 Hz, 2-channel, 1.4 minutes]
2025-07-20 00:39:06.961 | CDROM: Loaded bak07.ogg [44100 Hz, 2-channel, 0.7 minutes]
2025-07-20 00:39:06.963 | CDROM: Loaded bak08.ogg [44100 Hz, 2-channel, 0.4 minutes]
2025-07-20 00:39:06.965 | CDROM: Loaded bak09.ogg [44100 Hz, 2-channel, 0.5 minutes]
2025-07-20 00:39:06.967 | CDROM: Loaded bak10.ogg [44100 Hz, 2-channel, 0.2 minutes]
2025-07-20 00:39:06.968 | CDROM: Loaded bak11.ogg [44100 Hz, 2-channel, 1.1 minutes]
2025-07-20 00:39:06.970 | CDROM: Loaded bak12.ogg [44100 Hz, 2-channel, 0.9 minutes]
2025-07-20 00:39:06.972 | CDROM: Loaded bak13.ogg [44100 Hz, 2-channel, 0.8 minutes]
2025-07-20 00:39:06.974 | CDROM: Loaded bak14.ogg [44100 Hz, 2-channel, 0.8 minutes]
2025-07-20 00:39:06.976 | CDROM: Loaded bak15.ogg [44100 Hz, 2-channel, 1.1 minutes]
2025-07-20 00:39:06.978 | CDROM: Loaded bak16.ogg [44100 Hz, 2-channel, 0.8 minutes]
2025-07-20 00:39:06.981 | CDROM: Loaded bak17.ogg [44100 Hz, 2-channel, 0.9 minutes]
2025-07-20 00:39:06.985 | CDROM: Loaded bak18.ogg [44100 Hz, 2-channel, 1.3 minutes]
2025-07-20 00:39:06.988 | CDROM: Loaded bak19.ogg [44100 Hz, 2-channel, 1.2 minutes]
2025-07-20 00:39:06.990 | CDROM: Loaded bak20.ogg [44100 Hz, 2-channel, 0.9 minutes]
2025-07-20 00:39:06.993 | CDROM: Loaded bak21.ogg [44100 Hz, 2-channel, 1.1 minutes]
2025-07-20 00:39:06.996 | CDROM: Loaded bak22.ogg [44100 Hz, 2-channel, 1.3 minutes]
2025-07-20 00:39:07.022 | CDROM: Loaded bak23.ogg [44100 Hz, 2-channel, 1.0 minutes]
2025-07-20 00:39:07.038 | CDROM: Loaded bak24.ogg [44100 Hz, 2-channel, 1.8 minutes]
2025-07-20 00:39:07.053 | CDROM: Loaded bak25.ogg [44100 Hz, 2-channel, 1.2 minutes]
2025-07-20 00:39:07.071 | CDROM: Loaded bak26.ogg [44100 Hz, 2-channel, 0.9 minutes]
2025-07-20 00:39:07.092 | CDROM: Loaded bak27.ogg [44100 Hz, 2-channel, 0.7 minutes]
2025-07-20 00:39:07.096 | CDROM: Loaded bak28.ogg [44100 Hz, 2-channel, 0.7 minutes]
2025-07-20 00:39:07.111 | CDROM: Loaded bak29.ogg [44100 Hz, 2-channel, 0.8 minutes]
2025-07-20 00:39:07.121 | CDROM: Loaded bak30.ogg [44100 Hz, 2-channel, 0.7 minutes]
2025-07-20 00:39:07.144 | CDROM: Loaded bak31.ogg [44100 Hz, 2-channel, 0.6 minutes]
2025-07-20 00:39:07.155 | CDROM: Loaded bak32.ogg [44100 Hz, 2-channel, 1.3 minutes]
2025-07-20 00:39:07.168 | CDROM: Loaded bak33.ogg [44100 Hz, 2-channel, 0.9 minutes]
2025-07-20 00:39:07.172 | CDROM: Loaded bak34.ogg [44100 Hz, 2-channel, 0.9 minutes]
2025-07-20 00:39:07.191 | CDROM: Loaded bak35.ogg [44100 Hz, 2-channel, 1.2 minutes]
2025-07-20 00:39:07.211 | CDROM: Loaded bak36.ogg [44100 Hz, 2-channel, 0.2 minutes]
2025-07-20 00:39:07.213 | CDROM: Loaded bak37.ogg [44100 Hz, 2-channel, 0.7 minutes]
2025-07-20 00:39:07.224 | CDROM: Loaded bak38.ogg [44100 Hz, 2-channel, 1.1 minutes]
2025-07-20 00:39:07.235 | CDROM: Loaded bak39.ogg [44100 Hz, 2-channel, 1.0 minutes]
2025-07-20 00:39:07.237 | CDROM: Loaded bak40.ogg [44100 Hz, 2-channel, 0.5 minutes]
2025-07-20 00:39:07.249 | CDROM: Loaded bak41.ogg [44100 Hz, 2-channel, 0.6 minutes]
2025-07-20 00:39:07.261 | CDROM: Loaded bak42.ogg [44100 Hz, 2-channel, 1.5 minutes]
2025-07-20 00:39:07.269 | CDROM: Loaded bak43.ogg [44100 Hz, 2-channel, 0.7 minutes]
2025-07-20 00:39:07.280 | CDROM: Loaded bak44.ogg [44100 Hz, 2-channel, 1.1 minutes]
2025-07-20 00:39:07.283 | CDROM: Loaded bak45.ogg [44100 Hz, 2-channel, 0.8 minutes]
2025-07-20 00:39:07.302 | CDROM: Loaded bak46.ogg [44100 Hz, 2-channel, 0.9 minutes]
2025-07-20 00:39:07.303 | CDROM: Loaded bak47.ogg [44100 Hz, 2-channel, 0.1 minutes]
2025-07-20 00:39:07.315 | CDROM: Loaded bak48.ogg [44100 Hz, 2-channel, 0.1 minutes]
2025-07-20 00:39:07.317 | CDROM: Loaded bak49.ogg [44100 Hz, 2-channel, 0.2 minutes]
2025-07-20 00:39:07.324 | CDROM: Loaded bak50.ogg [44100 Hz, 2-channel, 0.1 minutes]
2025-07-20 00:39:07.326 | CDROM: Loaded bak51.ogg [44100 Hz, 2-channel, 0.3 minutes]
2025-07-20 00:39:07.339 | CDROM: Loaded bak52.ogg [44100 Hz, 2-channel, 0.3 minutes]
2025-07-20 00:39:07.341 | CDROM: Loaded bak53.ogg [44100 Hz, 2-channel, 0.3 minutes]
2025-07-20 00:39:07.359 | CDROM: Loaded bak54.ogg [44100 Hz, 2-channel, 0.2 minutes]
2025-07-20 00:39:07.368 | CDROM: Loaded bak55.ogg [44100 Hz, 2-channel, 0.2 minutes]
2025-07-20 00:39:07.411 | CDROM: Loaded bak56.ogg [44100 Hz, 2-channel, 0.2 minutes]
2025-07-20 00:39:07.422 | CDROM: Loaded bak57.ogg [44100 Hz, 2-channel, 1.2 minutes]
2025-07-20 00:39:07.425 | CDROM: Loaded bak58.ogg [44100 Hz, 2-channel, 0.9 minutes]
2025-07-20 00:39:07.438 | CDROM: Loaded bak59.ogg [44100 Hz, 2-channel, 1.0 minutes]
2025-07-20 00:39:07.438 | CDROM: Loaded bak60.ogg [44100 Hz, 2-channel, 0.2 minutes]
2025-07-20 00:39:07.441 | CDROM: Loaded bak61.ogg [44100 Hz, 2-channel, 1.0 minutes]
2025-07-20 00:39:07.449 | CDROM: Loaded bak62.ogg [44100 Hz, 2-channel, 1.2 minutes]
2025-07-20 00:39:07.460 | CDROM: Loaded bak63.ogg [44100 Hz, 2-channel, 1.4 minutes]
2025-07-20 00:39:07.468 | SDL: Window size initialized to 2880x2160 pixels
2025-07-20 00:39:07.468 | MOUNT: Path '..' found
2025-07-20 00:39:07.481 | RENDER: Auto-switched to shader 'crt/vga-4k'
2025-07-20 00:39:07.481 | SDL: Using standard SDI (auto) display refresh rate of 120 Hz
2025-07-20 00:39:07.483 | OPENGL: Double buffering not enabled
2025-07-20 00:39:07.488 | DISPLAY: VGA 720x400 16-colour text mode 03h at 70.087 Hz VFR, scaled to 3600x2000 pixels with 1:1 (1:1) pixel aspect ratio
2025-07-20 00:39:07.488 | OPENGL: Disabled vsync
2025-07-20 00:39:07.698 | OPENGL: Double buffering not enabled
2025-07-20 00:39:07.701 | DISPLAY: VGA 320x200 256-colour graphics mode 13h at 70.086 Hz VFR, scaled to 3200x2000 pixels with 1:1 (1:1) pixel aspect ratio
2025-07-20 00:39:07.782 | SB16: Resetting DSP
2025-07-20 00:39:15.903 | CDROM: Shutting down CD-DA player
2025-07-20 00:39:15.903 | PCSPEAKER: Shutting down impulse model
2025-07-20 00:39:15.917 | OPL: Shutting down OPL3
2025-07-20 00:39:15.917 | SB16: Shutting down
2025-07-20 00:39:15.917 | MPU-401: Shutting down
2025-07-20 00:39:15.917 | FSYNTH: Shutting down
2025-07-20 00:39:15.927 | CAPTURE: Image capturer shutting down
2025-07-20 00:39:15.927 | DMA: Shutting down primary controller
2025-07-20 00:39:15.927 | DMA: Shutting down secondary controller
2025-07-20 00:39:15.979 | atexit
Launch command: ['/usr/bin/dosbox', '-conf', '../dosboxBAK.conf', '-conf', '../dosboxBAK_single.conf', '-noconsole', '-c', 'exit', '--set', 'mididevice=fluidsynth', '../KRONDOR.exe']
All processes exited
============= End of log =============

@arielj
Copy link
Collaborator Author

arielj commented Jul 20, 2025

@Schweppesale is this a game that should already use Dosbox? because I don't see anything in the game settings to tell heroic you want to use dosbox

I understand this feature is not what would be used in your case now that I understand what you are trying to do, we use gogdl to run gog games and it already has code to handle dosbox explicitly https://github.com/Heroic-Games-Launcher/heroic-gogdl/blob/f25db86e30e35338b2a9a53d181b00849913dc11/gogdl/launch.py#L106 and heroic should already use native dosbox if available according to this #3797, my understanding is that proton should already be ignored by default when using the system's dosbox

I think what you have is maybe a bug in gogdl or heroic, but not related to this feature

check https://github.com/Heroic-Games-Launcher/HeroicGamesLauncher/wiki/How-To:-DOSBOX-and-SCUMMVM

cc @imLinguin for visibility

@arielj arielj force-pushed the run-without-wine branch from 21b2773 to 79eb059 Compare July 20, 2025 17:23
@arielj arielj removed the pr:wip WIP, don't merge. label Jul 20, 2025
@arielj arielj added the pr:ready-for-review Feature-complete, ready for the grind! :P label Jul 20, 2025
@arielj arielj marked this pull request as ready for review July 20, 2025 17:29
@Schweppesale
Copy link

Schweppesale commented Jul 20, 2025

@arielj yea it's a really old RPG from back in the 90s.
GOG will typically ship most games from this era with a portable version of DOSBOX.

we use gogdl to run gog games and it already has code to handle dosbox explicitly

That's right and Heroic will correctly determine that this game requires dosbox to run prior to calling the native dosbox-staging installation.

The problem however is that it will still create a wine prefix despite never having a reason to use it which is something I'd hoped this feature you're working on right now would address.

This is also the reason why I had created that feature request the other week:
#4707

Another problem with the current implementation is that the user may want to swap out the dosbox instance with something like scummvm or a linux build of some game engine source port (gzdoom, openmw, etc)

If the user decides to provide the heroic entry with an alternative executable then it will always attempt to run it within the wine prefix.

So the behavior here seems somewhat inconsistent.

It will create a wine prefix that is never used by default unless you provide it with an alternative executable in which case it will always use the prefix.

You can get around this limitation by creating a separate side-loaded app that shares the same game files but since you lose the ability to store saves on the cloud this is not exactly an ideal solution.


Another problem with Heroic's dosbox integration is that it doesn't appear to set the correct working directory prior to calling most games and/or configuration files (which often launch the game via autoexec).

The workaround is simple enough but it won't be obvious to new users.

Basically, you need to append the relative path to executable via build arguments:

Screenshot_20250720_163405

Screenshot_20250720_163527

I believe it's using the DOSBOX folder as the working directory but obviously that's is a separate issue.
I'll probably create a separate bug report for this later.

Same game - no launch arguments:
Screenshot_20250720_170528

Note: Most DOS games simply won't launch but the solution is almost always more or less the same.

@arielj
Copy link
Collaborator Author

arielj commented Jul 20, 2025

what you describe seems to be bugs with the dosbox handling, but from the description of the feature request I didn't understand this was the problem

I'd suggest creating bug reports for these issues instead, since heroic handling the dosbox integration is unrelated to the feature of this PR, it is already implemented (but with bugs from what I see)

EDIT: I was talking with another dev and it seems like wine or proton and a prefix are needed to properly setup the game, even if then it's launched using the native dosbox, so I understand what you explain is not actually a bug but a necessary step of the game setup process

@Schweppesale
Copy link

Schweppesale commented Jul 20, 2025

EDIT: I was talking with another dev and it seems like wine or proton and a prefix are needed to properly setup the game, even if then it's launched using the native dosbox, so I understand what you explain is not actually a bug but a necessary step of the game setup process

@arielj I thought the prefix is created when the user presses play for the first time.

Is that not actually the case?

what you describe seems to be bugs with the dosbox handling, but from the description of the feature request I didn't understand this was the problem

Yea, as mentioned earlier I'm going to create a separate bug report for the dosbox/working directory issue.

Another problem with the current implementation is that the user may want to swap out the dosbox instance with something like scummvm or a linux build of some game engine source port (gzdoom, openmw, etc)

^ We should disregard this comment I made earlier.

Just ran another quick test and it looks like the changes you made do in fact allow us to run native executables that exist outside of the prefix even if it is being unnecessarily recreated.

So this is looking good for the most part.

@Schweppesale
Copy link

Schweppesale commented Jul 20, 2025

Deleted my last comment since I may have posted the wrong logs and I'm not sure if this is some type of regression:
#4734 (comment)

So here we have some logs where I'm including a call to the "does-not-exist" wrapper command.

The game in this case still launched despite including a command which doesn't exist:

Launching "Betrayal at Krondor" (gog)
Native? No
Installed in: /mnt/hdd/Program Files (x86)/GalaxyClient/Games/Betrayal at Krondor

System Info:
CPU: 16x AMD Ryzen 7 7800X3D 8-Core Processor
Memory: 33.26 GB (used: 15.82 GB)
GPUs:
GPU 0:
Name: NVIDIA Corporation AD102 [GeForce RTX 4090]
IDs: D=2684 V=10de SD=13ae SV=196e
Driver: nvidia
OS: Fedora Linux 42 (KDE Plasma Desktop Edition) (linux)

The current system is not a Steam Deck
We are not running inside a Flatpak container

Software Versions:
Heroic: 2.17.1 Cutty Flam Franky
Legendary: 0.20.37 Exit 17 (Heroic)
gogdl: 1.1.2
comet: comet 0.2.0
Nile: 1.1.2 Will A. Zeppeli

Game Settings: {
"autoInstallDxvkNvapi": true,
"preferSystemLibs": true,
"enableEsync": true,
"enableFsync": true,
"launcherArgs": " --working-dir "/mnt/hdd/Program Files (x86)/GalaxyClient/Games/Betrayal at Krondor/" KRONDOR.EXE",
"nvidiaPrime": false,
"enviromentOptions": [
{
"key": "PULSE_LATENCY_MSEC",
"value": "60"
}
],
"wrapperOptions": [
{
"exe": "does-not-exist",
"args": "BaK"
}
],
"showFps": false,
"showMangohud": false,
"targetExe": "/home/john/bin/dbox",
"useGameMode": true,
"useSteamRuntime": false,
"battlEyeRuntime": true,
"eacRuntime": true,
"language": "",
"beforeLaunchScriptPath": "",
"afterLaunchScriptPath": "",
"gamescope": {
"enableUpscaling": false,
"enableLimiter": false,
"additionalOptions": "-s 2 --hdr-itm-enabled --hdr-itm-target-nits 800 --adaptive-sync",
"enableForceGrabCursor": false
},
"verboseLogs": true,
"advertiseAvxForRosetta": false,
"wineVersion": {
"bin": "/home/john/.local/share/Steam/compatibilitytools.d/GE-Proton9-27/proton",
"name": "Proton - GE-Proton9-27",
"type": "proton"
},
"winePrefix": "/home/john/Games/Heroic/Prefixes/default/Betrayal at Krondor",
"doNotUseWine": true
}

Game launched at: Sun Jul 20 2025 19:27:03 GMT-0400 (Eastern Daylight Time)

Winetricks packages:

Launch Command: HEROIC_APP_NAME=1207660953 HEROIC_APP_RUNNER=gog GAMEID=umu-0 HEROIC_APP_SOURCE=gog STORE=gog STEAM_COMPAT_INSTALL_PATH="/mnt/hdd/Program Files (x86)/GalaxyClient/Games/Betrayal at Krondor" PULSE_LATENCY_MSEC=60 LD_PRELOAD= STEAM_COMPAT_CLIENT_INSTALL_PATH=/home/john/.steam/steam WINEPREFIX="/home/john/Games/Heroic/Prefixes/default/Betrayal at Krondor" STEAM_COMPAT_DATA_PATH="/home/john/Games/Heroic/Prefixes/default/Betrayal at Krondor" PROTONPATH=/home/john/.local/share/Steam/compatibilitytools.d/GE-Proton9-27 WINE_FULLSCREEN_FSR=0 PROTON_ENABLE_NVAPI=1 DXVK_NVAPI_ALLOW_OTHER_DRIVERS=1 PROTON_EAC_RUNTIME=/home/john/.config/heroic/tools/runtimes/eac_runtime PROTON_BATTLEYE_RUNTIME=/home/john/.config/heroic/tools/runtimes/battleye_runtime STEAM_COMPAT_APP_ID=0 SteamAppId=0 SteamGameId="heroic-Betrayal at Krondor" PROTON_LOG_DIR=/home/john WINEDEBUG=+fixme DXVK_LOG_LEVEL=info VKD3D_DEBUG=fixme /tmp/.mount_HeroicVzMhZx/resources/app.asar.unpacked/build/bin/x64/linux/gogdl launch "/mnt/hdd/Program Files (x86)/GalaxyClient/Games/Betrayal at Krondor" --override-exe /home/john/bin/dbox 1207660953 --no-wine --platform windows --working-dir "/mnt/hdd/Program Files (x86)/GalaxyClient/Games/Betrayal at Krondor/" KRONDOR.EXE

Game Log:
date time |
2025-07-20 19:27:07.061 | arguments: dosbox --fullscreen --conf dosbox.conf -conf ../dosboxBAK.conf -conf ../dosboxBAK_single.conf -noconsole -c exit --working-dir /mnt/hdd/Program\ Files\ (x86)/GalaxyClient/Games/Betrayal\ at\ Krondor/ KRONDOR.EXE
2025-07-20 19:27:07.062 | Current dir: /home/john/bin
2025-07-20 19:27:07.062 | stderr verbosity: 0
2025-07-20 19:27:07.062 | -----------------------------------
2025-07-20 19:27:07.062 | dosbox-staging version 0.82.2 ()
2025-07-20 19:27:07.062 | ---
2025-07-20 19:27:07.062 | LOG: Loguru version 2.1.0 initialised
2025-07-20 19:27:07.062 | CONFIG: Deprecated option 'cycles'

The 'cycles' setting is deprecated but still accepted; please use the
'cpu_cycles', 'cpu_cycles_protected' and 'cpu_throttle' settings instead as
support will be removed in the future.

2025-07-20 19:27:07.062 | CONFIG: Deprecated option 'voodoo_multithreading'

Renamed to 'voodoo_threads'

2025-07-20 19:27:07.062 | CONFIG: Loaded primary config file '/home/john/.config/dosbox/dosbox-staging.conf'
2025-07-20 19:27:07.062 | CONFIG: Can't open custom config file 'dosbox.conf'
2025-07-20 19:27:07.062 | CONFIG: Can't open custom config file '../dosboxBAK.conf'
2025-07-20 19:27:07.062 | CONFIG: Can't open custom config file '../dosboxBAK_single.conf'
2025-07-20 19:27:07.062 | LANG: Using internal English language messages
2025-07-20 19:27:07.075 | SDL: version 2.32.56 initialised (wayland video and pipewire audio)
2025-07-20 19:27:07.075 | DISPLAY: Using 2132x1599 window size in windowed mode on display-0
2025-07-20 19:27:07.262 | OPENGL: Vendor: NVIDIA Corporation
2025-07-20 19:27:07.262 | OPENGL: Version: 4.6.0 NVIDIA 575.64.03
2025-07-20 19:27:07.262 | OPENGL: GLSL version: 4.60 NVIDIA
2025-07-20 19:27:07.262 | OPENGL: NPOT textures supported
2025-07-20 19:27:07.262 | RENDER: Using adaptive CRT shader based on the graphics standard of the video mode
2025-07-20 19:27:07.263 | RENDER: Auto-switched to shader 'crt/hercules'
2025-07-20 19:27:07.263 | VGA: Pixel doubling enabled
2025-07-20 19:27:07.263 | VIDEO: Using the DOS video mode's frame rate
2025-07-20 19:27:07.270 | MEMORY: Using 4096 DOS memory pages (16 MB) at address: 0x7fac5267f010
2025-07-20 19:27:07.270 | VIDEO: Initialised S3 Trio64 VESA 2.0 compatible with 4 MB of FP DRAM supporting 89 modes
2025-07-20 19:27:07.274 | VGA: Double scanning VGA video modes enabled
2025-07-20 19:27:07.275 | VOODOO: Initialized with 4 MB of RAM, 16 threads, and no bilinear filtering
2025-07-20 19:27:07.275 | CAPTURE: Image capturer started
2025-07-20 19:27:07.283 | MIXER: Initialised stereo 48000 Hz audio with 512 sample frame buffer
2025-07-20 19:27:07.283 | MIXER: Master compressor enabled
2025-07-20 19:27:07.338 | FSYNTH: Using SoundFont '/home/john/Games/dosbox/soundfont/EmperorGrieferus_Roland_SC-55_v3.7.sf2'
2025-07-20 19:27:07.338 | FSYNTH: Chorus enabled with 3 voices at level 1.20, 0.30 Hz speed, 8.00 depth, and sine-wave modulation
2025-07-20 19:27:07.338 | FSYNTH: Reverb enabled with a 0.61 room size, 0.23 damping, 0.76 width, and level 0.56
2025-07-20 19:27:07.338 | FSYNTH: Operating at 48000 Hz without resampling
2025-07-20 19:27:07.339 | MIDI: Opened device: fluidsynth
2025-07-20 19:27:07.339 | MPU-401: Running in intelligent mode on ports 330h and 331h
2025-07-20 19:27:07.339 | OPL: Operating at 49716 Hz and downsampling to the output rate
2025-07-20 19:27:07.339 | OPL: Running OPL3 on ports 220h and 388h
2025-07-20 19:27:07.339 | OPL: Sound Blaster 16 OPL output filter enabled
2025-07-20 19:27:07.339 | DMA: Initialised primary controller
2025-07-20 19:27:07.339 | DMA: Initialised secondary controller
2025-07-20 19:27:07.339 | SB: Operating at 22050 Hz and upsampling to the output rate
2025-07-20 19:27:07.339 | SB16: Modern DAC output filter enabled
2025-07-20 19:27:07.339 | SB16: Setting 'BLASTER' environment variable to 'A220 I7 D1 H5 T6'
2025-07-20 19:27:07.339 | SB16: Running on port 220h, IRQ 7, DMA 1, and high DMA 5
2025-07-20 19:27:07.339 | PCSPEAKER: Operating at 48000 Hz without resampling
2025-07-20 19:27:07.339 | PCSPEAKER: Initialised discrete model
2025-07-20 19:27:07.339 | PCSPEAKER: High-pass filter enabled (18 dB/oct at 120 Hz)
2025-07-20 19:27:07.339 | PCSPEAKER: Low-pass filter enabled (12 dB/oct at 4800 Hz)
2025-07-20 19:27:07.339 | MOUSE: Will be captured immediately on start
2025-07-20 19:27:07.339 | MOUSE: Middle button will capture/release the mouse (clicks not sent to the game/program)
2025-07-20 19:27:07.339 | MOUSE (PS/2): Standard, 3 buttons
2025-07-20 19:27:07.342 | DOS: Loaded modern locale for country 1, 'United States'
2025-07-20 19:27:07.343 | SLIRP: Slirp version: 4.8.0
2025-07-20 19:27:07.343 | SLIRP: Successfully initialized
2025-07-20 19:27:07.343 | NE2000: Initialised on port 300h and IRQ 3
2025-07-20 19:27:07.343 | CONFIG: Loaded auto-mounted drive config file '/usr/share/dosbox-staging/drives/y.conf'
2025-07-20 19:27:07.614 | MAPPER: Found one joystick
2025-07-20 19:27:07.614 | MAPPER: Initialised 8BitDo Ultimate Wireless / Pro 2 Wired Controller with 6 axes, 11 buttons, and 1 hat(s)
2025-07-20 19:27:07.614 | MAPPER: Failed loading mapperfile 'mapper-sdl2-0.81.1.map' directly or from resources
2025-07-20 19:27:07.614 | MAPPER: Loaded default key bindings
2025-07-20 19:27:07.614 | MOUNT: Path '/usr/share/dosbox-staging/drives/y' found
2025-07-20 19:27:07.615 | MOUNT: Path '.' found
2025-07-20 19:27:07.618 | SDL: Window size initialized to 2880x2160 pixels
2025-07-20 19:27:07.619 | RENDER: Auto-switched to shader 'crt/vga-4k'
2025-07-20 19:27:07.619 | SDL: Using standard SDI (auto) display refresh rate of 120 Hz
2025-07-20 19:27:07.620 | OPENGL: Double buffering not enabled
2025-07-20 19:27:07.624 | DISPLAY: VGA 720x400 16-colour text mode 03h at 70.087 Hz VFR, scaled to 2667x2000 pixels with 1:1.35 (20:27) pixel aspect ratio
2025-07-20 19:27:07.624 | OPENGL: Disabled vsync
2025-07-20 19:27:07.820 | OPENGL: Double buffering not enabled
2025-07-20 19:27:07.825 | DISPLAY: VGA 320x200 256-colour graphics mode 13h at 70.086 Hz VFR, scaled to 2667x2000 pixels with 1:1.2 (5:6) pixel aspect ratio
2025-07-20 19:27:07.873 | SB16: Resetting DSP
2025-07-20 19:27:15.366 | PCSPEAKER: Shutting down discrete model
2025-07-20 19:27:15.367 | OPL: Shutting down OPL3
2025-07-20 19:27:15.367 | SB16: Shutting down
2025-07-20 19:27:15.367 | MPU-401: Shutting down
2025-07-20 19:27:15.367 | FSYNTH: Shutting down
2025-07-20 19:27:15.374 | CAPTURE: Image capturer shutting down
2025-07-20 19:27:15.374 | DMA: Shutting down primary controller
2025-07-20 19:27:15.374 | DMA: Shutting down secondary controller
2025-07-20 19:27:15.445 | atexit
Launch command: ['/home/john/bin/dbox', '-conf', '../dosboxBAK.conf', '-conf', '../dosboxBAK_single.conf', '-noconsole', '-c', 'exit', '--working-dir', '/mnt/hdd/Program Files (x86)/GalaxyClient/Games/Betrayal at Krondor/', 'KRONDOR.EXE']
All processes exited
============= End of log =============

Note: The additional launch arguments as well.

This is probably not a big deal for dosbox (dbox) since it will simply log any missing configuration files and attempt to launch the game without them but I figured it was probably worth pointing out.

I'm not sure for example what would happen if we pass these parameters into openmw or gzdoom.

@arielj
Copy link
Collaborator Author

arielj commented Jul 21, 2025

@arielj I thought the prefix is created when the user presses play for the first time.

Is that not actually the case?

yes, prefixes are created when launching a game if the prefix does not exist

my understanding is that for games that run through dosbox, the prefix is still needed to run setup steps every time the prefix is created, that's why the prefix is created, games may need it

again, this PR is not meant to fix anything related to games that run through dosbox, that's out of the scope of what I implemented here

@Schweppesale
Copy link

Schweppesale commented Jul 21, 2025

Fair enough.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
pr:ready-for-review Feature-complete, ready for the grind! :P
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Possibility to only run alternative EXE on MacOS and not use Wine
2 participants