NavisworksTransport/deploy-plugin.bat
2026-03-19 09:45:44 +08:00

27 lines
732 B
Batchfile

@echo off
setlocal
:: Stop Navisworks to release locked plugin DLLs.
taskkill /F /IM Roamer.exe 2>nul
if %errorlevel% == 0 (
echo Navisworks process terminated.
timeout /t 1 /nobreak >nul
)
set "TARGET_DIR=%PROGRAMDATA%\Autodesk\Navisworks Manage 2026\plugins\TransportPlugin"
set "BUILD_DIR=bin\x64\Release"
if not exist "%TARGET_DIR%" mkdir "%TARGET_DIR%"
copy "%BUILD_DIR%\*.dll" "%TARGET_DIR%\" >nul
echo Plugin DLLs deployed.
:: Copy bundled resources.
if exist "%BUILD_DIR%\resources" (
if not exist "%TARGET_DIR%\resources" mkdir "%TARGET_DIR%\resources"
xcopy "%BUILD_DIR%\resources\*" "%TARGET_DIR%\resources\" /E /I /Y /Q >nul
echo Resources folder deployed.
)
echo Plugin deployed successfully!