3.1 Mac Meson build client bug
Reply To ddeanbrown
#define DEFAULT_DATA_PATH ".:data:/3.1:/Applications/Freeciv.app/Contents/share/freeciv"
That "/3.1" component is likely what is supposed to be "~/.freeciv/3.1". Is the autotools fc_config.h otherwise the similar?
Reply To cazfi
Reply To ddeanbrown
#define DEFAULT_DATA_PATH ".:data:/3.1:/Applications/Freeciv.app/Contents/share/freeciv"
That "/3.1" component is likely what is supposed to be "~/.freeciv/3.1". Is the autotools fc_config.h otherwise the similar?
I can reproduce similarly broken fc_config.h
Attached patches fix the macro in fc_config.h for me.
Tested and works for me on Mac. OK to go ahead and commit those patches and close this ticket.
This does also fix the problem I had in https://osdn.net/projects/freeciv/ticket/44549, will update that ticket.
Spun off from my testing in https://osdn.net/projects/freeciv/ticket/44549
The clients built on Mac with Meson fail to find downloaded rulesets in ~/.freeciv/3.1
Clients built with autotools are OK. Maybe *nix Meson builds have the same bug.
I suspect it's something in the chain starting in meson.build has get_option('datadir') and priv_conf_data.set('DEFAULT_DATA_PATH'... , then build/fc_config.h has
#define DEFAULT_DATA_PATH ".:data:/3.1:/Applications/Freeciv.app/Contents/share/freeciv" (which I'm not sure is correct), and then shared.c has
data_dir_names = base_get_dirs(NULL != path ? path : DEFAULT_DATA_PATH);
I was able to work around similar path problems by setting environment variable values for FREECIV_DATA_PATH, FREECIV_SAVE_PATH & FREECIV_SCENARIO_PATH at run time, but not this one. If this one is fixed, might not need to set those environment variables.