Skip to content

Patch CLI file argument handling to bypass broken codepath#45

Merged
noahc3 merged 2 commits intodevfrom
fix-document-path-cli-arg-handler
Apr 23, 2026
Merged

Patch CLI file argument handling to bypass broken codepath#45
noahc3 merged 2 commits intodevfrom
fix-document-path-cli-arg-handler

Conversation

@noahc3
Copy link
Copy Markdown
Owner

@noahc3 noahc3 commented Apr 12, 2026

  • Add WineFix patch for ProcessCommandLineArguments WinRT silent failure/crash
    • Affinity's method references SharedStorageAccessManager which isn't available in Wine and causes a TypeLoadException that silently prevents CLI file paths from being processed.
    • The patch hooks OnMainWindowLoaded to open files via IDocumentViewService directly, and replaces SingleInstanceThread to fix the crash when sending files to an already-running instance.
  • Fix argument quoting in AffinityHook
    • string.Join(" ", args) didn't quote paths containing spaces, breaking file paths with spaces when forwarding to Affinity.exe.
  • Add "Command-line file opening fix" toggle to WineFix settings (enabled by default, restart required).

@noahc3 noahc3 changed the title Replace CLI file argument handling to bypass broken codepath Patch CLI file argument handling to bypass broken codepath Apr 12, 2026
@github-actions
Copy link
Copy Markdown

github-actions Bot commented Apr 12, 2026

🚀 Build Artifacts Ready

Commit: 19ef922
Build Timestamp: April 12, 2026 at 01:32 UTC
Build Workflow: View Run

📦 Direct Downloads (via nightly.link):

@noahc3 noahc3 self-assigned this Apr 12, 2026
@Novaryn42-glitch
Copy link
Copy Markdown

Thank you so much for this patch !

I have an issue with the new AffinityPluginLoader.dll though :

  • It tries to open the licence web page and fails :
    Initialization failed: Couldn't find a compatible Webview2 Runtime installation to host WebViews.

The previous AffinityPluginLoader.dll was working

@noahc3
Copy link
Copy Markdown
Owner Author

noahc3 commented Apr 12, 2026

@Novaryn42-glitch
Opened a separate issue for this #46

@noahc3 noahc3 added apl winefix wf-patch For bugs that we'd like to patch in WineFix labels Apr 23, 2026
@noahc3 noahc3 merged commit 0d7f153 into dev Apr 23, 2026
3 checks passed
@noahc3 noahc3 deleted the fix-document-path-cli-arg-handler branch April 23, 2026 17:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

apl wf-patch For bugs that we'd like to patch in WineFix winefix

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants