-
-
Notifications
You must be signed in to change notification settings - Fork 119
Developer Getting Started: MinGW
- Git client (GitHub for Windows)
- CMake
- MinGW
- SDL development libraries: SDL 1.2, SDL_mixer 1.2, SDL_image 1.2
Instructions for TortoiseGit are also available; these are not recommended
Repo URL: https://github.com/cxong/cdogs-sdl.git
-
Optional: for the purposes of this walkthrough, the clone location is
C:\cdogs-sdl
. To make GitHub for Windows automatically clone to this location, set the default storage directory toC:\
. -
Click the "Clone in Windows" button in the repo website.
-
You should now see the repo contents in
C:\cdogs-sdl
These instructions install SDL libraries into MinGW, but unfortunately CMake's Windows SDL support is quite poor, so these instructions are also designed to support CMake as well. Please make sure these instructions are followed correctly and in order!
-
From the contents of the SDL-1.2.XX package, copy the contents of
bin
toC:\MinGW\bin
,include
intoC:\MinGW\include
, andlib
intoC:\MinGW\lib
(so you should have the filesC:\MinGW\bin\sdl-config
,C:\MinGW\include\SDL\SDL.h
,C:\MinGW\lib\libSDL.dll.a
etc.) -
Do the same for SDL_mixer and SDL_image, combining the contents of the include and lib folders. However, you should also copy the DLLs e.g.
SDL_mixer.dll
toC:\MinGW
for CMake's benefit. -
Copy the
.dll
files to theC:\cdogs-sdl\src
folder -
Create an environment variable
SDLDIR
that points toC:\MinGW
CMake MinGW support is buggy; make sure to follow these instructions carefully!
-
Run CMake in Windows: for "Where is the source code:" and "Where to build the binaries:" input
C:\cdogs-sdl
-
Click "Configure", choosing
MinGW Makefiles
; click Finish. -
Open MinGW shell and navigate to
/c/cdogs-sdl
. Run./make.sh
and C-Dogs SDL should configure and build. -
If the last step didn't work (perhaps the wrong order was followed), open CMake Windows and select
File > Delete Cache
, and start this section over. -
Run
cdogs-sdl
. You are ready to go!