Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 24 additions & 0 deletions BuildNosman.bat
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
@echo off
setlocal

:: Configuration
set PROJECT_DIR=Toolchain\nosman
set OUTPUT_NAME=nodos.exe
set BIN_NAME=nosman.exe

pushd %PROJECT_DIR%

echo Building
cargo build --release
if %ERRORLEVEL% neq 0 (
echo.
echo [ERROR] Build failed. Please check your Rust code.
popd
exit /b %ERRORLEVEL%
)

popd
move /y "%PROJECT_DIR%\target\release\%BIN_NAME%" ".\%OUTPUT_NAME%"

echo.
echo Success
37 changes: 37 additions & 0 deletions BuildNosman.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
#!/bin/bash

# Configuration
PROJECT_DIR="Toolchain/nosman"
OUTPUT_NAME="nodos"
BIN_NAME="nosman"

# Navigate to the project directory
if ! cd "$PROJECT_DIR"; then
echo "[ERROR] Could not find directory $PROJECT_DIR"
exit 1
fi

echo "Building"
cargo build --release
if [ $? -ne 0 ]; then
echo ""
echo "[ERROR] Build failed. Please check your Rust code."
exit 1
fi

# Move back to the original root directory and move the file
cd - > /dev/null

# Remove the old file first to prevent "same file" warnings/errors
if [ -f "./$OUTPUT_NAME" ]; then
rm -f "./$OUTPUT_NAME"
fi

# Move the new binary
mv "$PROJECT_DIR/target/release/$BIN_NAME" "./$OUTPUT_NAME"

# Ensure the new binary is executable
chmod +x "./$OUTPUT_NAME"

echo ""
echo "Success"