Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add back Windows specific CompilerApp to fix libraries with WPF references #2392

Merged
merged 1 commit into from
Aug 17, 2024

Conversation

Basewq
Copy link
Contributor

@Basewq Basewq commented Jul 16, 2024

PR Details

May be controversial to bring the windows specific CompilerApp back.
Pinging @Jklawreszuk & @Kryptos-FR since they've spent a lot of time on the cross-platform transition side of things.
This does not remove the cross-platform version, but rather includes the Windows specific version and use that over the cross-platform version.

Related Issue

Fixes #2244
The problem is referencing any Stride libraries that touch WPF code, the ModuleInitializer will try to load the WPF framework if it's not loaded, however WPF is Windows only, so it can't be loaded in any way except by having the Windows specific version.

Types of changes

  • Docs change / refactoring / dependency upgrade
  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)

Checklist

  • My change requires a change to the documentation.
  • I have added tests to cover my changes.
  • All new and existing tests passed.
  • I have built and run the editor to try this change out.

@Kryptos-FR
Copy link
Member

I don't see any problem with double targeting for now.

That said what is the use case? Stride libraries beside the one used exclusively for the editor aren't supposed to have any dependencies with WPF. And the ones for the editor aren't expected to be used for Games.

@Jklawreszuk
Copy link
Collaborator

I've now tested on Fedora and this change doesn't break support for Linux so this as a temp solution LGTM 👌

@Basewq
Copy link
Contributor Author

Basewq commented Aug 12, 2024

That said what is the use case?

I believe there were a few people in discord that attempted to host Stride in their own WPF application, or something like that (I'm not 100% sure).

My own example project tried to show a way to extend the editor, which requires referencing the editor specific libraries to access certain objects/methods.
https://github.com/Basewq/XenkoProofOfConcepts/blob/046c2ce82300ad8ae7d5e9d965e620d442dc789c/LevelEditorExtensionExample/LevelEditorExtensionExample/Editor/LevelEditEditorProcessor.cs#L117
While I actually don't use this, it does show that it's possible to do, although it also shows how difficult it really is to try to extend the editor.

@Eideren Eideren merged commit dad92aa into stride3d:master Aug 17, 2024
2 checks passed
@Eideren
Copy link
Collaborator

Eideren commented Aug 17, 2024

Thanks !

@Basewq Basewq deleted the compilerapp_wpf_fix branch August 21, 2024 07:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

AssetCompiler error on multi-project configuration
4 participants