commit
87b87708fe
8 changed files with 88 additions and 14 deletions
9
.gitignore
vendored
Normal file
9
.gitignore
vendored
Normal file
|
@ -0,0 +1,9 @@
|
|||
*.swo
|
||||
*.swp
|
||||
Python-*
|
||||
python_files/Python-*
|
||||
freetype-*
|
||||
SDL_*
|
||||
build/*
|
||||
sdl/sdl1.3/Xcode-iPhoneOS/SDL/build/
|
||||
kivy/*
|
9
build_all.sh
Executable file
9
build_all.sh
Executable file
|
@ -0,0 +1,9 @@
|
|||
#!/bin/bash
|
||||
|
||||
. environment.sh
|
||||
|
||||
try ./build_python.sh
|
||||
try ./build_sdl.sh
|
||||
try ./build_freetype.sh
|
||||
try ./build_sdlttf.sh
|
||||
try ./build_kivy.sh
|
|
@ -1,11 +1,8 @@
|
|||
#!/bin/bash
|
||||
|
||||
set -x
|
||||
. environment.sh
|
||||
|
||||
FT_VERSION=2.4.8
|
||||
SDKVER=5.0
|
||||
DEVROOT=/Developer/Platforms/iPhoneOS.platform/Developer
|
||||
SDKROOT=$DEVROOT/SDKs/iPhoneOS$SDKVER.sdk
|
||||
|
||||
if [ ! -d freetype-$FT_VERSION ]; then
|
||||
curl -L http://download.savannah.gnu.org/releases/freetype/freetype-$FT_VERSION.tar.bz2 > freetype-$FT_VERSION.tar.bz2
|
||||
|
@ -19,8 +16,10 @@ fi
|
|||
# lib not found, compile it
|
||||
pushd .
|
||||
cd freetype-$FT_VERSION
|
||||
./configure --prefix=/usr/local/iphone --host=arm-apple-darwin --enable-static=yes --enable-shared=no CC=$DEVROOT/usr/bin/arm-apple-darwin10-llvm-gcc-4.2 AR=$DEVROOT/usr/bin/ar LDFLAGS="-isysroot $SDKROOT -miphoneos-version-min=$SDKVER" CFLAGS="-O2 -miphoneos-version-min=$SDKVER -isysroot $SDKROOT"
|
||||
./configure --prefix=/usr/local/iphone --host=arm-apple-darwin --enable-static=yes --enable-shared=no CC=$DEVROOT/usr/bin/arm-apple-darwin10-llvm-gcc-4.2 AR=$DEVROOT/usr/bin/ar LDFLAGS="-isysroot $SDKROOT -miphoneos-version-min=$SDKVER" CFLAGS="-O0 -g -miphoneos-version-min=$SDKVER -isysroot $SDKROOT"
|
||||
make clean
|
||||
make
|
||||
cp objs/.libs/libfreetype.a libfreetype-arm7.a
|
||||
|
||||
# copy to buildroot
|
||||
cp objs/.libs/libfreetype.a $BUILDROOT/lib/libfreetype.a
|
||||
cp -a include $BUILDROOT/include/freetype
|
||||
|
|
24
build_kivy.sh
Executable file
24
build_kivy.sh
Executable file
|
@ -0,0 +1,24 @@
|
|||
#!/bin/bash
|
||||
|
||||
. ./environment.sh
|
||||
|
||||
set -x
|
||||
|
||||
if [ ! -d kivy ]; then
|
||||
try git clone https://github.com/tito/kivy
|
||||
try cd kivy
|
||||
try git checkout ios-support
|
||||
try cd ..
|
||||
fi
|
||||
|
||||
if [ "X$1" == "X-f" ]; then
|
||||
try cd kivy
|
||||
try git clean -dxf
|
||||
try git fetch
|
||||
try git checkout ios-support
|
||||
try cd ..
|
||||
fi
|
||||
|
||||
cd kivy
|
||||
make ios
|
||||
|
|
@ -1,4 +1,7 @@
|
|||
#!/bin/zsh
|
||||
|
||||
. ./environment.sh
|
||||
|
||||
set -o errexit
|
||||
set -x
|
||||
|
||||
|
@ -164,4 +167,4 @@ lipo $PATH_DEV/lib/libpython2.7-arm.a $PATH_SIMU/lib/libpython2.7-i386.a -create
|
|||
find python2.7 | grep -E '*\.(py|pyc|so\.o|so\.a|so\.libs)$' | xargs rm
|
||||
find python2.7 | grep -E '*test*' | xargs rm -rdf
|
||||
|
||||
|
||||
cp $PATH_DEV/libpython2.7-arm.a $BUILDROOT/build/lib/
|
||||
|
|
|
@ -1,3 +1,8 @@
|
|||
#!/bin/bash
|
||||
. ./environmnent.sh
|
||||
pushd sdl/sdl1.3/Xcode-iPhoneOS/SDL
|
||||
xcodebuild -project SDLiPhoneOS.xcodeproj -alltargets
|
||||
popd
|
||||
#the binarie is under sdl/sdl1.3/Xcode-iPhoneOS/SDL/build/Release-Universal/
|
||||
cp sdl/sdl1.3/Xcode-iPhoneOS/SDL/build/Release-iPhoneOS/libSDL.a $BUILDROOT/lib
|
||||
cp -a sdl/sdl1.3/include $BUILDROOT/include/SDL
|
||||
|
|
|
@ -1,11 +1,8 @@
|
|||
#!/bin/bash
|
||||
|
||||
set -x
|
||||
. environment.sh
|
||||
|
||||
SDLTTF_VERSION=2.0.10
|
||||
SDKVER=5.0
|
||||
DEVROOT=/Developer/Platforms/iPhoneOS.platform/Developer
|
||||
SDKROOT=$DEVROOT/SDKs/iPhoneOS$SDKVER.sdk
|
||||
|
||||
if [ ! -d SDL_ttf-$SDLTTF_VERSION ]; then
|
||||
curl -L http://www.libsdl.org/projects/SDL_ttf/release/SDL_ttf-$SDLTTF_VERSION.tar.gz > SDL_ttf-$SDLTTF_VERSION.tar.gz
|
||||
|
@ -17,12 +14,15 @@ if [ -f SDL_ttf-$SDLTTF_VERSION/libSDL_ttf-arm7.a ]; then
|
|||
fi
|
||||
|
||||
|
||||
cd SDL_ttf-2.0.10
|
||||
cd SDL_ttf-$SDLTTF_VERSION
|
||||
rm libSDL_ttf.la
|
||||
./configure --prefix=/usr/local/iphone --host=arm-apple-darwin \
|
||||
--enable-static=yes --enable-shared=no \
|
||||
--without-x \
|
||||
CC=$DEVROOT/usr/bin/arm-apple-darwin10-llvm-gcc-4.2 AR=$DEVROOT/usr/bin/ar LDFLAGS="-isysroot $SDKROOT -miphoneos-version-min=$SDKVER" CFLAGS="-O2 -miphoneos-version-min=$SDKVER -isysroot $SDKROOT"
|
||||
CC=$DEVROOT/usr/bin/arm-apple-darwin10-llvm-gcc-4.2 AR=$DEVROOT/usr/bin/ar LDFLAGS="-isysroot $SDKROOT -miphoneos-version-min=$SDKVER" CFLAGS="-O0 -g -miphoneos-version-min=$SDKVER -isysroot $SDKROOT"
|
||||
make clean
|
||||
make libSDL_ttf.la
|
||||
cp .libs/libSDL_ttf.a libSDL_ttf-arm7.a
|
||||
|
||||
# copy to buildroot
|
||||
cp .libs/libSDL_ttf.a $BUILDROOT/lib/libSDL_ttf.a
|
||||
cp -a SDL_ttf.h $BUILDROOT/include
|
||||
|
|
25
environment.sh
Executable file
25
environment.sh
Executable file
|
@ -0,0 +1,25 @@
|
|||
#!/bin/bash
|
||||
|
||||
try () {
|
||||
"$@" || exit -1
|
||||
}
|
||||
|
||||
# iOS SDK Environmnent
|
||||
SDKVER=5.0
|
||||
DEVROOT=/Developer/Platforms/iPhoneOS.platform/Developer
|
||||
SDKROOT=$DEVROOT/SDKs/iPhoneOS$SDKVER.sdk
|
||||
|
||||
# where the build will be located
|
||||
ROOT="$( cd -P "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
|
||||
BUILDROOT="$ROOT/build"
|
||||
|
||||
# for external project
|
||||
export KIVYIOSROOT="$ROOT"
|
||||
|
||||
# create build directory if not found
|
||||
set -x
|
||||
if [ ! -d $BUILDROOT ]; then
|
||||
try mkdir $BUILDROOT
|
||||
try mkdir $BUILDROOT/include
|
||||
try mkdir $BUILDROOT/lib
|
||||
fi
|
Loading…
Add table
Reference in a new issue