Repository navigation
fix: resolve xdelta3 via bundled assets and make version dynamic (#176) - #182
Merged
Merged
Conversation
Comprehensive onboarding report covering the two-layer architecture (Flutter gui/ + pure-Dart core/), the JSON-lines IPC bridge (CoreBridge <-> openrom-core), the full conversion pipeline (GUI pick -> CLI -> external binary -> progress parsing -> completion), third-party tool resolution and fallback paths per platform, Flutter state management and screen map, and the CI/CD packaging lifecycle (Windows ZIP/NSIS, Linux AppImage/ZIP + ARM64, macOS DMG, Android APK, Flatpak). Co-authored-by: openhands <openhands@all-hands.dev>
…amic (#176) Issue #176 reported two problems on Windows: xdelta patching failed, and the About screen showed "3.0.0" instead of the real version. xdelta3 resolution: - gui/lib/utils/config.dart: AppConfig.getToolPath now delegates to the core's core.getToolPath(), which searches config.json override -> bundled assets/<os>[/<arch>]/<tool> -> OS PATH, instead of only looking next to the main executable. Fixes xdelta3 (and any bundled tool) not being found when it ships in the release assets/ folder. - core/lib/src/config.dart: getDefaultBundledPath also probes the arch subfolder on Windows (assets/windows/x86_64/<tool>.exe) before the flat assets/windows/<tool>.exe, matching macOS/Linux. - gui/lib/patcher/xdelta_patcher.dart, xdelta_builder.dart: only fail the existence preflight for absolute paths, so a bare-name tool resolved via the OS PATH is not falsely reported missing. Dynamic version: - core/bin/openrom.dart: --version uses readAppVersion() instead of a hardcoded 'v3.0.0' fallback, so CoreBridge.getVersion() and the About screen report the real version. - core/lib/src/version_reader.dart: also honours --dart-define=APP_VERSION. - Release.yml + flatpak manifest: bundle the VERSION file next to the core (and GUI) binaries so readAppVersion() finds it at runtime. Co-authored-by: openhands <openhands@all-hands.dev>
Closed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Fixes two problems reported in #176: xdelta patching fails on Windows, and the app's info/About tab shows
3.0.0instead of the real version.Closes #176.
Root cause
1. xdelta3 was never found.
AppConfig.xdelta3Path(gui/lib/utils/config.dart) hard-coded a path next to the main executable (<exeDir>/xdelta3.exe) and ignored the bundledassets/folder. In a real install,xdelta3.exeships underassets/windows/…, so every xdelta patch failed with "xdelta3 binary not found".2. The version was hard-coded.
core/bin/openrom.dart(--version) fell back to a literal'v3.0.0', and the About screen reads that viaCoreBridge.getVersion()— hence "3.0.0".Changes
xdelta3 resolution
gui/lib/utils/config.dartAppConfig.getToolPathnow delegates to the core'score.getToolPath(), i.e. the standard chain: config.json override → bundledassets/<os>[/<arch>]/<tool>→ OS PATHcore/lib/src/config.dartgetDefaultBundledPathnow also probesassets/windows/x86_64/<tool>.exebeforeassets/windows/<tool>.exe(matching the macOS/Linux behaviour)gui/lib/patcher/xdelta_patcher.dart,xdelta_builder.dartDynamic version
core/bin/openrom.dart--versionusesreadAppVersion()instead of the hard-coded'v3.0.0'fallback → fixesCoreBridge.getVersion()and the About screencore/lib/src/version_reader.dart--dart-define=APP_VERSION(priority: define →VERSIONnext to exe →VERSIONin CWD →unknown).github/workflows/Release.yml,flatpak/io.github.M5Devs.OpenROM.ymlVERSIONfile next to the core (and GUI) binaries soreadAppVersion()finds it at runtimeDocs
docs/DEVELOPER_ONBOARDING.md— architecture, IPC bridge, conversion pipeline, tool resolution, state management, and CI/CD packaging lifecycle.Behaviour
Testing
flutter analyze/dart testwere not executed. Changes were verified by inspection and are type-safe (removed the now-unuseddart:ioimport; added thepathimport where needed).flutter analyze+flutter testingui/,dart analyze+dart testincore/(thequality.ymlgate), and a manual xdelta patch on a Windows build.This PR was created by an AI agent (OpenHands) on behalf of the user.