forked from facebook/react-native
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Adding patches required for running RN66 in Office apps (#1023)
- Loading branch information
1 parent
bb08860
commit fc720c2
Showing
11 changed files
with
142 additions
and
5 deletions.
There are no files selected for viewing
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
11 changes: 11 additions & 0 deletions
11
...ches/patches/JniUtils/ReactAndroid/src/main/java/com/facebook/react/fabric/jni/Android.mk
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,11 @@ | ||
--- /dev/code/rnm-66-fresh/ReactAndroid/src/main/java/com/facebook/react/fabric/jni/Android.mk 2022-02-13 19:54:48.571686475 -0800 | ||
+++ /dev/code/react-native-macos/ReactAndroid/src/main/java/com/facebook/react/fabric/jni/Android.mk 2022-02-13 19:52:50.350473816 -0800 | ||
@@ -11,7 +11,7 @@ | ||
|
||
LOCAL_SRC_FILES := $(wildcard $(LOCAL_PATH)/*.cpp) | ||
|
||
-LOCAL_SHARED_LIBRARIES := libjsi libreactconfig librrc_slider librrc_progressbar librrc_switch librrc_modal libyoga libglog libfb libfbjni libglog_init libfolly_json libfolly_futures libreact_render_mounting libreactnativeutilsjni libreact_utils libreact_render_debug libreact_render_graphics libreact_render_core react_render_componentregistry librrc_view librrc_unimplementedview librrc_root librrc_scrollview libbetter libreact_render_attributedstring libreact_render_uimanager libreact_render_templateprocessor libreact_render_scheduler libreact_render_animations libreact_render_imagemanager libreact_render_textlayoutmanager libreact_codegen_rncore rrc_text librrc_image librrc_textinput libreact_debug libreact_render_mapbuffer libmapbufferjni libreact_render_telemetry | ||
+LOCAL_SHARED_LIBRARIES := libjsi libreactconfig librrc_slider librrc_progressbar librrc_switch librrc_modal libyoga libglog libfb libfbjni libglog_init libfolly_json libfolly_futures libreact_render_mounting libreactnativejni libreact_utils libreact_render_debug libreact_render_graphics libreact_render_core react_render_componentregistry librrc_view librrc_unimplementedview librrc_root librrc_scrollview libbetter libreact_render_attributedstring libreact_render_uimanager libreact_render_templateprocessor libreact_render_scheduler libreact_render_animations libreact_render_imagemanager libreact_render_textlayoutmanager libreact_codegen_rncore rrc_text librrc_image librrc_textinput libreact_debug libreact_render_mapbuffer libmapbufferjni libreact_render_telemetry | ||
|
||
LOCAL_STATIC_LIBRARIES := | ||
|
11 changes: 11 additions & 0 deletions
11
...es/JniUtils/ReactAndroid/src/main/java/com/facebook/react/turbomodule/core/jni/Android.mk
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,11 @@ | ||
--- /dev/code/rnm-66-fresh/ReactAndroid/src/main/java/com/facebook/react/turbomodule/core/jni/Android.mk 2022-02-13 19:54:48.579686559 -0800 | ||
+++ /dev/code/react-native-macos/ReactAndroid/src/main/java/com/facebook/react/turbomodule/core/jni/Android.mk 2022-02-13 19:53:04.134612248 -0800 | ||
@@ -19,7 +19,7 @@ | ||
|
||
LOCAL_CFLAGS += -fexceptions -frtti -std=c++17 -Wall | ||
|
||
-LOCAL_SHARED_LIBRARIES = libfb libfbjni libreactnativeutilsjni | ||
+LOCAL_SHARED_LIBRARIES = libfb libfbjni libreactnativejni | ||
|
||
LOCAL_STATIC_LIBRARIES = libcallinvoker libreactperfloggerjni libruntimeexecutor | ||
|
11 changes: 11 additions & 0 deletions
11
android-patches/patches/JniUtils/ReactAndroid/src/main/jni/react/jni/Android.mk
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,11 @@ | ||
--- /dev/code/rnm-66-fresh/ReactAndroid/src/main/jni/react/jni/Android.mk 2022-02-13 19:54:48.595686727 -0800 | ||
+++ /dev/code/react-native-macos/ReactAndroid/src/main/jni/react/jni/Android.mk 2022-02-13 19:53:07.962650850 -0800 | ||
@@ -77,7 +77,7 @@ | ||
LOCAL_LDLIBS += -landroid | ||
|
||
# The dynamic libraries (.so files) that this module depends on. | ||
-LOCAL_SHARED_LIBRARIES := libreactnativeutilsjni libfolly_json libfb libfbjni libglog_init libyoga logger | ||
+LOCAL_SHARED_LIBRARIES := libreactnativejni libfolly_json libfb libfbjni libglog_init libyoga logger | ||
|
||
# The static libraries (.a files) that this module depends on. | ||
LOCAL_STATIC_LIBRARIES := libreactnative libruntimeexecutor libcallinvokerholder |
11 changes: 11 additions & 0 deletions
11
...oid-patches/patches/JniUtils/ReactCommon/react/renderer/components/progressbar/Android.mk
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,11 @@ | ||
--- /dev/code/rnm-66-fresh/ReactCommon/react/renderer/components/progressbar/Android.mk 2022-02-13 19:54:48.619686978 -0800 | ||
+++ /dev/code/react-native-macos/ReactCommon/react/renderer/components/progressbar/Android.mk 2022-02-13 19:53:12.522696921 -0800 | ||
@@ -21,7 +21,7 @@ | ||
|
||
LOCAL_STATIC_LIBRARIES := | ||
|
||
-LOCAL_SHARED_LIBRARIES := libfbjni libreact_codegen_rncore libreactnativeutilsjni libreact_render_componentregistry libreact_render_uimanager libyoga libfolly_futures glog libfolly_json libglog_init libreact_render_core libreact_render_debug libreact_render_graphics librrc_view libreact_debug | ||
+LOCAL_SHARED_LIBRARIES := libfbjni libreact_codegen_rncore libreactnativejni libreact_render_componentregistry libreact_render_uimanager libyoga libfolly_futures glog libfolly_json libglog_init libreact_render_core libreact_render_debug libreact_render_graphics librrc_view libreact_debug | ||
|
||
include $(BUILD_SHARED_LIBRARY) | ||
|
11 changes: 11 additions & 0 deletions
11
android-patches/patches/JniUtils/ReactCommon/react/renderer/components/slider/Android.mk
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,11 @@ | ||
--- /dev/code/rnm-66-fresh/ReactCommon/react/renderer/components/slider/Android.mk 2022-02-13 19:54:48.619686978 -0800 | ||
+++ /dev/code/react-native-macos/ReactCommon/react/renderer/components/slider/Android.mk 2022-02-13 19:53:21.558788484 -0800 | ||
@@ -21,7 +21,7 @@ | ||
|
||
LOCAL_STATIC_LIBRARIES := | ||
|
||
-LOCAL_SHARED_LIBRARIES := libfbjni libreact_codegen_rncore libreact_render_imagemanager libreactnativeutilsjni libreact_render_componentregistry libreact_render_uimanager librrc_image libyoga libfolly_futures glog libfolly_json libglog_init libreact_render_core libreact_render_debug libreact_render_graphics librrc_view libreact_debug libreact_render_mapbuffer | ||
+LOCAL_SHARED_LIBRARIES := libfbjni libreact_codegen_rncore libreact_render_imagemanager libreactnativejni libreact_render_componentregistry libreact_render_uimanager librrc_image libyoga libfolly_futures glog libfolly_json libglog_init libreact_render_core libreact_render_debug libreact_render_graphics librrc_view libreact_debug libreact_render_mapbuffer | ||
|
||
include $(BUILD_SHARED_LIBRARY) | ||
|
11 changes: 11 additions & 0 deletions
11
android-patches/patches/JniUtils/ReactCommon/react/renderer/components/switch/Android.mk
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,11 @@ | ||
--- /home/mganandraj/code/rnm-66-fresh/ReactCommon/react/renderer/components/switch/Android.mk 2022-02-13 19:54:48.619686978 -0800 | ||
+++ /home/mganandraj/code/react-native-macos/ReactCommon/react/renderer/components/switch/Android.mk 2022-02-13 19:53:25.274826242 -0800 | ||
@@ -21,7 +21,7 @@ | ||
|
||
LOCAL_STATIC_LIBRARIES := | ||
|
||
-LOCAL_SHARED_LIBRARIES := libfbjni libreact_codegen_rncore libreactnativeutilsjni libreact_render_componentregistry libreact_render_uimanager libyoga libfolly_futures glog libfolly_json libglog_init libreact_render_core libreact_render_debug libreact_render_graphics librrc_view libreact_debug | ||
+LOCAL_SHARED_LIBRARIES := libfbjni libreact_codegen_rncore libreactnativejni libreact_render_componentregistry libreact_render_uimanager libyoga libfolly_futures glog libfolly_json libglog_init libreact_render_core libreact_render_debug libreact_render_graphics librrc_view libreact_debug | ||
|
||
include $(BUILD_SHARED_LIBRARY) | ||
|
11 changes: 11 additions & 0 deletions
11
android-patches/patches/JniUtils/ReactCommon/react/renderer/textlayoutmanager/Android.mk
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,11 @@ | ||
--- /home/mganandraj/code/rnm-66-fresh/ReactCommon/react/renderer/textlayoutmanager/Android.mk 2022-02-13 19:54:48.631687103 -0800 | ||
+++ /home/mganandraj/code/react-native-macos/ReactCommon/react/renderer/textlayoutmanager/Android.mk 2022-02-13 19:53:28.338857418 -0800 | ||
@@ -11,7 +11,7 @@ | ||
|
||
LOCAL_SRC_FILES := $(wildcard $(LOCAL_PATH)/*.cpp $(LOCAL_PATH)/platform/android/react/renderer/textlayoutmanager/*.cpp) | ||
|
||
-LOCAL_SHARED_LIBRARIES := libfolly_futures libreactnativeutilsjni libreact_utils libfb libfbjni libreact_render_uimanager libreact_render_componentregistry libreact_render_attributedstring libreact_render_mounting glog libfolly_json libglog_init libyoga libreact_render_core libreact_render_debug libreact_render_graphics libreact_debug libreact_render_mapbuffer libmapbufferjni libreact_render_telemetry | ||
+LOCAL_SHARED_LIBRARIES := libfolly_futures libreactnativejni libreact_utils libfb libfbjni libreact_render_uimanager libreact_render_componentregistry libreact_render_attributedstring libreact_render_mounting glog libfolly_json libglog_init libyoga libreact_render_core libreact_render_debug libreact_render_graphics libreact_debug libreact_render_mapbuffer libmapbufferjni libreact_render_telemetry | ||
|
||
LOCAL_STATIC_LIBRARIES := | ||
|
30 changes: 30 additions & 0 deletions
30
...atches/OfficeRNHost/ReactAndroid/src/main/java/com/facebook/react/bridge/ReactBridge.java
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,30 @@ | ||
--- /dev/code/rnm-66-fresh/ReactAndroid/src/main/java/com/facebook/react/bridge/ReactBridge.java 2022-02-13 19:54:48.563686391 -0800 | ||
+++ /dev/code/react-native-macos/ReactAndroid/src/main/java/com/facebook/react/bridge/ReactBridge.java 2022-02-13 22:53:50.732054489 -0800 | ||
@@ -31,6 +31,27 @@ | ||
Systrace.beginSection( | ||
TRACE_TAG_REACT_JAVA_BRIDGE, "ReactBridge.staticInit::load:reactnativejni"); | ||
ReactMarker.logMarker(ReactMarkerConstants.LOAD_REACT_NATIVE_SO_FILE_START); | ||
+ | ||
+ // JS Engine is configurable.. And we exepct only one packaged | ||
+ // Hence ignore failure | ||
+ try { | ||
+ SoLoader.loadLibrary("hermes"); | ||
+ }catch (UnsatisfiedLinkError jscE){} | ||
+ | ||
+ try { | ||
+ SoLoader.loadLibrary("v8jsi"); | ||
+ }catch (UnsatisfiedLinkError jscE){} | ||
+ | ||
+ SoLoader.loadLibrary("glog"); | ||
+ SoLoader.loadLibrary("glog_init"); | ||
+ SoLoader.loadLibrary("fb"); | ||
+ SoLoader.loadLibrary("fbjni"); | ||
+ SoLoader.loadLibrary("yoga"); | ||
+ SoLoader.loadLibrary("folly_json"); | ||
+ SoLoader.loadLibrary("reactperfloggerjni"); | ||
+ SoLoader.loadLibrary("jsinspector"); | ||
+ SoLoader.loadLibrary("jsi"); | ||
+ SoLoader.loadLibrary("logger"); | ||
SoLoader.loadLibrary("reactnativejni"); | ||
ReactMarker.logMarker(ReactMarkerConstants.LOAD_REACT_NATIVE_SO_FILE_END); | ||
Systrace.endSection(TRACE_TAG_REACT_JAVA_BRIDGE); |
10 changes: 10 additions & 0 deletions
10
...s/patches/RootViewAttach/ReactAndroid/src/main/java/com/facebook/react/ReactRootView.java
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,10 @@ | ||
--- /dev/code/rnm-66-fresh/ReactAndroid/src/main/java/com/facebook/react/ReactRootView.java 2022-02-13 19:54:48.563686391 -0800 | ||
+++ /dev/code/react-native-macos/ReactAndroid/src/main/java/com/facebook/react/ReactRootView.java 2022-02-13 22:34:45.828345952 -0800 | ||
@@ -410,6 +410,7 @@ | ||
mInitialUITemplate = initialUITemplate; | ||
|
||
mReactInstanceManager.createReactContextInBackground(); | ||
+ attachToReactInstanceManager(); | ||
|
||
} finally { | ||
Systrace.endSection(TRACE_TAG_REACT_JAVA_BRIDGE); |