-
Notifications
You must be signed in to change notification settings - Fork 474
feat(windows): add New Architecture support #1147
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
Changes from 1 commit
b3739e6
73e701f
b231d74
7967f29
7e5116e
beb94d5
10b538b
36a9635
f289477
50e5255
66c9429
b01454d
1ea1df7
015b4ab
6f1d52f
5e055bc
a794eb1
f1fc1d4
8387705
123b3fd
8dade8c
8acb3b0
e50e5e1
be17698
3782d55
539a4c1
00913a6
e49a0ef
35b24a1
452ed6f
dabd92a
66e0c92
ad9ce4d
456d9fa
b6bfb3b
b9f2e55
dd5b0fb
eef71c1
ce96c4b
ee87b26
f79f198
ef227e7
a1d931c
9bc5354
67526ce
c3c8874
8099d49
dd1dbac
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -91,10 +91,13 @@ | |
<ImportGroup Label="PropertySheets" Condition="'$(UseFabric)'!='true'"> | ||
<Import Project="PropertySheet.props" /> | ||
</ImportGroup> | ||
<ImportGroup Label="ReactNativeWindowsPropertySheets"> | ||
<ImportGroup Label="ReactNativeWindowsPropertySheets" Condition="'$(ReactNativeWindowsCanary)'!='true' And '$([MSBuild]::VersionLessThan($(ReactNativeWindowsMinor), 76))'"> | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. $([MSBuild]::VersionLessThan($(ReactNativeWindowsMajor).$(ReactNativeWindowsMinor).$(ReactNativeWindowsPatch), '0.76.0')) Otherwise if we ever get to a version 1.0, it would count as a version less than 76. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This will still fail to do the right thing if we publish a RNW 1.0.0 I think we want: There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. |
||
<Import Project="$(ReactNativeWindowsDir)\PropertySheets\external\Microsoft.ReactNative.Uwp.CppLib.props" Condition="'$(UseFabric)'!='true' And Exists('$(ReactNativeWindowsDir)\PropertySheets\External\Microsoft.ReactNative.Uwp.CppLib.props')" /> | ||
<Import Project="$(ReactNativeWindowsDir)\PropertySheets\External\Microsoft.ReactNative.Composition.CppLib.props" Condition="'$(UseFabric)'=='true' And Exists('$(ReactNativeWindowsDir)\PropertySheets\External\Microsoft.ReactNative.Composition.CppLib.props')" /> | ||
</ImportGroup> | ||
<ImportGroup Label="ReactNativeWindowsPropertySheets" Condition="'$(ReactNativeWindowsCanary)'=='true' Or '$([MSBuild]::VersionGreaterThanOrEquals($(ReactNativeWindowsMinor), 76))'"> | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I think there is a way to do an if else, I think its called choice or something. You should do that, so that we only include one set of the props files. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Looking at the |
||
<Import Project="$(ReactNativeWindowsDir)\PropertySheets\External\Microsoft.ReactNative.CppLib.props" Condition="Exists('$(ReactNativeWindowsDir)\PropertySheets\External\Microsoft.ReactNative.CppLib.props')" /> | ||
</ImportGroup> | ||
<ItemDefinitionGroup> | ||
<ClCompile> | ||
<PrecompiledHeader>Use</PrecompiledHeader> | ||
|
@@ -161,10 +164,13 @@ | |
<Midl Include="..\code\ReactPackageProvider.idl" /> | ||
</ItemGroup> | ||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" /> | ||
<ImportGroup Label="ReactNativeWindowsTargets"> | ||
<ImportGroup Label="ReactNativeWindowsTargets" Condition="'$(ReactNativeWindowsCanary)'!='true' And '$([MSBuild]::VersionLessThan($(ReactNativeWindowsMinor), 76))'"> | ||
<Import Project="$(ReactNativeWindowsDir)\PropertySheets\External\Microsoft.ReactNative.Uwp.CppLib.targets" Condition="'$(UseFabric)'!='true' And Exists('$(ReactNativeWindowsDir)\PropertySheets\External\Microsoft.ReactNative.Uwp.CppLib.targets')" /> | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. We should work out how to use Do we have any variables available to the vcxproj for RNW version? -- Seems like that would be useful so that we could import Uwp.CppLib on older RNW versions, but the newer import on newer RNW versions. If we dont have such a variable, we should add one to newer RNW versions, and we can use the lack of such a variable as indication to use the older build logic. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. that logic is in Microsoft.ReactNative.CppLib.props and Microsoft.ReactNative.CppLib.targets and will be in 0.76. At some point we just have to say, RNW fabricis soft launching in 0.76, the template in 0.76 is the supported base and 0.76 is the supported min version for fabric. Projects are welcome to use UseFabric themselves to replicate the functionality for RNW < 0.76, but I don't want that in the template. |
||
<Import Project="$(ReactNativeWindowsDir)\PropertySheets\External\Microsoft.ReactNative.Composition.CppLib.targets" Condition="'$(UseFabric)'=='true' And Exists('$(ReactNativeWindowsDir)\PropertySheets\External\Microsoft.ReactNative.Composition.CppLib.targets')" /> | ||
</ImportGroup> | ||
<ImportGroup Label="ReactNativeWindowsTargets" Condition="'$(ReactNativeWindowsCanary)'=='true' Or '$([MSBuild]::VersionGreaterThanOrEquals($(ReactNativeWindowsMinor), 76))'"> | ||
<Import Project="$(ReactNativeWindowsDir)\PropertySheets\External\Microsoft.ReactNative.CppLib.targets" Condition="Exists('$(ReactNativeWindowsDir)\PropertySheets\External\Microsoft.ReactNative.CppLib.targets')" /> | ||
</ImportGroup> | ||
<ItemGroup> | ||
</ItemGroup> | ||
<Target Name="EnsureReactNativeWindowsTargets" BeforeTargets="PrepareForBuild"> | ||
|
@@ -175,5 +181,7 @@ | |
<Error Condition="'$(UseFabric)'!='true' And !Exists('$(ReactNativeWindowsDir)\PropertySheets\External\Microsoft.ReactNative.Uwp.CppLib.targets')" Text="$([System.String]::Format('$(ErrorText)', '$(ReactNativeWindowsDir)\PropertySheets\External\Microsoft.ReactNative.Uwp.CppLib.targets'))" /> | ||
<Error Condition="'$(UseFabric)'=='true' And !Exists('$(ReactNativeWindowsDir)\PropertySheets\External\Microsoft.ReactNative.Composition.CppLib.props')" Text="$([System.String]::Format('$(ErrorText)', '$(ReactNativeWindowsDir)\PropertySheets\External\Microsoft.ReactNative.Composition.CppLib.props'))" /> | ||
<Error Condition="'$(UseFabric)'=='true' And !Exists('$(ReactNativeWindowsDir)\PropertySheets\External\Microsoft.ReactNative.Composition.CppLib.targets')" Text="$([System.String]::Format('$(ErrorText)', '$(ReactNativeWindowsDir)\PropertySheets\External\Microsoft.ReactNative.Composition.CppLib.targets'))" /> | ||
<Error Condition="!Exists('$(ReactNativeWindowsDir)\PropertySheets\External\Microsoft.ReactNative.CppLib.props')" Text="$([System.String]::Format('$(ErrorText)', '$(ReactNativeWindowsDir)\PropertySheets\External\Microsoft.ReactNative.CppLib.props'))" /> | ||
<Error Condition="!Exists('$(ReactNativeWindowsDir)\PropertySheets\External\Microsoft.ReactNative.CppLib.targets')" Text="$([System.String]::Format('$(ErrorText)', '$(ReactNativeWindowsDir)\PropertySheets\External\Microsoft.ReactNative.CppLib.targets'))" /> | ||
</Target> | ||
</Project> |
tido64 marked this conversation as resolved.
Show resolved
Hide resolved
|
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@acoates-ms this commit should make use of microsoft/react-native-windows#13945 once that PR is backported into 0.76.
I assumed that if someone is building with a canary build, that it would be the latest canary so it will include template update - which is why the check for the new props and targets import is an
Or
. Does the logic here look good?