Skip to content

Commit 7f222be

Browse files
authored
Merge pull request #337 from rozele/windows
Adds react-native-windows support for UWP
2 parents abb8272 + 5c5c0db commit 7f222be

27 files changed

+3163
-0
lines changed

windows/.gitignore

Lines changed: 78 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,78 @@
1+
*AppPackages*
2+
*BundleArtifacts*
3+
*ReactAssets*
4+
5+
#OS junk files
6+
[Tt]humbs.db
7+
*.DS_Store
8+
9+
#Visual Studio files
10+
*.[Oo]bj
11+
*.user
12+
*.aps
13+
*.pch
14+
*.vspscc
15+
*.vssscc
16+
*_i.c
17+
*_p.c
18+
*.ncb
19+
*.suo
20+
*.tlb
21+
*.tlh
22+
*.bak
23+
*.[Cc]ache
24+
*.ilk
25+
*.log
26+
*.lib
27+
*.sbr
28+
*.sdf
29+
*.opensdf
30+
*.opendb
31+
*.unsuccessfulbuild
32+
ipch/
33+
[Oo]bj/
34+
[Bb]in
35+
[Dd]ebug*/
36+
[Rr]elease*/
37+
Ankh.NoLoad
38+
39+
#MonoDevelop
40+
*.pidb
41+
*.userprefs
42+
43+
#Tooling
44+
_ReSharper*/
45+
*.resharper
46+
[Tt]est[Rr]esult*
47+
*.sass-cache
48+
49+
#Project files
50+
[Bb]uild/
51+
52+
#Subversion files
53+
.svn
54+
55+
# Office Temp Files
56+
~$*
57+
58+
# vim Temp Files
59+
*~
60+
61+
#NuGet
62+
packages/
63+
*.nupkg
64+
65+
#ncrunch
66+
*ncrunch*
67+
*crunch*.local.xml
68+
69+
# visual studio database projects
70+
*.dbmdl
71+
72+
#Test files
73+
*.testsettings
74+
75+
#Other files
76+
*.DotSettings
77+
.vs/
78+
*project.lock.json

windows/.npmignore

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
2+
# Make sure we don't publish build artifacts to NPM
3+
ARM/
4+
Debug/
5+
x64/
6+
x86/
7+
bin/
8+
obj/
9+
.vs/
Loading
Loading
Loading
Loading
Loading
1.42 KB
Loading
Loading
Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<Package
3+
xmlns="http://schemas.microsoft.com/appx/manifest/foundation/windows10"
4+
xmlns:mp="http://schemas.microsoft.com/appx/2014/phone/manifest"
5+
xmlns:uap="http://schemas.microsoft.com/appx/manifest/uap/windows10"
6+
IgnorableNamespaces="uap mp">
7+
8+
<Identity Name="ad16a47e-d1a1-4328-9c43-c9609e328e36"
9+
Publisher="CN=ericroz"
10+
Version="1.0.0.0" />
11+
12+
<mp:PhoneIdentity PhoneProductId="ad16a47e-d1a1-4328-9c43-c9609e328e36" PhonePublisherId="00000000-0000-0000-0000-000000000000"/>
13+
14+
<Properties>
15+
<DisplayName>RNFS.Tests</DisplayName>
16+
<PublisherDisplayName>ericroz</PublisherDisplayName>
17+
<Logo>Assets\StoreLogo.png</Logo>
18+
</Properties>
19+
20+
<Dependencies>
21+
<TargetDeviceFamily Name="Windows.Universal" MinVersion="10.0.0.0" MaxVersionTested="10.0.0.0" />
22+
</Dependencies>
23+
24+
<Resources>
25+
<Resource Language="x-generate" />
26+
</Resources>
27+
<Applications>
28+
<Application Id="vstest.executionengine.universal.App"
29+
Executable="$targetnametoken$.exe"
30+
EntryPoint="RNFS.Tests.App">
31+
<uap:VisualElements
32+
DisplayName="RNFS.Tests"
33+
Square150x150Logo="Assets\Square150x150Logo.png"
34+
Square44x44Logo="Assets\Square44x44Logo.png"
35+
Description="RNFS.Tests"
36+
BackgroundColor="transparent">
37+
<uap:DefaultTile Wide310x150Logo="Assets\Wide310x150Logo.png"/>
38+
<uap:SplashScreen Image="Assets\SplashScreen.png" />
39+
</uap:VisualElements>
40+
</Application>
41+
</Applications>
42+
<Capabilities>
43+
<Capability Name="internetClientServer" />
44+
</Capabilities>
45+
</Package>
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
using System.Reflection;
2+
using System.Runtime.CompilerServices;
3+
using System.Runtime.InteropServices;
4+
5+
[assembly: AssemblyTitle("RNFS.Tests")]
6+
[assembly: AssemblyDescription("")]
7+
[assembly: AssemblyConfiguration("")]
8+
[assembly: AssemblyCompany("")]
9+
[assembly: AssemblyProduct("RNFS.Tests")]
10+
[assembly: AssemblyCopyright("Copyright © 2017")]
11+
[assembly: AssemblyTrademark("")]
12+
[assembly: AssemblyCulture("")]
13+
[assembly: AssemblyMetadata("TargetPlatform","UAP")]
14+
15+
// [assembly: AssemblyVersion("1.0.*")]
16+
[assembly: AssemblyVersion("1.0.0.0")]
17+
[assembly: AssemblyFileVersion("1.0.0.0")]
18+
[assembly: ComVisible(false)]
Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
<!--
2+
This file contains Runtime Directives used by .NET Native. The defaults here are suitable for most
3+
developers. However, you can modify these parameters to modify the behavior of the .NET Native
4+
optimizer.
5+
6+
Runtime Directives are documented at http://go.microsoft.com/fwlink/?LinkID=391919
7+
8+
To fully enable reflection for App1.MyClass and all of its public/private members
9+
<Type Name="App1.MyClass" Dynamic="Required All"/>
10+
11+
To enable dynamic creation of the specific instantiation of AppClass<T> over System.Int32
12+
<TypeInstantiation Name="App1.AppClass" Arguments="System.Int32" Activate="Required Public" />
13+
14+
Using the Namespace directive to apply reflection policy to all the types in a particular namespace
15+
<Namespace Name="DataClasses.ViewModels" Seralize="All" />
16+
-->
17+
18+
<Directives xmlns="http://schemas.microsoft.com/netfx/2013/01/metadata">
19+
<Application>
20+
<!--
21+
An Assembly element with Name="*Application*" applies to all assemblies in
22+
the application package. The asterisks are not wildcards.
23+
-->
24+
<Assembly Name="*Application*" Dynamic="Required All" />
25+
<!-- Add your application specific runtime directives here. -->
26+
27+
28+
</Application>
29+
</Directives>

windows/RNFS.Tests/RNFS.Tests.csproj

Lines changed: 151 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,151 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<Project ToolsVersion="15.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
3+
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
4+
<PropertyGroup>
5+
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
6+
<Platform Condition=" '$(Platform)' == '' ">x86</Platform>
7+
<ProjectGuid>{8D2229AC-F6EC-4FBD-9AAC-FE4792DA98C6}</ProjectGuid>
8+
<OutputType>AppContainerExe</OutputType>
9+
<AppDesignerFolder>Properties</AppDesignerFolder>
10+
<RootNamespace>RNFS.Tests</RootNamespace>
11+
<AssemblyName>RNFS.Tests</AssemblyName>
12+
<DefaultLanguage>en-US</DefaultLanguage>
13+
<TargetPlatformIdentifier>UAP</TargetPlatformIdentifier>
14+
<TargetPlatformVersion>10.0.14393.0</TargetPlatformVersion>
15+
<TargetPlatformMinVersion>10.0.10586.0</TargetPlatformMinVersion>
16+
<MinimumVisualStudioVersion>14</MinimumVisualStudioVersion>
17+
<FileAlignment>512</FileAlignment>
18+
<ProjectTypeGuids>{A5A43C5B-DE2A-4C0C-9213-0A381AF9435A};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
19+
<PackageCertificateKeyFile>RNFS.Tests_TemporaryKey.pfx</PackageCertificateKeyFile>
20+
<UnitTestPlatformVersion Condition="'$(UnitTestPlatformVersion)' == ''">$(VisualStudioVersion)</UnitTestPlatformVersion>
21+
</PropertyGroup>
22+
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug|x86'">
23+
<DebugSymbols>true</DebugSymbols>
24+
<OutputPath>bin\x86\Debug\</OutputPath>
25+
<DefineConstants>DEBUG;TRACE;NETFX_CORE;WINDOWS_UWP</DefineConstants>
26+
<NoWarn>;2008</NoWarn>
27+
<DebugType>full</DebugType>
28+
<PlatformTarget>x86</PlatformTarget>
29+
<UseVSHostingProcess>false</UseVSHostingProcess>
30+
<ErrorReport>prompt</ErrorReport>
31+
<Prefer32Bit>true</Prefer32Bit>
32+
</PropertyGroup>
33+
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Release|x86'">
34+
<OutputPath>bin\x86\Release\</OutputPath>
35+
<DefineConstants>TRACE;NETFX_CORE;WINDOWS_UWP</DefineConstants>
36+
<Optimize>true</Optimize>
37+
<NoWarn>;2008</NoWarn>
38+
<DebugType>pdbonly</DebugType>
39+
<PlatformTarget>x86</PlatformTarget>
40+
<UseVSHostingProcess>false</UseVSHostingProcess>
41+
<ErrorReport>prompt</ErrorReport>
42+
<Prefer32Bit>true</Prefer32Bit>
43+
<UseDotNetNativeToolchain>true</UseDotNetNativeToolchain>
44+
</PropertyGroup>
45+
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug|ARM'">
46+
<DebugSymbols>true</DebugSymbols>
47+
<OutputPath>bin\ARM\Debug\</OutputPath>
48+
<DefineConstants>DEBUG;TRACE;NETFX_CORE;WINDOWS_UWP</DefineConstants>
49+
<NoWarn>;2008</NoWarn>
50+
<DebugType>full</DebugType>
51+
<PlatformTarget>ARM</PlatformTarget>
52+
<UseVSHostingProcess>false</UseVSHostingProcess>
53+
<ErrorReport>prompt</ErrorReport>
54+
<Prefer32Bit>true</Prefer32Bit>
55+
</PropertyGroup>
56+
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Release|ARM'">
57+
<OutputPath>bin\ARM\Release\</OutputPath>
58+
<DefineConstants>TRACE;NETFX_CORE;WINDOWS_UWP</DefineConstants>
59+
<Optimize>true</Optimize>
60+
<NoWarn>;2008</NoWarn>
61+
<DebugType>pdbonly</DebugType>
62+
<PlatformTarget>ARM</PlatformTarget>
63+
<UseVSHostingProcess>false</UseVSHostingProcess>
64+
<ErrorReport>prompt</ErrorReport>
65+
<Prefer32Bit>true</Prefer32Bit>
66+
<UseDotNetNativeToolchain>true</UseDotNetNativeToolchain>
67+
</PropertyGroup>
68+
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug|x64'">
69+
<DebugSymbols>true</DebugSymbols>
70+
<OutputPath>bin\x64\Debug\</OutputPath>
71+
<DefineConstants>DEBUG;TRACE;NETFX_CORE;WINDOWS_UWP</DefineConstants>
72+
<NoWarn>;2008</NoWarn>
73+
<DebugType>full</DebugType>
74+
<PlatformTarget>x64</PlatformTarget>
75+
<UseVSHostingProcess>false</UseVSHostingProcess>
76+
<ErrorReport>prompt</ErrorReport>
77+
<Prefer32Bit>true</Prefer32Bit>
78+
</PropertyGroup>
79+
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Release|x64'">
80+
<OutputPath>bin\x64\Release\</OutputPath>
81+
<DefineConstants>TRACE;NETFX_CORE;WINDOWS_UWP</DefineConstants>
82+
<Optimize>true</Optimize>
83+
<NoWarn>;2008</NoWarn>
84+
<DebugType>pdbonly</DebugType>
85+
<PlatformTarget>x64</PlatformTarget>
86+
<UseVSHostingProcess>false</UseVSHostingProcess>
87+
<ErrorReport>prompt</ErrorReport>
88+
<Prefer32Bit>true</Prefer32Bit>
89+
<UseDotNetNativeToolchain>true</UseDotNetNativeToolchain>
90+
</PropertyGroup>
91+
<ItemGroup>
92+
<!--A reference to the entire .Net Framework and Windows SDK are automatically included-->
93+
<None Include="project.json" />
94+
</ItemGroup>
95+
<ItemGroup>
96+
<SDKReference Include="TestPlatform.Universal, Version=$(UnitTestPlatformVersion)" />
97+
</ItemGroup>
98+
<ItemGroup>
99+
<Compile Include="Properties\AssemblyInfo.cs" />
100+
<Compile Include="UnitTestApp.xaml.cs">
101+
<DependentUpon>UnitTestApp.xaml</DependentUpon>
102+
</Compile>
103+
<Compile Include="RNFSManagerTests.cs" />
104+
</ItemGroup>
105+
<ItemGroup>
106+
<ApplicationDefinition Include="UnitTestApp.xaml">
107+
<Generator>MSBuild:Compile</Generator>
108+
<SubType>Designer</SubType>
109+
</ApplicationDefinition>
110+
</ItemGroup>
111+
<ItemGroup>
112+
<AppxManifest Include="Package.appxmanifest">
113+
<SubType>Designer</SubType>
114+
</AppxManifest>
115+
<None Include="RNFS.Tests_TemporaryKey.pfx" />
116+
</ItemGroup>
117+
<ItemGroup>
118+
<Content Include="Properties\UnitTestApp.rd.xml" />
119+
<Content Include="Assets\LockScreenLogo.scale-200.png" />
120+
<Content Include="Assets\SplashScreen.scale-200.png" />
121+
<Content Include="Assets\Square150x150Logo.scale-200.png" />
122+
<Content Include="Assets\Square44x44Logo.scale-200.png" />
123+
<Content Include="Assets\Square44x44Logo.targetsize-24_altform-unplated.png" />
124+
<Content Include="Assets\StoreLogo.png" />
125+
<Content Include="Assets\Wide310x150Logo.scale-200.png" />
126+
</ItemGroup>
127+
<ItemGroup>
128+
<ProjectReference Include="..\..\node_modules\react-native-windows\ReactWindows\ReactNative\ReactNative.csproj">
129+
<Project>{c7673ad5-e3aa-468c-a5fd-fa38154e205c}</Project>
130+
<Name>ReactNative</Name>
131+
</ProjectReference>
132+
<ProjectReference Include="..\RNFs\RNFS.csproj">
133+
<Project>{746610d0-8693-11e7-a20d-bf83f7366778}</Project>
134+
<Name>RNFS</Name>
135+
</ProjectReference>
136+
</ItemGroup>
137+
<ItemGroup>
138+
<Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
139+
</ItemGroup>
140+
<PropertyGroup Condition=" '$(VisualStudioVersion)' == '' or '$(VisualStudioVersion)' &lt; '14.0' ">
141+
<VisualStudioVersion>14.0</VisualStudioVersion>
142+
</PropertyGroup>
143+
<Import Project="$(MSBuildExtensionsPath)\Microsoft\WindowsXaml\v$(VisualStudioVersion)\Microsoft.Windows.UI.Xaml.CSharp.targets" />
144+
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
145+
Other similar extension points exist, see Microsoft.Common.targets.
146+
<Target Name="BeforeBuild">
147+
</Target>
148+
<Target Name="AfterBuild">
149+
</Target>
150+
-->
151+
</Project>
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
<?xml version="1.0" encoding="utf-8" standalone="no"?>
2+
<Project ToolsVersion="14.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
3+
<PropertyGroup Condition=" '$(ExcludeRestorePackageImports)' != 'true' ">
4+
<RestoreSuccess Condition=" '$(RestoreSuccess)' == '' ">True</RestoreSuccess>
5+
<RestoreTool Condition=" '$(RestoreTool)' == '' ">NuGet</RestoreTool>
6+
<ProjectAssetsFile Condition=" '$(ProjectAssetsFile)' == '' ">C:\src\react-native-fs\windows\RNFS.Tests\project.lock.json</ProjectAssetsFile>
7+
<NuGetPackageRoot Condition=" '$(NuGetPackageRoot)' == '' ">$(UserProfile)\.nuget\packages\</NuGetPackageRoot>
8+
<NuGetPackageFolders Condition=" '$(NuGetPackageFolders)' == '' ">C:\Users\ericroz\.nuget\packages\</NuGetPackageFolders>
9+
<NuGetProjectStyle Condition=" '$(NuGetProjectStyle)' == '' ">ProjectJson</NuGetProjectStyle>
10+
<NuGetToolVersion Condition=" '$(NuGetToolVersion)' == '' ">4.3.0</NuGetToolVersion>
11+
</PropertyGroup>
12+
<PropertyGroup>
13+
<MSBuildAllProjects>$(MSBuildAllProjects);$(MSBuildThisFileFullPath)</MSBuildAllProjects>
14+
</PropertyGroup>
15+
<ImportGroup Condition=" '$(ExcludeRestorePackageImports)' != 'true' ">
16+
<Import Project="$(NuGetPackageRoot)mstest.testadapter\1.1.18\build\uap10.0\MSTest.TestAdapter.props" Condition="Exists('$(NuGetPackageRoot)mstest.testadapter\1.1.18\build\uap10.0\MSTest.TestAdapter.props')" />
17+
</ImportGroup>
18+
</Project>
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
<?xml version="1.0" encoding="utf-8" standalone="no"?>
2+
<Project ToolsVersion="14.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
3+
<PropertyGroup>
4+
<MSBuildAllProjects>$(MSBuildAllProjects);$(MSBuildThisFileFullPath)</MSBuildAllProjects>
5+
</PropertyGroup>
6+
<ImportGroup Condition=" '$(ExcludeRestorePackageImports)' != 'true' ">
7+
<Import Project="$(NuGetPackageRoot)mstest.testadapter\1.1.18\build\uap10.0\MSTest.TestAdapter.targets" Condition="Exists('$(NuGetPackageRoot)mstest.testadapter\1.1.18\build\uap10.0\MSTest.TestAdapter.targets')" />
8+
</ImportGroup>
9+
</Project>
2.45 KB
Binary file not shown.

0 commit comments

Comments
 (0)