diff --git a/waterbox/common.mak b/waterbox/common.mak index d872fe637f..b09e7f4388 100644 --- a/waterbox/common.mak +++ b/waterbox/common.mak @@ -2,7 +2,8 @@ WATERBOX_DIR := $(shell dirname $(realpath $(lastword $(MAKEFILE_LIST)))) ROOT_DIR := $(shell dirname $(realpath $(lastword $(filter-out $(lastword $(MAKEFILE_LIST)),$(MAKEFILE_LIST))))) -OUTPUTDLL_DIR := $(realpath $(WATERBOX_DIR)/../output/dll) +OUTPUTDLL_DIR := $(realpath $(WATERBOX_DIR)/../Assets/dll) +OUTPUTDLLCOPY_DIR := $(realpath $(WATERBOX_DIR)/../output/dll) ifeq ($(OUT_DIR),) OUT_DIR := $(ROOT_DIR)/obj endif @@ -94,11 +95,13 @@ $(TARGET_DEBUG): $(DOBJS) $(EMULIBC_DOBJS) $(LINKSCRIPT) install: $(TARGET_RELEASE) @cp -f $< $(OUTPUTDLL_DIR) @gzip --stdout --best $< > $(OUTPUTDLL_DIR)/$(TARGET).gz + @cp $(OUTPUTDLL_DIR)/$(TARGET).gz $(OUTPUTDLLCOPY_DIR)/$(TARGET).gz || true @echo Release build of $(TARGET) installed. install-debug: $(TARGET_DEBUG) @cp -f $< $(OUTPUTDLL_DIR) @gzip --stdout --best $< > $(OUTPUTDLL_DIR)/$(TARGET).gz + @cp $(OUTPUTDLL_DIR)/$(TARGET).gz $(OUTPUTDLLCOPY_DIR)/$(TARGET).gz || true @echo Debug build of $(TARGET) installed. else diff --git a/waterbox/waterboxhost/build-debug-no-dirty-detection.bat b/waterbox/waterboxhost/build-debug-no-dirty-detection.bat index 2460e5c4ef..f385b0af1d 100644 --- a/waterbox/waterboxhost/build-debug-no-dirty-detection.bat +++ b/waterbox/waterboxhost/build-debug-no-dirty-detection.bat @@ -1,2 +1,3 @@ @cargo b --features "no-dirty-detection" +@copy target\debug\waterboxhost.dll ..\..\Assets\dll @copy target\debug\waterboxhost.dll ..\..\output\dll diff --git a/waterbox/waterboxhost/build-debug-no-dirty-detection.sh b/waterbox/waterboxhost/build-debug-no-dirty-detection.sh index 515de9e6f9..a88ce44d7e 100644 --- a/waterbox/waterboxhost/build-debug-no-dirty-detection.sh +++ b/waterbox/waterboxhost/build-debug-no-dirty-detection.sh @@ -1,4 +1,9 @@ #!/bin/sh +if [ -z "$BIZHAWKBUILD_HOME" ]; then export BIZHAWKBUILD_HOME="$(realpath "$(dirname "$0")/../..")"; fi + cargo b --features "no-dirty-detection" -cp target/debug/libwaterboxhost.so ../../Assets/dll -cp target/debug/libwaterboxhost.so ../../output/dll + +cp target/debug/libwaterboxhost.so "$BIZHAWKBUILD_HOME/Assets/dll" +if [ -e "$BIZHAWKBUILD_HOME/output" ]; then + cp target/debug/libwaterboxhost.so "$BIZHAWKBUILD_HOME/output/dll" +fi diff --git a/waterbox/waterboxhost/build-debug.bat b/waterbox/waterboxhost/build-debug.bat index 5b144c9240..02e2fc82f3 100644 --- a/waterbox/waterboxhost/build-debug.bat +++ b/waterbox/waterboxhost/build-debug.bat @@ -1,2 +1,3 @@ @cargo b +@copy target\debug\waterboxhost.dll ..\..\Assets\dll @copy target\debug\waterboxhost.dll ..\..\output\dll diff --git a/waterbox/waterboxhost/build-debug.sh b/waterbox/waterboxhost/build-debug.sh index 5c9bd3ffd2..4db6d725ab 100644 --- a/waterbox/waterboxhost/build-debug.sh +++ b/waterbox/waterboxhost/build-debug.sh @@ -1,4 +1,9 @@ #!/bin/sh +if [ -z "$BIZHAWKBUILD_HOME" ]; then export BIZHAWKBUILD_HOME="$(realpath "$(dirname "$0")/../..")"; fi + cargo b -cp target/debug/libwaterboxhost.so ../../Assets/dll -cp target/debug/libwaterboxhost.so ../../output/dll + +cp target/debug/libwaterboxhost.so "$BIZHAWKBUILD_HOME/Assets/dll" +if [ -e "$BIZHAWKBUILD_HOME/output" ]; then + cp target/debug/libwaterboxhost.so "$BIZHAWKBUILD_HOME/output/dll" +fi diff --git a/waterbox/waterboxhost/build-release.bat b/waterbox/waterboxhost/build-release.bat index e3e9bfd4cd..fa1e00f0b9 100644 --- a/waterbox/waterboxhost/build-release.bat +++ b/waterbox/waterboxhost/build-release.bat @@ -1,2 +1,3 @@ @cargo b --release +@copy target\release\waterboxhost.dll ..\..\Assets\dll @copy target\release\waterboxhost.dll ..\..\output\dll diff --git a/waterbox/waterboxhost/build-release.sh b/waterbox/waterboxhost/build-release.sh index ceb390b395..7940facc97 100644 --- a/waterbox/waterboxhost/build-release.sh +++ b/waterbox/waterboxhost/build-release.sh @@ -1,4 +1,9 @@ #!/bin/sh +if [ -z "$BIZHAWKBUILD_HOME" ]; then export BIZHAWKBUILD_HOME="$(realpath "$(dirname "$0")/../..")"; fi + cargo b --release -cp target/release/libwaterboxhost.so ../../Assets/dll -cp target/release/libwaterboxhost.so ../../output/dll + +cp target/release/libwaterboxhost.so "$BIZHAWKBUILD_HOME/Assets/dll" +if [ -e "$BIZHAWKBUILD_HOME/output" ]; then + cp target/release/libwaterboxhost.so "$BIZHAWKBUILD_HOME/output/dll" +fi