Permalink
Browse files

Change: Always build baseset metadata, instead of including it in the…

… repo.

This adds a script and project files to generate these files within MSVC.
  • Loading branch information...
PeterN committed Jan 13, 2019
1 parent e76fd99 commit 1334cfb3e5fd13fb51dc9cbf0690f55f5a57c4bf
@@ -42,11 +42,22 @@ MD5SUM := $(shell [ "$(OS)" = "OSX" ] && echo "md5 -r" || echo "md5sum")
NFO_FILES := $(GRF_DIR)/*.nfo $(GRF_DIR)/rivers/*.nfo
PNG_FILES := $(GRF_DIR)/*.png $(GRF_DIR)/rivers/*.png

# List of target files.
OBT_FILES := $(BIN_DIR)/orig_dos.obg
OBT_FILES += $(BIN_DIR)/orig_dos_de.obg
OBT_FILES += $(BIN_DIR)/orig_win.obg
OBT_FILES += $(BIN_DIR)/orig_dos.obs
OBT_FILES += $(BIN_DIR)/orig_win.obs
OBT_FILES += $(BIN_DIR)/no_sound.obs
OBT_FILES += $(BIN_DIR)/orig_dos.obm
OBT_FILES += $(BIN_DIR)/orig_win.obm
OBT_FILES += $(BIN_DIR)/no_music.obm
OBT_FILES += $(BIN_DIR)/orig_tto.obm

# Build the GRF.
all: $(OBT_FILES)
ifdef GRFCODEC
all: $(BIN_DIR)/openttd.grf $(BIN_DIR)/orig_extra.grf $(BIN_DIR)/orig_dos.obg $(BIN_DIR)/orig_dos_de.obg $(BIN_DIR)/orig_win.obg $(BIN_DIR)/orig_dos.obs $(BIN_DIR)/orig_win.obs $(BIN_DIR)/no_sound.obs $(BIN_DIR)/orig_win.obm $(BIN_DIR)/no_music.obm
else
all:
all: $(BIN_DIR)/openttd.grf $(BIN_DIR)/orig_extra.grf
endif

$(OBJS_DIR)/langfiles.tmp: $(LANG_DIR)/*.txt
@@ -67,6 +78,10 @@ $(BIN_DIR)/%.obm: $(BASESET_DIR)/%.obm $(OBJS_DIR)/langfiles.tmp $(BASESET_DIR)/
$(E) '$(STAGE) Updating $(notdir $@)'
$(Q) awk -v langfiles='$(OBJS_DIR)/langfiles.tmp' -f $(BASESET_DIR)/translations.awk $< >$@

# Guard against trying to run GRFCODEC/NFORENUM without either being set.
ifdef GRFCODEC
ifdef NFORENUM

# Compile extra grf
$(BIN_DIR)/openttd.grf: $(PNG_FILES) $(NFO_FILES) $(GRF_DIR)/assemble_nfo.awk
$(E) '$(STAGE) Assembling openttd.nfo'
@@ -89,9 +104,12 @@ $(BIN_DIR)/orig_extra.grf: $(PNG_FILES) $(NFO_FILES) $(GRF_DIR)/assemble_nfo.awk
$(Q) $(GRFCODEC) -n -s -e -p1 $(OBJS_DIR)/orig_extra.grf
$(Q)cp $(OBJS_DIR)/orig_extra.grf $(BIN_DIR)/orig_extra.grf

endif
endif

# Clean up temporary files.
clean:
$(Q)rm -f *.bak *.grf
$(Q)rm -f *.bak *.grf $(OBT_FILES)

# Clean up temporary files
mrproper: clean

This file was deleted.

Oops, something went wrong.

This file was deleted.

Oops, something went wrong.

This file was deleted.

Oops, something went wrong.

This file was deleted.

Oops, something went wrong.
Oops, something went wrong.

0 comments on commit 1334cfb

Please sign in to comment.