Refactor code structure for improved readability and maintainability
This commit is contained in:
@@ -0,0 +1,37 @@
|
||||
@echo off
|
||||
REM Build AI/Vision dynamic library plugins and copy to plugins directory (Windows)
|
||||
REM Usage: build_and_copy_plugins.bat [debug]
|
||||
|
||||
setlocal enabledelayedexpansion
|
||||
|
||||
set PROFILE=release
|
||||
set CARGO_FLAGS=--release
|
||||
|
||||
if /I "%~1"=="debug" (
|
||||
set PROFILE=debug
|
||||
set CARGO_FLAGS=
|
||||
echo === Compiling plugins in DEBUG mode ===
|
||||
) else (
|
||||
echo === Compiling plugins in RELEASE mode ===
|
||||
)
|
||||
|
||||
set PROJECT_DIR=C:\Projects\hcie-rust-v4
|
||||
set PLUGINS_DIR=%PROJECT_DIR%\plugins
|
||||
mkdir "%PLUGINS_DIR%" 2>nul
|
||||
|
||||
echo === Building AI/Vision dynamic libraries ===
|
||||
|
||||
echo 1. Building hcie-ai...
|
||||
cargo build --manifest-path "%PROJECT_DIR%\hcie-ai\Cargo.toml" %CARGO_FLAGS% --features ffi
|
||||
|
||||
echo 2. Building hcie-vision...
|
||||
cargo build --manifest-path "%PROJECT_DIR%\hcie-vision\Cargo.toml" %CARGO_FLAGS% --features ffi
|
||||
|
||||
REM On Windows, the output would be .dll files
|
||||
REM Adjust the copy commands as needed for your Windows environment
|
||||
copy "%PROJECT_DIR%\target\%PROFILE%\hcie_ai.dll" "%PLUGINS_DIR%\" 2>nul
|
||||
copy "%PROJECT_DIR%\target\%PROFILE%\hcie_vision.dll" "%PLUGINS_DIR%\" 2>nul
|
||||
|
||||
echo ====================================================
|
||||
echo AI/Vision plugins built and copied to %PLUGINS_DIR% in %PROFILE% mode!
|
||||
echo ====================================================
|
||||
Reference in New Issue
Block a user