Add a first-party MDL mod-build system and reorganize modding/ under src/
modding/mods/ holds message edits as plain JSON (type, index, language, plus only the changed fields - a long body can live in a sibling .txt to avoid escaping in JSON), so mod authoring is reviewable in git instead of living only in hacked's GUI. mdlp (modding/src/mdlp/, its own Docker image mdlp-image/) turns them into the same mod folder/zip hacked's own Save produces, reusing hacked's ss1/edit, ss1/world and ss1/content/text packages via a go.mod replace - no GUI/GLFW/GTK needed. `make mods` builds every mod into dist/mods/<name>/, scoped per-mod so it never touches hacked's own build output; `make` (no target) now builds both. Fixes a bug this surfaced: hacked's FileLocation.AbsolutePathFrom silently writes into the current directory instead of the given output folder when passed a relative path (the GUI never hits this since its folder picker is always absolute) - mdlp now resolves its own paths up front. res/run-mods.sh/.bat are new companion launchers to run.sh/.bat: they pass every dist/mods/*/mod folder to the engine as a separate absolute argument, since ProcessModDirectory() only scans one directory level deep. Wired into `make dist`/`dist-win` only, not the release archives. modding/hacked/, its patches, sqweek-dialog/, its patches, and the new mdlp/ move under modding/src/, separating source from the surrounding Docker/script scaffolding; all path references updated to match. NOTICE.txt gains a section for hacked's distributed build, listing hacked (New BSD), sqweek/dialog (ISC - corrected from a wrong "New BSD" note), and hacked's other direct Go dependencies.
This commit is contained in:
+22
-3
@@ -1,16 +1,24 @@
|
||||
# Builds the modding subproject - see README.md.
|
||||
#
|
||||
# Targets:
|
||||
# all (default) - alias for `hacked`.
|
||||
# all (default) - `hacked` and `mods`.
|
||||
# build-image - builds the hacked-build-image Docker image
|
||||
# (./hacked-build-image.sh). Only needed once, or after
|
||||
# hacked-build-image/ or hacked/go.mod|go.sum changes.
|
||||
# hacked - compiles hacked/ for Linux and Windows via that image,
|
||||
# offline. Output lands in dist/.
|
||||
# mdlp-image - builds the mdlp-image Docker image (./mdlp-image.sh).
|
||||
# Only needed once, or after mdlp-image/ or
|
||||
# mdlp/go.mod|go.sum changes.
|
||||
# mods - builds every mod under mods/ via that image, offline.
|
||||
# Set MODS="name1 name2" to build only those. Output
|
||||
# lands in dist/mods/.
|
||||
# clean - removes dist/.
|
||||
.PHONY: all build-image hacked clean
|
||||
.PHONY: all build-image hacked mdlp-image mods clean
|
||||
|
||||
all: hacked
|
||||
export MODS
|
||||
|
||||
all: hacked mods
|
||||
|
||||
build-image:
|
||||
./hacked-build-image.sh
|
||||
@@ -26,5 +34,16 @@ hacked:
|
||||
./hacked-build-run-image.sh; \
|
||||
fi
|
||||
|
||||
mdlp-image:
|
||||
./mdlp-image.sh
|
||||
|
||||
# Same already-in-the-image shortcut as `hacked` above, for MDLP_IMAGE.
|
||||
mods:
|
||||
@if [ -n "$$MDLP_IMAGE" ]; then \
|
||||
bash mdlp-image/process-mods.sh; \
|
||||
else \
|
||||
./mdlp-run-image.sh; \
|
||||
fi
|
||||
|
||||
clean:
|
||||
rm -rf dist
|
||||
|
||||
Reference in New Issue
Block a user