buildable for v1.13.4
This commit is contained in:
parent
28747b538a
commit
d4c8ad8b95
3
.gitignore
vendored
3
.gitignore
vendored
@ -1,3 +1,4 @@
|
|||||||
.directory
|
.directory
|
||||||
/build
|
/build
|
||||||
release*
|
/image/*
|
||||||
|
/patchwork
|
||||||
|
49
Makefile
49
Makefile
@ -1,31 +1,36 @@
|
|||||||
all: patch/tree/map/definition.csv
|
all: patch/tree/map/definition.csv
|
||||||
|
|
||||||
|
# patch
|
||||||
VANILLA_SRC ?= ../vanilla
|
VANILLA_SRC ?= ../vanilla
|
||||||
|
patchwork/map/definition.csv: $(VANILLA_SRC)/map/definition.csv patches/map_definition.patch
|
||||||
|
mkdir -p $(@D)
|
||||||
|
patch -u --binary -N -o $@ $^
|
||||||
|
|
||||||
patch/tree patch/work:
|
#build
|
||||||
mkdir $@
|
raw_requsites := src/*
|
||||||
patch/tree/map: patch/tree
|
patched_requisites := patchwork/map/definition.csv
|
||||||
mkdir $@
|
|
||||||
patch/work/map_definition.csv: $(VANILLA_SRC)/map/definition.csv | patch/work
|
|
||||||
cp -v $< $@
|
|
||||||
patch/tree/map/definition.csv: patch/work/map_definition.csv patch/patches/map_definition.patch | patch/tree/map
|
|
||||||
patch -u --binary -N $^
|
|
||||||
cp -v $< $@
|
|
||||||
|
|
||||||
clean:
|
|
||||||
rm -rf patch/tree patch/work release.zip build
|
|
||||||
|
|
||||||
release: build release.zip
|
|
||||||
build:
|
build:
|
||||||
mkdir $@
|
mkdir $@
|
||||||
|
release: build/release.zip
|
||||||
|
|
||||||
raw_requsites := common descriptor.mod gfx history interface localisation
|
build/release.zip: src/* $(patched_requisites) | build
|
||||||
patched_requisites := patch/tree/map
|
cd src && zip -r ../build/$(@F) ./
|
||||||
build/randchgs: $(raw_requsites) $(patched_requisites) | build
|
cd patchwork && zip -r ../build/$(@F) ./
|
||||||
|
|
||||||
|
# install
|
||||||
|
DESTDIR ?= image
|
||||||
|
MODNAME ?= randchgs
|
||||||
|
MODPATH ?= C:/Users/User/Documents/Paradox Interactive/Hearts of Iron IV/mod/randchgs
|
||||||
|
install: $(DESTDIR)/$(MODNAME).mod | $(DESTDIR)/$(MODNAME)
|
||||||
|
$(DESTDIR)/$(MODNAME) $(DESTDIR):
|
||||||
mkdir -p $@
|
mkdir -p $@
|
||||||
cp -r -t $@ $(raw_requsites)
|
$(DESTDIR)/$(MODNAME)/descriptor.mod: build/release.zip | $(DESTDIR)/$(MODNAME)
|
||||||
cp -r -t $@ $(patched_requisites)
|
cd $| && unzip -o $(abspath build/release.zip)
|
||||||
|
$(DESTDIR)/$(MODNAME).mod: $(DESTDIR)/$(MODNAME)/descriptor.mod
|
||||||
|
cp $< $@
|
||||||
|
printf '\n%s\n' 'path="$(MODPATH)/$(MODNAME)"' >> $@
|
||||||
|
|
||||||
release.zip: build/randchgs
|
#clean
|
||||||
zip -r $@ build
|
clean:
|
||||||
.PHONY: all release clean
|
rm -rf patchwork build image
|
||||||
|
.PHONY: all release clean patch install
|
||||||
|
2
patch/.gitignore
vendored
2
patch/.gitignore
vendored
@ -1,2 +0,0 @@
|
|||||||
/work
|
|
||||||
/tree
|
|
BIN
patches/terrain.bmp
Normal file
BIN
patches/terrain.bmp
Normal file
Binary file not shown.
After Width: | Height: | Size: 11 MiB |
Loading…
Reference in New Issue
Block a user