From 2087e692dc7789bd83d9321ed7c14913c9899daa Mon Sep 17 00:00:00 2001 From: JAVCIF <81954917+JAVCIF@users.noreply.github.com> Date: Thu, 27 Aug 2026 19:34:38 -0500 Subject: [PATCH 1/2] Publish VNAR Beta 1.1 source, documentation and Windows release pipeline --- .github/workflows/release.yml | 140 +++- CHANGELOG.md | 16 + LICENSE | 21 + LocaleGameHub/App.xaml | 500 +++++++++++++ LocaleGameHub/App.xaml.cs | 131 ++++ LocaleGameHub/CoverEditorWindow.xaml | 125 ++++ LocaleGameHub/CoverEditorWindow.xaml.cs | 441 ++++++++++++ LocaleGameHub/CoverSearchWindow.xaml | 86 +++ LocaleGameHub/CoverSearchWindow.xaml.cs | 123 ++++ LocaleGameHub/DeveloperCoverWindow.xaml | 59 ++ LocaleGameHub/DeveloperCoverWindow.xaml.cs | 168 +++++ LocaleGameHub/GameEditorWindow.xaml | 104 +++ LocaleGameHub/GameEditorWindow.xaml.cs | 440 ++++++++++++ LocaleGameHub/GlobalUsings.cs | 6 + LocaleGameHub/LocaleGameHub.csproj | 25 + LocaleGameHub/MainWindow.xaml | 247 +++++++ LocaleGameHub/MainWindow.xaml.cs | 657 ++++++++++++++++++ LocaleGameHub/Models/AppSettings.cs | 13 + LocaleGameHub/Models/CoverEditState.cs | 21 + LocaleGameHub/Models/CoverSearchResult.cs | 9 + .../Models/DeveloperCardViewModel.cs | 13 + LocaleGameHub/Models/DeveloperEntry.cs | 10 + LocaleGameHub/Models/GameCardViewModel.cs | 15 + LocaleGameHub/Models/GameEntry.cs | 18 + LocaleGameHub/Models/LocaleProfile.cs | 9 + LocaleGameHub/Models/ScanCandidate.cs | 12 + LocaleGameHub/Models/ShortcutIconOption.cs | 11 + LocaleGameHub/Models/VndbDeveloperRef.cs | 7 + LocaleGameHub/Resources/VNAR.ico | Bin 7518 -> 158513 bytes LocaleGameHub/Resources/VNAR.png | Bin 7523 -> 784178 bytes LocaleGameHub/Resources/VNARShortcut.ico | Bin 43863 -> 36447 bytes LocaleGameHub/Resources/VNARShortcut.png | Bin 0 -> 9237 bytes LocaleGameHub/ScanWindow.xaml | 42 ++ LocaleGameHub/ScanWindow.xaml.cs | 48 ++ LocaleGameHub/Services/AppDataPaths.cs | 50 ++ LocaleGameHub/Services/CoverService.cs | 131 ++++ LocaleGameHub/Services/DarkTitleBarService.cs | 33 + LocaleGameHub/Services/DraggedImageService.cs | 129 ++++ .../Services/ExecutableIconService.cs | 138 ++++ .../Services/ImageCompatibilityService.cs | 56 ++ LocaleGameHub/Services/ImageSearchService.cs | 78 +++ LocaleGameHub/Services/LibraryService.cs | 132 ++++ .../LocaleEmulatorInstallerService.cs | 145 ++++ .../Services/LocaleEmulatorService.cs | 119 ++++ LocaleGameHub/Services/LocalizationService.cs | 193 +++++ LocaleGameHub/Services/RemoteImageService.cs | 108 +++ LocaleGameHub/Services/ScannerService.cs | 98 +++ LocaleGameHub/Services/ShortcutService.cs | 98 +++ LocaleGameHub/Services/VndbService.cs | 229 ++++++ LocaleGameHub/SettingsWindow.xaml | 142 ++++ LocaleGameHub/SettingsWindow.xaml.cs | 303 ++++++++ LocaleGameHub/ShortcutWindow.xaml | 102 +++ LocaleGameHub/ShortcutWindow.xaml.cs | 115 +++ LocaleGameHub/app.manifest | 15 + README.es.md | 98 +++ README.md | 104 +++ THIRD_PARTY_NOTICES.md | 47 ++ bootstrap/source.part00.b64 | 1 - bootstrap/source.part01_04.b64 | 1 - bootstrap/source.part05_08.b64 | 1 - build_portable.bat | 21 + build_small.bat | 21 + installer/VNAR.iss | 42 ++ source-bootstrap.zip | Bin 7506 -> 0 bytes 64 files changed, 6260 insertions(+), 7 deletions(-) create mode 100644 CHANGELOG.md create mode 100644 LICENSE create mode 100644 LocaleGameHub/App.xaml create mode 100644 LocaleGameHub/App.xaml.cs create mode 100644 LocaleGameHub/CoverEditorWindow.xaml create mode 100644 LocaleGameHub/CoverEditorWindow.xaml.cs create mode 100644 LocaleGameHub/CoverSearchWindow.xaml create mode 100644 LocaleGameHub/CoverSearchWindow.xaml.cs create mode 100644 LocaleGameHub/DeveloperCoverWindow.xaml create mode 100644 LocaleGameHub/DeveloperCoverWindow.xaml.cs create mode 100644 LocaleGameHub/GameEditorWindow.xaml create mode 100644 LocaleGameHub/GameEditorWindow.xaml.cs create mode 100644 LocaleGameHub/GlobalUsings.cs create mode 100644 LocaleGameHub/LocaleGameHub.csproj create mode 100644 LocaleGameHub/MainWindow.xaml create mode 100644 LocaleGameHub/MainWindow.xaml.cs create mode 100644 LocaleGameHub/Models/AppSettings.cs create mode 100644 LocaleGameHub/Models/CoverEditState.cs create mode 100644 LocaleGameHub/Models/CoverSearchResult.cs create mode 100644 LocaleGameHub/Models/DeveloperCardViewModel.cs create mode 100644 LocaleGameHub/Models/DeveloperEntry.cs create mode 100644 LocaleGameHub/Models/GameCardViewModel.cs create mode 100644 LocaleGameHub/Models/GameEntry.cs create mode 100644 LocaleGameHub/Models/LocaleProfile.cs create mode 100644 LocaleGameHub/Models/ScanCandidate.cs create mode 100644 LocaleGameHub/Models/ShortcutIconOption.cs create mode 100644 LocaleGameHub/Models/VndbDeveloperRef.cs create mode 100644 LocaleGameHub/Resources/VNARShortcut.png create mode 100644 LocaleGameHub/ScanWindow.xaml create mode 100644 LocaleGameHub/ScanWindow.xaml.cs create mode 100644 LocaleGameHub/Services/AppDataPaths.cs create mode 100644 LocaleGameHub/Services/CoverService.cs create mode 100644 LocaleGameHub/Services/DarkTitleBarService.cs create mode 100644 LocaleGameHub/Services/DraggedImageService.cs create mode 100644 LocaleGameHub/Services/ExecutableIconService.cs create mode 100644 LocaleGameHub/Services/ImageCompatibilityService.cs create mode 100644 LocaleGameHub/Services/ImageSearchService.cs create mode 100644 LocaleGameHub/Services/LibraryService.cs create mode 100644 LocaleGameHub/Services/LocaleEmulatorInstallerService.cs create mode 100644 LocaleGameHub/Services/LocaleEmulatorService.cs create mode 100644 LocaleGameHub/Services/LocalizationService.cs create mode 100644 LocaleGameHub/Services/RemoteImageService.cs create mode 100644 LocaleGameHub/Services/ScannerService.cs create mode 100644 LocaleGameHub/Services/ShortcutService.cs create mode 100644 LocaleGameHub/Services/VndbService.cs create mode 100644 LocaleGameHub/SettingsWindow.xaml create mode 100644 LocaleGameHub/SettingsWindow.xaml.cs create mode 100644 LocaleGameHub/ShortcutWindow.xaml create mode 100644 LocaleGameHub/ShortcutWindow.xaml.cs create mode 100644 LocaleGameHub/app.manifest create mode 100644 README.es.md create mode 100644 README.md create mode 100644 THIRD_PARTY_NOTICES.md delete mode 100644 bootstrap/source.part00.b64 delete mode 100644 bootstrap/source.part01_04.b64 delete mode 100644 bootstrap/source.part05_08.b64 create mode 100644 build_portable.bat create mode 100644 build_small.bat create mode 100644 installer/VNAR.iss delete mode 100644 source-bootstrap.zip diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 07a24cf..ad4952f 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -1,10 +1,142 @@ -name: VNAR Release Bootstrap +name: Build Beta Release on: + push: + branches: + - main + pull_request: + branches: + - main workflow_dispatch: +permissions: + contents: read + +concurrency: + group: vnar-release-${{ github.ref }} + cancel-in-progress: false + +env: + RELEASE_TAG: v1.0.0-beta.1.1 + jobs: - waiting: - runs-on: ubuntu-latest + build-release: + runs-on: windows-latest + + steps: + - name: Checkout + uses: actions/checkout@v4 + + - name: Setup .NET 10 + uses: actions/setup-dotnet@v4 + with: + dotnet-version: 10.0.x + + - name: Restore + run: dotnet restore .\LocaleGameHub\LocaleGameHub.csproj + + - name: Publish self-contained build + shell: pwsh + run: | + dotnet publish .\LocaleGameHub\LocaleGameHub.csproj ` + -c Release ` + -r win-x64 ` + --self-contained true ` + -p:PublishSingleFile=true ` + -p:IncludeNativeLibrariesForSelfExtract=true ` + -o .\dist\portable + + if ($LASTEXITCODE -ne 0) { throw "dotnet publish failed" } + + Copy-Item .\LICENSE .\dist\portable\LICENSE.txt + Copy-Item .\THIRD_PARTY_NOTICES.md .\dist\portable\THIRD_PARTY_NOTICES.md + Copy-Item .\README.md .\dist\portable\README.md + Copy-Item .\README.es.md .\dist\portable\README.es.md + + - name: Create portable ZIP + shell: pwsh + run: | + Compress-Archive -Path .\dist\portable\* -DestinationPath .\dist\VNAR-Portable-win-x64.zip -Force + + - name: Install Inno Setup + shell: pwsh + run: choco install innosetup --no-progress -y + + - name: Build installer + shell: pwsh + run: | + & "C:\Program Files (x86)\Inno Setup 6\ISCC.exe" .\installer\VNAR.iss + if ($LASTEXITCODE -ne 0) { throw "Installer compilation failed" } + + - name: Verify packages and create checksums + shell: pwsh + run: | + foreach ($file in @('.\dist\portable\VNAR.exe', '.\dist\portable\Resources\VNARShortcut.ico', '.\dist\VNAR-Setup.exe', '.\dist\VNAR-Portable-win-x64.zip')) { + if (!(Test-Path $file) -or (Get-Item $file).Length -eq 0) { throw "Missing or empty package file: $file" } + } + Get-FileHash .\dist\VNAR-Setup.exe, .\dist\VNAR-Portable-win-x64.zip -Algorithm SHA256 | + ForEach-Object { "$($_.Hash.ToLower()) $(Split-Path $_.Path -Leaf)" } | + Set-Content .\dist\SHA256SUMS.txt -Encoding ascii + + - name: Upload validated packages + uses: actions/upload-artifact@v4 + with: + name: vnar-windows-packages + path: | + dist/VNAR-Setup.exe + dist/VNAR-Portable-win-x64.zip + dist/SHA256SUMS.txt + if-no-files-found: error + + publish-release: + needs: build-release + if: github.ref == 'refs/heads/main' && github.event_name != 'pull_request' + runs-on: windows-latest + permissions: + contents: write steps: - - run: echo "Bootstrap files are being prepared." + - name: Download validated packages + uses: actions/download-artifact@v4 + with: + name: vnar-windows-packages + path: dist + + - name: Publish GitHub prerelease + shell: pwsh + env: + GH_TOKEN: ${{ github.token }} + GH_REPO: ${{ github.repository }} + run: | + $tag = "${{ env.RELEASE_TAG }}" + $notes = @" + ## VNAR Beta 1.1 + + First public GitHub beta package. + + ### Downloads + - **VNAR-Setup.exe** — self-contained Windows installer. + - **VNAR-Portable-win-x64.zip** — self-contained portable build. + - **SHA256SUMS.txt** — package checksums. + + Both packages store settings and artwork in `%LOCALAPPDATA%\VNAR`. + The executables are unsigned; Windows may display a SmartScreen warning. + + See the repository README for setup instructions, features, and third-party notices. + "@ + + gh release view $tag 2>$null + if ($LASTEXITCODE -ne 0) { + gh release create $tag ` + .\dist\VNAR-Setup.exe ` + .\dist\VNAR-Portable-win-x64.zip ` + .\dist\SHA256SUMS.txt ` + --title "VNAR Beta 1.1" ` + --notes $notes ` + --prerelease --draft ` + --target "${{ github.sha }}" + if ($LASTEXITCODE -ne 0) { throw "Release upload failed" } + gh release edit $tag --draft=false + if ($LASTEXITCODE -ne 0) { throw "Release publication failed" } + } else { + Write-Host "Release $tag already exists; keeping its original packages. Bump RELEASE_TAG for the next release." + } diff --git a/CHANGELOG.md b/CHANGELOG.md new file mode 100644 index 0000000..32a1d21 --- /dev/null +++ b/CHANGELOG.md @@ -0,0 +1,16 @@ +# Changelog + +## 1.0.0-beta.1.1 + +First public GitHub beta package. + +Highlights: + +- Locale Emulator profiles and first-run setup. +- Game library import, drag & drop, scanning, search, pagination, favorites, and developer grouping. +- English and Spanish UI. +- VNDB metadata and cover integration. +- Non-destructive cover editor with HQ export and multiple background modes. +- WebP normalization through SkiaSharp. +- Smart desktop shortcuts with selectable executable icons. +- Themed context menus and scrollbars. diff --git a/LICENSE b/LICENSE new file mode 100644 index 0000000..fbcc40f --- /dev/null +++ b/LICENSE @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) 2026 JAVCIF + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/LocaleGameHub/App.xaml b/LocaleGameHub/App.xaml new file mode 100644 index 0000000..f5400c7 --- /dev/null +++ b/LocaleGameHub/App.xaml @@ -0,0 +1,500 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/LocaleGameHub/App.xaml.cs b/LocaleGameHub/App.xaml.cs new file mode 100644 index 0000000..46b8bae --- /dev/null +++ b/LocaleGameHub/App.xaml.cs @@ -0,0 +1,131 @@ +using System.Text; +using System.Windows; +using System.Windows.Threading; +using LocaleGameHub.Services; + +namespace LocaleGameHub; + +public partial class App : Application +{ + protected override void OnStartup(StartupEventArgs e) + { + base.OnStartup(e); + + DispatcherUnhandledException += App_DispatcherUnhandledException; + AppDomain.CurrentDomain.UnhandledException += CurrentDomain_UnhandledException; + + try + { + var preferences = new LibraryService(); + LocalizationService.SetLanguage(preferences.Settings.Language); + + if (TryGetLaunchGameId(e.Args, out var gameId)) + { + LaunchFromShortcut(preferences, gameId); + Shutdown(0); + return; + } + + var main = new MainWindow(); + MainWindow = main; + main.Show(); + } + catch (Exception ex) + { + ShowStartupError(ex); + Shutdown(-1); + } + } + + + private static bool TryGetLaunchGameId(string[] args, out Guid gameId) + { + gameId = Guid.Empty; + for (var i = 0; i < args.Length; i++) + { + var arg = args[i]; + if (arg.StartsWith("--launch=", StringComparison.OrdinalIgnoreCase)) + return Guid.TryParse(arg["--launch=".Length..].Trim('"'), out gameId); + + if (!arg.Equals("--launch", StringComparison.OrdinalIgnoreCase) || i + 1 >= args.Length) continue; + return Guid.TryParse(args[i + 1].Trim('"'), out gameId); + } + return false; + } + + private static void LaunchFromShortcut(LibraryService library, Guid gameId) + { + var game = library.Games.FirstOrDefault(g => g.Id == gameId) + ?? throw new InvalidOperationException(LocalizationService.Bi( + "Ese acceso directo apunta a un juego que ya no existe en la biblioteca de VNAR.", + "This shortcut points to a game that no longer exists in the VNAR library.")); + + var locale = new LocaleEmulatorService(library); + locale.Launch(game); + game.LastPlayedUtc = DateTime.UtcNow; + library.SaveGames(); + } + + private void App_DispatcherUnhandledException(object sender, DispatcherUnhandledExceptionEventArgs e) + { + WriteCrashLog("DispatcherUnhandledException", e.Exception); + MessageBox.Show( + BuildErrorMessage(e.Exception), + LocalizationService.Bi("VNAR - Error inesperado", "VNAR - Unexpected error"), + MessageBoxButton.OK, + MessageBoxImage.Error); + e.Handled = true; + } + + private void CurrentDomain_UnhandledException(object? sender, UnhandledExceptionEventArgs e) + { + if (e.ExceptionObject is Exception ex) + WriteCrashLog("UnhandledException", ex); + } + + private static void ShowStartupError(Exception ex) + { + WriteCrashLog("Startup", ex); + MessageBox.Show( + BuildErrorMessage(ex), + LocalizationService.Bi("VNAR no pudo iniciar", "VNAR could not start"), + MessageBoxButton.OK, + MessageBoxImage.Error); + } + + private static string BuildErrorMessage(Exception ex) + { + return LocalizationService.IsSpanish + ? $"VNAR encontró un error al iniciar.\n\n{ex.GetType().Name}: {ex.Message}\n\nSe guardó un log en:\n{CrashLogPath}" + : $"VNAR encountered a startup error.\n\n{ex.GetType().Name}: {ex.Message}\n\nA log was saved to:\n{CrashLogPath}"; + } + + private static string CrashLogPath + { + get + { + var root = Path.Combine( + Environment.GetFolderPath(Environment.SpecialFolder.LocalApplicationData), + "VNAR"); + return Path.Combine(root, "crash.log"); + } + } + + private static void WriteCrashLog(string stage, Exception ex) + { + try + { + var path = CrashLogPath; + Directory.CreateDirectory(Path.GetDirectoryName(path)!); + var sb = new StringBuilder(); + sb.AppendLine($"[{DateTime.Now:yyyy-MM-dd HH:mm:ss}] {stage}"); + sb.AppendLine(ex.ToString()); + sb.AppendLine(new string('-', 80)); + File.AppendAllText(path, sb.ToString()); + } + catch + { + // Never let logging hide the original error. + } + } +} diff --git a/LocaleGameHub/CoverEditorWindow.xaml b/LocaleGameHub/CoverEditorWindow.xaml new file mode 100644 index 0000000..9f5560f --- /dev/null +++ b/LocaleGameHub/CoverEditorWindow.xaml @@ -0,0 +1,125 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +