-
Notifications
You must be signed in to change notification settings - Fork 134
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
[0.66-stable]Adding patches required for running RN66 in Office apps #1023
Changes from all commits
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 |
---|---|---|
@@ -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 := | ||
|
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 | ||
|
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 |
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) | ||
|
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) | ||
|
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) | ||
|
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 := | ||
|
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"); | ||
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. does this need to be loaded in all scenarios? What about release builds? 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. Yeah.. these dependencies comes from OSS builds .. and they are not flavor specific .. This are lots of room for improvement in the native builds in OSS .. |
||
+ 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); |
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); |
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.
Is it possible to extend the macro definition across multiple lines (like how we do with
\
in nmake)? That way we could keep the android specific libraries on separate lines, which would help us stay in sync with any additions/removals that might happen in main or 0.66-stable. i.e. the patch shouldn't be manipulating the existing list, just adding new entries on new lines if possibleThere 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.
Yeah .. good point ! Let's fix in main and cherry pick it to the stable branch ..