Skip to content
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

Fix cmake error on windows #132

Merged
merged 1 commit into from
Aug 21, 2022
Merged

Fix cmake error on windows #132

merged 1 commit into from
Aug 21, 2022

Conversation

Kudo
Copy link
Owner

@Kudo Kudo commented Aug 21, 2022

Why

fix #115

How

the path on windows is not correct:
C:\DEV\...\node_modules\react-native/ReactCommon/jsiexecutor/jsireact/JSIExecutor.cpp.
replace file separators to / also on windows

@Kudo Kudo marked this pull request as ready for review August 21, 2022 14:46
@Kudo Kudo merged commit 5a2107f into main Aug 21, 2022
@Kudo Kudo deleted the fix-win-cmake-error branch August 21, 2022 14:46
piaskowyk pushed a commit to software-mansion/react-native-reanimated that referenced this pull request Nov 10, 2022
## Description
I get cmake error (`Invalid character escape '\K'.`) when using latest Reanimated on RN version 0.64.3, this will fix Android build on windows because latest version of reanimated doesn't provide prebuilt AAR for older version, so it will attempt to rebuild from source

![image](https://user-images.githubusercontent.com/15137312/200750965-a126493a-a1c6-4b62-85d0-c91a9f38bed3.png)

## Changes
- added method `toPlatformFileString(File path)` to android/build.gradle to replace windows file separator character with '/'
- call `toPlatformFileString` on cmake arguments REACT_NATIVE_DIR
- fix sources taken from [this PR](Kudo/react-native-v8#132)

## Test code and steps to reproduce
- create new project with RN v0.64.3
- install latest version of react-native-reanimated
- try to build apk for Android `./gradlew clean installDebug`

## Checklist

- [ ] Included code example that can be used to test this change
- [ ] Updated TS types
- [ ] Added TS types tests
- [ ] Added unit / integration tests
- [ ] Updated documentation
- [ ] Ensured that CI passes
piaskowyk pushed a commit to software-mansion/react-native-reanimated that referenced this pull request Nov 10, 2022
## Description
I get cmake error (`Invalid character escape '\K'.`) when using latest Reanimated on RN version 0.64.3, this will fix Android build on windows because latest version of reanimated doesn't provide prebuilt AAR for older version, so it will attempt to rebuild from source

![image](https://user-images.githubusercontent.com/15137312/200750965-a126493a-a1c6-4b62-85d0-c91a9f38bed3.png)

## Changes
- added method `toPlatformFileString(File path)` to android/build.gradle to replace windows file separator character with '/'
- call `toPlatformFileString` on cmake arguments REACT_NATIVE_DIR
- fix sources taken from [this PR](Kudo/react-native-v8#132)

## Test code and steps to reproduce
- create new project with RN v0.64.3
- install latest version of react-native-reanimated
- try to build apk for Android `./gradlew clean installDebug`

## Checklist

- [ ] Included code example that can be used to test this change
- [ ] Updated TS types
- [ ] Added TS types tests
- [ ] Added unit / integration tests
- [ ] Updated documentation
- [ ] Ensured that CI passes
fluiddot pushed a commit to wordpress-mobile/react-native-reanimated that referenced this pull request Jun 5, 2023
## Description
I get cmake error (`Invalid character escape '\K'.`) when using latest Reanimated on RN version 0.64.3, this will fix Android build on windows because latest version of reanimated doesn't provide prebuilt AAR for older version, so it will attempt to rebuild from source

![image](https://user-images.githubusercontent.com/15137312/200750965-a126493a-a1c6-4b62-85d0-c91a9f38bed3.png)

## Changes
- added method `toPlatformFileString(File path)` to android/build.gradle to replace windows file separator character with '/'
- call `toPlatformFileString` on cmake arguments REACT_NATIVE_DIR
- fix sources taken from [this PR](Kudo/react-native-v8#132)

## Test code and steps to reproduce
- create new project with RN v0.64.3
- install latest version of react-native-reanimated
- try to build apk for Android `./gradlew clean installDebug`

## Checklist

- [ ] Included code example that can be used to test this change
- [ ] Updated TS types
- [ ] Added TS types tests
- [ ] Added unit / integration tests
- [ ] Updated documentation
- [ ] Ensured that CI passes
Kudo added a commit to expo/expo that referenced this pull request Jan 9, 2024
# Why

fixes #26206
close ENG-10993

# How

cmake path separator should be `/` always. refer to
Kudo/react-native-v8#132 fix but refine the
method name a little bit

# Test Plan

- ci passed
- test building on windows
Kudo added a commit to expo/expo that referenced this pull request Jan 10, 2024
# Why

fixes #26206
close ENG-10993

# How

cmake path separator should be `/` always. refer to
Kudo/react-native-v8#132 fix but refine the
method name a little bit

# Test Plan

- ci passed
- test building on windows

(cherry picked from commit 175fcd7)
onizam95 pushed a commit to onizam95/expo-av-drm that referenced this pull request Jan 15, 2024
# Why

fixes expo#26206
close ENG-10993

# How

cmake path separator should be `/` always. refer to
Kudo/react-native-v8#132 fix but refine the
method name a little bit

# Test Plan

- ci passed
- test building on windows
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

CMake build error due to incorrect absolute RN_DIR path
1 participant