Compiling angband on Windows

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • academic.sam
    Scout
    • Mar 2013
    • 31

    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
    Scout
    • Mar 2013
    • 31

    #2
    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, 23:04.

    Comment

    • Tibarius
      Swordsman
      • Jun 2011
      • 429

      #3
      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.
      Blondes are more fun!

      Comment

      Working...
      😀
      😂
      🥰
      😘
      🤢
      😎
      😞
      😡
      👍
      👎