Difference between revisions of "Building DOSBox with MinGW"
(Major rewrite, I used Windows XP as the base OS. Current as of October 2014) |
|||
Line 1: | Line 1: | ||
== Building your own version of DOSBox == | == Building your own version of DOSBox == | ||
− | + | MinGW is the development environment that this page will show you how to use, an alternative is to use [[Building_DOSBox_with_Visual_C_2008_Express|Microsoft Visual Studio]] | |
− | |||
− | [[ | ||
− | |||
+ | This page will guide you through setting up MinGW to compile a current (SVN/CSV) version of DOSBox. Because of updates to compilers and libraries, this guide will not work with the 0.74 (the last official release, which is currently over 4 years old) source files. | ||
− | === | + | == Installing MinGW == |
+ | * Download mingw-get-setup.exe from http://sourceforge.net/projects/mingw/ | ||
+ | * Run the installer, choosing the defaults | ||
+ | * Once the '''MinGW Installation Manager''' application starts, select | ||
+ | ** mingw-developer-toolkit (msys-base should be automatically added) | ||
+ | ** mingw32-base | ||
+ | ** mingw32-gcc-g++ | ||
+ | * On the installation menu, apply changes, and confirm that you want to apply the changes | ||
− | + | The installation manager is going to download a bunch of files, and at the end, start installing them. Once this is done, you can close the dialog box as well as the installation manager. | |
− | + | Well done, MinGW is now installed! Let's start it up. | |
− | + | * Browse to '''C:\MinGW\msys\1.0''' | |
+ | * Run '''MSYS.BAT''' | ||
− | + | This will start up a DOS prompt like screen, lets mount the base path | |
+ | mount 'c:\MinGW' /mingw | ||
− | + | You have now completed this section, lets move on to adding the SDL libraries to MinGW. | |
− | + | == Adding the SDL libraries to MinGW == | |
+ | * Download the pre compiled SDL development libraries from here http://www.libsdl.org/release/SDL-devel-1.2.15-mingw32.tar.gz | ||
+ | * Copy the downloaded file to your MSYS home folder, it's going to be something like '''C:\MinGW\msys\1.0\home\Administrator''' | ||
+ | * Switch back to the MSYS command prompt we started earlier | ||
+ | * Lets extract the downloaded files | ||
+ | tar xvf SDL-devel-1.2.15-mingw32.tar.gz | ||
+ | * And now add the files to MinGW | ||
+ | cd SDL-1.2.15 | ||
+ | make native | ||
+ | cd .. | ||
− | + | Cool, the SDL libraries have been added to MinGW, onto the next section. | |
− | + | == Adding Direct Draw support to DOSBox (Optional) == | |
+ | If you want to give DOSBox the option to use the DDRAW output option, then we need to add a couple of extra libraries to MinGW | ||
+ | * Download the following file, http://www.libsdl.org/extras/win32/common/directx-devel.tar.gz | ||
+ | * Copy the downloaded file to your MSYS home folder | ||
+ | * Switch to the MSYS command prompt | ||
+ | * Extract the files (the -C parameter, tells tar where to extract the files to) | ||
+ | tar xvf directx-devel.tar.gz -C /mingw | ||
− | + | == Adding SDL_net libraries to MinGW (Optional) == | |
+ | SDL_net gives DOSBox networking support, if you aren't going to be using DOSBox for multi player games, then you can probably skip this step. | ||
+ | * Download the SDL_net source files from https://www.libsdl.org/projects/SDL_net/release/SDL_net-1.2.8.tar.gz | ||
+ | * Copy the downloaded file to your MSYS home folder | ||
+ | * Switch to the MSYS command prompt | ||
+ | * Extract the file | ||
+ | tar xvf SDL_net-1.2.8.tar.gz | ||
+ | * Lets configure the libraries | ||
+ | cd SDL_net-1.2.8 | ||
+ | ./configure prefix=/usr | ||
+ | * And now compile them | ||
+ | make | ||
+ | * And then install them (copy the files) | ||
+ | make install | ||
+ | cd .. | ||
− | == | + | == Compiling DOSBox == |
+ | * Download the latest source files for DOSBox from here http://source.dosbox.com/dosboxsvn.tgz | ||
+ | * Copy the file to your MSYS home folder | ||
+ | * Extract the file | ||
+ | tar xvf dosboxsvn.tgz | ||
+ | * Let's configure it | ||
+ | cd dosbox | ||
+ | ./autogen.sh | ||
+ | ./configure LDFLAGS="-static-libgcc -static-libstdc++ -s" | ||
+ | * And now for compiling DOSBox | ||
+ | make | ||
+ | * The last step is to gather all the files together in a folder | ||
+ | ** Create a folder with a name of your choosing | ||
+ | ** Copy the dosbox.exe file located under the '''dosbox\src''' folder, e.g. '''C:\MinGW\msys\1.0\home\Administrator\dosbox\src''' to the folder you created | ||
+ | ** Copy the SDL.dll file located under '''SDL-1.2.15\bin''', e.g. '''C:\MinGW\msys\1.0\home\Administrator\SDL-1.2.15\bin''' to the folder you created | ||
+ | ** Optionally, copy the SDL_net.dll file located under '''SDL_net-1.2.8\.libs''', e.g. '''C:\MinGW\msys\1.0\home\Administrator\SDL_net-1.2.8\.libs''' to the folder you created | ||
− | + | Start up DOSBox, and see if it works. | |
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− |
Revision as of 23:41, 21 October 2014
Building your own version of DOSBox
MinGW is the development environment that this page will show you how to use, an alternative is to use Microsoft Visual Studio
This page will guide you through setting up MinGW to compile a current (SVN/CSV) version of DOSBox. Because of updates to compilers and libraries, this guide will not work with the 0.74 (the last official release, which is currently over 4 years old) source files.
Installing MinGW
- Download mingw-get-setup.exe from http://sourceforge.net/projects/mingw/
- Run the installer, choosing the defaults
- Once the MinGW Installation Manager application starts, select
- mingw-developer-toolkit (msys-base should be automatically added)
- mingw32-base
- mingw32-gcc-g++
- On the installation menu, apply changes, and confirm that you want to apply the changes
The installation manager is going to download a bunch of files, and at the end, start installing them. Once this is done, you can close the dialog box as well as the installation manager.
Well done, MinGW is now installed! Let's start it up.
- Browse to C:\MinGW\msys\1.0
- Run MSYS.BAT
This will start up a DOS prompt like screen, lets mount the base path
mount 'c:\MinGW' /mingw
You have now completed this section, lets move on to adding the SDL libraries to MinGW.
Adding the SDL libraries to MinGW
- Download the pre compiled SDL development libraries from here http://www.libsdl.org/release/SDL-devel-1.2.15-mingw32.tar.gz
- Copy the downloaded file to your MSYS home folder, it's going to be something like C:\MinGW\msys\1.0\home\Administrator
- Switch back to the MSYS command prompt we started earlier
- Lets extract the downloaded files
tar xvf SDL-devel-1.2.15-mingw32.tar.gz
- And now add the files to MinGW
cd SDL-1.2.15 make native cd ..
Cool, the SDL libraries have been added to MinGW, onto the next section.
Adding Direct Draw support to DOSBox (Optional)
If you want to give DOSBox the option to use the DDRAW output option, then we need to add a couple of extra libraries to MinGW
- Download the following file, http://www.libsdl.org/extras/win32/common/directx-devel.tar.gz
- Copy the downloaded file to your MSYS home folder
- Switch to the MSYS command prompt
- Extract the files (the -C parameter, tells tar where to extract the files to)
tar xvf directx-devel.tar.gz -C /mingw
Adding SDL_net libraries to MinGW (Optional)
SDL_net gives DOSBox networking support, if you aren't going to be using DOSBox for multi player games, then you can probably skip this step.
- Download the SDL_net source files from https://www.libsdl.org/projects/SDL_net/release/SDL_net-1.2.8.tar.gz
- Copy the downloaded file to your MSYS home folder
- Switch to the MSYS command prompt
- Extract the file
tar xvf SDL_net-1.2.8.tar.gz
- Lets configure the libraries
cd SDL_net-1.2.8 ./configure prefix=/usr
- And now compile them
make
- And then install them (copy the files)
make install cd ..
Compiling DOSBox
- Download the latest source files for DOSBox from here http://source.dosbox.com/dosboxsvn.tgz
- Copy the file to your MSYS home folder
- Extract the file
tar xvf dosboxsvn.tgz
- Let's configure it
cd dosbox ./autogen.sh ./configure LDFLAGS="-static-libgcc -static-libstdc++ -s"
- And now for compiling DOSBox
make
- The last step is to gather all the files together in a folder
- Create a folder with a name of your choosing
- Copy the dosbox.exe file located under the dosbox\src folder, e.g. C:\MinGW\msys\1.0\home\Administrator\dosbox\src to the folder you created
- Copy the SDL.dll file located under SDL-1.2.15\bin, e.g. C:\MinGW\msys\1.0\home\Administrator\SDL-1.2.15\bin to the folder you created
- Optionally, copy the SDL_net.dll file located under SDL_net-1.2.8\.libs, e.g. C:\MinGW\msys\1.0\home\Administrator\SDL_net-1.2.8\.libs to the folder you created
Start up DOSBox, and see if it works.