From 160545167524a8f323f1b2b824580467acf2f425 Mon Sep 17 00:00:00 2001 From: "Andrew Coates (REDMOND)" Date: Wed, 8 Apr 2020 16:18:01 -0700 Subject: [PATCH 01/11] Move playground app to use Microsoft.ReactNative --- packages/E2ETest/package.json | 4 +- .../package.json | 4 +- packages/playground/.eslintignore | 1 - packages/playground/.eslintrc.js | 10 +- packages/playground/.flowconfig | 75 +++ packages/playground/.gitattributes | 1 + packages/playground/.gitignore | 62 ++- packages/playground/.npmrc | 1 - packages/playground/.prettierrc.js | 6 + packages/playground/.watchmanconfig | 1 + packages/playground/App.js | 114 ++++ packages/playground/README.md | 53 +- packages/playground/babel.config.js | 3 + packages/playground/index.js | 9 + packages/playground/just-task.js | 44 -- packages/playground/metro.config.js | 30 +- packages/playground/package.json | 24 +- packages/playground/packages.config | 3 +- packages/playground/postinstall.js | 42 -- packages/playground/react-native.config.js | 4 +- packages/playground/windows/.gitignore | 92 ++++ packages/playground/windows/playground.sln | 159 ++++-- .../playground/windows/playground/App.cpp | 281 ++++++++++ .../playground/windows/playground/App.xaml | 10 - .../windows/playground/App.xaml.cpp | 113 ---- .../playground/windows/playground/App.xaml.h | 27 - .../windows/playground/Bundle/.gitignore | 2 + .../windows/playground/HostingPane.xaml | 165 ------ .../windows/playground/HostingPane.xaml.cpp | 498 ------------------ .../windows/playground/HostingPane.xaml.h | 87 --- .../windows/playground/MainPage.xaml | 13 - .../windows/playground/MainPage.xaml.cpp | 130 ----- .../windows/playground/MainPage.xaml.h | 36 -- .../windows/playground/Package.appxmanifest | 43 +- .../windows/playground/Playground.vcxproj | 152 +++--- .../playground/Playground.vcxproj.filters | 63 +-- .../playground/Playground_TemporaryKey.pfx | Bin 2512 -> 2528 bytes .../windows/playground/PropertySheet.props | 16 + .../playground/ReactPackageProvider.cpp | 20 + .../windows/playground/ReactPackageProvider.h | 21 + .../playground/Utilities/RelayCommand.cpp | 32 -- .../playground/Utilities/RelayCommand.h | 26 - .../playground/ViewLifetimeControl.cpp | 259 --------- .../windows/playground/ViewLifetimeControl.h | 91 ---- .../windows/playground/nativeModules.g.h | 2 + .../windows/playground/packages.config | 1 + .../playground/windows/playground/pch.cpp | 1 - packages/playground/windows/playground/pch.h | 31 +- yarn.lock | 290 ++++++---- 49 files changed, 1220 insertions(+), 1932 deletions(-) delete mode 100644 packages/playground/.eslintignore create mode 100644 packages/playground/.flowconfig create mode 100644 packages/playground/.gitattributes delete mode 100644 packages/playground/.npmrc create mode 100644 packages/playground/.prettierrc.js create mode 100644 packages/playground/.watchmanconfig create mode 100644 packages/playground/App.js create mode 100644 packages/playground/babel.config.js create mode 100644 packages/playground/index.js delete mode 100644 packages/playground/just-task.js delete mode 100644 packages/playground/postinstall.js create mode 100644 packages/playground/windows/.gitignore create mode 100644 packages/playground/windows/playground/App.cpp delete mode 100644 packages/playground/windows/playground/App.xaml delete mode 100644 packages/playground/windows/playground/App.xaml.cpp delete mode 100644 packages/playground/windows/playground/App.xaml.h create mode 100644 packages/playground/windows/playground/Bundle/.gitignore delete mode 100644 packages/playground/windows/playground/HostingPane.xaml delete mode 100644 packages/playground/windows/playground/HostingPane.xaml.cpp delete mode 100644 packages/playground/windows/playground/HostingPane.xaml.h delete mode 100644 packages/playground/windows/playground/MainPage.xaml delete mode 100644 packages/playground/windows/playground/MainPage.xaml.cpp delete mode 100644 packages/playground/windows/playground/MainPage.xaml.h create mode 100644 packages/playground/windows/playground/PropertySheet.props create mode 100644 packages/playground/windows/playground/ReactPackageProvider.cpp create mode 100644 packages/playground/windows/playground/ReactPackageProvider.h delete mode 100644 packages/playground/windows/playground/Utilities/RelayCommand.cpp delete mode 100644 packages/playground/windows/playground/Utilities/RelayCommand.h delete mode 100644 packages/playground/windows/playground/ViewLifetimeControl.cpp delete mode 100644 packages/playground/windows/playground/ViewLifetimeControl.h create mode 100644 packages/playground/windows/playground/nativeModules.g.h diff --git a/packages/E2ETest/package.json b/packages/E2ETest/package.json index 12290feaad3..af4d78fe2fc 100644 --- a/packages/E2ETest/package.json +++ b/packages/E2ETest/package.json @@ -43,9 +43,9 @@ "@wdio/sync": "5.12.1", "appium": "1.14.1", "just-scripts": "^0.36.1", - "metro-react-native-babel-preset": "0.55.0", + "metro-react-native-babel-preset": "^0.56.0", "prettier": "^1.18.2", - "react-test-renderer": "16.8.6", + "react-test-renderer": "16.9.0", "rimraf": "^3.0.0", "ts-node": "^7.0.1", "tsconfig-paths": "^3.8.0", diff --git a/packages/microsoft-reactnative-sampleapps/package.json b/packages/microsoft-reactnative-sampleapps/package.json index 3d71c300dd5..c21ba0e5907 100644 --- a/packages/microsoft-reactnative-sampleapps/package.json +++ b/packages/microsoft-reactnative-sampleapps/package.json @@ -25,7 +25,7 @@ "@types/react": "16.9.0", "@types/react-native": "~0.61.5", "just-scripts": "^0.36.1", - "metro-react-native-babel-preset": "0.55.0", - "react-test-renderer": "16.8.6" + "metro-react-native-babel-preset": "^0.56.0", + "react-test-renderer": "16.9.0" } } diff --git a/packages/playground/.eslintignore b/packages/playground/.eslintignore deleted file mode 100644 index 600e365ec83..00000000000 --- a/packages/playground/.eslintignore +++ /dev/null @@ -1 +0,0 @@ -**/node_modules \ No newline at end of file diff --git a/packages/playground/.eslintrc.js b/packages/playground/.eslintrc.js index e23962f3715..40c6dcd05f3 100644 --- a/packages/playground/.eslintrc.js +++ b/packages/playground/.eslintrc.js @@ -1,6 +1,4 @@ -module.exports = { - extends: "@react-native-community", - rules:{ - "react-native/no-inline-styles" : 0, - } -}; \ No newline at end of file +module.exports = { + root: true, + extends: '@react-native-community', +}; diff --git a/packages/playground/.flowconfig b/packages/playground/.flowconfig new file mode 100644 index 00000000000..4afc766a296 --- /dev/null +++ b/packages/playground/.flowconfig @@ -0,0 +1,75 @@ +[ignore] +; We fork some components by platform +.*/*[.]android.js + +; Ignore "BUCK" generated dirs +/\.buckd/ + +; Ignore polyfills +node_modules/react-native/Libraries/polyfills/.* + +; These should not be required directly +; require from fbjs/lib instead: require('fbjs/lib/warning') +node_modules/warning/.* + +; Flow doesn't support platforms +.*/Libraries/Utilities/LoadingView.js + +[untyped] +.*/node_modules/@react-native-community/cli/.*/.* + +[include] + +[libs] +node_modules/react-native/Libraries/react-native/react-native-interface.js +node_modules/react-native/flow/ + +[options] +emoji=true + +esproposal.optional_chaining=enable +esproposal.nullish_coalescing=enable + +module.file_ext=.js +module.file_ext=.json +module.file_ext=.ios.js + +munge_underscores=true + +module.name_mapper='^react-native$' -> '/node_modules/react-native/Libraries/react-native/react-native-implementation' +module.name_mapper='^react-native/\(.*\)$' -> '/node_modules/react-native/\1' +module.name_mapper='^[./a-zA-Z0-9$_-]+\.\(bmp\|gif\|jpg\|jpeg\|png\|psd\|svg\|webp\|m4v\|mov\|mp4\|mpeg\|mpg\|webm\|aac\|aiff\|caf\|m4a\|mp3\|wav\|html\|pdf\)$' -> '/node_modules/react-native/Libraries/Image/RelativeImageStub' + +suppress_type=$FlowIssue +suppress_type=$FlowFixMe +suppress_type=$FlowFixMeProps +suppress_type=$FlowFixMeState + +suppress_comment=\\(.\\|\n\\)*\\$FlowFixMe\\($\\|[^(]\\|(\\(\\)? *\\(site=[a-z,_]*react_native\\(_ios\\)?_\\(oss\\|fb\\)[a-z,_]*\\)?)\\) +suppress_comment=\\(.\\|\n\\)*\\$FlowIssue\\((\\(\\)? *\\(site=[a-z,_]*react_native\\(_ios\\)?_\\(oss\\|fb\\)[a-z,_]*\\)?)\\)?:? #[0-9]+ +suppress_comment=\\(.\\|\n\\)*\\$FlowExpectedError + +[lints] +sketchy-null-number=warn +sketchy-null-mixed=warn +sketchy-number=warn +untyped-type-import=warn +nonstrict-import=warn +deprecated-type=warn +unsafe-getters-setters=warn +inexact-spread=warn +unnecessary-invariant=warn +signature-verification-failure=warn +deprecated-utility=error + +[strict] +deprecated-type +nonstrict-import +sketchy-null +unclear-type +unsafe-getters-setters +untyped-import +untyped-type-import + +[version] +^0.105.0 diff --git a/packages/playground/.gitattributes b/packages/playground/.gitattributes new file mode 100644 index 00000000000..d42ff18354d --- /dev/null +++ b/packages/playground/.gitattributes @@ -0,0 +1 @@ +*.pbxproj -text diff --git a/packages/playground/.gitignore b/packages/playground/.gitignore index bc578d1d660..ad572e632bc 100644 --- a/packages/playground/.gitignore +++ b/packages/playground/.gitignore @@ -1,3 +1,59 @@ -/node_modules -/windows/playground/Generated Files/ -/build \ No newline at end of file +# OSX +# +.DS_Store + +# Xcode +# +build/ +*.pbxuser +!default.pbxuser +*.mode1v3 +!default.mode1v3 +*.mode2v3 +!default.mode2v3 +*.perspectivev3 +!default.perspectivev3 +xcuserdata +*.xccheckout +*.moved-aside +DerivedData +*.hmap +*.ipa +*.xcuserstate + +# Android/IntelliJ +# +build/ +.idea +.gradle +local.properties +*.iml + +# node.js +# +node_modules/ +npm-debug.log +yarn-error.log + +# BUCK +buck-out/ +\.buckd/ +*.keystore +!debug.keystore + +# fastlane +# +# It is recommended to not store the screenshots in the git repo. Instead, use fastlane to re-generate the +# screenshots whenever they are needed. +# For more information about the recommended setup visit: +# https://docs.fastlane.tools/best-practices/source-control/ + +*/fastlane/report.xml +*/fastlane/Preview.html +*/fastlane/screenshots + +# Bundle artifact +*.jsbundle + +# CocoaPods +/ios/Pods/ diff --git a/packages/playground/.npmrc b/packages/playground/.npmrc deleted file mode 100644 index 9cf9495031e..00000000000 --- a/packages/playground/.npmrc +++ /dev/null @@ -1 +0,0 @@ -package-lock=false \ No newline at end of file diff --git a/packages/playground/.prettierrc.js b/packages/playground/.prettierrc.js new file mode 100644 index 00000000000..5c4de1a4f65 --- /dev/null +++ b/packages/playground/.prettierrc.js @@ -0,0 +1,6 @@ +module.exports = { + bracketSpacing: false, + jsxBracketSameLine: true, + singleQuote: true, + trailingComma: 'all', +}; diff --git a/packages/playground/.watchmanconfig b/packages/playground/.watchmanconfig new file mode 100644 index 00000000000..9e26dfeeb6e --- /dev/null +++ b/packages/playground/.watchmanconfig @@ -0,0 +1 @@ +{} \ No newline at end of file diff --git a/packages/playground/App.js b/packages/playground/App.js new file mode 100644 index 00000000000..bb77580955e --- /dev/null +++ b/packages/playground/App.js @@ -0,0 +1,114 @@ +/** + * Sample React Native App + * https://github.com/facebook/react-native + * + * @format + * @flow + */ + +import React from 'react'; +import { + SafeAreaView, + StyleSheet, + ScrollView, + View, + Text, + StatusBar, +} from 'react-native'; + +import { + Header, + LearnMoreLinks, + Colors, + DebugInstructions, + ReloadInstructions, +} from 'react-native/Libraries/NewAppScreen'; + +const App: () => React$Node = () => { + return ( + <> + + + +
+ {global.HermesInternal == null ? null : ( + + Engine: Hermes + + )} + + + Step One + + Edit App.js to change this + screen and then come back to see your edits. + + + + See Your Changes + + + + + + Debug + + + + + + Learn More + + Read the docs to discover what to do next: + + + + + + + + ); +}; + +const styles = StyleSheet.create({ + scrollView: { + backgroundColor: Colors.lighter, + }, + engine: { + position: 'absolute', + right: 0, + }, + body: { + backgroundColor: Colors.white, + }, + sectionContainer: { + marginTop: 32, + paddingHorizontal: 24, + }, + sectionTitle: { + fontSize: 24, + fontWeight: '600', + color: Colors.black, + }, + sectionDescription: { + marginTop: 8, + fontSize: 18, + fontWeight: '400', + color: Colors.dark, + }, + highlight: { + fontWeight: '700', + }, + footer: { + color: Colors.dark, + fontSize: 12, + fontWeight: '600', + padding: 4, + paddingRight: 12, + textAlign: 'right', + }, +}); + +export default App; diff --git a/packages/playground/README.md b/packages/playground/README.md index 8030a6be8cc..5d869967a0e 100644 --- a/packages/playground/README.md +++ b/packages/playground/README.md @@ -1,56 +1,53 @@ # Playground -Playground is a sample standalone application that shows usage of React Native for Windows vNext with several test scenarios. +Playground is a sample standalone application that allows testing of various JS files, including RNTester. ## Launching the app -1. Make sure your development machine has been set up with all the system requirements and dependencies mentioned [here](https://github.com/microsoft/react-native-windows/blob/master/vnext/docs/GettingStarted.md). Make sure a browser is launched and running. - -2. Open a command prompt in Administrator mode, navigate to the root folder and install React Native -`npm install -g react-native-cli` +1. Make sure your development machine has been set up with all the system requirements and dependencies mentioned [here](https://github.com/microsoft/react-native-windows/blob/master/vnext/docs/GettingStarted.md). Make sure a browser is launched and running. -3. Install React Native for Windows +1. Install Packages with-in the repo -`yarn add rnpm-plugin-windows` -`yarn install` +`yarn` -4. Ensure packages are built +1. Ensure packages are built `yarn build` -5. Navigate to the `playground` folder +1. Navigate to the `playground` folder `cd packages\playground` -6. Run the app +1. Run the app -`react-native run-windows` +`yarn windows` -This command will build and deploy the application along with launching Metro bundler and the dev tools. +This command will build and deploy the application along with launching Metro bundler and the dev tools. ## Using the app -You can find several sample .tsx files under the `/playground/samples` folder. You can load any of these files from the drop down at the top of the app, ensure the right App/component name has been picked for the sample on the drop down against "App Name". Click `Load` to load the .tsx file to the bottom pane. +You can find several sample .tsx files under the `/playground/samples` folder. You can load any of these files from the drop down at the top of the app, ensure the right App/component name has been picked for the sample on the drop down against "App Name". Click `Load` to load the .tsx file to the bottom pane. -You can edit the .tsx files for live reload. You can also add multiple React Native for Windows contents within the same app by clicking `+Pane` and loading a different .tsx file into each. +You can edit the .tsx files for fast refresh. -Use the toggles for Web debugger, Live Reload and Reuse Instance to change/test your scenarios. +Use the UI at the top of the playground application to modify the instance settings, then hit `Load` to run the instance. ## Editing the app -You can access and edit the .tsx files in the `/playground/samples` folder. Live reload should work as expected while editing the Typescript files. +You can access and edit the .tsx files in the `/playground/samples` folder. Fast Refresh should work as expected while editing the Typescript files. You can also launch `/playground/windows/playground.sln` solution file in Visual Studio and edit the native C++ code in the Playground Project. You will have to re-launch the app with the above steps if edits are made to the native app code. ## How to remote debug Playground -1. On your dev machine, open `packages/playground/windows/Playground.sln` -2. On your dev machine, run the metro bundler by doing `yarn start --host devMachineName` -3. On your target machine, run MSVSMon. This can be downloaded from [here](https://visualstudio.microsoft.com/downloads/#remote-tools-for-visual-studio-2019). - 1. I haven’t been able to figure out authentication so once you run msvsmon, click on `Options` and select no authentication. -4. Right click on the Playground project, Properties, Debugging - 1. Select Remote debugging, and enter the IP of the debug target - 2. In the command line arguments textbox, enter `devMachineName:8081` - 3. In the protocol dropdown, select no authentication -5. F5! This will build your playground app, and deploy to the target machine. -6. On the target, press `Load`. This will communicate back to the dev machine bundler and launch the web debugger on the dev machine, and serve the pages back to the app running in the target. -You need an updated version of the bundler in order for remote debugging to work properly: [PR here](https://github.com/react-native-community/cli/pull/829) + +1. On your dev machine, open `packages/playground/windows/Playground.sln` +2. On your dev machine, run the metro bundler by doing `yarn start --host devMachineName` +3. On your target machine, run MSVSMon. This can be downloaded from [here](https://visualstudio.microsoft.com/downloads/#remote-tools-for-visual-studio-2019). + 1. I haven’t been able to figure out authentication so once you run msvsmon, click on `Options` and select no authentication. +4. Right click on the Playground project, Properties, Debugging + 1. Select Remote debugging, and enter the IP of the debug target + 2. In the command line arguments textbox, enter `devMachineName:8081` + 3. In the protocol dropdown, select no authentication +5. F5! This will build your playground app, and deploy to the target machine. +6. On the target, press `Load`. This will communicate back to the dev machine bundler and launch the web debugger on the dev machine, and serve the pages back to the app running in the target. + You need an updated version of the bundler in order for remote debugging to work properly: [PR here](https://github.com/react-native-community/cli/pull/829) diff --git a/packages/playground/babel.config.js b/packages/playground/babel.config.js new file mode 100644 index 00000000000..f842b77fcfb --- /dev/null +++ b/packages/playground/babel.config.js @@ -0,0 +1,3 @@ +module.exports = { + presets: ['module:metro-react-native-babel-preset'], +}; diff --git a/packages/playground/index.js b/packages/playground/index.js new file mode 100644 index 00000000000..a850d031de7 --- /dev/null +++ b/packages/playground/index.js @@ -0,0 +1,9 @@ +/** + * @format + */ + +import {AppRegistry} from 'react-native'; +import App from './App'; +import {name as appName} from './app.json'; + +AppRegistry.registerComponent(appName, () => App); diff --git a/packages/playground/just-task.js b/packages/playground/just-task.js deleted file mode 100644 index d99240b79b5..00000000000 --- a/packages/playground/just-task.js +++ /dev/null @@ -1,44 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. - * @format - * @ts-check - */ - -const path = require('path'); -const { - task, - series, - option, - argv, - tscTask, - eslintTask, -} = require('just-scripts'); -const libPath = path.resolve(process.cwd(), 'lib'); -const srcPath = path.resolve(process.cwd(), 'src'); - -option('production'); -option('clean'); - -task('eslint', () => { - return eslintTask(); -}); -task('eslint:fix', () => { - return eslintTask({fix: true}); -}); -task('ts', () => { - return tscTask({ - pretty: true, - noEmit: true, - ...(argv().production && { - inlineSources: true, - sourceRoot: path.relative(libPath, srcPath), - }), - target: 'es6', - module: 'commonjs', - }); -}); - -task('build', series('ts')); -task('lint', series('eslint')); -task('lint:fix', series('eslint:fix')); diff --git a/packages/playground/metro.config.js b/packages/playground/metro.config.js index db67986a530..f019392ca1c 100644 --- a/packages/playground/metro.config.js +++ b/packages/playground/metro.config.js @@ -9,11 +9,11 @@ const path = require('path'); const blacklist = require('metro-config/src/defaults/blacklist'); const rnPath = fs.realpathSync( - fs.realpathSync( - path.resolve(require.resolve('react-native/package.json'), '..'), - ), + path.resolve(require.resolve('react-native/package.json'), '..'), +); +const rnwPath = fs.realpathSync( + path.resolve(require.resolve('react-native-windows/package.json'), '..'), ); -const rnwPath = path.resolve(__dirname, '../../vnext'); module.exports = { // WatchFolders is only needed due to the yarn workspace layout of node_modules, we need to watch the symlinked locations separately @@ -26,34 +26,22 @@ module.exports = { resolver: { extraNodeModules: { - // Redirect metro to rnwPath instead of node_modules/react-native-windows, since metro doesn't like symlinks + // Redirect react-native to react-native-windows 'react-native': rnwPath, 'react-native-windows': rnwPath, }, // Include the macos platform in addition to the defaults because the fork includes macos, but doesn't declare it platforms: ['ios', 'android', 'windesktop', 'windows', 'web', 'macos'], // Since there are multiple copies of react-native, we need to ensure that metro only sees one of them - // This should go away after RN 0.61 when haste is removed + // This should go in RN 0.61 when haste is removed blacklistRE: blacklist([ - new RegExp(`${path.resolve(rnPath)}.*`.replace(/[/\\]/g, '/')), - new RegExp( - `${path.resolve(rnwPath, 'node_modules/react-native')}.*`.replace( - /[/\\]/g, - '/', - ), - ), new RegExp( - `${path.resolve(rnwPath, 'ReactCopies')}.*`.replace(/[/\\]/g, '/'), - ), - new RegExp( - `${path.resolve( - require.resolve('@react-native-community/cli/package.json'), - '../node_modules/react-native', - )}.*`.replace(/[/\\]/g, '/'), + `${(path.resolve(rnPath) + path.sep).replace(/[/\\]/g, '/')}.*`, ), + // This stops "react-native run-windows" from causing the metro server to crash if its already running new RegExp( - `${path.resolve(__dirname, 'windows')}.*`.replace(/[/\\]/g, '/'), + `${path.resolve(__dirname, 'windows').replace(/[/\\]/g, '/')}.*`, ), ]), }, diff --git a/packages/playground/package.json b/packages/playground/package.json index 748ebb1ec82..3bf87d3b2e0 100644 --- a/packages/playground/package.json +++ b/packages/playground/package.json @@ -3,27 +3,25 @@ "version": "0.0.54", "private": true, "scripts": { - "build": "just-scripts build", - "clean": "just-scripts clean", - "lint:fix": "just-scripts lint:fix", - "lint": "just-scripts lint", - "postinstall": "node postinstall.js", + "android": "react-native run-android", + "ios": "react-native run-ios", "start": "react-native start", - "watch": "tsc -w" + "test": "jest", + "lint": "eslint .", + "windows": "react-native run-windows" }, "dependencies": { "react": "16.9.0", "react-native": "0.61.5", - "react-native-windows": "0.0.0-master.23", - "rnpm-plugin-windows": "^0.6.1" + "react-native-windows": "0.0.0-master.23" }, "devDependencies": { - "@babel/core": "7.5.5", - "@babel/runtime": "7.5.5", + "@babel/core": "^7.6.2", + "@babel/runtime": "^7.6.2", "@types/react": "16.9.0", "@types/react-native": "~0.61.5", - "just-scripts": "^0.36.1", - "metro-react-native-babel-preset": "0.55.0", - "react-test-renderer": "16.8.6" + "metro-react-native-babel-preset": "^0.56.0", + "react-test-renderer": "16.9.0", + "@react-native-community/eslint-config": "^0.0.5" } } diff --git a/packages/playground/packages.config b/packages/playground/packages.config index cdb7bb377d4..944c02938da 100644 --- a/packages/playground/packages.config +++ b/packages/playground/packages.config @@ -1,4 +1,5 @@  - + + \ No newline at end of file diff --git a/packages/playground/postinstall.js b/packages/playground/postinstall.js deleted file mode 100644 index ea656da5b18..00000000000 --- a/packages/playground/postinstall.js +++ /dev/null @@ -1,42 +0,0 @@ -/** - * The react-native cli getPlugins assumes that all the react-native platform packages - * are located in node_modules. - * - * When in a yarn workspace, the react-native platforms can be hoisted, so we need to - * add a link to the real location so that getPlugins works correctly. - * - * @format - * - */ -// @ts-check - -const fs = require('fs'); -const path = require('path'); -const os = require('os'); - -const checkOrCreate_node_modules = () => { - const p = path.join(__dirname, 'node_modules'); - - if (!fs.existsSync(p)) { - fs.mkdirSync(p); - } -}; -checkOrCreate_node_modules(); - -const link = (name, target) => { - const p = path.join(__dirname, 'node_modules', name); - - if (!fs.existsSync(p)) { - fs.symlinkSync(target, p, os.platform() === 'win32' ? 'junction' : 'dir'); - } -}; - -link('react-native-windows', path.resolve(__dirname, '../../vnext')); -link( - 'react-native', - path.resolve(require.resolve('react-native/package.json'), '..'), -); -link( - 'rnpm-plugin-windows', - path.resolve(require.resolve('rnpm-plugin-windows/package.json'), '..'), -); diff --git a/packages/playground/react-native.config.js b/packages/playground/react-native.config.js index 25b1f17a2da..cedd9d380ae 100644 --- a/packages/playground/react-native.config.js +++ b/packages/playground/react-native.config.js @@ -1,3 +1,5 @@ +const fs = require('fs'); +const path = require('path'); module.exports = { - reactNativePath: '../../vnext', + reactNativePath: fs.realpathSync(path.resolve(require.resolve('react-native-windows/package.json'), '..')), }; diff --git a/packages/playground/windows/.gitignore b/packages/playground/windows/.gitignore new file mode 100644 index 00000000000..4ea0c7b5a35 --- /dev/null +++ b/packages/playground/windows/.gitignore @@ -0,0 +1,92 @@ +*AppPackages* +*BundleArtifacts* + +#OS junk files +[Tt]humbs.db +*.DS_Store + +#Visual Studio files +*.[Oo]bj +*.user +*.aps +*.pch +*.vspscc +*.vssscc +*_i.c +*_p.c +*.ncb +*.suo +*.tlb +*.tlh +*.bak +*.[Cc]ache +*.ilk +*.log +*.lib +*.sbr +*.sdf +*.opensdf +*.opendb +*.unsuccessfulbuild +ipch/ +[Oo]bj/ +[Bb]in +[Dd]ebug*/ +[Rr]elease*/ +Ankh.NoLoad + +# Visual C++ cache files +ipch/ +*.aps +*.ncb +*.opendb +*.opensdf +*.sdf +*.cachefile +*.VC.db +*.VC.VC.opendb + +#MonoDevelop +*.pidb +*.userprefs + +#Tooling +_ReSharper*/ +*.resharper +[Tt]est[Rr]esult* +*.sass-cache + +#Project files +[Bb]uild/ + +#Subversion files +.svn + +# Office Temp Files +~$* + +# vim Temp Files +*~ + +#NuGet +packages/ +*.nupkg + +#ncrunch +*ncrunch* +*crunch*.local.xml + +# visual studio database projects +*.dbmdl + +#Test files +*.testsettings + +#Other files +*.DotSettings +.vs/ +*project.lock.json + +#Files generated by the VS build +**/Generated Files/** + diff --git a/packages/playground/windows/playground.sln b/packages/playground/windows/playground.sln index b158b1fa829..51df10393e6 100644 --- a/packages/playground/windows/playground.sln +++ b/packages/playground/windows/playground.sln @@ -1,17 +1,15 @@  Microsoft Visual Studio Solution File, Format Version 12.00 # Visual Studio Version 16 -VisualStudioVersion = 16.0.29102.190 +VisualStudioVersion = 16.0.29215.179 MinimumVisualStudioVersion = 10.0.40219.1 -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Playground", "playground\Playground.vcxproj", "{8B88FFAE-4DBC-49A2-AFA5-D2477D4AD189}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Folly", "..\..\..\vnext\Folly\Folly.vcxproj", "{A990658C-CE31-4BCC-976F-0FC6B1AF693D}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "ReactUWP", "..\..\..\vnext\ReactUWP\ReactUWP.vcxproj", "{2D5D43D9-CFFC-4C40-B4CD-02EFB4E2742B}" +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "playground", "playground\playground.vcxproj", "{6B6AA847-B32F-41AC-9D3B-48A8CDFA8ADE}" ProjectSection(ProjectDependencies) = postProject - {A990658C-CE31-4BCC-976F-0FC6B1AF693D} = {A990658C-CE31-4BCC-976F-0FC6B1AF693D} + {F7D32BD0-2749-483E-9A0D-1635EF7E3136} = {F7D32BD0-2749-483E-9A0D-1635EF7E3136} EndProjectSection EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Folly", "..\..\..\vnext\Folly\Folly.vcxproj", "{A990658C-CE31-4BCC-976F-0FC6B1AF693D}" +EndProject Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "ReactCommon", "..\..\..\vnext\ReactCommon\ReactCommon.vcxproj", "{A9D95A91-4DB7-4F72-BEB6-FE8A5C89BFBD}" ProjectSection(ProjectDependencies) = postProject {A990658C-CE31-4BCC-976F-0FC6B1AF693D} = {A990658C-CE31-4BCC-976F-0FC6B1AF693D} @@ -22,123 +20,168 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "ReactWindowsCore", "..\..\. {A990658C-CE31-4BCC-976F-0FC6B1AF693D} = {A990658C-CE31-4BCC-976F-0FC6B1AF693D} EndProjectSection EndProject -Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "PropertySheets", "PropertySheets", "{6F24927E-EE45-4DB2-91DA-DCC6E98B0C42}" - ProjectSection(SolutionItems) = preProject - ..\..\..\vnext\PropertySheets\ARM.props = ..\..\..\vnext\PropertySheets\ARM.props - ..\..\..\vnext\PropertySheets\Debug.props = ..\..\..\vnext\PropertySheets\Debug.props - ..\..\..\vnext\PropertySheets\React.Cpp.props = ..\..\..\vnext\PropertySheets\React.Cpp.props - ..\..\..\vnext\PropertySheets\Release.props = ..\..\..\vnext\PropertySheets\Release.props - ..\..\..\vnext\PropertySheets\Warnings.props = ..\..\..\vnext\PropertySheets\Warnings.props - ..\..\..\vnext\PropertySheets\Win32.props = ..\..\..\vnext\PropertySheets\Win32.props - ..\..\..\vnext\PropertySheets\x64.props = ..\..\..\vnext\PropertySheets\x64.props - ..\..\..\vnext\PropertySheets\x86.props = ..\..\..\vnext\PropertySheets\x86.props - EndProjectSection +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Chakra", "..\..\..\vnext\Chakra\Chakra.vcxitems", "{C38970C0-5FBF-4D69-90D8-CBAC225AE895}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Microsoft.ReactNative", "..\..\..\vnext\Microsoft.ReactNative\Microsoft.ReactNative.vcxproj", "{F7D32BD0-2749-483E-9A0D-1635EF7E3136}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "JSI.Shared", "..\..\..\vnext\JSI\Shared\JSI.Shared.vcxitems", "{0CC28589-39E4-4288-B162-97B959F8B843}" EndProject Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "JSI.Universal", "..\..\..\vnext\JSI\Universal\JSI.Universal.vcxproj", "{A62D504A-16B8-41D2-9F19-E2E86019E5E4}" EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Microsoft.ReactNative.Cxx", "..\..\..\vnext\Microsoft.ReactNative.Cxx\Microsoft.ReactNative.Cxx.vcxitems", "{DA8B35B3-DA00-4B02-BDE6-6A397B3FD46B}" +EndProject +Project("{D954291E-2A0B-460D-934E-DC6B0785DB48}") = "Microsoft.ReactNative.SharedManaged", "..\..\..\vnext\Microsoft.ReactNative.SharedManaged\Microsoft.ReactNative.SharedManaged.shproj", "{67A1076F-7790-4203-86EA-4402CCB5E782}" +EndProject Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Common", "..\..\..\vnext\Common\Common.vcxproj", "{FCA38F3C-7C73-4C47-BE4E-32F77FA8538D}" EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "ReactNative", "ReactNative", "{5EA20F54-880A-49F3-99FA-4B3FE54E8AB1}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Shared", "..\..\..\vnext\Shared\Shared.vcxitems", "{2049DBE9-8D13-42C9-AE4B-413AE38FFFD0}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Mso", "..\..\..\vnext\Mso\Mso.vcxitems", "{84E05BFA-CBAF-4F0D-BFB6-4CE85742A57E}" +EndProject Global GlobalSection(SharedMSBuildProjectFiles) = preSolution - ..\..\..\vnext\Chakra\Chakra.vcxitems*{2d5d43d9-cffc-4c40-b4cd-02efb4e2742b}*SharedItemsImports = 4 - ..\..\..\vnext\Shared\Shared.vcxitems*{2d5d43d9-cffc-4c40-b4cd-02efb4e2742b}*SharedItemsImports = 4 + ..\..\..\vnext\JSI\Shared\JSI.Shared.vcxitems*{0cc28589-39e4-4288-b162-97b959f8b843}*SharedItemsImports = 9 + ..\..\..\vnext\Shared\Shared.vcxitems*{2049dbe9-8d13-42c9-ae4b-413ae38fffd0}*SharedItemsImports = 9 + ..\..\..\vnext\Microsoft.ReactNative.SharedManaged\Microsoft.ReactNative.SharedManaged.projitems*{67a1076f-7790-4203-86ea-4402ccb5e782}*SharedItemsImports = 13 + ..\..\..\vnext\Microsoft.ReactNative.Cxx\Microsoft.ReactNative.Cxx.vcxitems*{6b6aa847-b32f-41ac-9d3b-48a8cdfa8ade}*SharedItemsImports = 4 + ..\..\..\vnext\Mso\Mso.vcxitems*{84e05bfa-cbaf-4f0d-bfb6-4ce85742a57e}*SharedItemsImports = 9 ..\..\..\vnext\JSI\Shared\JSI.Shared.vcxitems*{a62d504a-16b8-41d2-9f19-e2e86019e5e4}*SharedItemsImports = 4 + ..\..\..\vnext\Chakra\Chakra.vcxitems*{c38970c0-5fbf-4d69-90d8-cbac225ae895}*SharedItemsImports = 9 + ..\..\..\vnext\Microsoft.ReactNative.Cxx\Microsoft.ReactNative.Cxx.vcxitems*{da8b35b3-da00-4b02-bde6-6a397b3fd46b}*SharedItemsImports = 9 + ..\..\..\vnext\Chakra\Chakra.vcxitems*{f7d32bd0-2749-483e-9a0d-1635ef7e3136}*SharedItemsImports = 4 + ..\..\..\vnext\JSI\Shared\JSI.Shared.vcxitems*{f7d32bd0-2749-483e-9a0d-1635ef7e3136}*SharedItemsImports = 4 + ..\..\..\vnext\Mso\Mso.vcxitems*{f7d32bd0-2749-483e-9a0d-1635ef7e3136}*SharedItemsImports = 4 + ..\..\..\vnext\Shared\Shared.vcxitems*{f7d32bd0-2749-483e-9a0d-1635ef7e3136}*SharedItemsImports = 4 EndGlobalSection GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|ARM = Debug|ARM + Debug|ARM64 = Debug|ARM64 Debug|x64 = Debug|x64 Debug|x86 = Debug|x86 Release|ARM = Release|ARM + Release|ARM64 = Release|ARM64 Release|x64 = Release|x64 Release|x86 = Release|x86 EndGlobalSection GlobalSection(ProjectConfigurationPlatforms) = postSolution - {8B88FFAE-4DBC-49A2-AFA5-D2477D4AD189}.Debug|ARM.ActiveCfg = Debug|ARM - {8B88FFAE-4DBC-49A2-AFA5-D2477D4AD189}.Debug|ARM.Build.0 = Debug|ARM - {8B88FFAE-4DBC-49A2-AFA5-D2477D4AD189}.Debug|ARM.Deploy.0 = Debug|ARM - {8B88FFAE-4DBC-49A2-AFA5-D2477D4AD189}.Debug|x64.ActiveCfg = Debug|x64 - {8B88FFAE-4DBC-49A2-AFA5-D2477D4AD189}.Debug|x64.Build.0 = Debug|x64 - {8B88FFAE-4DBC-49A2-AFA5-D2477D4AD189}.Debug|x64.Deploy.0 = Debug|x64 - {8B88FFAE-4DBC-49A2-AFA5-D2477D4AD189}.Debug|x86.ActiveCfg = Debug|Win32 - {8B88FFAE-4DBC-49A2-AFA5-D2477D4AD189}.Debug|x86.Build.0 = Debug|Win32 - {8B88FFAE-4DBC-49A2-AFA5-D2477D4AD189}.Debug|x86.Deploy.0 = Debug|Win32 - {8B88FFAE-4DBC-49A2-AFA5-D2477D4AD189}.Release|ARM.ActiveCfg = Release|ARM - {8B88FFAE-4DBC-49A2-AFA5-D2477D4AD189}.Release|ARM.Build.0 = Release|ARM - {8B88FFAE-4DBC-49A2-AFA5-D2477D4AD189}.Release|ARM.Deploy.0 = Release|ARM - {8B88FFAE-4DBC-49A2-AFA5-D2477D4AD189}.Release|x64.ActiveCfg = Release|x64 - {8B88FFAE-4DBC-49A2-AFA5-D2477D4AD189}.Release|x64.Build.0 = Release|x64 - {8B88FFAE-4DBC-49A2-AFA5-D2477D4AD189}.Release|x64.Deploy.0 = Release|x64 - {8B88FFAE-4DBC-49A2-AFA5-D2477D4AD189}.Release|x86.ActiveCfg = Release|Win32 - {8B88FFAE-4DBC-49A2-AFA5-D2477D4AD189}.Release|x86.Build.0 = Release|Win32 - {8B88FFAE-4DBC-49A2-AFA5-D2477D4AD189}.Release|x86.Deploy.0 = Release|Win32 + {6B6AA847-B32F-41AC-9D3B-48A8CDFA8ADE}.Debug|ARM.ActiveCfg = Debug|ARM + {6B6AA847-B32F-41AC-9D3B-48A8CDFA8ADE}.Debug|ARM.Build.0 = Debug|ARM + {6B6AA847-B32F-41AC-9D3B-48A8CDFA8ADE}.Debug|ARM.Deploy.0 = Debug|ARM + {6B6AA847-B32F-41AC-9D3B-48A8CDFA8ADE}.Debug|ARM64.ActiveCfg = Debug|ARM64 + {6B6AA847-B32F-41AC-9D3B-48A8CDFA8ADE}.Debug|ARM64.Build.0 = Debug|ARM64 + {6B6AA847-B32F-41AC-9D3B-48A8CDFA8ADE}.Debug|ARM64.Deploy.0 = Debug|ARM64 + {6B6AA847-B32F-41AC-9D3B-48A8CDFA8ADE}.Debug|x64.ActiveCfg = Debug|x64 + {6B6AA847-B32F-41AC-9D3B-48A8CDFA8ADE}.Debug|x64.Build.0 = Debug|x64 + {6B6AA847-B32F-41AC-9D3B-48A8CDFA8ADE}.Debug|x64.Deploy.0 = Debug|x64 + {6B6AA847-B32F-41AC-9D3B-48A8CDFA8ADE}.Debug|x86.ActiveCfg = Debug|Win32 + {6B6AA847-B32F-41AC-9D3B-48A8CDFA8ADE}.Debug|x86.Build.0 = Debug|Win32 + {6B6AA847-B32F-41AC-9D3B-48A8CDFA8ADE}.Debug|x86.Deploy.0 = Debug|Win32 + {6B6AA847-B32F-41AC-9D3B-48A8CDFA8ADE}.Release|ARM.ActiveCfg = Release|ARM + {6B6AA847-B32F-41AC-9D3B-48A8CDFA8ADE}.Release|ARM.Build.0 = Release|ARM + {6B6AA847-B32F-41AC-9D3B-48A8CDFA8ADE}.Release|ARM.Deploy.0 = Release|ARM + {6B6AA847-B32F-41AC-9D3B-48A8CDFA8ADE}.Release|ARM64.ActiveCfg = Release|ARM64 + {6B6AA847-B32F-41AC-9D3B-48A8CDFA8ADE}.Release|ARM64.Build.0 = Release|ARM64 + {6B6AA847-B32F-41AC-9D3B-48A8CDFA8ADE}.Release|ARM64.Deploy.0 = Release|ARM64 + {6B6AA847-B32F-41AC-9D3B-48A8CDFA8ADE}.Release|x64.ActiveCfg = Release|x64 + {6B6AA847-B32F-41AC-9D3B-48A8CDFA8ADE}.Release|x64.Build.0 = Release|x64 + {6B6AA847-B32F-41AC-9D3B-48A8CDFA8ADE}.Release|x64.Deploy.0 = Release|x64 + {6B6AA847-B32F-41AC-9D3B-48A8CDFA8ADE}.Release|x86.ActiveCfg = Release|Win32 + {6B6AA847-B32F-41AC-9D3B-48A8CDFA8ADE}.Release|x86.Build.0 = Release|Win32 + {6B6AA847-B32F-41AC-9D3B-48A8CDFA8ADE}.Release|x86.Deploy.0 = Release|Win32 {A990658C-CE31-4BCC-976F-0FC6B1AF693D}.Debug|ARM.ActiveCfg = Debug|ARM {A990658C-CE31-4BCC-976F-0FC6B1AF693D}.Debug|ARM.Build.0 = Debug|ARM + {A990658C-CE31-4BCC-976F-0FC6B1AF693D}.Debug|ARM64.ActiveCfg = Debug|ARM64 + {A990658C-CE31-4BCC-976F-0FC6B1AF693D}.Debug|ARM64.Build.0 = Debug|ARM64 {A990658C-CE31-4BCC-976F-0FC6B1AF693D}.Debug|x64.ActiveCfg = Debug|x64 {A990658C-CE31-4BCC-976F-0FC6B1AF693D}.Debug|x64.Build.0 = Debug|x64 {A990658C-CE31-4BCC-976F-0FC6B1AF693D}.Debug|x86.ActiveCfg = Debug|Win32 {A990658C-CE31-4BCC-976F-0FC6B1AF693D}.Debug|x86.Build.0 = Debug|Win32 {A990658C-CE31-4BCC-976F-0FC6B1AF693D}.Release|ARM.ActiveCfg = Release|ARM {A990658C-CE31-4BCC-976F-0FC6B1AF693D}.Release|ARM.Build.0 = Release|ARM + {A990658C-CE31-4BCC-976F-0FC6B1AF693D}.Release|ARM64.ActiveCfg = Release|ARM64 + {A990658C-CE31-4BCC-976F-0FC6B1AF693D}.Release|ARM64.Build.0 = Release|ARM64 {A990658C-CE31-4BCC-976F-0FC6B1AF693D}.Release|x64.ActiveCfg = Release|x64 {A990658C-CE31-4BCC-976F-0FC6B1AF693D}.Release|x64.Build.0 = Release|x64 {A990658C-CE31-4BCC-976F-0FC6B1AF693D}.Release|x86.ActiveCfg = Release|Win32 {A990658C-CE31-4BCC-976F-0FC6B1AF693D}.Release|x86.Build.0 = Release|Win32 - {2D5D43D9-CFFC-4C40-B4CD-02EFB4E2742B}.Debug|ARM.ActiveCfg = Debug|ARM - {2D5D43D9-CFFC-4C40-B4CD-02EFB4E2742B}.Debug|ARM.Build.0 = Debug|ARM - {2D5D43D9-CFFC-4C40-B4CD-02EFB4E2742B}.Debug|x64.ActiveCfg = Debug|x64 - {2D5D43D9-CFFC-4C40-B4CD-02EFB4E2742B}.Debug|x64.Build.0 = Debug|x64 - {2D5D43D9-CFFC-4C40-B4CD-02EFB4E2742B}.Debug|x86.ActiveCfg = Debug|Win32 - {2D5D43D9-CFFC-4C40-B4CD-02EFB4E2742B}.Debug|x86.Build.0 = Debug|Win32 - {2D5D43D9-CFFC-4C40-B4CD-02EFB4E2742B}.Release|ARM.ActiveCfg = Release|ARM - {2D5D43D9-CFFC-4C40-B4CD-02EFB4E2742B}.Release|ARM.Build.0 = Release|ARM - {2D5D43D9-CFFC-4C40-B4CD-02EFB4E2742B}.Release|x64.ActiveCfg = Release|x64 - {2D5D43D9-CFFC-4C40-B4CD-02EFB4E2742B}.Release|x64.Build.0 = Release|x64 - {2D5D43D9-CFFC-4C40-B4CD-02EFB4E2742B}.Release|x86.ActiveCfg = Release|Win32 - {2D5D43D9-CFFC-4C40-B4CD-02EFB4E2742B}.Release|x86.Build.0 = Release|Win32 {A9D95A91-4DB7-4F72-BEB6-FE8A5C89BFBD}.Debug|ARM.ActiveCfg = Debug|ARM {A9D95A91-4DB7-4F72-BEB6-FE8A5C89BFBD}.Debug|ARM.Build.0 = Debug|ARM + {A9D95A91-4DB7-4F72-BEB6-FE8A5C89BFBD}.Debug|ARM64.ActiveCfg = Debug|ARM64 + {A9D95A91-4DB7-4F72-BEB6-FE8A5C89BFBD}.Debug|ARM64.Build.0 = Debug|ARM64 {A9D95A91-4DB7-4F72-BEB6-FE8A5C89BFBD}.Debug|x64.ActiveCfg = Debug|x64 {A9D95A91-4DB7-4F72-BEB6-FE8A5C89BFBD}.Debug|x64.Build.0 = Debug|x64 {A9D95A91-4DB7-4F72-BEB6-FE8A5C89BFBD}.Debug|x86.ActiveCfg = Debug|Win32 {A9D95A91-4DB7-4F72-BEB6-FE8A5C89BFBD}.Debug|x86.Build.0 = Debug|Win32 {A9D95A91-4DB7-4F72-BEB6-FE8A5C89BFBD}.Release|ARM.ActiveCfg = Release|ARM {A9D95A91-4DB7-4F72-BEB6-FE8A5C89BFBD}.Release|ARM.Build.0 = Release|ARM + {A9D95A91-4DB7-4F72-BEB6-FE8A5C89BFBD}.Release|ARM64.ActiveCfg = Release|ARM64 + {A9D95A91-4DB7-4F72-BEB6-FE8A5C89BFBD}.Release|ARM64.Build.0 = Release|ARM64 {A9D95A91-4DB7-4F72-BEB6-FE8A5C89BFBD}.Release|x64.ActiveCfg = Release|x64 {A9D95A91-4DB7-4F72-BEB6-FE8A5C89BFBD}.Release|x64.Build.0 = Release|x64 {A9D95A91-4DB7-4F72-BEB6-FE8A5C89BFBD}.Release|x86.ActiveCfg = Release|Win32 {A9D95A91-4DB7-4F72-BEB6-FE8A5C89BFBD}.Release|x86.Build.0 = Release|Win32 {11C084A3-A57C-4296-A679-CAC17B603144}.Debug|ARM.ActiveCfg = Debug|ARM {11C084A3-A57C-4296-A679-CAC17B603144}.Debug|ARM.Build.0 = Debug|ARM + {11C084A3-A57C-4296-A679-CAC17B603144}.Debug|ARM64.ActiveCfg = Debug|ARM64 + {11C084A3-A57C-4296-A679-CAC17B603144}.Debug|ARM64.Build.0 = Debug|ARM64 {11C084A3-A57C-4296-A679-CAC17B603144}.Debug|x64.ActiveCfg = Debug|x64 {11C084A3-A57C-4296-A679-CAC17B603144}.Debug|x64.Build.0 = Debug|x64 {11C084A3-A57C-4296-A679-CAC17B603144}.Debug|x86.ActiveCfg = Debug|Win32 {11C084A3-A57C-4296-A679-CAC17B603144}.Debug|x86.Build.0 = Debug|Win32 {11C084A3-A57C-4296-A679-CAC17B603144}.Release|ARM.ActiveCfg = Release|ARM {11C084A3-A57C-4296-A679-CAC17B603144}.Release|ARM.Build.0 = Release|ARM + {11C084A3-A57C-4296-A679-CAC17B603144}.Release|ARM64.ActiveCfg = Release|ARM64 + {11C084A3-A57C-4296-A679-CAC17B603144}.Release|ARM64.Build.0 = Release|ARM64 {11C084A3-A57C-4296-A679-CAC17B603144}.Release|x64.ActiveCfg = Release|x64 {11C084A3-A57C-4296-A679-CAC17B603144}.Release|x64.Build.0 = Release|x64 {11C084A3-A57C-4296-A679-CAC17B603144}.Release|x86.ActiveCfg = Release|Win32 {11C084A3-A57C-4296-A679-CAC17B603144}.Release|x86.Build.0 = Release|Win32 + {F7D32BD0-2749-483E-9A0D-1635EF7E3136}.Debug|ARM.ActiveCfg = Debug|ARM + {F7D32BD0-2749-483E-9A0D-1635EF7E3136}.Debug|ARM.Build.0 = Debug|ARM + {F7D32BD0-2749-483E-9A0D-1635EF7E3136}.Debug|ARM64.ActiveCfg = Debug|ARM64 + {F7D32BD0-2749-483E-9A0D-1635EF7E3136}.Debug|ARM64.Build.0 = Debug|ARM64 + {F7D32BD0-2749-483E-9A0D-1635EF7E3136}.Debug|x64.ActiveCfg = Debug|x64 + {F7D32BD0-2749-483E-9A0D-1635EF7E3136}.Debug|x64.Build.0 = Debug|x64 + {F7D32BD0-2749-483E-9A0D-1635EF7E3136}.Debug|x86.ActiveCfg = Debug|Win32 + {F7D32BD0-2749-483E-9A0D-1635EF7E3136}.Debug|x86.Build.0 = Debug|Win32 + {F7D32BD0-2749-483E-9A0D-1635EF7E3136}.Release|ARM.ActiveCfg = Release|ARM + {F7D32BD0-2749-483E-9A0D-1635EF7E3136}.Release|ARM.Build.0 = Release|ARM + {F7D32BD0-2749-483E-9A0D-1635EF7E3136}.Release|ARM64.ActiveCfg = Release|ARM64 + {F7D32BD0-2749-483E-9A0D-1635EF7E3136}.Release|ARM64.Build.0 = Release|ARM64 + {F7D32BD0-2749-483E-9A0D-1635EF7E3136}.Release|x64.ActiveCfg = Release|x64 + {F7D32BD0-2749-483E-9A0D-1635EF7E3136}.Release|x64.Build.0 = Release|x64 + {F7D32BD0-2749-483E-9A0D-1635EF7E3136}.Release|x86.ActiveCfg = Release|Win32 + {F7D32BD0-2749-483E-9A0D-1635EF7E3136}.Release|x86.Build.0 = Release|Win32 {A62D504A-16B8-41D2-9F19-E2E86019E5E4}.Debug|ARM.ActiveCfg = Debug|ARM {A62D504A-16B8-41D2-9F19-E2E86019E5E4}.Debug|ARM.Build.0 = Debug|ARM + {A62D504A-16B8-41D2-9F19-E2E86019E5E4}.Debug|ARM64.ActiveCfg = Debug|ARM64 + {A62D504A-16B8-41D2-9F19-E2E86019E5E4}.Debug|ARM64.Build.0 = Debug|ARM64 {A62D504A-16B8-41D2-9F19-E2E86019E5E4}.Debug|x64.ActiveCfg = Debug|x64 {A62D504A-16B8-41D2-9F19-E2E86019E5E4}.Debug|x64.Build.0 = Debug|x64 {A62D504A-16B8-41D2-9F19-E2E86019E5E4}.Debug|x86.ActiveCfg = Debug|Win32 {A62D504A-16B8-41D2-9F19-E2E86019E5E4}.Debug|x86.Build.0 = Debug|Win32 {A62D504A-16B8-41D2-9F19-E2E86019E5E4}.Release|ARM.ActiveCfg = Release|ARM {A62D504A-16B8-41D2-9F19-E2E86019E5E4}.Release|ARM.Build.0 = Release|ARM + {A62D504A-16B8-41D2-9F19-E2E86019E5E4}.Release|ARM64.ActiveCfg = Release|ARM64 + {A62D504A-16B8-41D2-9F19-E2E86019E5E4}.Release|ARM64.Build.0 = Release|ARM64 {A62D504A-16B8-41D2-9F19-E2E86019E5E4}.Release|x64.ActiveCfg = Release|x64 {A62D504A-16B8-41D2-9F19-E2E86019E5E4}.Release|x64.Build.0 = Release|x64 {A62D504A-16B8-41D2-9F19-E2E86019E5E4}.Release|x86.ActiveCfg = Release|Win32 {A62D504A-16B8-41D2-9F19-E2E86019E5E4}.Release|x86.Build.0 = Release|Win32 {FCA38F3C-7C73-4C47-BE4E-32F77FA8538D}.Debug|ARM.ActiveCfg = Debug|ARM {FCA38F3C-7C73-4C47-BE4E-32F77FA8538D}.Debug|ARM.Build.0 = Debug|ARM + {FCA38F3C-7C73-4C47-BE4E-32F77FA8538D}.Debug|ARM64.ActiveCfg = Debug|ARM64 + {FCA38F3C-7C73-4C47-BE4E-32F77FA8538D}.Debug|ARM64.Build.0 = Debug|ARM64 {FCA38F3C-7C73-4C47-BE4E-32F77FA8538D}.Debug|x64.ActiveCfg = Debug|x64 {FCA38F3C-7C73-4C47-BE4E-32F77FA8538D}.Debug|x64.Build.0 = Debug|x64 {FCA38F3C-7C73-4C47-BE4E-32F77FA8538D}.Debug|x86.ActiveCfg = Debug|Win32 {FCA38F3C-7C73-4C47-BE4E-32F77FA8538D}.Debug|x86.Build.0 = Debug|Win32 {FCA38F3C-7C73-4C47-BE4E-32F77FA8538D}.Release|ARM.ActiveCfg = Release|ARM {FCA38F3C-7C73-4C47-BE4E-32F77FA8538D}.Release|ARM.Build.0 = Release|ARM + {FCA38F3C-7C73-4C47-BE4E-32F77FA8538D}.Release|ARM64.ActiveCfg = Release|ARM64 + {FCA38F3C-7C73-4C47-BE4E-32F77FA8538D}.Release|ARM64.Build.0 = Release|ARM64 {FCA38F3C-7C73-4C47-BE4E-32F77FA8538D}.Release|x64.ActiveCfg = Release|x64 {FCA38F3C-7C73-4C47-BE4E-32F77FA8538D}.Release|x64.Build.0 = Release|x64 {FCA38F3C-7C73-4C47-BE4E-32F77FA8538D}.Release|x86.ActiveCfg = Release|Win32 @@ -147,7 +190,21 @@ Global GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE EndGlobalSection + GlobalSection(NestedProjects) = preSolution + {A990658C-CE31-4BCC-976F-0FC6B1AF693D} = {5EA20F54-880A-49F3-99FA-4B3FE54E8AB1} + {A9D95A91-4DB7-4F72-BEB6-FE8A5C89BFBD} = {5EA20F54-880A-49F3-99FA-4B3FE54E8AB1} + {11C084A3-A57C-4296-A679-CAC17B603144} = {5EA20F54-880A-49F3-99FA-4B3FE54E8AB1} + {C38970C0-5FBF-4D69-90D8-CBAC225AE895} = {5EA20F54-880A-49F3-99FA-4B3FE54E8AB1} + {F7D32BD0-2749-483E-9A0D-1635EF7E3136} = {5EA20F54-880A-49F3-99FA-4B3FE54E8AB1} + {0CC28589-39E4-4288-B162-97B959F8B843} = {5EA20F54-880A-49F3-99FA-4B3FE54E8AB1} + {A62D504A-16B8-41D2-9F19-E2E86019E5E4} = {5EA20F54-880A-49F3-99FA-4B3FE54E8AB1} + {DA8B35B3-DA00-4B02-BDE6-6A397B3FD46B} = {5EA20F54-880A-49F3-99FA-4B3FE54E8AB1} + {67A1076F-7790-4203-86EA-4402CCB5E782} = {5EA20F54-880A-49F3-99FA-4B3FE54E8AB1} + {FCA38F3C-7C73-4C47-BE4E-32F77FA8538D} = {5EA20F54-880A-49F3-99FA-4B3FE54E8AB1} + {2049DBE9-8D13-42C9-AE4B-413AE38FFFD0} = {5EA20F54-880A-49F3-99FA-4B3FE54E8AB1} + {84E05BFA-CBAF-4F0D-BFB6-4CE85742A57E} = {5EA20F54-880A-49F3-99FA-4B3FE54E8AB1} + EndGlobalSection GlobalSection(ExtensibilityGlobals) = postSolution - SolutionGuid = {F5EAF3BA-6B6F-4E81-B5C6-49B30EC0A32E} + SolutionGuid = {D43FAD39-F619-437D-BB40-04A3982ACB6A} EndGlobalSection EndGlobal diff --git a/packages/playground/windows/playground/App.cpp b/packages/playground/windows/playground/App.cpp new file mode 100644 index 00000000000..81c0fdd869c --- /dev/null +++ b/packages/playground/windows/playground/App.cpp @@ -0,0 +1,281 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License.#include "pch.h" + +#include "ReactPackageProvider.h" + +using namespace winrt::playground; +using namespace winrt::playground::implementation; + +using namespace winrt; +using namespace Windows::ApplicationModel::Activation; +using namespace Windows::Foundation; +using namespace Windows::UI; +using namespace Windows::UI::Xaml; +using namespace Windows::UI::Xaml::Controls; +using namespace Windows::UI::Xaml::Media; +using namespace Windows::Storage; +using namespace Windows::Storage::Streams; +using namespace Windows::Graphics::Imaging; +using namespace Windows::Storage::Pickers; + +struct App : ApplicationT { + void OnLaunched(LaunchActivatedEventArgs const &) { + const hstring xamlString = + L" " + L" " + L" " + L" " + L" " + L" " + L" " + L" " + L" " + L" " + L" " + L"" + L"