windows build script, runtime impl
This commit is contained in:
18
build.sh
18
build.sh
@@ -4,25 +4,25 @@
|
||||
set -e
|
||||
|
||||
# Configuration
|
||||
GODOT_PROJECT="../minekoloft" # relative path to Godot project
|
||||
LIB_NAME="fastvoxel" # your library name
|
||||
GODOT_PROJECT="../minekoloft"
|
||||
LIB_NAME="fastvoxel"
|
||||
DEST_LINUX="$GODOT_PROJECT/addons/fastvoxel/bin/linux"
|
||||
DEST_WINDOWS="$GODOT_PROJECT/addons/fastvoxel/bin/windows"
|
||||
|
||||
# Build for Linux (native)
|
||||
echo "Building for Linux (native)..."
|
||||
cargo build --release
|
||||
cargo build --release --target x86_64-unknown-linux-gnu
|
||||
# Copy the shared library
|
||||
TMP="$DEST_LINUX/lib${LIB_NAME}.so.tmp"
|
||||
cp "target/release/lib${LIB_NAME}.so" "$TMP"
|
||||
cp "target/x86_64-unknown-linux-gnu/release/lib${LIB_NAME}.so" "$TMP"
|
||||
mv "$TMP" "$DEST_LINUX/lib${LIB_NAME}.so"
|
||||
|
||||
# Optional: Cross compile for Windows (if needed)
|
||||
# Uncomment the following lines if you have the Windows target installed
|
||||
# echo "Building for Windows (cross-compile)..."
|
||||
# cargo build --release --target x86_64-pc-windows-gnu
|
||||
# mkdir -p "$DEST_WINDOWS"
|
||||
# cp "target/x86_64-pc-windows-gnu/release/${LIB_NAME}.dll" "$DEST_WINDOWS/"
|
||||
# echo "Copied to $DEST_WINDOWS"
|
||||
echo "Building for Windows (cross-compile)..."
|
||||
cargo build --release --target x86_64-pc-windows-gnu
|
||||
mkdir -p "$DEST_WINDOWS"
|
||||
cp "target/x86_64-pc-windows-gnu/release/${LIB_NAME}.dll" "$DEST_WINDOWS/"
|
||||
echo "Copied to $DEST_WINDOWS"
|
||||
|
||||
echo "Done."
|
||||
@@ -2,6 +2,14 @@ use std::collections::HashMap;
|
||||
|
||||
use crate::{chunk::Chunk, runtime::types::WorldConfig};
|
||||
|
||||
pub enum RuntimeState {
|
||||
Idle,
|
||||
ReadingStorage,
|
||||
Generating,
|
||||
Meshing,
|
||||
SavingToStorage,
|
||||
}
|
||||
|
||||
pub struct Runtime {
|
||||
chunks: HashMap<(i32, i32), Chunk>,
|
||||
// renderer: Renderer,
|
||||
|
||||
Reference in New Issue
Block a user