-
Notifications
You must be signed in to change notification settings - Fork 18
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: work-around long path issues on windows
- Loading branch information
Showing
5 changed files
with
56 additions
and
5 deletions.
There are no files selected for viewing
36 changes: 36 additions & 0 deletions
36
.yarn/patches/react-native-vision-camera-npm-3.9.2-3b35d90475.patch
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,36 @@ | ||
diff --git a/android/build.gradle b/android/build.gradle | ||
index 88ea6a5b7b32dca55eeedc5b4bf255157742abdf..5b7268df98a16ae82db3765ee788af9985d28887 100644 | ||
--- a/android/build.gradle | ||
+++ b/android/build.gradle | ||
@@ -72,6 +72,20 @@ static def findNodeModules(baseDir) { | ||
|
||
def nodeModules = findNodeModules(projectDir) | ||
|
||
+static def findTools(baseDir) { | ||
+ def basePath = baseDir.toPath().normalize() | ||
+ while (basePath) { | ||
+ def toolsPath = Paths.get(basePath.toString(), "tools") | ||
+ if (toolsPath.toFile().exists()) { | ||
+ return toolsPath.toString() | ||
+ } | ||
+ basePath = basePath.getParent() | ||
+ } | ||
+ throw new GradleException("react-native-vision-camera: Failed to find tools/ path!") | ||
+} | ||
+ | ||
+def toolsDir = findTools(projectDir) | ||
+ | ||
def hasWorklets = !safeExtGetBool('VisionCamera_disableFrameProcessors', false) && findProject(":react-native-worklets-core") != null | ||
logger.warn("[VisionCamera] react-native-worklets-core ${hasWorklets ? "found" : "not found"}, Frame Processors ${hasWorklets ? "enabled" : "disabled"}!") | ||
|
||
@@ -120,7 +134,9 @@ android { | ||
cppFlags "-O2 -frtti -fexceptions -Wall -Wno-unused-variable -fstack-protector-all" | ||
arguments "-DANDROID_STL=c++_shared", | ||
"-DNODE_MODULES_DIR=${nodeModules}", | ||
- "-DENABLE_FRAME_PROCESSORS=${hasWorklets ? "ON" : "OFF"}" | ||
+ "-DENABLE_FRAME_PROCESSORS=${hasWorklets ? "ON" : "OFF"}", | ||
+ "-DCMAKE_MAKE_PROGRAM=${toolsDir}\\windows\\ninja.exe", | ||
+ "-DCMAKE_OBJECT_PATH_MAX=1024" | ||
abiFilters (*reactNativeArchitectures()) | ||
} | ||
} |
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
Binary file not shown.
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