I've seen some posts about issues with compiling on Windows and I thought I'd post this short guide on how to do it using MinGW compiler.
- Download MinGW installaton manager from http://sourceforge.net/projects/mingw/files/ - Click the download link for the latest version (E.g. "Download mingw--get-setup.exe")
- Select the default path (C:\MinGW). Your life will be a lot easier.
- Click "Basic Setup" on the left pane.
- Click the checkbox in front of "mingw-developer-toolkit" and select "Mark for installaton" (this takes a few seconds and should mark "msys-base" as well)
- Also Select "mingw32-base" packages as above.
- Click "All packages" in the left pane. You should see a number of packages already selected.
- Click "MinGW libraries" under "MinGW". Scroll down the list on the right pane and find "mingw32-libz". Click on the box for "dev" class and select "Mark for installation". This should mark both the "dev" class and "dll" class.
- Click on the installation menu and select "Apply changes". You should see another dialog with a list of packages removed, upgraded and installed. Click "Apply". Go for a cup of coffee (or a stronger beverage if you prefer). Close the dialog once it says all packages were installed successfully.
- In file explorer, navigate to C:\MinGW\msys\1.0\etc folder. There should be a file called "fstab.sample". Copy this to "fstab" (no file extension) and edit it with a text editor (Notepad++ is a good choice and serves well later).
- Ensure that first line contains "c:/mingw /mingw". It may have another line about "perl". Leave it as is. Also ensure that there is a blank line at the end.
- In the C:\MinGW\msys\1.0 folder, there is a filed called "msys.bat". Run this to start a command window.
- In this command window (shell), type "cd /c/Users/xyz/Documents/angband-3.5.1-release" to go to the angband source folder (xyz is your username in Windows). If you did not unpack angband source in your "Documents" folder, you may need to change above path as appropriate.
- Type "./autogen.sh" once to generate the configure script.
- Type "./configure --enable-win --with-no-install" once to create make files.
- Type "make" to complile the files. This should create the executable file in "src" folder.
- Optional: To shrink the file type "strip src/angband.exe". This removes symbol table that is used for debugging. For 3.5.1, this makes it 1.7M instead of 4.2M
- Copy "angband.exe" file in "src" folder to the folder where you downloaded the playable copy.
- Congratulations! Now you have an identical copy of angband that you compiled
- Now, you may hack the source and run "make" to re-compile.
Comment