diff --git a/Azaion.Inference/build_inference.cmd b/Azaion.Inference/build_inference.cmd index 2d737f8..f0b14f7 100644 --- a/Azaion.Inference/build_inference.cmd +++ b/Azaion.Inference/build_inference.cmd @@ -1,5 +1,8 @@ echo Build Cython app -pushd %~dp0 +set CURRENT_DIR=%cd% + +REM Change to the parent directory of the current location +cd /d %~dp0.. echo remove dist folder: if exist dist rmdir dist /s /q @@ -60,4 +63,4 @@ robocopy "dist\azaion-inference\_internal" "..\dist-azaion\_internal" "security. robocopy "dist\azaion-inference\_internal" "..\dist-dlls\_internal" /E /MOVE robocopy "dist\azaion-inference" "..\dist-azaion" "azaion-inference.exe" /E /MOVE -popd \ No newline at end of file +cd /d %CURRENT_DIR% diff --git a/build/build_dotnet.cmd b/build/build_dotnet.cmd index efc800f..70b7729 100644 --- a/build/build_dotnet.cmd +++ b/build/build_dotnet.cmd @@ -1,5 +1,6 @@ echo Build .net app -pushd %~dp0.. +set CURRENT_DIR=%cd% +cd /d %~dp0.. dotnet build -c Release @@ -24,4 +25,4 @@ robocopy "dist" "dist-dlls" /E /MOVE echo Copy ico copy logo.ico dist-azaion\ -popd \ No newline at end of file +cd /d %CURRENT_DIR% \ No newline at end of file diff --git a/build/download_models.cmd b/build/download_models.cmd index f43a5dc..d6cc6c9 100644 --- a/build/download_models.cmd +++ b/build/download_models.cmd @@ -1,5 +1,8 @@ echo Download onnx model -pushd %~dp0 +set CURRENT_DIR=%cd% + +REM Change to the parent directory of the current location +cd /d %~dp0.. if not exist cdn_manager.exe ( echo Install cdn_manager @@ -8,4 +11,4 @@ if not exist cdn_manager.exe ( call cdn_manager.exe download models move models ..\dist-dlls\ -popd \ No newline at end of file +cd /d %CURRENT_DIR% diff --git a/build/init.cmd b/build/init.cmd index fafef12..56e0250 100644 --- a/build/init.cmd +++ b/build/init.cmd @@ -1,12 +1,22 @@ echo Make dirs, copy init dlls -pushd %~dp0.. +REM Save the current directory +set CURRENT_DIR=%cd% +REM Change to the parent directory of the current location +cd /d %~dp0.. + +REM Remove and recreate the dist-dlls and dist-azaion directories if exist dist-dlls rmdir dist-dlls /s /q mkdir dist-dlls if exist dist-azaion rmdir dist-azaion /s /q mkdir dist-azaion echo Copying shared libs + +REM Copy the shared libs from the source location to dist-dlls robocopy "C:\\share" "dist-dlls" "*" -popd \ No newline at end of file +REM Return to the original directory +cd /d %CURRENT_DIR% + +echo Init script completed.