NavisworksTransport/deploy-plugin.bat

23 lines
749 B
Batchfile
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

@echo off
:: 如果 Navisworks 正在运行,关闭它以释放 DLL 锁定
taskkill /F /IM Roamer.exe 2>nul
if %errorlevel% == 0 (
echo Navisworks process terminated.
timeout /t 1 /nobreak >nul
)
set "TARGET_DIR=C:\ProgramData\Autodesk\Navisworks Manage 2026\plugins\NavisworksTransportPlugin"
if not exist "%TARGET_DIR%" mkdir "%TARGET_DIR%"
copy "bin\x64\Release\NavisworksTransportPlugin.dll" "%TARGET_DIR%\" >nul
:: 复制resources文件夹包含chart.js等本地资源
if exist "bin\x64\Release\resources" (
if not exist "%TARGET_DIR%\resources" mkdir "%TARGET_DIR%\resources"
copy "bin\x64\Release\resources\*" "%TARGET_DIR%\resources\" >nul
echo Resources folder deployed.
)
echo Plugin deployed successfully!