Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in / Register
Toggle navigation
O
opencv
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Packages
Packages
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
submodule
opencv
Commits
20ec29f2
Commit
20ec29f2
authored
Jul 14, 2011
by
Andrey Kamaev
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Android samples are included into the Android package
parent
a70f354c
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
47 additions
and
7 deletions
+47
-7
package.sh
android/scripts/package.sh
+38
-1
Android.mk
samples/android/2-native/jni/Android.mk
+4
-3
Android.mk
samples/android/4-mixed/jni/Android.mk
+4
-3
includeOpenCV.mk
samples/android/includeOpenCV.mk
+1
-0
No files found.
android/scripts/package.sh
View file @
20ec29f2
...
...
@@ -10,6 +10,7 @@ cd package
PRG_DIR
=
`
pwd
`
mkdir
opencv
# neon-enabled build
cd
$PRG_DIR
mkdir
build-neon
...
...
@@ -23,6 +24,7 @@ rm -rf doc include src .classpath .project AndroidManifest.xml default.propertie
mv
libs/armeabi-v7a libs/armeabi-v7a-neon
mv
share/OpenCV/3rdparty/libs/armeabi-v7a share/OpenCV/3rdparty/libs/armeabi-v7a-neon
# armeabi-v7a build
cd
"
$PRG_DIR
"
mkdir
build
...
...
@@ -51,7 +53,42 @@ cp "$ANDROID_DIR/../README" opencv/
CV_VERSION
=
`
grep
-o
"[0-9]
\+\.
[0-9]
\+\.
[0-9]
\+
"
opencv/share/OpenCV/OpenCVConfig-version.cmake
`
mv
opencv opencv
$CV_VERSION
tar
cjpf opencv
$CV_VERSION
.tar.bz2 opencv
$CV_VERSION
||
exit
-1
#samples
cp
-r
"
$ANDROID_DIR
/../samples/android"
"
$PRG_DIR
/samples"
cd
"
$PRG_DIR
/samples"
#enable for loops over items with spaces in their name
IFS
=
"
"
for
dir
in
`
ls
-1
|
grep
-v
hello-android
`
do
if
[
-f
"
$dir
/default.properties"
]
then
HAS_REFERENCE
=
`
cat
"
$dir
/default.properties"
|
grep
-c
android.library.reference.1
`
if
[
$HAS_REFERENCE
=
1
]
then
echo
-n
>
"
$dir
/default.properties"
android update project
--name
"
$dir
"
--target
"android-8"
--library
"../../opencv
$CV_VERSION
"
--path
"
$dir
"
echo
'android update project --name "$dir" --target "android-8" --library "../opencv$CV_VERSION" --path "$dir"'
fi
fi
done
echo
"OPENCV_MK_PATH:=../../opencv
$CV_VERSION
/share/OpenCV/OpenCV.mk"
>
includeOpenCV.mk
cd
"
$PRG_DIR
/samples"
#remove ignored files/folders
svn status
--no-ignore
|
grep
^I |
cut
-c9-
| xargs
-d
\\
n
rm
-rf
#remove unversioned files/folders
svn status |
grep
^
\?
|
cut
-c9-
| xargs
-d
\\
n
rm
-rf
#remove unneded CMakeLists.txt
rm
CMakeLists.txt
# pack all files
cd
$PRG_DIR
tar
cjpf opencv
$CV_VERSION
.tar.bz2
--exclude-vcs
opencv
$CV_VERSION
samples
||
exit
-1
echo
echo
"Package opencv
$CV_VERSION
.tar.bz2 is successfully created"
samples/android/2-native/jni/Android.mk
View file @
20ec29f2
...
...
@@ -2,11 +2,12 @@ LOCAL_PATH := $(call my-dir)
include $(CLEAR_VARS)
OPENCV_MK_BUILD_PATH:=../../../../android/build/OpenCV.mk
ifeq ("$(wildcard $(OPENCV_MK_BUILD_PATH))","")
include ../includeOpenCV.mk
ifeq ("$(wildcard $(OPENCV_MK_PATH))","")
#try to load OpenCV.mk from default install location
include $(TOOLCHAIN_PREBUILT_ROOT)/user/share/OpenCV/OpenCV.mk
else
include $(OPENCV_MK_
BUILD_
PATH)
include $(OPENCV_MK_PATH)
endif
LOCAL_MODULE := native_sample
...
...
samples/android/4-mixed/jni/Android.mk
View file @
20ec29f2
...
...
@@ -3,11 +3,12 @@ LOCAL_PATH := $(call my-dir)
include $(CLEAR_VARS)
OPENCV_CAMERA_MODULES:=off
OPENCV_MK_BUILD_PATH:=../../../../android/build/OpenCV.mk
ifeq ("$(wildcard $(OPENCV_MK_BUILD_PATH))","")
include ../includeOpenCV.mk
ifeq ("$(wildcard $(OPENCV_MK_PATH))","")
#try to load OpenCV.mk from default install location
include $(TOOLCHAIN_PREBUILT_ROOT)/user/share/OpenCV/OpenCV.mk
else
include $(OPENCV_MK_
BUILD_
PATH)
include $(OPENCV_MK_PATH)
endif
LOCAL_MODULE := mixed_sample
...
...
samples/android/includeOpenCV.mk
0 → 100644
View file @
20ec29f2
OPENCV_MK_PATH:=../../../android/build/OpenCV.mk
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment