Wire adaptor mod installers and mod types into Vortex#22527
Open
Wire adaptor mod installers and mod types into Vortex#22527
Conversation
Register a single "adaptor" installer (priority 25) in the bridge that gates on gameId via getAdaptorInstaller and delegates to the per-game dispatch populated during setup(). Maps InstallMapping[] to IInstruction[] with type "copy". Throws if no adaptor installer is registered for the game (adaptor-managed games without an installer service fall through to supported: false and hit the generic fallback instead).
InstallManager's buildFileList produces backslash-separated paths on Windows and includes directory entries (trailing separator). Adaptors expect forward-slash RelativePaths. Normalize separators and filter directory entries at the bridge boundary before dispatching.
After paths resolve in setup(), register a Vortex mod type for each non-game anchor in the adaptor's GamePaths (e.g. saves, preferences). The installer callback now checks the anchor field on mappings: if all files target a single non-game anchor, a setmodtype instruction is emitted so the mod deploys to the correct location. Mixed anchors in a single mod throw an error since Vortex only supports one mod type per mod. Also adds qpPathToNative helper to convert serialized QualifiedPath URI-style paths to native OS paths for registerModType's getPath.
- Validate paths entries at runtime before treating as SerializedQP - Use IInstruction[] instead of hand-rolled type annotation - Guard against empty install mappings from adaptor - Fix Bluebird return type for mod type test callback - Correct fomod priority comment to reference both installers
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
Connects the adaptor bridge to Vortex's install and deployment pipeline so adaptor-declared games can install and deploy mods end-to-end.
"adaptor"installer (priority 25) that delegates archive contents to whichever adaptor owns the active game, normalizing Windows backslash paths to forward-slash before dispatchsetmodtypeinstructions emitted during installResolves APP-320