How to make a binary release of Angband 4.1.0

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • 10v24
    Rookie
    • Feb 2018
    • 12

    How to make a binary release of Angband 4.1.0

    I made a kind of variant of Angband 4.1.0 (see 10v24.net/ang) a few years ago and never made a Windows binary of it. Now I have a Windows 8.1 computer and have installed msys2 and so on, and want to make a Windows binary that people can download.

    In ./configure, there are three options for installation: shared scorefile (like on old fashioned Unix server), private directory, and "with no install". Each option sets a different path or paths for game data, etc. From the output of ./configure, it looks like the path is always to something particular to my computer. Is there a graceful way to have it have a relative path, so that it would work wherever the user installed it? I assume that when the developers make a binary for distribution, they have some way to make it work that way.
    angband-tr (10v24.net/ang)
  • backwardsEric
    Knight
    • Aug 2019
    • 531

    #2
    Does running this in the top-level directory,

    Code:
    ./configure --enable-win --disable-curses --disable-x11
    make
    cp src/angband.exe .
    cp src/win/dll/*.dll .
    scripts/pkg_win name_you_want_for_release_here
    , work within the MSYS2 environment? That's intended to build the Win32 front end. The Win32 front end sets the paths to be the directory where the executable is plus "\lib" and does not use the DEFAULT_LIB_PATH, DEFAULT_CONFIG_PATH, and DEFAULT_DATA_PATH preprocessor macros set by the configure script (or src/config.h if not using that script).

    Comment

    • fph
      Veteran
      • Apr 2009
      • 1030

      #3
      If you use git, the fastest way to a Windows release might be copying Vanilla's github workflows to cross-compile to Windows.
      --
      Dive fast, die young, leave a high-CHA corpse.

      Comment

      • Nick
        Vanilla maintainer
        • Apr 2007
        • 9647

        #4
        IIRC the simple way to compile on Windows is
        Code:
        cd src
        MINGW=yes make -f Makefile.win
        which leaves you with a binary in the src directory.

        Then doing
        Code:
        cd ..
        cp src/angband.exe .
        cp src/win/dll/*.dll .
        scripts/pkg_win name_you_want_for_release_here
        as in Eric's solution should do the packaging.
        One for the Dark Lord on his dark throne
        In the Land of Mordor where the Shadows lie.

        Comment

        • 10v24
          Rookie
          • Feb 2018
          • 12

          #5
          Thanks for the advice. I now have the problem that when I compile, ld.exe says that some things in mon-blows.h are multiply defined, as though mon-blows.h is included multiple times, perhaps, and this prevents linking from completing. I do see that mon-blows.h includes monster.h, which includes mon-blows.h, which is circular, but this shouldn't be a problem since conditional compilation is used. I have successfully compiled this project in Linux, so I'm guessing maybe there's some difference between the preprocessor (or linker?) in my Linux gcc and my MingW.

          I'm wondering if I supplied the right flag to MingW, that would fix it (something like std=c99? which is already set by default).
          angband-tr (10v24.net/ang)

          Comment

          • backwardsEric
            Knight
            • Aug 2019
            • 531

            #6
            That's a problem from Angband 4.1.0, which you'd also see if compiling 4.1.0 on versions of Linux from the past 3 years or so (certainly happens with Debian 11 and its packaged versions of gcc and ld). See https://github.com/angband/angband/c...106f679b7845c2 for the fix: modify src/mon-blows.h to add extern to the declarations for blow_methods and blow_effects.

            Comment

            • 10v24
              Rookie
              • Feb 2018
              • 12

              #7
              Okay, thanks everyone for the advice, I got it to compile finally, and packaged.
              angband-tr (10v24.net/ang)

              Comment

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