Skip to content
Browse files

create_package script updated to use command line version of the pack…

…age generator
  • Loading branch information...
1 parent 7708ff4 commit fcdb399dd681ebd3d702143da27eb2dd6e72132b @arturoc arturoc committed May 3, 2012
Showing with 62 additions and 82 deletions.
  1. +62 −82 scripts/dev/create_package.sh
View
144 scripts/dev/create_package.sh
@@ -1,4 +1,4 @@
-# $1 -> platform: win_cb, linux, linux64, vs2008, osx, osxSL, iphone, all
+# $1 -> platform: win_cb, linux, linux64, vs2008, osx, osxSL, ios, all
# $2 -> version number: 006
platform=$1
@@ -14,11 +14,11 @@ hostArch=`uname`
# echo "will make changes for snow leopard"
#fi
-if [ "$platform" != "win_cb" ] && [ "$platform" != "linux" ] && [ "$platform" != "linux64" ] && [ "$platform" != "vs2008" ] && [ "$platform" != "vs2010" ] && [ "$platform" != "osx" ] && [ "$platform" != "android" ] && [ "$platform" != "iphone" ] && [ "$platform" != "all" ]; then
+if [ "$platform" != "win_cb" ] && [ "$platform" != "linux" ] && [ "$platform" != "linux64" ] && [ "$platform" != "vs2008" ] && [ "$platform" != "vs2010" ] && [ "$platform" != "osx" ] && [ "$platform" != "android" ] && [ "$platform" != "ios" ] && [ "$platform" != "all" ]; then
echo usage:
echo ./create_package.sh platform version
echo platform:
- echo win_cb, linux, linux64, vs2008, vs2010, osx, android, iphone, all
+ echo win_cb, linux, linux64, vs2008, vs2010, osx, android, ios, all
exit 1
fi
@@ -30,15 +30,15 @@ if [ "$version" == "" ]; then
exit 1
fi
-REPO=git://github.com/openframeworks/openFrameworks.git
-REPO_ALIAS=ofmain
-BRANCH=master
+REPO=/home/arturo/Desktop/openFrameworks
+REPO_ALIAS=/home/arturo/Desktop/openFrameworks
+BRANCH=develop
libsnotinmac="unicap gstappsink glu quicktime videoInput"
libsnotinlinux="quicktime videoInput glut glu"
libsnotinwindows="unicap gstappsink"
libsnotinandroid="glut unicap gstappsink quicktime videoInput fmodex glee rtAudio"
-libsnotiniphone="glut unicap gstappsink quicktime videoInput fmodex glee rtAudio"
+libsnotinios="glut unicap gstappsink quicktime videoInput fmodex glee rtAudio"
if [ ! -d openFrameworks/.git ]; then
git clone $REPO
@@ -171,6 +171,10 @@ function deleteProjectFiles {
fi
}
+function createProjectFiles {
+ projectGenerator --allexamples --${pkg_platform}
+}
+
function createPackage {
pkg_platform=$1
pkg_version=$2
@@ -186,110 +190,84 @@ function createPackage {
#fi
echo "creating package $pkg_platform $version in $pkg_ofroot"
- #delete other platforms example project files
- cd $pkg_ofroot/apps/examples
-
- for example in $( find . -maxdepth 1 -mindepth 1 -type d )
- do
- echo deleting $example
- deleteProjectFiles $pkg_platform $pkg_ofroot $example
- cd $pkg_ofroot/apps/examples
- done
-
-
- #delete other platforms addons examples project files
- cd $pkg_ofroot/apps/addonsExamples
-
- for example in $( find . -maxdepth 1 -mindepth 1 -type d )
- do
- deleteProjectFiles $pkg_platform $pkg_ofroot $example
- cd $pkg_ofroot/apps/addonsExamples
- done
+ #remove apps folder
+ rm -r $pkg_ofroot/apps
- #delete iphone examples in other platforms
- cd $pkg_ofroot/apps
+ cd $pkg_ofroot/examples
- if [ "$pkg_platform" != "iphone" ]; then
- rm -Rf iPhoneSpecificExamples
- rm -Rf iPhoneExamples
- rm -Rf iPhoneAddonsExamples
+ #delete ios examples in other platforms
+ if [ "$pkg_platform" != "ios" ]; then
+ rm -Rf ios
fi
#delete android examples in other platforms
if [ "$pkg_platform" != "android" ]; then
- rm -Rf androidExamples
+ rm -Rf android
fi
#delete desktop examples in mobile packages
- if [ "$pkg_platform" == "android" ] || [ "$pkg_platform" == "iphone" ]; then
- rm -Rf examples
- rm -Rf addonsExamples
+ if [ "$pkg_platform" == "android" ] || [ "$pkg_platform" == "ios" ]; then
+ rm -Rf 3d
+ rm -Rf addons
+ rm -Rf communication
+ rm -Rf empty
+ rm -Rf events
+ rm -Rf gl
+ rm -Rf graphics
+ rm -Rf ios
+ rm -Rf math
+ rm -Rf sound
+ rm -Rf utils
+ rm -Rf video
fi
- #delete drag & drop example in linux, still not working
+ #delete drag & drop and glInfo examples in linux, still not working
if [ "$pkg_platform" == "linux" ] || [ "$pkg_platform" == "linux64" ]; then
- rm -Rf examples/dragDropExample
+ rm -Rf utils/dragDropExample
+ rm -Rf gl/glInfoExample
fi
+
#delete ofxSynth addon, still not stable
+ cd $pkg_ofroot
rm -Rf addons/ofxSynth
+ rm -Rf addons/ofxGui
+
+ #create project files for platform
+ createProjectFiles $pkg_platform $pkg_ofroot
- #create project files
- cd $pkg_ofroot
- if [ "$platform" = "win_cb" ]; then
- scripts/win_cb/createProjects.py
- elif [ "$platform" = "linux" ] || [ "$platform" = "linux64" ]; then
- scripts/linux/createProjects.py -p${platform}
- elif [ "$platform" = "osx" ]; then
- if [ "$hostArch" = "Linux" ]; then
- cd $pkg_ofroot/libs/openFrameworksCompiled/project/linux
- make Release
- cd $pkg_ofroot
- scripts/linux/createProjects.py apps/devApps/_DeployExamples/
- cd $pkg_ofroot/apps/devApps/_DeployExamples/
- make
- cd bin
- ./_DeployExamples
- cd $pkg_ofroot/libs/openFrameworksCompiled/project/linux
- make cleanRelease
- else
- cd $pkg_ofroot/apps/devApps/_DeployExamples/
- xcodebuild -configuration Debug -target deployExamples -project deployExamples.xcodeproj
- ./bin/deployExamplesDebug.app/Contents/MacOS/deployExamplesDebug
- fi
- fi
#delete other platform libraries
if [ "$pkg_platform" = "linux" ]; then
- otherplatforms="linux64 osx win_cb vs2008 vs2010 iphone android"
+ otherplatforms="linux64 osx win_cb vs2008 vs2010 ios android"
fi
if [ "$pkg_platform" = "linux64" ]; then
- otherplatforms="linux osx win_cb vs2008 vs2010 iphone android"
+ otherplatforms="linux osx win_cb vs2008 vs2010 ios android"
fi
if [ "$pkg_platform" = "osx" ]; then
- otherplatforms="linux linux64 win_cb vs2008 vs2010 iphone android"
+ otherplatforms="linux linux64 win_cb vs2008 vs2010 ios android"
fi
if [ "$pkg_platform" = "win_cb" ]; then
- otherplatforms="linux linux64 osx vs2008 vs2010 iphone android"
+ otherplatforms="linux linux64 osx vs2008 vs2010 ios android"
fi
if [ "$pkg_platform" = "vs2008" ]; then
- otherplatforms="linux linux64 osx win_cb vs2010 iphone android"
+ otherplatforms="linux linux64 osx win_cb vs2010 ios android"
fi
if [ "$pkg_platform" = "vs2010" ]; then
- otherplatforms="linux linux64 osx win_cb vs2008 iphone android"
+ otherplatforms="linux linux64 osx win_cb vs2008 ios android"
fi
- if [ "$pkg_platform" = "iphone" ]; then
+ if [ "$pkg_platform" = "ios" ]; then
otherplatforms="linux linux64 win_cb vs2008 vs2010 android"
fi
if [ "$pkg_platform" = "android" ]; then
- otherplatforms="linux linux64 osx win_cb vs2008 vs2010 iphone"
+ otherplatforms="linux linux64 osx win_cb vs2008 vs2010 ios"
fi
#delete libraries for other platforms
@@ -310,8 +288,8 @@ function createPackage {
rm -Rf $libsnotinwindows
elif [ "$pkg_platform" = "android" ]; then
rm -Rf $libsnotinandroid
- elif [ "$pkg_platform" = "iphone" ]; then
- rm -Rf $libsnotiniphone
+ elif [ "$pkg_platform" = "ios" ]; then
+ rm -Rf $libsnotinios
fi
cd ${pkg_ofroot}/addons
@@ -336,13 +314,13 @@ function createPackage {
rm -Rf $( ls -d */include_android )
fi
- #delete specific include folders for non-iphone
- if [ "$pkg_platform" != "iphone" ]; then
- rm -Rf $( ls -d */include_iphone )
+ #delete specific include folders for non-ios
+ if [ "$pkg_platform" != "ios" ]; then
+ rm -Rf $( ls -d */include_ios )
fi
#delete generic includes for libs that has specific ones in android
- if [ "$pkg_platform" == "android" ] || [ "$pkg_platform" == "iphone" ]; then
+ if [ "$pkg_platform" == "android" ] || [ "$pkg_platform" == "ios" ]; then
rm -Rf glu/include
fi
@@ -359,7 +337,7 @@ function createPackage {
if [ "$pkg_platform" != "linux64" ]; then
rm -Rf $otherplatforms
else
- rm -Rf win_cb vs2008 vs2010 osx iphone
+ rm -Rf win_cb vs2008 vs2010 osx ios
fi
rm create_package.sh
@@ -372,14 +350,12 @@ function createPackage {
rm -Rf $(find . -name .gitignore)
#delete dev folders
- cd $pkg_ofroot/apps
- rm -Rf devApps
cd ${pkg_ofroot}/scripts
rm -Rf dev
#delete xcode templates in other platforms
cd $pkg_ofroot
- if [ "$pkg_platform" != "osx" ] && [ "$pkg_platform" != "iphone" ]; then
+ if [ "$pkg_platform" != "osx" ] && [ "$pkg_platform" != "ios" ]; then
rm -Rf "xcode templates"
fi
@@ -388,8 +364,8 @@ function createPackage {
if [ "$pkg_platform" != "android" ]; then
rm -Rf ofxAndroid
fi
- #delete ofxIphone in non iphone
- if [ "$pkg_platform" != "iphone" ]; then
+ #delete ofxiPhone in non ios
+ if [ "$pkg_platform" != "ios" ]; then
rm -Rf ofxiPhone
fi
@@ -472,7 +448,11 @@ if [ "$platform" = "all" ]; then
mv * $packageroot/..
#rm -Rf $packageroot
else
+ of_root=$(echo ~/.ofprojectgenerator/config)
+ echo $packageroot > ~/.ofprojectgenerator/config
createPackage $platform $version $packageroot
+ echo $of_root > ~/.ofprojectgenerator/config
+
fi
cd $packageroot

0 comments on commit fcdb399

Please sign in to comment.
Something went wrong with that request. Please try again.