Skip to content

Conversation

Doprez
Copy link
Contributor

@Doprez Doprez commented Mar 29, 2025

PR Details

Changes the default build setting changed by #2644
Also removes a change in the DXTWrapper

Related Issue

None, found in master.

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.

<AllowedOutputExtensionsInPackageBuildOutputFolder>.so; .a; $(AllowedOutputExtensionsInPackageBuildOutputFolder)</AllowedOutputExtensionsInPackageBuildOutputFolder>

<StrideNativeWindowsArm64Enabled Condition="'$(StrideNativeWindowsArm64Enabled)' == ''">true</StrideNativeWindowsArm64Enabled>
<StrideNativeWindowsArm64Enabled Condition="'$(StrideNativeWindowsArm64Enabled)' == ''">false</StrideNativeWindowsArm64Enabled>
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Isn't that change forces to set to True when releasing nuget packages?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What do you mean? Do you mean, does this get affected by the team city builds?

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I .. think so, since by default is true then it's generating arm64 dll files without any additional paramateres. I'm just afraid that's gonna require some additional modification.

Copy link
Collaborator

@Jklawreszuk Jklawreszuk Mar 29, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

My proposal would be something like this

Suggested change
<StrideNativeWindowsArm64Enabled Condition="'$(StrideNativeWindowsArm64Enabled)' == ''">false</StrideNativeWindowsArm64Enabled>
<StrideNativeWindowsArm64Enabled Condition="'$(StrideNativeWindowsArm64Enabled)' == ''">true</StrideNativeWindowsArm64Enabled>
<StrideNativeWindowsArm64Enabled Condition="'$(StrideNativeWindowsArm64Enabled)' == '' AND '$(Configuration)' != 'Release'">false</StrideNativeWindowsArm64Enabled>

Copy link
Collaborator

@Jklawreszuk Jklawreszuk Mar 29, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Would be great if someone else comment If I'm correct

Copy link
Collaborator

@Jklawreszuk Jklawreszuk Mar 30, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If it's easy to configure in TC then why not ,otherwise I'd go with my change (i.e if value is NaN then set true, then if is not relase, dont geneerate arm files)

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It could be irritating that the debug build works and once you switch to release it breaks. I'd prefer passing the parameter explicitly to TC build.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

makes sense

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Im not very familiar with conditionals in targets files. If we make the change through TC then would my current change be ok currently or would it cause a problem?

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It should be ok. I think the file we should modify is build/Stride.build which contains a property BuildProperties, adding StrideNativeWindowsArm64Enabled=true should enable it for command line / TC builds.

@azeno
Copy link
Collaborator

azeno commented Mar 30, 2025

The changes in DXTWrapper were made on purpose. Without them the calls would not work on arm64. Are you saying they don't work now on x64?

@Jklawreszuk
Copy link
Collaborator

Jklawreszuk commented Mar 30, 2025

Yes, after applying the changes, it seems that changed methods stopped working (skybox asset for example) on win
-x64

@azeno
Copy link
Collaborator

azeno commented Mar 30, 2025

Interesting. Then I'll have to read up on it again and find a different solution.

@Doprez
Copy link
Contributor Author

Doprez commented Mar 30, 2025

I might be able to use an if def in the class with a const to change the value depending on architecture.

@Doprez
Copy link
Contributor Author

Doprez commented Mar 30, 2025

@azeno would you be able to test out this branch when you have some time to make sure it still works for windows arm?

I just added a check for the value you added in the targets file StrideNativeWindowsArm64Enabled that if I understand correctly should hopefully make sense.

@azeno
Copy link
Collaborator

azeno commented Mar 30, 2025

@Doprez Sure can do, but I was just wondering if we should change the native code so that it uses Unicode like other methods in that file do. Those ifdefs are such a pain.

@Doprez
Copy link
Contributor Author

Doprez commented Mar 30, 2025

100% hate what I did here lol I am not a fan of them either. I just wasn't sure on the fix complexity with the native code so this was a quick work around fix.

@azeno
Copy link
Collaborator

azeno commented Mar 30, 2025

Let me check the native part ..

@azeno
Copy link
Collaborator

azeno commented Mar 30, 2025

@Doprez Looks like simply re-compiling sources\tools\Stride.TextureConverter.Wrappers for win-x64 did the trick. I'll make a PR.

@azeno
Copy link
Collaborator

azeno commented Mar 30, 2025

@Doprez See #2694 - undo your changes, and make sure to do a clean build so you don't end up with the old dlls.

@Doprez
Copy link
Contributor Author

Doprez commented Mar 30, 2025

Found an alternative to detect CPU architecture instead that I think should work better assuming I did it right.

Will make a new PR that should be simpler.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants