Skip to content

Commit 8c703a2

Browse files
committed
Add quick tips
1 parent 7a80644 commit 8c703a2

File tree

1 file changed

+42
-23
lines changed

1 file changed

+42
-23
lines changed

README.md

Lines changed: 42 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -49,34 +49,53 @@ dependencies {
4949
* Press `⌘ + shift + B` (Mac) or `ctrl + shift + B` (Win/Linux), choose the option `Enable CMake And Build Project With CMake`.
5050
* Done.
5151

52-
* Build `JNI` part with ndk-build: (Not recommended)
53-
54-
```shell
55-
export NDK=path/of/your/ndk
56-
cd folder/of/jni (android-gpuimage-plus/library/src/main/jni)
52+
* Build with preset tasks: (Requires `wsl`/`mingw`/`cygwin` on Windows.)
5753

58-
#This will make all arch: armeabi, armeabi-v7a arm64-v8a, x86, mips
59-
./buildJNI
60-
#Or use "sh buildJNI"
54+
```shell
55+
# define the environment variable "ANDROID_HOME"
56+
# If using Windows, define ANDROID_HOME in Windows Environment Settings by yourself.
57+
export ANDROID_HOME=/path/to/android/sdk
58+
59+
# Setup Project
60+
bash --setup-project
6161

62-
#Try this if you failed to run the shell above
63-
export CGE_USE_VIDEO_MODULE=1
64-
$NDK/ndk-build
62+
# Compile with CMake Debug
63+
bash vscode_tasks.sh --debug --enable-cmake --build
64+
# Compile with CMake Release
65+
bash vscode_tasks.sh --release --enable-cmake --build
6566

66-
#If you don't want anything except the image filter,
67-
#Do as below to build with only cge module
68-
#No ffmpeg, opencv or faceTracker.
69-
#And remove the loading part of ffmpeg&facetracker
70-
$NDK/ndk-build
67+
# Start Demo By Command
68+
bash vscode_tasks.sh --run
69+
```
7170

72-
#For Windows user, you should include the `.cmd` extension to `ndk-build` like this:
73-
cd <your\path\to\this\repo>\library\src\main\jni
74-
<your\path\to\ndk>\ndk-build.cmd
71+
* Build `JNI` part with ndk-build: (Not recommended)
7572

76-
#Also remember to comment out these line in NativeLibraryLoader
77-
//System.loadLibrary("ffmpeg");
78-
//CGEFFmpegNativeLibrary.avRegisterAll();
79-
```
73+
```shell
74+
export NDK=path/of/your/ndk
75+
cd folder/of/jni (android-gpuimage-plus/library/src/main/jni)
76+
77+
#This will make all arch: armeabi, armeabi-v7a arm64-v8a, x86, mips
78+
./buildJNI
79+
#Or use "sh buildJNI"
80+
81+
#Try this if you failed to run the shell above
82+
export CGE_USE_VIDEO_MODULE=1
83+
$NDK/ndk-build
84+
85+
#If you don't want anything except the image filter,
86+
#Do as below to build with only cge module
87+
#No ffmpeg, opencv or faceTracker.
88+
#And remove the loading part of ffmpeg&facetracker
89+
$NDK/ndk-build
90+
91+
#For Windows user, you should include the `.cmd` extension to `ndk-build` like this:
92+
cd <your\path\to\this\repo>\library\src\main\jni
93+
<your\path\to\ndk>\ndk-build.cmd
94+
95+
#Also remember to comment out these line in NativeLibraryLoader
96+
//System.loadLibrary("ffmpeg");
97+
//CGEFFmpegNativeLibrary.avRegisterAll();
98+
```
8099

81100
> You can find precompiled libs here: [android-gpuimage-plus-libs](https://github.com/wysaid/android-gpuimage-plus-libs) (The precompiled '.so' files are generated with NDK-r23b)
82101

0 commit comments

Comments
 (0)