VOGONS

Common searches


DOSBox Compilation Guides

Topic actions

Reply 40 of 48, by DosFreak

User metadata
Rank l33t++
Rank
l33t++

Alright. Didn't have time to test clang or verify dependencies but I did get mingw working with MSYS2 so that removed all the work of having to update wget,autoconf,automake,pkg-config,gawk,libtool,mercurial,svn,and git and it appears to work fine under MSYS2. I even compiled a DOSBox executable that works on <Pentium Pro.
Check the above post for the update guide.

Need to see about using the original mingw with Ubuntu 19.10 or Ubuntu w/WSL. Should be able to unpack the .deb files from 18.04 but not sure what to do then but I'm sure I'll figure it out.

Bugs with the original Mingw are with FLAC which requires a downgrade to 1.3.2 and SDL_NET. Previously I modified SDL_NET to remove GetLocalAddresses (which introduced the requirement of Active desktop so 1.2.8+ only for 95 and NT4) which isn't used by DOSBox so that will probably work again as well. Depending on what changed though may make more sense to use an older version without that functionality.

So
SDL_NET 1.2.8+ for 95-NT4+ w/Active Desktop
SDL_NET 1.2.7 for 95-NT3.50+ without Active Desktop

DOSBox Compilation Guides
DosBox Feature Request Thread
PC Game Compatibility List
How To Ask Questions The Smart Way
Running DRM games offline

Reply 41 of 48, by DosFreak

User metadata
Rank l33t++
Rank
l33t++

Worked on dependencies. Zlib is ridiculous and documented issues with clang.
Looks like the current version of Clang requires Vista+. Need to track down the last XP version. Also need to see if the one I downloaded last year still works for XP.
Need to test clang on Linux.
Need to review old guides and integrate into new one.

DOSBox Compilation Guides
DosBox Feature Request Thread
PC Game Compatibility List
How To Ask Questions The Smart Way
Running DRM games offline

Reply 42 of 48, by DosFreak

User metadata
Rank l33t++
Rank
l33t++

Did some testing with clang on Linux and figured out what I needed to do to cross compile with it for Windows but unwind_resume error when compiling DOSBox. Possibly different exception handling between Mingw-w64 and clang. Need to find a clang specifically compiled for Mingw-W64.

Had issues when compiling under my user account that went away under root so recommend using that.
As such I can't use absolute variables and need to use relative so need to switch to that in the guide.
It looks like Zlib in Linux allows you to use ./configure whereas on Windows it doesn't..... It also has CC and CFLAGS hardcoded so have to set those variables. Need to verify if configure can be used in Windows.

DOSBox Compilation Guides
DosBox Feature Request Thread
PC Game Compatibility List
How To Ask Questions The Smart Way
Running DRM games offline

Reply 43 of 48, by DosFreak

User metadata
Rank l33t++
Rank
l33t++

Updated guide.

Verified dependencies with MSYS2 w/ original Mingw
Compiled DOSBox SVN for <Pentium Pro for Windows 95/NT4 w/Active Desktop
Still integrating older guides into new one.
Haven't integrated previouis diffs yet so in Window mode use overlay or opengl, Active Desktop still required, Winsock 2 required, Doesn't work on NT3.50 or NT3.51.
For 64bit test march x86-x64 again and replace native.

P.S. Set output to any but surface and window resolution to a percentage for a present from Qbix. 😀 Let the complaining begin! (Works fine on Windows 95 too!)

Attachments

  • Filename
    dosbox.zip
    File size
    1.92 MiB
    Downloads
    11 downloads
    File license
    Fair use/fair dealing exception
Last edited by DosFreak on 2020-02-19, 23:38. Edited 1 time in total.

DOSBox Compilation Guides
DosBox Feature Request Thread
PC Game Compatibility List
How To Ask Questions The Smart Way
Running DRM games offline

Reply 44 of 48, by DosFreak

User metadata
Rank l33t++
Rank
l33t++

Updated guide in last post.
Worked on dependencies some more
Switched from native to x86-64
Verified static with clang working.
Dosbox compiled with clang with MSYS results in the console loading but the main dosbox screen not whereas Clang compiled on Linux works. Need to check.
Fixed zlib makefile by adding a variable. Currently two makefiles 1 for 32bit and 1 for 64bit for windows. Now can easily use gcc or clang for zlib.
Standardized make with nproc variable.
Renamed misnamed variables.

DOSBox Compilation Guides
DosBox Feature Request Thread
PC Game Compatibility List
How To Ask Questions The Smart Way
Running DRM games offline

Reply 45 of 48, by DosFreak

User metadata
Rank l33t++
Rank
l33t++

For Windows exclude mingw exclude compile folder and vmdk files in Windows Defender

DOSBox Compilation Guides
DosBox Feature Request Thread
PC Game Compatibility List
How To Ask Questions The Smart Way
Running DRM games offline

Reply 46 of 48, by kjliew

User metadata
Rank Oldbie
Rank
Oldbie

MSYS2/mingw-w64 dropped Windows XP support, not just the toolchain environment but including native binaries produced by the GNU GCC compilers.
The main culprit is winpthread library. The upstream targeted Window 7 APIs as minumum requirement.
https://github.com/msys2/MINGW-packages/issues/5139#

Everyone just wishes/wants/likes legacy Windows killed .....

Reply 47 of 48, by DosFreak

User metadata
Rank l33t++
Rank
l33t++

DOSBox binary works fine on 95+, NT3.50+ if compiled static when compiled with MINGW-W64 that was compiled with win32 instead of posix thread. Mingw-W64 from the MSYS2 repo is compiled with posix instead of win32 thread and they are too lazy to provide both but you can download a older non-trunk win32 build from their site that is or compile under Ubuntu WSL or regular Ubuntu since their Mingw-w64 is compiled with win32 thread.

RL got in the way again for the past two weeks but the next project will be to compile MSYS2 / MinGW-W64 for i686+ and <i686 for win32 on Windows and <i686 on Linux, sadly I'll still need to provide the current instructions for those too lazy to compile the toolchain themselves but will be useful for those who care.

Dealing with MSYS2 w/ MINGW-W64 oddities is a pain and compiling is sooooo slow, I'm really not sure why anyone would bother with it now that WSL has caught up for those who don't want to use Vmware. Mabye those with blinding hatred for Windows 10 so insist on using MSYS2/Mingw-W64 on <10? if so switch to Linux and compile from there.

A commit posted last year concerned dropping of Windows 2000 support due to them requiring a newer MSVCRT. So the MINGW-W64 devs are well aware of OS support, AFAIK Windows XP is still supported by MINGW-W64 but they can't do anything about 3rd party libraries. Currently the MSVCRT issue isn't a concern for 2000 and below as long as the MSVCRT is updated on those systems otherwise you'd have to compile with an older version of Mingw-w64.

TLDR, likely a combination of using win32 thread and compiling statically which allows DOSBox to continue functioning on older operating systems when using MINGW-W64. Since dosbox doesn't contain C++11 \C++11 thread code then the winpthread addition added by Mingw-w64 compiled with posix is an unnecessary requirement.

I do wonder if it was used which would be better winpthread or https://github.com/meganz/mingw-std-threads ?

Last edited by DosFreak on 2020-02-20, 00:39. Edited 9 times in total.

DOSBox Compilation Guides
DosBox Feature Request Thread
PC Game Compatibility List
How To Ask Questions The Smart Way
Running DRM games offline

Reply 48 of 48, by DosFreak

User metadata
Rank l33t++
Rank
l33t++

Minor update.

Changed LIBSSDLS variables -lsdl_net to -lSDL_net for Linux.
Need to check zlib on Linux again. Possibly variables messing up.

Verified again that a compiled DOSBox executable with Mingw-w64 w/gcc 9.2 win32 compiled on Linux works on Windows XP.

Attachments

DOSBox Compilation Guides
DosBox Feature Request Thread
PC Game Compatibility List
How To Ask Questions The Smart Way
Running DRM games offline