diff --git a/mod.config b/mod.config index f4c362d..df47276 100644 --- a/mod.config +++ b/mod.config @@ -86,6 +86,10 @@ PACKAGING_WINDOWS_REGISTRY_KEY="OpenRAExampleMod" # The git tag to use for the AppImage dependencies. PACKAGING_APPIMAGE_DEPENDENCIES_TAG="20180408" +# Space delimited list of additional files/directories to copy from the engine directory +# when packaging your mod. e.g. "./mods/modcontent" or "./mods/d2k/OpenRA.Mods.D2k.dll" +PACKAGING_COPY_ENGINE_FILES="" + ############################################################################## # Advanced Configuration # diff --git a/packaging/linux/buildpackage.sh b/packaging/linux/buildpackage.sh index d4efa9a..c1a3bc3 100755 --- a/packaging/linux/buildpackage.sh +++ b/packaging/linux/buildpackage.sh @@ -64,6 +64,11 @@ make core SDK="-sdk:4.5" make install-engine prefix="usr" DESTDIR="${BUILTDIR}/" make install-common-mod-files prefix="usr" DESTDIR="${BUILTDIR}/" +for f in ${PACKAGING_COPY_ENGINE_FILES}; do + mkdir -p "${BUILTDIR}/usr/lib/openra/$(dirname "${f}")" + cp -r "${f}" "${BUILTDIR}/usr/lib/openra/${f}" +done + popd > /dev/null popd > /dev/null diff --git a/packaging/osx/buildpackage.sh b/packaging/osx/buildpackage.sh index 08a9a09..2c4a142 100755 --- a/packaging/osx/buildpackage.sh +++ b/packaging/osx/buildpackage.sh @@ -75,6 +75,12 @@ make osx-dependencies make core SDK="-sdk:4.5" make install-engine gameinstalldir="/Contents/Resources/" DESTDIR="${BUILTDIR}/OpenRA.app" make install-common-mod-files gameinstalldir="/Contents/Resources/" DESTDIR="${BUILTDIR}/OpenRA.app" + +for f in ${PACKAGING_COPY_ENGINE_FILES}; do + mkdir -p "${BUILTDIR}/OpenRA.app/Contents/Resources/$(dirname "${f}")" + cp -r "${f}" "${BUILTDIR}/OpenRA.app/Contents/Resources/${f}" +done + popd > /dev/null popd > /dev/null diff --git a/packaging/windows/buildpackage.sh b/packaging/windows/buildpackage.sh index 52b8eae..01f5279 100755 --- a/packaging/windows/buildpackage.sh +++ b/packaging/windows/buildpackage.sh @@ -63,6 +63,12 @@ make windows-dependencies make core SDK="-sdk:4.5" make install-engine gameinstalldir="" DESTDIR="${BUILTDIR}" make install-common-mod-files gameinstalldir="" DESTDIR="${BUILTDIR}" + +for f in ${PACKAGING_COPY_ENGINE_FILES}; do + mkdir -p "${BUILTDIR}/$(dirname "${f}")" + cp -r "${f}" "${BUILTDIR}/${f}" +done + popd > /dev/null popd > /dev/null