commit
7eb5961d88
13 changed files with 459 additions and 16 deletions
1
.gitignore
vendored
1
.gitignore
vendored
|
@ -1,6 +1,5 @@
|
|||
*.swo
|
||||
*.swp
|
||||
Python-*
|
||||
freetype-*
|
||||
build/*
|
||||
src/SDL/Xcode-iPhoneOS/SDL/build/
|
||||
|
|
137
src/ffi_files/ffi-3.0.13-sysv.S.patch
Normal file
137
src/ffi_files/ffi-3.0.13-sysv.S.patch
Normal file
|
@ -0,0 +1,137 @@
|
|||
--- libffi-3.0.13-old/src/arm/sysv.S 2013-03-16 12:19:39.000000000 +0100
|
||||
+++ libffi-3.0.13-new/src/arm/sysv.S 2013-08-26 19:33:28.000000000 +0200
|
||||
@@ -109,58 +109,35 @@
|
||||
#define UNWIND @
|
||||
#endif
|
||||
|
||||
+.syntax unified
|
||||
|
||||
#if defined(__thumb__) && !defined(__THUMB_INTERWORK__)
|
||||
-.macro ARM_FUNC_START name
|
||||
- .text
|
||||
- .align 0
|
||||
- .thumb
|
||||
- .thumb_func
|
||||
-#ifdef __APPLE__
|
||||
- ENTRY($0)
|
||||
+#define ARM_FUNC_START(name) \
|
||||
+ .text; \
|
||||
+ .align 4; \
|
||||
+ .thumb; \
|
||||
+ .thumb_func; \
|
||||
+ ENTRY(name); \
|
||||
+ bx pc; \
|
||||
+ nop; \
|
||||
+ .arm; \
|
||||
+ UNWIND .fnstart; \
|
||||
+_L__##name:
|
||||
#else
|
||||
- ENTRY(\name)
|
||||
-#endif
|
||||
- bx pc
|
||||
- nop
|
||||
- .arm
|
||||
- UNWIND .fnstart
|
||||
-/* A hook to tell gdb that we've switched to ARM mode. Also used to call
|
||||
- directly from other local arm routines. */
|
||||
-#ifdef __APPLE__
|
||||
-_L__$0:
|
||||
-#else
|
||||
-_L__\name:
|
||||
-#endif
|
||||
-.endm
|
||||
-#else
|
||||
-.macro ARM_FUNC_START name
|
||||
- .text
|
||||
- .align 0
|
||||
- .arm
|
||||
-#ifdef __APPLE__
|
||||
- ENTRY($0)
|
||||
-#else
|
||||
- ENTRY(\name)
|
||||
-#endif
|
||||
+#define ARM_FUNC_START(name) \
|
||||
+ .text; \
|
||||
+ .align 4; \
|
||||
+ .arm; \
|
||||
+ ENTRY(name); \
|
||||
UNWIND .fnstart
|
||||
-.endm
|
||||
#endif
|
||||
|
||||
-.macro RETLDM regs=, cond=, dirn=ia
|
||||
+.macro RETLDM
|
||||
#if defined (__INTERWORKING__)
|
||||
- .ifc "\regs",""
|
||||
- ldr\cond lr, [sp], #4
|
||||
- .else
|
||||
- ldm\cond\dirn sp!, {\regs, lr}
|
||||
- .endif
|
||||
- bx\cond lr
|
||||
+ ldr lr, [sp], #4
|
||||
+ bx lr
|
||||
#else
|
||||
- .ifc "\regs",""
|
||||
- ldr\cond pc, [sp], #4
|
||||
- .else
|
||||
- ldm\cond\dirn sp!, {\regs, pc}
|
||||
- .endif
|
||||
+ ldr pc, [sp], #4
|
||||
#endif
|
||||
.endm
|
||||
|
||||
@@ -170,8 +147,7 @@
|
||||
@ r3: fig->flags
|
||||
@ sp+0: ecif.rvalue
|
||||
|
||||
- @ This assumes we are using gas.
|
||||
-ARM_FUNC_START ffi_call_SYSV
|
||||
+ARM_FUNC_START(ffi_call_SYSV)
|
||||
@ Save registers
|
||||
stmfd sp!, {r0-r3, fp, lr}
|
||||
UNWIND .save {r0-r3, fp, lr}
|
||||
@@ -228,7 +204,7 @@
|
||||
#if defined(__SOFTFP__) || defined(__ARM_EABI__)
|
||||
cmpne r3, #FFI_TYPE_DOUBLE
|
||||
#endif
|
||||
- stmeqia r2, {r0, r1}
|
||||
+ stmiaeq r2, {r0, r1}
|
||||
|
||||
#if !defined(__SOFTFP__) && !defined(__ARM_EABI__)
|
||||
beq LSYM(Lepilogue)
|
||||
@@ -266,7 +242,7 @@
|
||||
void *args;
|
||||
*/
|
||||
|
||||
-ARM_FUNC_START ffi_closure_SYSV
|
||||
+ARM_FUNC_START(ffi_closure_SYSV)
|
||||
UNWIND .pad #16
|
||||
add ip, sp, #16
|
||||
stmfd sp!, {ip, lr}
|
||||
@@ -345,7 +321,7 @@
|
||||
@ r3: fig->flags
|
||||
@ sp+0: ecif.rvalue
|
||||
|
||||
-ARM_FUNC_START ffi_call_VFP
|
||||
+ARM_FUNC_START(ffi_call_VFP)
|
||||
@ Save registers
|
||||
stmfd sp!, {r0-r3, fp, lr}
|
||||
UNWIND .save {r0-r3, fp, lr}
|
||||
@@ -410,7 +386,7 @@
|
||||
beq LSYM(Lepilogue_vfp)
|
||||
|
||||
cmp r3, #FFI_TYPE_SINT64
|
||||
- stmeqia r2, {r0, r1}
|
||||
+ stmiaeq r2, {r0, r1}
|
||||
beq LSYM(Lepilogue_vfp)
|
||||
|
||||
cmp r3, #FFI_TYPE_FLOAT
|
||||
@@ -433,7 +409,7 @@
|
||||
.size CNAME(ffi_call_VFP),.ffi_call_VFP_end-CNAME(ffi_call_VFP)
|
||||
|
||||
|
||||
-ARM_FUNC_START ffi_closure_VFP
|
||||
+ARM_FUNC_START(ffi_closure_VFP)
|
||||
fstmfdd sp!, {d0-d7}
|
||||
@ r0-r3, then d0-d7
|
||||
UNWIND .pad #80
|
2
src/python_files/ModulesSetup.mobile
Normal file
2
src/python_files/ModulesSetup.mobile
Normal file
|
@ -0,0 +1,2 @@
|
|||
# Ctypes
|
||||
_ctypes _ctypes/_ctypes.c _ctypes/callbacks.c _ctypes/callproc.c _ctypes/stgdict.c _ctypes/cfield.c -I$(srcdir)/../../build/include/ffi
|
34
src/python_files/Python-2.7.1-ctypes_duplicate.patch
Normal file
34
src/python_files/Python-2.7.1-ctypes_duplicate.patch
Normal file
|
@ -0,0 +1,34 @@
|
|||
--- Python2.7-old/Modules/_ctypes/cfield.c 2010-05-09 16:46:46.000000000 +0200
|
||||
+++ Python2.7-new/Modules/_ctypes/cfield.c 2013-08-27 00:21:15.000000000 +0200
|
||||
@@ -1747,24 +1747,6 @@
|
||||
} ffi_type;
|
||||
*/
|
||||
|
||||
-/* align and size are bogus for void, but they must not be zero */
|
||||
-ffi_type ffi_type_void = { 1, 1, FFI_TYPE_VOID };
|
||||
-
|
||||
-ffi_type ffi_type_uint8 = { 1, 1, FFI_TYPE_UINT8 };
|
||||
-ffi_type ffi_type_sint8 = { 1, 1, FFI_TYPE_SINT8 };
|
||||
-
|
||||
-ffi_type ffi_type_uint16 = { 2, 2, FFI_TYPE_UINT16 };
|
||||
-ffi_type ffi_type_sint16 = { 2, 2, FFI_TYPE_SINT16 };
|
||||
-
|
||||
-ffi_type ffi_type_uint32 = { 4, 4, FFI_TYPE_UINT32 };
|
||||
-ffi_type ffi_type_sint32 = { 4, 4, FFI_TYPE_SINT32 };
|
||||
-
|
||||
-ffi_type ffi_type_uint64 = { 8, LONG_LONG_ALIGN, FFI_TYPE_UINT64 };
|
||||
-ffi_type ffi_type_sint64 = { 8, LONG_LONG_ALIGN, FFI_TYPE_SINT64 };
|
||||
-
|
||||
-ffi_type ffi_type_float = { sizeof(float), FLOAT_ALIGN, FFI_TYPE_FLOAT };
|
||||
-ffi_type ffi_type_double = { sizeof(double), DOUBLE_ALIGN, FFI_TYPE_DOUBLE };
|
||||
-
|
||||
#ifdef ffi_type_longdouble
|
||||
#undef ffi_type_longdouble
|
||||
#endif
|
||||
@@ -1772,6 +1754,4 @@
|
||||
ffi_type ffi_type_longdouble = { sizeof(long double), LONGDOUBLE_ALIGN,
|
||||
FFI_TYPE_LONGDOUBLE };
|
||||
|
||||
-ffi_type ffi_type_pointer = { sizeof(void *), VOID_P_ALIGN, FFI_TYPE_POINTER };
|
||||
-
|
||||
/*---------------- EOF ----------------*/
|
159
src/python_files/Python-2.7.1-pyconfig.patch
Normal file
159
src/python_files/Python-2.7.1-pyconfig.patch
Normal file
|
@ -0,0 +1,159 @@
|
|||
--- Python2.7-old/pyconfig.h 2013-08-26 19:26:05.000000000 +0200
|
||||
+++ Python2.7-new/pyconfig.h 2013-08-27 00:11:06.000000000 +0200
|
||||
@@ -72,7 +72,7 @@
|
||||
/* #undef HAVE_ATTRIBUTE_FORMAT_PARSETUPLE */
|
||||
|
||||
/* Define to 1 if you have the `bind_textdomain_codeset' function. */
|
||||
-#define HAVE_BIND_TEXTDOMAIN_CODESET 1
|
||||
+/* #undef HAVE_BIND_TEXTDOMAIN_CODESET */
|
||||
|
||||
/* Define to 1 if you have the <bluetooth/bluetooth.h> header file. */
|
||||
/* #undef HAVE_BLUETOOTH_BLUETOOTH_H */
|
||||
@@ -218,7 +218,7 @@
|
||||
/* #undef HAVE_FDATASYNC */
|
||||
|
||||
/* Define to 1 if you have the `finite' function. */
|
||||
-#define HAVE_FINITE 1
|
||||
+/* #undef HAVE_FINITE */
|
||||
|
||||
/* Define to 1 if you have the `flock' function. */
|
||||
#define HAVE_FLOCK 1
|
||||
@@ -233,7 +233,7 @@
|
||||
#define HAVE_FPATHCONF 1
|
||||
|
||||
/* Define to 1 if you have the `fseek64' function. */
|
||||
-#define HAVE_FSEEK64 1
|
||||
+/* #undef HAVE_FSEEK64 */
|
||||
|
||||
/* Define to 1 if you have the `fseeko' function. */
|
||||
#define HAVE_FSEEKO 1
|
||||
@@ -245,7 +245,7 @@
|
||||
#define HAVE_FSYNC 1
|
||||
|
||||
/* Define to 1 if you have the `ftell64' function. */
|
||||
-#define HAVE_FTELL64 1
|
||||
+/* #undef HAVE_FTELL64 */
|
||||
|
||||
/* Define to 1 if you have the `ftello' function. */
|
||||
#define HAVE_FTELLO 1
|
||||
@@ -260,7 +260,7 @@
|
||||
#define HAVE_GAI_STRERROR 1
|
||||
|
||||
/* Define to 1 if you have the `gamma' function. */
|
||||
-#define HAVE_GAMMA 1
|
||||
+/* #undef HAVE_GAMMA */
|
||||
|
||||
/* Define if we can use gcc inline assembler to get and set x87 control word
|
||||
*/
|
||||
@@ -279,10 +279,10 @@
|
||||
#define HAVE_GETGROUPS 1
|
||||
|
||||
/* Define to 1 if you have the `gethostbyname' function. */
|
||||
-/* #undef HAVE_GETHOSTBYNAME */
|
||||
+#define HAVE_GETHOSTBYNAME 1
|
||||
|
||||
/* Define this if you have some version of gethostbyname_r() */
|
||||
-#define HAVE_GETHOSTBYNAME_R 1
|
||||
+/* #undef HAVE_GETHOSTBYNAME_R */
|
||||
|
||||
/* Define this if you have the 3-arg version of gethostbyname_r(). */
|
||||
/* #undef HAVE_GETHOSTBYNAME_R_3_ARG */
|
||||
@@ -291,7 +291,7 @@
|
||||
/* #undef HAVE_GETHOSTBYNAME_R_5_ARG */
|
||||
|
||||
/* Define this if you have the 6-arg version of gethostbyname_r(). */
|
||||
-#define HAVE_GETHOSTBYNAME_R_6_ARG 1
|
||||
+/* #undef HAVE_GETHOSTBYNAME_R_6_ARG */
|
||||
|
||||
/* Define to 1 if you have the `getitimer' function. */
|
||||
#define HAVE_GETITIMER 1
|
||||
@@ -327,19 +327,19 @@
|
||||
#define HAVE_GETPWENT 1
|
||||
|
||||
/* Define to 1 if you have the `getresgid' function. */
|
||||
-#define HAVE_GETRESGID 1
|
||||
+/* #undef HAVE_GETRESGID */
|
||||
|
||||
/* Define to 1 if you have the `getresuid' function. */
|
||||
-#define HAVE_GETRESUID 1
|
||||
+/* #undef HAVE_GETRESUID */
|
||||
|
||||
/* Define to 1 if you have the `getsid' function. */
|
||||
#define HAVE_GETSID 1
|
||||
|
||||
/* Define to 1 if you have the `getspent' function. */
|
||||
-#define HAVE_GETSPENT 1
|
||||
+/* #undef HAVE_GETSPENT */
|
||||
|
||||
/* Define to 1 if you have the `getspnam' function. */
|
||||
-#define HAVE_GETSPNAM 1
|
||||
+/* #undef HAVE_GETSPNAM */
|
||||
|
||||
/* Define to 1 if you have the `gettimeofday' function. */
|
||||
#define HAVE_GETTIMEOFDAY 1
|
||||
@@ -465,7 +465,7 @@
|
||||
#define HAVE_MKTIME 1
|
||||
|
||||
/* Define to 1 if you have the `mremap' function. */
|
||||
-#define HAVE_MREMAP 1
|
||||
+/* #undef HAVE_MREMAP */
|
||||
|
||||
/* Define to 1 if you have the <ncurses.h> header file. */
|
||||
/* #undef HAVE_NCURSES_H */
|
||||
@@ -492,7 +492,7 @@
|
||||
#define HAVE_PAUSE 1
|
||||
|
||||
/* Define to 1 if you have the `plock' function. */
|
||||
-#define HAVE_PLOCK 1
|
||||
+/* #undef HAVE_PLOCK */
|
||||
|
||||
/* Define to 1 if you have the `poll' function. */
|
||||
#define HAVE_POLL 1
|
||||
@@ -567,7 +567,7 @@
|
||||
#define HAVE_SEM_OPEN 1
|
||||
|
||||
/* Define to 1 if you have the `sem_timedwait' function. */
|
||||
-#define HAVE_SEM_TIMEDWAIT 1
|
||||
+/* #undef HAVE_SEM_TIMEDWAIT */
|
||||
|
||||
/* Define to 1 if you have the `sem_unlink' function. */
|
||||
#define HAVE_SEM_UNLINK 1
|
||||
@@ -600,10 +600,10 @@
|
||||
#define HAVE_SETREGID 1
|
||||
|
||||
/* Define to 1 if you have the `setresgid' function. */
|
||||
-#define HAVE_SETRESGID 1
|
||||
+/* #undef HAVE_SETRESGID */
|
||||
|
||||
/* Define to 1 if you have the `setresuid' function. */
|
||||
-#define HAVE_SETRESUID 1
|
||||
+/* #undef HAVE_SETRESUID */
|
||||
|
||||
/* Define to 1 if you have the `setreuid' function. */
|
||||
#define HAVE_SETREUID 1
|
||||
@@ -829,7 +829,7 @@
|
||||
#define HAVE_TMPNAM 1
|
||||
|
||||
/* Define to 1 if you have the `tmpnam_r' function. */
|
||||
-#define HAVE_TMPNAM_R 1
|
||||
+/* #undef HAVE_TMPNAM_R */
|
||||
|
||||
/* Define to 1 if your `struct tm' has `tm_zone'. Deprecated, use
|
||||
`HAVE_STRUCT_TM_TM_ZONE' instead. */
|
||||
@@ -894,7 +894,7 @@
|
||||
#define HAVE_ZLIB_COPY 1
|
||||
|
||||
/* Define to 1 if you have the `_getpty' function. */
|
||||
-#define HAVE__GETPTY 1
|
||||
+/* #undef HAVE__GETPTY */
|
||||
|
||||
/* Define if you are using Mach cthreads directly under /include */
|
||||
/* #undef HURD_C_THREADS */
|
||||
@@ -1245,5 +1245,4 @@
|
||||
#define STRICT_SYSV_CURSES /* Don't use ncurses extensions */
|
||||
#endif
|
||||
|
||||
-#endif /*Py_PYCONFIG_H*/
|
||||
-
|
||||
+#endif /*Py_PYCONFIG_H*/
|
||||
\ No newline at end of file
|
|
@ -2,6 +2,7 @@
|
|||
|
||||
. $(dirname $0)/environment.sh
|
||||
|
||||
try $(dirname $0)/build-libffi.sh
|
||||
try $(dirname $0)/build-python.sh
|
||||
try $(dirname $0)/reduce-python.sh
|
||||
try $(dirname $0)/build-ios.sh
|
||||
|
@ -12,6 +13,7 @@ try $(dirname $0)/build-sdlmixer.sh
|
|||
try $(dirname $0)/build-libjpeg.sh
|
||||
try $(dirname $0)/build-pil.sh
|
||||
try $(dirname $0)/build-kivy.sh
|
||||
try $(dirname $0)/build-pyobjus.sh
|
||||
|
||||
echo '== Build done'
|
||||
echo "Available libraries in $BUILDROOT/lib"
|
||||
|
|
28
tools/build-libffi.sh
Executable file
28
tools/build-libffi.sh
Executable file
|
@ -0,0 +1,28 @@
|
|||
#!/bin/bash
|
||||
|
||||
echo "Building libffi ============================="
|
||||
|
||||
. $(dirname $0)/environment.sh
|
||||
|
||||
if [ ! -f $CACHEROOT/libffi-$FFI_VERSION.tar.gz ]; then
|
||||
try curl -L ftp://sourceware.org/pub/libffi/libffi-$FFI_VERSION.tar.gz > $CACHEROOT/libffi-$FFI_VERSION.tar.gz
|
||||
fi
|
||||
if [ ! -d $TMPROOT/libffi-$FFI_VERSION ]; then
|
||||
try rm -rf $TMPROOT/libffi-$FFI_VERSION
|
||||
try tar xvf $CACHEROOT/libffi-$FFI_VERSION.tar.gz
|
||||
try mv libffi-$FFI_VERSION $TMPROOT
|
||||
fi
|
||||
|
||||
if [ -f $TMPROOT/libffi-$FFI_VERSION/Release-iphoneos/libffi.a ]; then
|
||||
exit 0;
|
||||
fi
|
||||
|
||||
# lib not found, compile it
|
||||
pushd $TMPROOT/libffi-$FFI_VERSION
|
||||
try patch -p1 < $KIVYIOSROOT/src/ffi_files/ffi-$FFI_VERSION-sysv.S.patch
|
||||
|
||||
try xcodebuild -project libffi.xcodeproj -target "libffi iOS" -configuration Release -sdk iphoneos$SDKVER OTHER_CFLAGS="-no-integrated-as"
|
||||
|
||||
try cp build/Release-iphoneos/libffi.a $BUILDROOT/lib/libffi.a
|
||||
try cp -a build/Release-iphoneos/usr/local/include $BUILDROOT/include/ffi
|
||||
popd
|
48
tools/build-pyobjus.sh
Executable file
48
tools/build-pyobjus.sh
Executable file
|
@ -0,0 +1,48 @@
|
|||
#!/bin/bash
|
||||
|
||||
echo "Building pyobjus ============================="
|
||||
|
||||
. $(dirname $0)/environment.sh
|
||||
|
||||
if [ ! -d $TMPROOT/pyobjus ] ; then
|
||||
try pushd $TMPROOT
|
||||
try git clone git@github.com:ivpusic/pyobjus.git
|
||||
try popd
|
||||
fi
|
||||
|
||||
try pushd $TMPROOT/pyobjus
|
||||
|
||||
OLD_CC="$CC"
|
||||
OLD_CFLAGS="$CFLAGS"
|
||||
OLD_LDFLAGS="$LDFLAGS"
|
||||
OLD_LDSHARED="$LDSHARED"
|
||||
export CC="$ARM_CC -I$BUILDROOT/include -I$BUILDROOT/include/ffi"
|
||||
export CFLAGS="$ARM_CFLAGS"
|
||||
export LDFLAGS="$ARM_LDFLAGS"
|
||||
export LDSHARED="$KIVYIOSROOT/tools/liblink"
|
||||
|
||||
rm -rdf iosbuild/
|
||||
try mkdir iosbuild
|
||||
|
||||
try $HOSTPYTHON setup.py build_ext
|
||||
try $HOSTPYTHON setup.py install -O2 --root iosbuild
|
||||
|
||||
# Strip away the large stuff
|
||||
find iosbuild/ | grep -E '.*\.(py|pyc|so\.o|so\.a|so\.libs)$$' | xargs rm
|
||||
rm -rdf "$BUILDROOT/python/lib/python2.7/site-packages/pyobjus"
|
||||
try cp -R "iosbuild/usr/local/lib/python2.7/site-packages/pyobjus" "$BUILDROOT/python/lib/python2.7/site-packages"
|
||||
popd
|
||||
|
||||
export CC="$OLD_CC"
|
||||
export CFLAGS="$OLD_CFLAGS"
|
||||
export LDFLAGS="$OLD_LDFLAGS"
|
||||
export LDSHARED="$OLD_LDSHARED"
|
||||
|
||||
bd=$TMPROOT/pyobjus/build/lib.macosx-*/pyobjus
|
||||
try $KIVYIOSROOT/tools/biglink $BUILDROOT/lib/libpyobjus.a $bd
|
||||
deduplicate $BUILDROOT/lib/libpyobjus.a
|
||||
|
||||
# copy objc bridge class -> it is used for implementing some objc methods, eg. for accelerometer
|
||||
try cp $TMPROOT/pyobjus/objc_classes/aux/* $KIVYIOSROOT/tools/templates
|
||||
|
||||
echo "Succesufully finished building pyobjus ==================="
|
|
@ -50,21 +50,27 @@ ln -s "$IOSSDKROOT/usr/lib/libgcc_s.1.dylib" extralibs/libgcc_s.10.4.dylib || ec
|
|||
|
||||
# Copy our setup for modules
|
||||
try cp $KIVYIOSROOT/src/python_files/ModulesSetup Modules/Setup.local
|
||||
try cat $KIVYIOSROOT/src/python_files/ModulesSetup.mobile >> Modules/Setup.local
|
||||
try cp $KIVYIOSROOT/src/python_files/_scproxy.py Lib/_scproxy.py
|
||||
|
||||
try ./configure CC="$ARM_CC" LD="$ARM_LD" \
|
||||
CFLAGS="$ARM_CFLAGS" \
|
||||
LDFLAGS="$ARM_LDFLAGS -Lextralibs/ -lsqlite3" \
|
||||
--without-pymalloc \
|
||||
--disable-toolbox-glue \
|
||||
--host=armv7-apple-darwin \
|
||||
--prefix=/python \
|
||||
CFLAGS="$ARM_CFLAGS" \
|
||||
LDFLAGS="$ARM_LDFLAGS -Lextralibs/ -lsqlite3 -L$BUILDROOT/lib -undefined dynamic_lookup" \
|
||||
--without-pymalloc \
|
||||
--disable-toolbox-glue \
|
||||
--host=armv7-apple-darwin \
|
||||
--prefix=/python \
|
||||
--without-doc-strings
|
||||
|
||||
# with undefined lookup, checks in configure just failed :(
|
||||
try patch -p1 < $KIVYIOSROOT/src/python_files/Python-$IOS_PYTHON_VERSION-pyconfig.patch
|
||||
try patch -p1 < $KIVYIOSROOT/src/python_files/Python-$IOS_PYTHON_VERSION-ctypes_duplicate.patch
|
||||
|
||||
try make HOSTPYTHON=./hostpython HOSTPGEN=./Parser/hostpgen \
|
||||
CROSS_COMPILE_TARGET=yes
|
||||
|
||||
try make install HOSTPYTHON=./hostpython CROSS_COMPILE_TARGET=yes prefix="$BUILDROOT/python"
|
||||
try make install HOSTPYTHON=./hostpython CROSS_COMPILE_TARGET=yes \
|
||||
prefix="$BUILDROOT/python"
|
||||
|
||||
try mv -f $BUILDROOT/python/lib/libpython2.7.a $BUILDROOT/lib/
|
||||
|
||||
|
|
|
@ -11,6 +11,13 @@ SRCDIR=$2
|
|||
APPID=$(echo $APPNAME | tr '[A-Z]' '[a-z]')
|
||||
TEMPLATESDIR=$(dirname $0)/templates/
|
||||
APPDIR=$KIVYIOSROOT/app-$APPID
|
||||
OLD_LC_CTYPE=$LC_CTYPE
|
||||
OLD_LANG=$LANG
|
||||
|
||||
# fix for -> sed: RE error: illegal byte sequence
|
||||
LC_CTYPE=C
|
||||
LANG=C
|
||||
|
||||
if [ "X$APPNAME" == "X" ]; then
|
||||
echo $(basename $0) "<appname> <source directory>"
|
||||
exit 1
|
||||
|
@ -27,6 +34,8 @@ try mkdir $APPDIR
|
|||
|
||||
echo "-> Copy templates"
|
||||
try cp $TEMPLATESDIR/main.m $APPDIR/main.m
|
||||
try cp $TEMPLATESDIR/bridge.h $APPDIR/bridge.h
|
||||
try cp $TEMPLATESDIR/bridge.m $APPDIR/bridge.m
|
||||
try cp $TEMPLATESDIR/icon.png $APPDIR/icon.png
|
||||
try cp $TEMPLATESDIR/template-Info.plist $APPDIR/$APPID-Info.plist
|
||||
try cp -a $TEMPLATESDIR/template.xcodeproj $APPDIR/$APPID.xcodeproj
|
||||
|
@ -37,8 +46,10 @@ try find $APPDIR -type f -not -iname *.png -exec sed -i '' "s/##APPNAME##/$APPNA
|
|||
try find $APPDIR -type f -not -iname *.png -exec sed -i '' "s/##SDKVER##/$SDKVER/g" {} \;
|
||||
try find $APPDIR -type f -not -iname *.png -exec sed -i '' "s^##SRCDIR##^$SRCDIR^g" {} \;
|
||||
|
||||
echo "-> Done !"
|
||||
LC_CTYPE=$OLD_LC_CTYPE
|
||||
LANG=$OLD_LANG
|
||||
|
||||
echo "-> Done !"
|
||||
echo
|
||||
echo "Your project is available at $APPDIR"
|
||||
echo
|
||||
|
|
|
@ -33,6 +33,7 @@ export FT_VERSION=2.4.8
|
|||
export XML2_VERSION=2.7.8
|
||||
export XSLT_VERSION=1.1.26
|
||||
export LXML_VERSION=2.3.1
|
||||
export FFI_VERSION=3.0.13
|
||||
|
||||
# where the build will be located
|
||||
export KIVYIOSROOT="$( cd -P "$( dirname "${BASH_SOURCE[0]}" )/../" && pwd )"
|
||||
|
|
|
@ -35,6 +35,4 @@ echo "-> Remove unused files (pyc, py)"
|
|||
find $YOURAPPDIR -iname '*.py' -exec rm {} \;
|
||||
find $YOURAPPDIR -iname '*.pyc' -exec rm {} \;
|
||||
|
||||
|
||||
echo "-> Source code of $APPNAME updated."
|
||||
|
||||
|
|
|
@ -15,6 +15,12 @@
|
|||
1D60589F0D05DD5A006BFB54 /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 1D30AB110D05D00D00671497 /* Foundation.framework */; };
|
||||
1DF5F4E00D08C38300B7A737 /* UIKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 1DF5F4DF0D08C38300B7A737 /* UIKit.framework */; };
|
||||
288765FD0DF74451002DB57D /* CoreGraphics.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 288765FC0DF74451002DB57D /* CoreGraphics.framework */; };
|
||||
2C18EF8C17CBD2900041C0E1 /* libffi.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 2C18EF8A17CBD2900041C0E1 /* libffi.a */; };
|
||||
2C18EF8D17CBD2900041C0E1 /* libpyobjus.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 2C18EF8B17CBD2900041C0E1 /* libpyobjus.a */; };
|
||||
2CB5F34417D51580006187AB /* CoreMotion.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 2CB5F34317D51580006187AB /* CoreMotion.framework */; };
|
||||
2CB5F34717D5233A006187AB /* bridge.m in Sources */ = {isa = PBXBuildFile; fileRef = 2CB5F34617D5233A006187AB /* bridge.m */; };
|
||||
596C7514150CFC75003F57D9 /* include in Resources */ = {isa = PBXBuildFile; fileRef = 596C7513150CFC75003F57D9 /* include */; };
|
||||
5983EC97163CB90D00475EFB /* libsqlite3.dylib in Frameworks */ = {isa = PBXBuildFile; fileRef = 5983EC96163CB90D00475EFB /* libsqlite3.dylib */; };
|
||||
598E034D14F80187000D1362 /* libSDL_mixer.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 598E034C14F80187000D1362 /* libSDL_mixer.a */; };
|
||||
598E035414F80578000D1362 /* libogg.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 598E035314F80578000D1362 /* libogg.a */; };
|
||||
598E035A14F8177A000D1362 /* libvorbisidec.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 598E035914F8177A000D1362 /* libvorbisidec.a */; };
|
||||
|
@ -26,9 +32,7 @@
|
|||
59994DAF148E558600863906 /* libpython2.7.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 59994DAA148E558600863906 /* libpython2.7.a */; };
|
||||
59994DB0148E558600863906 /* libSDL_ttf.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 59994DAB148E558600863906 /* libSDL_ttf.a */; };
|
||||
59994DB1148E558600863906 /* libSDL2.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 59994DAC148E558600863906 /* libSDL2.a */; };
|
||||
5983EC97163CB90D00475EFB /* libsqlite3.dylib in Frameworks */ = {isa = PBXBuildFile; fileRef = 5983EC96163CB90D00475EFB /* libsqlite3.dylib */; };
|
||||
59994DB3148E564400863906 /* lib in Resources */ = {isa = PBXBuildFile; fileRef = 59994DB2148E564400863906 /* lib */; };
|
||||
596C7514150CFC75003F57D9 /* include in Resources */ = {isa = PBXBuildFile; fileRef = 596C7513150CFC75003F57D9 /* include */; };
|
||||
59994E3B148E85C800863906 /* YourApp in Resources */ = {isa = PBXBuildFile; fileRef = 59994E3A148E85C800863906 /* YourApp */; };
|
||||
59ED7D08150E0C4400A92BEE /* libios.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 59ED7D07150E0C4400A92BEE /* libios.a */; };
|
||||
59ED7D0B150E325100A92BEE /* MessageUI.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 59ED7D0A150E325100A92BEE /* MessageUI.framework */; };
|
||||
|
@ -44,6 +48,12 @@
|
|||
1DF5F4DF0D08C38300B7A737 /* UIKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = UIKit.framework; path = System/Library/Frameworks/UIKit.framework; sourceTree = SDKROOT; };
|
||||
288765FC0DF74451002DB57D /* CoreGraphics.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreGraphics.framework; path = System/Library/Frameworks/CoreGraphics.framework; sourceTree = SDKROOT; };
|
||||
29B97316FDCFA39411CA2CEA /* main.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = main.m; sourceTree = "<group>"; };
|
||||
2C18EF8A17CBD2900041C0E1 /* libffi.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = libffi.a; path = ../build/lib/libffi.a; sourceTree = "<group>"; };
|
||||
2C18EF8B17CBD2900041C0E1 /* libpyobjus.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = libpyobjus.a; path = ../build/lib/libpyobjus.a; sourceTree = "<group>"; };
|
||||
2CB5F34317D51580006187AB /* CoreMotion.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreMotion.framework; path = System/Library/Frameworks/CoreMotion.framework; sourceTree = SDKROOT; };
|
||||
2CB5F34517D5233A006187AB /* bridge.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = bridge.h; sourceTree = SOURCE_ROOT; };
|
||||
2CB5F34617D5233A006187AB /* bridge.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = bridge.m; sourceTree = SOURCE_ROOT; };
|
||||
596C7513150CFC75003F57D9 /* include */ = {isa = PBXFileReference; lastKnownFileType = folder; name = include; path = ../build/python/embed/include; sourceTree = "<group>"; };
|
||||
5983EC96163CB90D00475EFB /* libsqlite3.dylib */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.dylib"; name = libsqlite3.dylib; path = usr/lib/libsqlite3.dylib; sourceTree = SDKROOT; };
|
||||
598E034C14F80187000D1362 /* libSDL_mixer.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = libSDL_mixer.a; path = ../build/lib/libSDL_mixer.a; sourceTree = "<group>"; };
|
||||
598E035314F80578000D1362 /* libogg.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = libogg.a; path = ../build/lib/libogg.a; sourceTree = "<group>"; };
|
||||
|
@ -58,7 +68,6 @@
|
|||
59994DAC148E558600863906 /* libSDL2.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = libSDL2.a; path = ../build/lib/libSDL2.a; sourceTree = "<group>"; };
|
||||
59994DB2148E564400863906 /* lib */ = {isa = PBXFileReference; lastKnownFileType = folder; name = lib; path = ../build/python/lib; sourceTree = SOURCE_ROOT; };
|
||||
59994E3A148E85C800863906 /* YourApp */ = {isa = PBXFileReference; lastKnownFileType = folder; path = YourApp; sourceTree = "<group>"; };
|
||||
596C7513150CFC75003F57D9 /* include */ = {isa = PBXFileReference; lastKnownFileType = folder; name = include; path = ../build/python/embed/include; sourceTree = "<group>"; };
|
||||
59ED7D07150E0C4400A92BEE /* libios.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = libios.a; path = ../build/lib/libios.a; sourceTree = "<group>"; };
|
||||
59ED7D0A150E325100A92BEE /* MessageUI.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = MessageUI.framework; path = System/Library/Frameworks/MessageUI.framework; sourceTree = SDKROOT; };
|
||||
8D1107310486CEB800E47090 /* ##APPID##-Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; path = "##APPID##-Info.plist"; plistStructureDefinitionIdentifier = "com.apple.xcode.plist.structure-definition.iphone.info-plist"; sourceTree = "<group>"; };
|
||||
|
@ -69,6 +78,9 @@
|
|||
isa = PBXFrameworksBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
2CB5F34417D51580006187AB /* CoreMotion.framework in Frameworks */,
|
||||
2C18EF8C17CBD2900041C0E1 /* libffi.a in Frameworks */,
|
||||
2C18EF8D17CBD2900041C0E1 /* libpyobjus.a in Frameworks */,
|
||||
5983EC97163CB90D00475EFB /* libsqlite3.dylib in Frameworks */,
|
||||
59ED7D0B150E325100A92BEE /* MessageUI.framework in Frameworks */,
|
||||
59ED7D08150E0C4400A92BEE /* libios.a in Frameworks */,
|
||||
|
@ -98,6 +110,8 @@
|
|||
080E96DDFE201D6D7F000001 /* Classes */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
2CB5F34517D5233A006187AB /* bridge.h */,
|
||||
2CB5F34617D5233A006187AB /* bridge.m */,
|
||||
);
|
||||
path = Classes;
|
||||
sourceTree = "<group>";
|
||||
|
@ -145,6 +159,9 @@
|
|||
29B97323FDCFA39411CA2CEA /* Frameworks */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
2CB5F34317D51580006187AB /* CoreMotion.framework */,
|
||||
2C18EF8A17CBD2900041C0E1 /* libffi.a */,
|
||||
2C18EF8B17CBD2900041C0E1 /* libpyobjus.a */,
|
||||
5983EC96163CB90D00475EFB /* libsqlite3.dylib */,
|
||||
59994DA8148E558600863906 /* libfreetype.a */,
|
||||
59994DA9148E558600863906 /* libkivy.a */,
|
||||
|
@ -232,7 +249,7 @@
|
|||
/* End PBXResourcesBuildPhase section */
|
||||
|
||||
/* Begin PBXShellScriptBuildPhase section */
|
||||
113D17E2153E3DB5001310A5 /* ShellScript */ = {
|
||||
113D17E2153E3DB5001310A5 /* ShellScript */ = {
|
||||
isa = PBXShellScriptBuildPhase;
|
||||
buildActionMask = 12;
|
||||
files = (
|
||||
|
@ -253,6 +270,7 @@
|
|||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
1D60589B0D05DD56006BFB54 /* main.m in Sources */,
|
||||
2CB5F34717D5233A006187AB /* bridge.m in Sources */,
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
|
@ -402,4 +420,4 @@
|
|||
/* End XCConfigurationList section */
|
||||
};
|
||||
rootObject = 29B97313FDCFA39411CA2CEA /* Project object */;
|
||||
}
|
||||
}
|
Loading…
Reference in a new issue