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
|
||||
/build
|
||||
release*
|
||||
/image/*
|
||||
/patchwork
|
||||
|
49
Makefile
49
Makefile
@ -1,31 +1,36 @@
|
||||
all: patch/tree/map/definition.csv
|
||||
|
||||
# patch
|
||||
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:
|
||||
mkdir $@
|
||||
patch/tree/map: patch/tree
|
||||
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
|
||||
raw_requsites := src/*
|
||||
patched_requisites := patchwork/map/definition.csv
|
||||
build:
|
||||
mkdir $@
|
||||
release: build/release.zip
|
||||
|
||||
raw_requsites := common descriptor.mod gfx history interface localisation
|
||||
patched_requisites := patch/tree/map
|
||||
build/randchgs: $(raw_requsites) $(patched_requisites) | build
|
||||
build/release.zip: src/* $(patched_requisites) | build
|
||||
cd src && zip -r ../build/$(@F) ./
|
||||
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 $@
|
||||
cp -r -t $@ $(raw_requsites)
|
||||
cp -r -t $@ $(patched_requisites)
|
||||
$(DESTDIR)/$(MODNAME)/descriptor.mod: build/release.zip | $(DESTDIR)/$(MODNAME)
|
||||
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
|
||||
zip -r $@ build
|
||||
.PHONY: all release clean
|
||||
#clean
|
||||
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