mirror of
https://github.com/opencv/opencv.git
synced 2025-01-18 06:03:15 +08:00
Fixed Android packaging script
This commit is contained in:
parent
20ec29f22e
commit
85c8a69fdf
@ -51,6 +51,8 @@ rm -rf opencv/doc/CMakeLists.txt
|
|||||||
cp "$ANDROID_DIR/README.android" opencv/
|
cp "$ANDROID_DIR/README.android" opencv/
|
||||||
cp "$ANDROID_DIR/../README" opencv/
|
cp "$ANDROID_DIR/../README" opencv/
|
||||||
|
|
||||||
|
|
||||||
|
# get opencv version
|
||||||
CV_VERSION=`grep -o "[0-9]\+\.[0-9]\+\.[0-9]\+" opencv/share/OpenCV/OpenCVConfig-version.cmake`
|
CV_VERSION=`grep -o "[0-9]\+\.[0-9]\+\.[0-9]\+" opencv/share/OpenCV/OpenCVConfig-version.cmake`
|
||||||
mv opencv opencv$CV_VERSION
|
mv opencv opencv$CV_VERSION
|
||||||
|
|
||||||
@ -62,7 +64,7 @@ cd "$PRG_DIR/samples"
|
|||||||
#enable for loops over items with spaces in their name
|
#enable for loops over items with spaces in their name
|
||||||
IFS="
|
IFS="
|
||||||
"
|
"
|
||||||
for dir in `ls -1 | grep -v hello-android`
|
for dir in `ls -1`
|
||||||
do
|
do
|
||||||
if [ -f "$dir/default.properties" ]
|
if [ -f "$dir/default.properties" ]
|
||||||
then
|
then
|
||||||
@ -71,13 +73,17 @@ do
|
|||||||
then
|
then
|
||||||
echo -n > "$dir/default.properties"
|
echo -n > "$dir/default.properties"
|
||||||
android update project --name "$dir" --target "android-8" --library "../../opencv$CV_VERSION" --path "$dir"
|
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"'
|
#echo 'android update project --name "$dir" --target "android-8" --library "../opencv$CV_VERSION" --path "$dir"'
|
||||||
fi
|
fi
|
||||||
|
else
|
||||||
|
rm -rf "$dir"
|
||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
|
|
||||||
echo "OPENCV_MK_PATH:=../../opencv$CV_VERSION/share/OpenCV/OpenCV.mk" > includeOpenCV.mk
|
echo "OPENCV_MK_PATH:=../../opencv$CV_VERSION/share/OpenCV/OpenCV.mk" > includeOpenCV.mk
|
||||||
|
|
||||||
|
|
||||||
|
#clean samples
|
||||||
cd "$PRG_DIR/samples"
|
cd "$PRG_DIR/samples"
|
||||||
#remove ignored files/folders
|
#remove ignored files/folders
|
||||||
svn status --no-ignore | grep ^I | cut -c9- | xargs -d \\n rm -rf
|
svn status --no-ignore | grep ^I | cut -c9- | xargs -d \\n rm -rf
|
||||||
@ -87,6 +93,22 @@ svn status | grep ^\? | cut -c9- | xargs -d \\n rm -rf
|
|||||||
rm CMakeLists.txt
|
rm CMakeLists.txt
|
||||||
|
|
||||||
|
|
||||||
|
#generate "gen" folders to eliminate eclipse warnings
|
||||||
|
cd "$PRG_DIR/samples"
|
||||||
|
for dir in `ls -1`
|
||||||
|
do
|
||||||
|
if [ -d "$dir" ]
|
||||||
|
then
|
||||||
|
mkdir "$dir/gen"
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
|
||||||
|
|
||||||
|
#generate folders "gen" and "res" for opencv (dummy eclipse stiff)
|
||||||
|
cd $PRG_DIR
|
||||||
|
mkdir "opencv$CV_VERSION/gen"
|
||||||
|
mkdir "opencv$CV_VERSION/res"
|
||||||
|
|
||||||
# pack all files
|
# pack all files
|
||||||
cd $PRG_DIR
|
cd $PRG_DIR
|
||||||
tar cjpf opencv$CV_VERSION.tar.bz2 --exclude-vcs opencv$CV_VERSION samples || exit -1
|
tar cjpf opencv$CV_VERSION.tar.bz2 --exclude-vcs opencv$CV_VERSION samples || exit -1
|
||||||
|
Loading…
Reference in New Issue
Block a user