Angband.oook.cz
Angband.oook.cz
AboutVariantsLadderForumCompetitionComicScreenshotsFunniesLinks

Go Back   Angband Forums > Angband > Development

Reply
 
Thread Tools Display Modes
Old March 9, 2015, 21:28   #1
academic.sam
Scout
 
Join Date: Mar 2013
Posts: 31
academic.sam is on a distinguished road
Compiling angband on Windows

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.
  1. 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")
  2. Select the default path (C:\MinGW). Your life will be a lot easier.
  3. Click "Basic Setup" on the left pane.
  4. 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)
  5. Also Select "mingw32-base" packages as above.
  6. Click "All packages" in the left pane. You should see a number of packages already selected.
  7. 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.
  8. 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.
  9. 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).
  10. 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.
  11. In the C:\MinGW\msys\1.0 folder, there is a filed called "msys.bat". Run this to start a command window.
  12. 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.
  13. Type "./autogen.sh" once to generate the configure script.
  14. Type "./configure --enable-win --with-no-install" once to create make files.
  15. Type "make" to complile the files. This should create the executable file in "src" folder.
  16. 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
  17. Copy "angband.exe" file in "src" folder to the folder where you downloaded the playable copy.
  18. Congratulations! Now you have an identical copy of angband that you compiled
  19. Now, you may hack the source and run "make" to re-compile.
academic.sam is offline   Reply With Quote
Old March 9, 2015, 22:56   #2
academic.sam
Scout
 
Join Date: Mar 2013
Posts: 31
academic.sam is on a distinguished road
How to use Qt Creator to compile, run and debug angband

You can use Qt creator (http://www.qt.io/download/) to edit angband source easily. Once you install the free Qt community ediition (caution: it is quite big), start Qt creator and pick "New project".

Select "Import project" from "Projects" pane and select "Import existing project" from the middle pane. Click "Choose" and select the folder where you unpacked angband source. This should automatically grab all the source files and you can then explore them within Qt creator.

I'll edit this post later to explain the setting for compiling and debugging. Happy hacking!

Last edited by academic.sam; March 9, 2015 at 23:04.
academic.sam is offline   Reply With Quote
Old March 14, 2015, 22:12   #3
Tibarius
Swordsman
 
Tibarius's Avatar
 
Join Date: Jun 2011
Location: Germany
Age: 50
Posts: 399
Tibarius is an unknown quantity at this point
hey, i wanted to try my hands for ages ...

Once i am done with my player's guide (currently 4 from 6 classes are explored and described) i may follow your guide and try myself to modify Angband.
Tibarius is offline   Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Compiling V for Windows Therem Harth Vanilla 8 September 5, 2011 00:36
Getting Unangband/Angband from SVN and Compiling on Windows andrewdoull Development 133 April 7, 2011 15:28
Compiling Hengband on Windows EpicMan Development 2 May 7, 2010 20:15
Compiling Z+Angband under Windows Altefcat Variants 8 December 11, 2008 10:44
Windows Compiling and Makefiles APWhite Vanilla 11 August 22, 2007 22:22


All times are GMT +1. The time now is 21:46.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2019, vBulletin Solutions Inc.