Add Fallout 4 path resolver and update deploys
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.
This commit is contained in:
@@ -35,6 +35,9 @@ venv/
|
|||||||
*.log
|
*.log
|
||||||
logs/
|
logs/
|
||||||
|
|
||||||
|
# Local machine Fallout 4 install path (written by resolve-fallout4-path.bat)
|
||||||
|
.fallout4-path
|
||||||
|
|
||||||
# Fallout 4 files
|
# Fallout 4 files
|
||||||
Fallout4.exe
|
Fallout4.exe
|
||||||
Fallout4Launcher.exe
|
Fallout4Launcher.exe
|
||||||
|
|||||||
+2
-12
@@ -2,19 +2,9 @@
|
|||||||
setlocal EnableExtensions
|
setlocal EnableExtensions
|
||||||
|
|
||||||
set "SCRIPT_DIR=%~dp0"
|
set "SCRIPT_DIR=%~dp0"
|
||||||
set "DATA_DIR=%~1"
|
|
||||||
set "F4_DIR=%~2"
|
|
||||||
|
|
||||||
if not defined DATA_DIR set "DATA_DIR=D:\SteamLibrary\steamapps\common\Fallout 4\Data"
|
call "%SCRIPT_DIR%resolve-fallout4-path.bat" "%~1"
|
||||||
if not defined F4_DIR set "F4_DIR=D:\SteamLibrary\steamapps\common\Fallout 4"
|
if errorlevel 1 exit /b 1
|
||||||
|
|
||||||
if not exist "%DATA_DIR%" (
|
|
||||||
echo Fallout 4 Data directory not found:
|
|
||||||
echo %DATA_DIR%
|
|
||||||
echo.
|
|
||||||
echo Usage: deploy-all.bat ["PATH\TO\Fallout 4\Data"] ["PATH\TO\Fallout 4"]
|
|
||||||
exit /b 1
|
|
||||||
)
|
|
||||||
|
|
||||||
set "FRAMEWORK_DIR=%SCRIPT_DIR%ThirdParty\framework-F4-Conversion"
|
set "FRAMEWORK_DIR=%SCRIPT_DIR%ThirdParty\framework-F4-Conversion"
|
||||||
set "PRISMA_DLL="
|
set "PRISMA_DLL="
|
||||||
|
|||||||
+2
-14
@@ -5,20 +5,8 @@ set "SCRIPT_DIR=%~dp0"
|
|||||||
set "UI_SOURCE=%SCRIPT_DIR%ui\views"
|
set "UI_SOURCE=%SCRIPT_DIR%ui\views"
|
||||||
set "PLUGIN_DLL="
|
set "PLUGIN_DLL="
|
||||||
|
|
||||||
if "%~1"=="" (
|
call "%SCRIPT_DIR%resolve-fallout4-path.bat" "%~1"
|
||||||
echo Usage: deploy-ui.bat "PATH\TO\Fallout 4\Data"
|
if errorlevel 1 exit /b 1
|
||||||
echo.
|
|
||||||
echo Copies HTML views to Data\PrismaUI_F4\views\
|
|
||||||
echo Optionally pass a second argument with the plugin DLL path to copy CommonwealthOnline.dll too.
|
|
||||||
exit /b 1
|
|
||||||
)
|
|
||||||
|
|
||||||
set "DATA_DIR=%~1"
|
|
||||||
if not exist "%DATA_DIR%" (
|
|
||||||
echo Data directory not found:
|
|
||||||
echo "%DATA_DIR%"
|
|
||||||
exit /b 1
|
|
||||||
)
|
|
||||||
|
|
||||||
set "VIEWS_DIR=%DATA_DIR%\PrismaUI_F4\views"
|
set "VIEWS_DIR=%DATA_DIR%\PrismaUI_F4\views"
|
||||||
if not exist "%VIEWS_DIR%" mkdir "%VIEWS_DIR%"
|
if not exist "%VIEWS_DIR%" mkdir "%VIEWS_DIR%"
|
||||||
|
|||||||
@@ -7,6 +7,34 @@ failed experiments, successful tests, and next steps.
|
|||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
|
## 2026-06-11 - Portable Fallout 4 Deploy Paths
|
||||||
|
|
||||||
|
### Summary
|
||||||
|
Deploy batch files now prompt for the Fallout 4 install location instead of hardcoding a single machine's Steam library path. The chosen path is saved locally in `.fallout4-path` for later runs.
|
||||||
|
|
||||||
|
### Files Changed
|
||||||
|
- `resolve-fallout4-path.bat` (new)
|
||||||
|
- `deploy-all.bat`
|
||||||
|
- `deploy-ui.bat`
|
||||||
|
- `.gitignore`
|
||||||
|
- `plugin/setup.md`
|
||||||
|
|
||||||
|
### Details
|
||||||
|
- Shared resolver accepts an optional command-line path (game root or `Data` folder)
|
||||||
|
- On first run, tries saved path, common Steam locations, then prompts
|
||||||
|
- `build-all.bat` unchanged; it forwards optional path args to `deploy-all.bat`
|
||||||
|
|
||||||
|
### Testing
|
||||||
|
- Batch scripts not run in this session
|
||||||
|
|
||||||
|
### Known Issues
|
||||||
|
- None currently known
|
||||||
|
|
||||||
|
### Next Steps
|
||||||
|
- Run `deploy-all.bat` on a machine without the old default path and confirm prompting/save behaviour
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
## 2026-06-11 - Ultralight SDK Submodule
|
## 2026-06-11 - Ultralight SDK Submodule
|
||||||
|
|
||||||
### Summary
|
### Summary
|
||||||
|
|||||||
+7
-4
@@ -79,13 +79,16 @@ build-prismaui.bat
|
|||||||
deploy-all.bat
|
deploy-all.bat
|
||||||
```
|
```
|
||||||
|
|
||||||
`deploy-all.bat` defaults to:
|
Or use `build-all.bat` to build and deploy in one step.
|
||||||
|
|
||||||
```text
|
`deploy-all.bat` and `deploy-ui.bat` prompt for your Fallout 4 install folder on first use (or when the saved path is missing). The choice is stored locally in `.fallout4-path` (gitignored). You can still pass a path on the command line:
|
||||||
D:\SteamLibrary\steamapps\common\Fallout 4\Data
|
|
||||||
|
```bat
|
||||||
|
deploy-all.bat "D:\SteamLibrary\steamapps\common\Fallout 4"
|
||||||
|
deploy-ui.bat "D:\SteamLibrary\steamapps\common\Fallout 4\Data"
|
||||||
```
|
```
|
||||||
|
|
||||||
It installs:
|
`deploy-all.bat` installs:
|
||||||
|
|
||||||
* `Data/F4SE/Plugins/PrismaUI_F4.dll`
|
* `Data/F4SE/Plugins/PrismaUI_F4.dll`
|
||||||
* `Data/F4SE/Plugins/CommonwealthOnline.dll`
|
* `Data/F4SE/Plugins/CommonwealthOnline.dll`
|
||||||
|
|||||||
@@ -0,0 +1,116 @@
|
|||||||
|
@echo off
|
||||||
|
REM resolve-fallout4-path.bat [PATH]
|
||||||
|
REM Sets F4_DIR and DATA_DIR for the caller.
|
||||||
|
REM PATH may be the game root or the Data folder. When omitted or invalid, prompts
|
||||||
|
REM the user and saves the choice to .fallout4-path for the next run.
|
||||||
|
setlocal EnableExtensions EnableDelayedExpansion
|
||||||
|
|
||||||
|
set "SCRIPT_DIR=%~dp0"
|
||||||
|
set "CONFIG=%SCRIPT_DIR%.fallout4-path"
|
||||||
|
set "INPUT=%~1"
|
||||||
|
set "F4_DIR="
|
||||||
|
set "DATA_DIR="
|
||||||
|
set "EXPLICIT=0"
|
||||||
|
if defined INPUT set "EXPLICIT=1"
|
||||||
|
|
||||||
|
if defined INPUT call :NormalizePath "!INPUT!"
|
||||||
|
if defined DATA_DIR if exist "!DATA_DIR!" goto :SaveAndDone
|
||||||
|
|
||||||
|
if "!EXPLICIT!"=="1" (
|
||||||
|
echo.
|
||||||
|
echo Path not found or invalid: !INPUT!
|
||||||
|
echo Expected the Fallout 4 folder or its Data subfolder.
|
||||||
|
set "F4_DIR="
|
||||||
|
set "DATA_DIR="
|
||||||
|
goto :PromptLoop
|
||||||
|
)
|
||||||
|
|
||||||
|
if exist "%CONFIG%" (
|
||||||
|
set /p "SAVED=" < "%CONFIG%"
|
||||||
|
call :StripQuotes SAVED
|
||||||
|
if defined SAVED call :NormalizePath "!SAVED!"
|
||||||
|
if defined DATA_DIR if exist "!DATA_DIR!" (
|
||||||
|
echo.
|
||||||
|
echo Saved Fallout 4 path: !F4_DIR!
|
||||||
|
set /p "USE_SAVED=Use this path? [Y/n]: "
|
||||||
|
if /i "!USE_SAVED!"=="" set "USE_SAVED=Y"
|
||||||
|
if /i "!USE_SAVED!"=="Y" goto :SaveAndDone
|
||||||
|
set "F4_DIR="
|
||||||
|
set "DATA_DIR="
|
||||||
|
)
|
||||||
|
)
|
||||||
|
|
||||||
|
for %%P in (
|
||||||
|
"D:\SteamLibrary\steamapps\common\Fallout 4"
|
||||||
|
"%ProgramFiles(x86)%\Steam\steamapps\common\Fallout 4"
|
||||||
|
"C:\Program Files (x86)\Steam\steamapps\common\Fallout 4"
|
||||||
|
"%ProgramFiles%\Steam\steamapps\common\Fallout 4"
|
||||||
|
) do (
|
||||||
|
if exist "%%~P\Data" (
|
||||||
|
echo.
|
||||||
|
echo Found Fallout 4 at: %%~P
|
||||||
|
set /p "USE_FOUND=Use this path? [Y/n]: "
|
||||||
|
if /i "!USE_FOUND!"=="" set "USE_FOUND=Y"
|
||||||
|
if /i "!USE_FOUND!"=="Y" (
|
||||||
|
set "F4_DIR=%%~P"
|
||||||
|
set "DATA_DIR=%%~P\Data"
|
||||||
|
goto :SaveAndDone
|
||||||
|
)
|
||||||
|
)
|
||||||
|
)
|
||||||
|
|
||||||
|
:PromptLoop
|
||||||
|
echo.
|
||||||
|
echo Enter your Fallout 4 installation directory.
|
||||||
|
echo Example: D:\SteamLibrary\steamapps\common\Fallout 4
|
||||||
|
set /p "F4_DIR="
|
||||||
|
if not defined F4_DIR (
|
||||||
|
echo No path entered.
|
||||||
|
exit /b 1
|
||||||
|
)
|
||||||
|
call :StripQuotes F4_DIR
|
||||||
|
if "!F4_DIR:~-1!"=="\" set "F4_DIR=!F4_DIR:~0,-1!"
|
||||||
|
set "DATA_DIR=!F4_DIR!\Data"
|
||||||
|
if not exist "!DATA_DIR!" (
|
||||||
|
echo Data folder not found:
|
||||||
|
echo !DATA_DIR!
|
||||||
|
echo Check the path and try again.
|
||||||
|
goto :PromptLoop
|
||||||
|
)
|
||||||
|
|
||||||
|
:SaveAndDone
|
||||||
|
> "%CONFIG%" echo !F4_DIR!
|
||||||
|
echo Using Fallout 4 Data: !DATA_DIR!
|
||||||
|
set "XF4=!F4_DIR!"
|
||||||
|
set "XDATA=!DATA_DIR!"
|
||||||
|
endlocal & set "F4_DIR=%XF4%" & set "DATA_DIR=%XDATA%"
|
||||||
|
exit /b 0
|
||||||
|
|
||||||
|
:NormalizePath
|
||||||
|
set "RAW=%~1"
|
||||||
|
call :StripQuotes RAW
|
||||||
|
if "!RAW:~-1!"=="\" set "RAW=!RAW:~0,-1!"
|
||||||
|
|
||||||
|
if exist "!RAW!\F4SE" (
|
||||||
|
set "DATA_DIR=!RAW!"
|
||||||
|
for %%D in ("!RAW!\..") do set "F4_DIR=%%~fD"
|
||||||
|
exit /b 0
|
||||||
|
)
|
||||||
|
if exist "!RAW!\Data" (
|
||||||
|
set "F4_DIR=!RAW!"
|
||||||
|
set "DATA_DIR=!RAW!\Data"
|
||||||
|
exit /b 0
|
||||||
|
)
|
||||||
|
if /i "!RAW:~-5!"=="\Data" (
|
||||||
|
if exist "!RAW!" (
|
||||||
|
set "DATA_DIR=!RAW!"
|
||||||
|
for %%D in ("!RAW!\..") do set "F4_DIR=%%~fD"
|
||||||
|
)
|
||||||
|
)
|
||||||
|
exit /b 0
|
||||||
|
|
||||||
|
:StripQuotes
|
||||||
|
set "TMP=!%~1!"
|
||||||
|
set "TMP=!TMP:"=!"
|
||||||
|
set "%~1=!TMP!"
|
||||||
|
exit /b 0
|
||||||
Reference in New Issue
Block a user