Getting Angband from Github and compiling it

Collapse
This is a sticky topic.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Azerath
    Rookie
    • Jun 2011
    • 21

    #31
    If you are trying to run Angband 3.2.0 from VS2010, just unzip downloaded sources and place attached files (sln + vcxproj* into src folder).

    The only problematic things are:
    - size_t in game-cmd.c as mentioned today in the other thread
    - utils.c and player/utils.c produces same obj by default, so rename player utils to player_utils.c and it should work!
    - mouse moving is not working due to bug with switched coordinates

    Debugging works like a charm :-) Tested on 32/64 bit Win7 with VS2010 Ultimate/Express.

    Regards
    Attached Files

    Comment

    • jens
      Swordsman
      • Apr 2011
      • 348

      #32
      Nice work! Now if someone would just do this for Eclipse as well ;-)

      Comment

      • d_m
        Angband Devteam member
        • Aug 2008
        • 1517

        #33
        Originally posted by Azerath
        If you are trying to run Angband 3.2.0 from VS2010, just unzip downloaded sources and place attached files (sln + vcxproj* into src folder).

        The only problematic things are:
        - size_t in game-cmd.c as mentioned today in the other thread
        - utils.c and player/utils.c produces same obj by default, so rename player utils to player_utils.c and it should work!
        - mouse moving is not working due to bug with switched coordinates

        Debugging works like a charm :-) Tested on 32/64 bit Win7 with VS2010 Ultimate/Express.

        Regards
        Hi Azerath,

        I hope to fix the size_t issue and maybe also rename player/utils.c to something else. Magnate has already fixed the mouse issue.

        Would that mean that Angband would actually work "out of the box" in Visual Studio/VC++??

        I am so used to taking flak for having things not work for MSVC that I am actually getting really excited about this

        Thanks,

        -- Erik
        linux->xterm->screen->pmacs

        Comment

        • ChodTheWacko
          Adept
          • Jul 2007
          • 155

          #34
          Hello Everyone,

          I just pulled down the latest version from git.

          Compiling on windows was fairly easy with cygwin:
          1) set MINGW=yes
          2) I modified Makefile.win to make it debuggable:
          changed '-O2' to -g
          removed the '-s' which strips the libraries
          removed -static otherwise it moaned about gcc_s library. (maybe I don't have it installed right)

          3) had to modify z-file a bit.

          and that's basically it. make -f Makefile.win and I have a playable game.

          However, the entire reason I did this exercise was because I wanted to generate stats, and that doesn't work. Any advice on this?

          - Frank

          Comment

          • Azerath
            Rookie
            • Jun 2011
            • 21

            #35
            Hi,

            Using attached VS project files should work. It reports a lot of warnings, but can be ignored, I hope so...

            It is sufficient to use only vcxproj only.

            Of course for people familiar with CygSomething, it would be a lot of easier use this tool than download and install VS, but as I have it already, then working and debugging is a lot of easier.

            Regards

            Comment

            • ChodTheWacko
              Adept
              • Jul 2007
              • 155

              #36
              Originally posted by Azerath
              Hi,
              It is sufficient to use only vcxproj only.
              Just for clarification before I go downloading all that:
              You can run the angband with -mstats option to get the object dumps, right?

              Although, Looking through the code, it looks it does direct inserts into sqlite?
              If so I might have to just hack it to dump it direct to a CSV file.

              - Frank

              Comment

              • Azerath
                Rookie
                • Jun 2011
                • 21

                #37
                Hmm... I'm not familiar with mstats option. Are you referring to creation of lib subfolders and its content? If so, then this VS project will only compile sources and lib folder I just copy from release.

                I've created VS just to more easily debug app on my machine, than substitute building...

                On the other hand hacking preparation of lib content shouldn't tak too much time...

                Regards,

                Comment

                • Magnate
                  Angband Devteam member
                  • May 2007
                  • 5110

                  #38
                  Originally posted by ChodTheWacko
                  Just for clarification before I go downloading all that:
                  You can run the angband with -mstats option to get the object dumps, right?

                  Although, Looking through the code, it looks it does direct inserts into sqlite?
                  If so I might have to just hack it to dump it direct to a CSV file.

                  - Frank
                  Hi Frank,

                  You have to configure the code to build the stats module - I don't know how you do that on platforms that don't use configure, but it's to do with #defining ENABLE_STATS in the right header files.

                  Also, apparently Windows doesn't support any of the -m options, so I'm not sure you could invoke the stats module even if you built it.

                  Finally, yes it does dump an sqlite db, so you would need to hack it to output CSV. Pls be warned that there's a LOT of data - about 1.2GB if it's uncompressed.
                  "Been away so long I hardly knew the place, gee it's good to be back home" - The Beatles

                  Comment

                  • myshkin
                    Angband Devteam member
                    • Apr 2007
                    • 334

                    #39
                    Originally posted by Magnate
                    Hi Frank,

                    You have to configure the code to build the stats module - I don't know how you do that on platforms that don't use configure, but it's to do with #defining ENABLE_STATS in the right header files.

                    Also, apparently Windows doesn't support any of the -m options, so I'm not sure you could invoke the stats module even if you built it.
                    The Windows, OS X, and NDS ports do not use the display module notion. For now, the easiest way to get stats working on Windows is likely to compile in an environment that supports configure...I haven't tested it, but I would guess that Cygwin with sqlite3 installed would do, with some small tweaks perhaps. The more elegant thing to do is to add a command-line option or a menu item to start the stats code; compare with the USE_SAVER sections of main-win.c for screensaver control. I aim to move most of main-stats.c into various files in the stats/ subdirectory, at which point it should be somewhat easier to call the stats engine from other parts of the code. (Other to-dos here: document the ugly struct access expressions better, merge with fizzix's code in wiz-stats.c, add support for different diving algorithms, and add support for merging databases. All are likely going to wait until after the 3.3 release.)

                    Originally posted by Magnate
                    Finally, yes it does dump an sqlite db, so you would need to hack it to output CSV. Pls be warned that there's a LOT of data - about 1.2GB if it's uncompressed.
                    Frank, is there a particular reason you want to use CSV? What tool do you plan to use to manipulate the data? The database is fairly relational.

                    Comment

                    • Derakon
                      Prophet
                      • Dec 2009
                      • 9022

                      #40
                      I'd guess he's planning to import it into Excel or some other spreadsheet program.

                      Comment

                      • ChodTheWacko
                        Adept
                        • Jul 2007
                        • 155

                        #41
                        Originally posted by myshkin
                        Frank, is there a particular reason you want to use CSV? What tool do you plan to use to manipulate the data? The database is fairly relational.
                        I actually work for an open source database company so I'd really prefer to use my own product. Not to mention, I'm more familiar with it so the idea of doing something more ambitious appeals to me. For example, setting up a web page so you can run whatever the hell kind of query you feel like against the data.

                        It's not so much CSV, it's just a more portable data format.

                        - Frank
                        Last edited by ChodTheWacko; July 1, 2011, 05:37.

                        Comment

                        • myshkin
                          Angband Devteam member
                          • Apr 2007
                          • 334

                          #42
                          Originally posted by ChodTheWacko
                          I actually work for an open source database company so I'd really prefer to use my own product. Not to mention, I'm more familiar with it so the idea of doing something more ambitious appeals to me. For example, setting up a web page so you can run whatever the hell kind of query you feel like against the data.

                          It's not so much CSV, it's just a more portable data format.

                          - Frank
                          I'd just generate the sqlite database and then dump to SQL, unless your database is not a SQLish one. If you really want, though, you can modify the stats code to call your database's API instead. If it's demonstrably better, we'd probably accept patches.

                          Comment

                          • Magnate
                            Angband Devteam member
                            • May 2007
                            • 5110

                            #43
                            Originally posted by ChodTheWacko
                            I actually work for an open source database company so I'd really prefer to use my own product. Not to mention, I'm more familiar with it so the idea of doing something more ambitious appeals to me. For example, setting up a web page so you can run whatever the hell kind of query you feel like against the data.
                            We already have that - but perhaps you mean for people to generate queries without using SQL? That would be extremely cool, if you can come up with some sort of query interface. I would definitely put that on my site for people too.
                            "Been away so long I hardly knew the place, gee it's good to be back home" - The Beatles

                            Comment

                            • ChodTheWacko
                              Adept
                              • Jul 2007
                              • 155

                              #44
                              Originally posted by Magnate
                              We already have that - but perhaps you mean for people to generate queries without using SQL? That would be extremely cool, if you can come up with some sort of query interface. I would definitely put that on my site for people too.
                              Yea, some kind of form, not raw SQL (which can take forever to run if you don't have the appropriate indexes for your query). I don't know when I have the time to do this, but it would be a fun project.

                              I'll probably just download/build/dump the stats on a linux machine at work, then export it to whever. Probably overall easier than getting it all to work on windows. Thanks for the suggestion, guys.

                              - Frank

                              Comment

                              • ehertlein
                                Scout
                                • Aug 2007
                                • 40

                                #45
                                I am having a real issue getting the latest code to build with Visual Studio Express 2010. Anyone out there having any luck?

                                I am trying to build from the command line with nmake /F Makefile.nmake

                                Comment

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