Introduce resolve-fallout4-path.bat to centralize locating the Fallout 4 installation. deploy-all.bat and deploy-ui.bat now call the resolver (accept an optional path arg or prompt interactively), and the chosen path is saved to a local .fallout4-path file (added to .gitignore). Updated docs (docs/dev-log.md, plugin/setup.md) to reflect the new behavior and usage examples. The resolver normalizes game or Data paths, probes common Steam locations, prompts the user when needed, and exports F4_DIR and DATA_DIR for callers.
45 lines
1.0 KiB
Batchfile
45 lines
1.0 KiB
Batchfile
@echo off
|
|
setlocal EnableExtensions
|
|
|
|
set "SCRIPT_DIR=%~dp0"
|
|
set "UI_SOURCE=%SCRIPT_DIR%ui\views"
|
|
set "PLUGIN_DLL="
|
|
|
|
call "%SCRIPT_DIR%resolve-fallout4-path.bat" "%~1"
|
|
if errorlevel 1 exit /b 1
|
|
|
|
set "VIEWS_DIR=%DATA_DIR%\PrismaUI_F4\views"
|
|
if not exist "%VIEWS_DIR%" mkdir "%VIEWS_DIR%"
|
|
|
|
echo Copying PrismaUI views...
|
|
xcopy /Y /E /I "%UI_SOURCE%\*" "%VIEWS_DIR%\"
|
|
if errorlevel 1 (
|
|
echo Failed to copy HTML views.
|
|
exit /b 1
|
|
)
|
|
|
|
if not "%~2"=="" (
|
|
set "PLUGIN_DLL=%~2"
|
|
set "PLUGINS_DIR=%DATA_DIR%\F4SE\Plugins"
|
|
if not exist "%PLUGINS_DIR%" mkdir "%PLUGINS_DIR%"
|
|
echo Copying plugin DLL...
|
|
copy /Y "%PLUGIN_DLL%" "%PLUGINS_DIR%\CommonwealthOnline.dll"
|
|
if errorlevel 1 (
|
|
echo Failed to copy plugin DLL.
|
|
exit /b 1
|
|
)
|
|
)
|
|
|
|
echo.
|
|
echo UI deployment complete.
|
|
echo Installed views under:
|
|
echo %VIEWS_DIR%
|
|
echo.
|
|
echo PrismaUI_F4 itself must be installed separately:
|
|
echo Data\F4SE\Plugins\PrismaUI_F4.dll
|
|
echo Data\PrismaUI_F4\libs\*.dll
|
|
echo Data\PrismaUI_F4\resources\
|
|
|
|
endlocal
|
|
exit /b 0
|