Ticket #46134

3.1 Mac Meson build client bug

Eröffnet am: 2022-11-28 13:42 Letztes Update: 2022-12-04 17:58

Auswertung:
Verantwortlicher:
Typ:
Status:
Geschlossen
Komponente:
Meilenstein:
Priorität:
5 - Mittel
Schweregrad:
5 - Mittel
Lösung:
Gefixt
Datei:
2

Details

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.

Ticket-Verlauf (3/8 Historien)

2022-11-28 13:42 Aktualisiert von: ddeanbrown
  • New Ticket "3.1 Mac Meson build client bug" created
2022-11-28 13:49 Aktualisiert von: cazfi
Kommentar

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?

2022-11-28 14:08 Aktualisiert von: cazfi
Kommentar

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

2022-11-29 05:09 Aktualisiert von: cazfi
  • Verantwortlicher Update from (Keine) to cazfi
  • Lösung Update from Keine to Accepted
Kommentar

Attached patches fix the macro in fc_config.h for me.

2022-11-29 11:48 Aktualisiert von: ddeanbrown
Kommentar

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.

2022-12-04 17:58 Aktualisiert von: cazfi
  • Status Update from Offen to Geschlossen
  • Lösung Update from Accepted to Gefixt

Bearbeiten

Please login to add comment to this ticket » Anmelden