Skip to content

Commit 2e233af

Browse files
Teodor C.claude
andcommitted
feat: Add Windows support to React Native quickstart app
- Replace UWP template with cpp-app template for Win32 desktop - Configure for React Native 0.79.1 with React Native Windows 0.79.3 - Enable new architecture (Fabric/TurboModules) support - Add proper DLL packaging configuration - Clean up build artifacts and update .gitignore - Use local Ditto SDK package with Windows support 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <[email protected]>
1 parent c0a4319 commit 2e233af

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

49 files changed

+865
-1526
lines changed

react-native/.gitignore

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,4 +81,6 @@ ditto
8181

8282
# MSBuild logs
8383
*.binlog
84-
msbuild_*.binlog
84+
msbuild_*.binlog
85+
msbuild_*.err
86+
msbuild_*.wrn

react-native/package.json

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -14,11 +14,10 @@
1414
"lint": "eslint .",
1515
"start": "react-native start",
1616
"clean": "rm -rf node_modules && yarn install && cd ios && rm -rf Podfile.lock && rm -rf Pods && pod install && cd ..",
17-
"clean:windows": "cd windows && rd /s /q packages Build x64 && cd ..",
18-
"test:windows": "jest --config jest.config.windows.js"
17+
"clean:windows": "cd windows && rd /s /q packages Build x64 && cd .."
1918
},
2019
"dependencies": {
21-
"@dittolive/ditto": "file:C:/Users/teodo/Projects/ditto/sdks/js/dist/ditto-packed3.tgz",
20+
"@dittolive/ditto": "file:C:/Users/teoc0/Projects/ditto/sdks/js/dist/ditto-package13.tgz",
2221
"react": "19.0.0",
2322
"react-native": "0.79.1",
2423
"react-native-bouncy-checkbox": "^4.1.2",
@@ -39,6 +38,7 @@
3938
"@react-native/eslint-config": "0.79.1",
4039
"@react-native/metro-config": "0.79.1",
4140
"@react-native/typescript-config": "0.79.1",
41+
"@rnx-kit/jest-preset": "^0.1.17",
4242
"@types/jest": "^29.5.13",
4343
"@types/react": "^19.0.0",
4444
"@types/react-test-renderer": "^19.0.0",
@@ -48,8 +48,7 @@
4848
"prettier": "2.8.8",
4949
"react-native-dotenv": "^3.4.11",
5050
"react-test-renderer": "19.0.0",
51-
"typescript": "5.0.4",
52-
"@rnx-kit/jest-preset": "^0.1.17"
51+
"typescript": "5.0.4"
5352
},
5453
"engines": {
5554
"node": ">=18"
@@ -58,7 +57,7 @@
5857
"init-windows": {
5958
"name": "DittoReactNativeSampleApp",
6059
"namespace": "DittoReactNativeSampleApp",
61-
"template": "old/uwp-cpp-app"
60+
"template": "cpp-app"
6261
}
6362
}
6463
}

react-native/windows/.gitignore

Lines changed: 10 additions & 51 deletions
Original file line numberDiff line numberDiff line change
@@ -34,59 +34,18 @@ ipch/
3434
[Dd]ebug*/
3535
[Rr]elease*/
3636
Ankh.NoLoad
37-
38-
# Visual C++ cache files
39-
ipch/
40-
*.aps
41-
*.ncb
42-
*.opendb
43-
*.opensdf
44-
*.sdf
45-
*.cachefile
46-
*.VC.db
47-
*.VC.VC.opendb
48-
49-
#MonoDevelop
50-
*.pidb
51-
*.userprefs
52-
53-
#Tooling
54-
_ReSharper*/
55-
*.resharper
56-
[Tt]est[Rr]esult*
57-
*.sass-cache
58-
59-
#Project files
60-
[Bb]uild/
61-
62-
#Subversion files
63-
.svn
64-
65-
# Office Temp Files
66-
~$*
67-
68-
# vim Temp Files
69-
*~
70-
71-
#NuGet
72-
packages/
73-
*.nupkg
74-
75-
#ncrunch
76-
*ncrunch*
77-
*crunch*.local.xml
78-
79-
# visual studio database projects
80-
*.dbmdl
81-
82-
#Test files
83-
*.testsettings
84-
85-
#Other files
86-
*.DotSettings
8737
.vs/
88-
*project.lock.json
38+
# Visual C++ cache files
8939

9040
#Files generated by the VS build
9141
**/Generated Files/**
9242

43+
#Files generated by MS build
44+
*.binlog
45+
*.err
46+
*.wrn
47+
48+
#Build output directories
49+
x64/
50+
x86/
51+
ARM64/
Lines changed: 90 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,90 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<Project ToolsVersion="Current" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
3+
<Import Project="$(SolutionDir)\ExperimentalFeatures.props" Condition="Exists('$(SolutionDir)\ExperimentalFeatures.props')" />
4+
<PropertyGroup>
5+
<ProjectGuid>{2885eb41-bf53-483b-87d8-960bcf06da00}</ProjectGuid>
6+
<DefaultLanguage>en-US</DefaultLanguage>
7+
<EntryPointProjectUniqueName>..\DittoReactNativeSampleApp\DittoReactNativeSampleApp.vcxproj</EntryPointProjectUniqueName>
8+
<DebuggerType>NativeOnly</DebuggerType>
9+
<BackgroundTaskDebugEngines>NativeOnly</BackgroundTaskDebugEngines>
10+
</PropertyGroup>
11+
<PropertyGroup Label="ReactNativeWindowsProps">
12+
<ReactNativeWindowsDir Condition="'$(ReactNativeWindowsDir)' == ''">$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), 'node_modules\react-native-windows\package.json'))\node_modules\react-native-windows\</ReactNativeWindowsDir>
13+
</PropertyGroup>
14+
<Import Project="$(ReactNativeWindowsDir)\PropertySheets\External\Microsoft.ReactNative.WindowsSdk.Default.props" />
15+
<PropertyGroup>
16+
<WapProjPath Condition="'$(WapProjPath)'==''">$(MSBuildExtensionsPath)\Microsoft\DesktopBridge\</WapProjPath>
17+
</PropertyGroup>
18+
<Import Project="$(WapProjPath)\Microsoft.DesktopBridge.props" />
19+
<ItemGroup Label="ProjectConfigurations">
20+
<ProjectConfiguration Include="Debug|x86">
21+
<Configuration>Debug</Configuration>
22+
<Platform>x86</Platform>
23+
</ProjectConfiguration>
24+
<ProjectConfiguration Include="Release|x86">
25+
<Configuration>Release</Configuration>
26+
<Platform>x86</Platform>
27+
</ProjectConfiguration>
28+
<ProjectConfiguration Include="Debug|x64">
29+
<Configuration>Debug</Configuration>
30+
<Platform>x64</Platform>
31+
</ProjectConfiguration>
32+
<ProjectConfiguration Include="Release|x64">
33+
<Configuration>Release</Configuration>
34+
<Platform>x64</Platform>
35+
</ProjectConfiguration>
36+
<ProjectConfiguration Include="Debug|ARM64">
37+
<Configuration>Debug</Configuration>
38+
<Platform>ARM64</Platform>
39+
</ProjectConfiguration>
40+
<ProjectConfiguration Include="Release|ARM64">
41+
<Configuration>Release</Configuration>
42+
<Platform>ARM64</Platform>
43+
</ProjectConfiguration>
44+
</ItemGroup>
45+
<ImportGroup Label="ReactNativeWindowsPropertySheets">
46+
<Import Project="$(ReactNativeWindowsDir)\PropertySheets\External\Microsoft.ReactNative.Composition.Package.props" Condition="Exists('$(ReactNativeWindowsDir)\PropertySheets\External\Microsoft.ReactNative.Composition.Package.props')" />
47+
</ImportGroup>
48+
<ItemGroup>
49+
<AppxManifest Include="Package.appxmanifest">
50+
<SubType>Designer</SubType>
51+
</AppxManifest>
52+
</ItemGroup>
53+
<ItemGroup>
54+
<Content Include="Images\SplashScreen.scale-200.png" />
55+
<Content Include="Images\LockScreenLogo.scale-200.png" />
56+
<Content Include="Images\Square150x150Logo.scale-200.png" />
57+
<Content Include="Images\Square44x44Logo.scale-200.png" />
58+
<Content Include="Images\Square44x44Logo.targetsize-24_altform-unplated.png" />
59+
<Content Include="Images\StoreLogo.png" />
60+
<Content Include="Images\Wide310x150Logo.scale-200.png" />
61+
<Content Include="$(ProjectDir)..\..\node_modules\@dittolive\ditto\react-native\windows\dittoffi\libs\x86_64-pc-windows-msvc\dittoffi.dll" Condition="'$(Platform)'=='x64'">
62+
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
63+
<TargetPath>DittoReactNativeSampleApp\dittoffi.dll</TargetPath>
64+
</Content>
65+
<Content Include="$(ProjectDir)..\..\node_modules\@dittolive\ditto\react-native\windows\dittoffi\libs\i686-pc-windows-msvc\dittoffi.dll" Condition="'$(Platform)'=='Win32' Or '$(Platform)'=='x86'">
66+
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
67+
<TargetPath>DittoReactNativeSampleApp\dittoffi.dll</TargetPath>
68+
</Content>
69+
<Content Include="$(ProjectDir)..\..\node_modules\@dittolive\ditto\react-native\windows\dittoffi\libs\aarch64-pc-windows-msvc\dittoffi.dll" Condition="'$(Platform)'=='ARM64'">
70+
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
71+
<TargetPath>DittoReactNativeSampleApp\dittoffi.dll</TargetPath>
72+
</Content>
73+
</ItemGroup>
74+
<ItemGroup>
75+
<ProjectReference Include="..\DittoReactNativeSampleApp\DittoReactNativeSampleApp.vcxproj">
76+
<SkipGetTargetFrameworkProperties>True</SkipGetTargetFrameworkProperties>
77+
</ProjectReference>
78+
</ItemGroup>
79+
<Import Project="$(WapProjPath)\Microsoft.DesktopBridge.targets" />
80+
<ImportGroup Label="ReactNativeWindowsTargets">
81+
<Import Project="$(ReactNativeWindowsDir)\PropertySheets\External\Microsoft.ReactNative.Composition.Package.targets" Condition="Exists('$(ReactNativeWindowsDir)\PropertySheets\External\Microsoft.ReactNative.Composition.Package.targets')" />
82+
</ImportGroup>
83+
<Target Name="EnsureReactNativeWindowsTargets" BeforeTargets="PrepareForBuild">
84+
<PropertyGroup>
85+
<ErrorText>This project references targets in your node_modules\react-native-windows folder that are missing. The missing file is {0}.</ErrorText>
86+
</PropertyGroup>
87+
<Error Condition="!Exists('$(ReactNativeWindowsDir)\PropertySheets\External\Microsoft.ReactNative.Composition.Package.props')" Text="$([System.String]::Format('$(ErrorText)', '$(ReactNativeWindowsDir)\PropertySheets\External\Microsoft.ReactNative.Composition.Package.props'))" />
88+
<Error Condition="!Exists('$(ReactNativeWindowsDir)\PropertySheets\External\Microsoft.ReactNative.Composition.Package.targets')" Text="$([System.String]::Format('$(ErrorText)', '$(ReactNativeWindowsDir)\PropertySheets\External\Microsoft.ReactNative.Composition.Package.targets'))" />
89+
</Target>
90+
</Project>

0 commit comments

Comments
 (0)