Angband.oook.cz
Angband.oook.cz
AboutVariantsLadderForumCompetitionComicScreenshotsFunniesLinks

Go Back   Angband Forums > Angband > Development

Reply
 
Thread Tools Display Modes
Old January 9, 2023, 05:24   #1
10v24
Rookie
 
10v24's Avatar
 
Join Date: Feb 2018
Posts: 12
10v24 is on a distinguished road
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)
10v24 is offline   Reply With Quote
Old January 9, 2023, 14:27   #2
backwardsEric
Swordsman
 
Join Date: Aug 2019
Posts: 349
backwardsEric is on a distinguished road
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).
backwardsEric is offline   Reply With Quote
Old January 9, 2023, 17:03   #3
fph
Veteran
 
Join Date: Apr 2009
Location: Pisa / DL0
Posts: 1,023
fph is on a distinguished road
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.
--
You read a scroll labeled 'lol gtfo' of Teleport Level.
fph is offline   Reply With Quote
Old January 9, 2023, 20:12   #4
Nick
Vanilla maintainer
 
Nick's Avatar
 
Join Date: Apr 2007
Location: Canberra, Australia
Age: 57
Posts: 9,481
Donated: $60
Nick will become famous soon enoughNick will become famous soon enough
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.
Nick is offline   Reply With Quote
Old January 11, 2023, 04:02   #5
10v24
Rookie
 
10v24's Avatar
 
Join Date: Feb 2018
Posts: 12
10v24 is on a distinguished road
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)
10v24 is offline   Reply With Quote
Old January 11, 2023, 12:20   #6
backwardsEric
Swordsman
 
Join Date: Aug 2019
Posts: 349
backwardsEric is on a distinguished road
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.
backwardsEric is offline   Reply With Quote
Old January 13, 2023, 00:34   #7
10v24
Rookie
 
10v24's Avatar
 
Join Date: Feb 2018
Posts: 12
10v24 is on a distinguished road
Okay, thanks everyone for the advice, I got it to compile finally, and packaged.
__________________
angband-tr (10v24.net/ang)
10v24 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
Making player status effects less binary Nick Vanilla 23 May 6, 2019 11:23
Composband 7.0.3 binary release Gwarl Variants 27 March 12, 2018 00:45
Make Angband Harder ! Sky Vanilla 7 October 4, 2017 19:22
Trying to make ego lights for Angband 2.9.3 Hajo Development 7 September 1, 2010 09:27
Universal Binary? fyonn Vanilla 11 August 7, 2007 02:29


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


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