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

fix: getting app exe path when using PublishSingleFile #2352

Merged
merged 1 commit into from
Jun 27, 2024

Conversation

Basewq
Copy link
Contributor

@Basewq Basewq commented Jun 25, 2024

PR Details

Use PlatformFolders.ApplicationExecutablePath instead of Assembly.GetEntryAssembly().Location

https://learn.microsoft.com/en-us/dotnet/core/deploying/single-file/overview?tabs=cli#api-incompatibility
Under 'API incompatibility' Assembly.Location is not available with single file deployment.
https://learn.microsoft.com/en-us/dotnet/api/system.environment.processpath?view=net-8.0
Environment.ProcessPath can be used as a fallback, but do note that even that can return null.

Related Issue

Fixes #2304 where Icon is set via GameContext.ProductLocation

Also fixes the super secret LeftCtrl + C+ F1 screenshot command in PublishSingleFile.

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.

@Eideren Eideren merged commit 904371f into stride3d:master Jun 27, 2024
14 checks passed
@Eideren
Copy link
Collaborator

Eideren commented Jun 27, 2024

Thanks !

@Eideren Eideren added the area-Core Issue of the engine unrelated to other defined areas label Jun 27, 2024
@Eideren Eideren changed the title Fix getting app exe path when using PublishSingleFile fix: getting app exe path when using PublishSingleFile Jun 27, 2024
@Basewq Basewq deleted the project_user_settings_fix branch July 1, 2024 22:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area-Core Issue of the engine unrelated to other defined areas
Projects
None yet
Development

Successfully merging this pull request may close these issues.

PublishSingleFile removes icon
2 participants