-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix issue with new arch cpp-app apps not finding the bundle in releas…
…e builds (#12754) ## Description The new cpp-app template (and related apps `playground-composition` and `e2e-test-app-fabric`) were all set with an invalid `BundleRootPath`. This causes the app to throw an error because it can't parse the given path from the URI, furthermore, since it was a URI based on the current working directory, it might not even be the right directory to load the bundle from. This PR fixes the issue by instead using the correct `file://` URI scheme and also looking for the bundle path relative to the location of the app exe itself. This PR also re-aligns the apps to use the similar instance settings setup of the older UWP app (using both the `BUNDLE` and `_DEBUG` macros appropriately). Partially resolves #12752 ### Type of Change - Bug fix (non-breaking change which fixes an issue) ### Why So that release builds work for the apps using the new template. ### What See above. ## Screenshots ![image](https://github.com/microsoft/react-native-windows/assets/10852185/4a839f09-996b-464d-ada3-1878bdf835e6) ## Testing Tested a new app works with the changes. ## Changelog Should this change be included in the release notes: _yes_ Fixed issue with new arch cpp-app apps not finding the bundle in release builds
- Loading branch information
1 parent
b0a01e7
commit e694482
Showing
8 changed files
with
49 additions
and
28 deletions.
There are no files selected for viewing
7 changes: 7 additions & 0 deletions
7
change/react-native-windows-aa8367b6-17de-4644-b985-dfabfe7c393d.json
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
{ | ||
"type": "prerelease", | ||
"comment": "Fix issue with new arch cpp-app apps not finding the bundle in release builds", | ||
"packageName": "react-native-windows", | ||
"email": "jthysell@microsoft.com", | ||
"dependentChangeType": "patch" | ||
} |
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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