Fixed bug where negative consts were not valid slang, revised build script to build the workshop folder to the release folder.

This commit is contained in:
2025-12-06 19:56:05 -07:00
parent d6548502cd
commit 0ea58e4921
7 changed files with 104 additions and 4 deletions

View File

@@ -5,6 +5,7 @@ set -e
RUST_DIR="rust_compiler"
CSHARP_DIR="csharp_mod"
RELEASE_DIR="release"
METADATA_DIR="ModData"
export RUSTFLAGS="--remap-path-prefix=${PWD}=. --remap-path-prefix=${HOME}/.cargo=~/.cargo"
@@ -39,9 +40,13 @@ echo "--------------------"
RUST_WIN_EXE="$RUST_DIR/target/x86_64-pc-windows-gnu/release/slang.exe"
RUST_WIN_DLL="$RUST_DIR/target/x86_64-pc-windows-gnu/release/slang.dll"
RUST_LINUX_BIN="$RUST_DIR/target/x86_64-unknown-linux-gnu/release/slang"
CHARP_DLL="$CSHARP_DIR/bin/Release/net48/StationeersSlang.dll"
CSHARP_DLL="$CSHARP_DIR/bin/Release/net48/StationeersSlang.dll"
# Remove the release directory if it exists so we have a fresh build dir
if [[ -d "$RELEASE_DIR" ]]; then
rm -rd "$RELEASE_DIR"
fi
# Check if the release dir exists, if not: create it.
if [[ ! -d "$RELEASE_DIR" ]]; then
mkdir "$RELEASE_DIR"
fi
@@ -51,6 +56,9 @@ cp "$RUST_WIN_EXE" "$RELEASE_DIR/slang.exe"
# This is the linux executable
cp "$RUST_LINUX_BIN" "$RELEASE_DIR/slang"
# This is the DLL mod itself
cp "$CHARP_DLL" "$RELEASE_DIR/StationeersSlang.dll"
cp "$CSHARP_DLL" "$RELEASE_DIR/StationeersSlang.dll"
# This is the rust-only compiler for use in injecting into the mod
cp "$RUST_WIN_DLL" "$RELEASE_DIR/rust_slang.dll"
# This is the whole bundled workshop release version of the mod
cp -r "$METADATA_DIR" "$RELEASE_DIR/workshop"
cp "$CSHARP_DLL" "$RELEASE_DIR/workshop/StationeersSlang.dll"