Relocate app data and package build output

Adds a new `AppPaths` helper and moves runtime/user-generated files (`init.config`, `custom_set.txt`, cache, WebView2 data) into `%LocalAppData%\Lithium` with readable fallback to portable files. WebView2 initialization now sets a loader DLL path, uses an explicit user data folder, and surfaces runtime-missing errors.

The build/publish pipeline is updated to emit a clean `Build\` layout with dependencies under `lib\`, remove duplicate root DLL/docs, and align probing/runtime settings for net48 x64 output. Supporting updates include ignore rules for build/runtime artifacts, refreshed agent build/release docs, and endpoint URL/domain updates.
This commit is contained in:
TJhost
2026-09-13 19:33:09 -04:00
parent 5f993f98b8
commit 19556f2d26
9 changed files with 172 additions and 53 deletions
+20 -8
View File
@@ -3,15 +3,24 @@
## Prerequisites
- Git remote: `https://git.scpsmp.site/JJ/Lithium.git`
- Auth: OAuth token stored in Windows Credential Manager (via git)
- MSBuild: `& "C:\Program Files\Microsoft Visual Studio\18\Community\MSBuild\Current\Bin\MSBuild.exe"`
- Visual Studio 2022 or newer with the .NET desktop development workload
- NuGet package restore enabled
- .NET Framework 4.8 Developer Pack for building
- Microsoft Edge WebView2 Runtime for the Website tab at runtime
## Build
```powershell
# Kill running process first
Stop-Process -Name "Lithium" -ErrorAction SilentlyContinue
# Compile Release build
& "C:\Program Files\Microsoft Visual Studio\2022\Community\Msbuild\Current\Bin\MSBuild.exe" /t:rebuild /p:Configuration=Release /p:Platform="x64"
# Locate MSBuild, restore packages, and compile the Release build
$msbuild = & "${env:ProgramFiles(x86)}\Microsoft Visual Studio\Installer\vswhere.exe" -latest -requires Microsoft.Component.MSBuild -find MSBuild\**\Bin\MSBuild.exe | Select-Object -First 1
& $msbuild Lithium.sln /t:Restore,Rebuild /p:Configuration=Release /p:Platform="x64"
# Create the clean file-deployment layout under Build\.
& $msbuild Lithium\Lithium.csproj /t:Publish /p:Configuration=Release /p:Platform="x64"
# Keep Lithium.exe, Lithium.exe.config, and the complete lib directory together.
```
## Stage & Commit
@@ -44,9 +53,12 @@ git push origin $version
$cred = "protocol=https`nhost=git.scpsmp.site`n`n" | git credential fill
$token = ($cred -split "`n" | Where-Object { $_ -like "password=*" }) -replace "password=",""
# 7z build output (x64/Release)
$archivePath = "D:\Lithium\Lithium-$version.7z"
& "C:\Program Files\7-Zip\7z.exe" a -mx=9 "$archivePath" "D:\Lithium\Lithium\bin\x64\Release\*"
# Archive the published x64 Release output; run from anywhere inside the repository
$repoRoot = (git rev-parse --show-toplevel).Trim()
$archivePath = Join-Path $repoRoot "Lithium-$version.7z"
$releaseOutput = Join-Path $repoRoot "Build\*"
$sevenZip = (Get-Command 7z.exe -ErrorAction Stop).Source
& $sevenZip a -mx=9 "$archivePath" "$releaseOutput"
# Create release via Gitea API
$body = @"
@@ -63,7 +75,7 @@ curl.exe -s -X POST "https://git.scpsmp.site/api/v1/repos/JJ/Lithium/releases/$r
## Post-Release Cleanup
```powershell
# Delete the local archive after successful upload
Remove-Item -LiteralPath "D:\Lithium\Lithium-$version.7z" -Force
Remove-Item -LiteralPath "$archivePath" -Force
Remove-Item -LiteralPath "$env:TEMP\release.json" -Force
```
@@ -72,4 +84,4 @@ Remove-Item -LiteralPath "$env:TEMP\release.json" -Force
- Tag naming scheme: `0.01`, `0.02`, `0.03`, etc. (not `v1.0.0`)
- Release naming scheme: `0.XX @ Lithium`
- Use PATCH to edit existing release tag via API if you mess up the tag name
- 7-Zip located at `C:\Program Files\NVIDIA Corporation\NVIDIA app\7z.exe` (or `C:\Program Files\7-Zip\7z.exe` if installed separately)
- Add `7z.exe` to `PATH` before running the release archive command