first part of cleaning
This commit is contained in:
parent
edcdf989e3
commit
cfa91a7458
19 changed files with 576 additions and 1 deletions
BIN
templates/icon.png
Normal file
BIN
templates/icon.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 12 KiB |
69
templates/main.m
Normal file
69
templates/main.m
Normal file
|
@ -0,0 +1,69 @@
|
|||
//
|
||||
// main.m
|
||||
// iOS-python-test
|
||||
//
|
||||
|
||||
#import <Foundation/Foundation.h>
|
||||
#import <UIKit/UIKit.h>
|
||||
#include <python2.7/Python.h>
|
||||
#include "SDL/SDL_main.h"
|
||||
#include <dlfcn.h>
|
||||
|
||||
int main(int argc, char *argv[]) {
|
||||
int ret = 0;
|
||||
|
||||
NSAutoreleasePool * pool = [[NSAutoreleasePool alloc] init];
|
||||
|
||||
// Change the executing path to YourApp
|
||||
chdir("YourApp");
|
||||
|
||||
// Special environment to prefer .pyo, and don't write bytecode if .py are found
|
||||
// because the process will not have write attribute on the device.
|
||||
putenv("PYTHONOPTIMIZE=2");
|
||||
putenv("PYTHONDONTWRITEBYTECODE=1");
|
||||
putenv("PYTHONNOUSERSITE=1");
|
||||
|
||||
// Kivy environment to prefer some implementation on ios platform
|
||||
putenv("KIVY_BUILD=ios");
|
||||
putenv("KIVY_NO_CONFIG=1");
|
||||
putenv("KIVY_NO_FILELOG=1");
|
||||
putenv("KIVY_NO_CONSOLELOG=1");
|
||||
putenv("KIVY_WINDOW=sdl");
|
||||
putenv("KIVY_IMAGE=imageio");
|
||||
putenv("KIVY_AUDIO=sdl");
|
||||
|
||||
NSString * resourcePath = [[NSBundle mainBundle] resourcePath];
|
||||
NSLog(@"PythonHome is: %s", (char *)[resourcePath UTF8String]);
|
||||
Py_SetPythonHome((char *)[resourcePath UTF8String]);
|
||||
|
||||
NSLog(@"Initializing python");
|
||||
Py_Initialize();
|
||||
PySys_SetArgv(argc, argv);
|
||||
|
||||
// If other modules are using thread, we need to initialize them before.
|
||||
PyEval_InitThreads();
|
||||
|
||||
// Search and start main.py
|
||||
const char * prog = [
|
||||
[[NSBundle mainBundle] pathForResource:@"YourApp/main" ofType:@"pyo"] cStringUsingEncoding:
|
||||
NSUTF8StringEncoding];
|
||||
NSLog(@"Running main.pyo: %s", prog);
|
||||
FILE* fd = fopen(prog, "r");
|
||||
if ( fd == NULL ) {
|
||||
ret = 1;
|
||||
NSLog(@"Unable to open main.pyo, abort.");
|
||||
} else {
|
||||
ret = PyRun_SimpleFileEx(fd, prog, 1);
|
||||
if (ret != 0)
|
||||
NSLog(@"Application quit abnormally!");
|
||||
}
|
||||
|
||||
Py_Finalize();
|
||||
NSLog(@"Leaving");
|
||||
|
||||
[pool release];
|
||||
|
||||
// Look like the app still runn even when we leaved here.
|
||||
exit(ret);
|
||||
return ret;
|
||||
}
|
51
templates/template-Info.plist
Normal file
51
templates/template-Info.plist
Normal file
|
@ -0,0 +1,51 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||
<plist version="1.0">
|
||||
<dict>
|
||||
<key>CFBundleDevelopmentRegion</key>
|
||||
<string>English</string>
|
||||
<key>CFBundleDisplayName</key>
|
||||
<string>${PRODUCT_NAME}</string>
|
||||
<key>CFBundleExecutable</key>
|
||||
<string>${EXECUTABLE_NAME}</string>
|
||||
<key>CFBundleIconFile</key>
|
||||
<string></string>
|
||||
<key>CFBundleIconFiles</key>
|
||||
<array>
|
||||
<string>icon.png</string>
|
||||
</array>
|
||||
<key>CFBundleIcons</key>
|
||||
<dict>
|
||||
<key>CFBundlePrimaryIcon</key>
|
||||
<dict>
|
||||
<key>CFBundleIconFiles</key>
|
||||
<array>
|
||||
<string>icon.png</string>
|
||||
</array>
|
||||
<key>UIPrerenderedIcon</key>
|
||||
<false/>
|
||||
</dict>
|
||||
</dict>
|
||||
<key>CFBundleIdentifier</key>
|
||||
<string>org.kivy.##APPID##</string>
|
||||
<key>CFBundleInfoDictionaryVersion</key>
|
||||
<string>6.0</string>
|
||||
<key>CFBundleName</key>
|
||||
<string>${PRODUCT_NAME}</string>
|
||||
<key>CFBundlePackageType</key>
|
||||
<string>APPL</string>
|
||||
<key>CFBundleShortVersionString</key>
|
||||
<string>1.1</string>
|
||||
<key>CFBundleSignature</key>
|
||||
<string>????</string>
|
||||
<key>CFBundleVersion</key>
|
||||
<string>1.1</string>
|
||||
<key>LSRequiresIPhoneOS</key>
|
||||
<true/>
|
||||
<key>UISupportedInterfaceOrientations~ipad</key>
|
||||
<array>
|
||||
<string>UIInterfaceOrientationLandscapeLeft</string>
|
||||
<string>UIInterfaceOrientationLandscapeRight</string>
|
||||
</array>
|
||||
</dict>
|
||||
</plist>
|
373
templates/template.xcodeproj/project.pbxproj
Executable file
373
templates/template.xcodeproj/project.pbxproj
Executable file
|
@ -0,0 +1,373 @@
|
|||
// !$*UTF8*$!
|
||||
{
|
||||
archiveVersion = 1;
|
||||
classes = {
|
||||
};
|
||||
objectVersion = 46;
|
||||
objects = {
|
||||
|
||||
/* Begin PBXBuildFile section */
|
||||
010731C2137F20B800A8D3A0 /* AudioToolbox.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 010731C1137F20B800A8D3A0 /* AudioToolbox.framework */; };
|
||||
010731C4137F20C300A8D3A0 /* QuartzCore.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 010731C3137F20C300A8D3A0 /* QuartzCore.framework */; };
|
||||
01532DAA137C099F0076F6BF /* icon.png in Resources */ = {isa = PBXBuildFile; fileRef = 01532DA9137C099F0076F6BF /* icon.png */; };
|
||||
01790B81137E5ED900E037D1 /* OpenGLES.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 01790B7A137E5ED900E037D1 /* OpenGLES.framework */; };
|
||||
1D60589B0D05DD56006BFB54 /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 29B97316FDCFA39411CA2CEA /* main.m */; };
|
||||
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 */; };
|
||||
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 */; };
|
||||
59994D8D148D48E300863906 /* ImageIO.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 59994D8C148D48E300863906 /* ImageIO.framework */; };
|
||||
59994D90148D686900863906 /* libbz2.dylib in Frameworks */ = {isa = PBXBuildFile; fileRef = 59994D8F148D686900863906 /* libbz2.dylib */; };
|
||||
59994D9E148E353000863906 /* libz.dylib in Frameworks */ = {isa = PBXBuildFile; fileRef = 59994D9D148E352F00863906 /* libz.dylib */; };
|
||||
59994DAD148E558600863906 /* libfreetype.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 59994DA8148E558600863906 /* libfreetype.a */; };
|
||||
59994DAE148E558600863906 /* libkivy.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 59994DA9148E558600863906 /* libkivy.a */; };
|
||||
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 /* libSDL.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 59994DAC148E558600863906 /* libSDL.a */; };
|
||||
59994DB3148E564400863906 /* lib in Resources */ = {isa = PBXBuildFile; fileRef = 59994DB2148E564400863906 /* lib */; };
|
||||
59994E35148E815300863906 /* include in Resources */ = {isa = PBXBuildFile; fileRef = 59994E34148E815300863906 /* include */; };
|
||||
59994E3B148E85C800863906 /* YourApp in Resources */ = {isa = PBXBuildFile; fileRef = 59994E3A148E85C800863906 /* YourApp */; };
|
||||
/* End PBXBuildFile section */
|
||||
|
||||
/* Begin PBXFileReference section */
|
||||
010731C1137F20B800A8D3A0 /* AudioToolbox.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AudioToolbox.framework; path = System/Library/Frameworks/AudioToolbox.framework; sourceTree = SDKROOT; };
|
||||
010731C3137F20C300A8D3A0 /* QuartzCore.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = QuartzCore.framework; path = System/Library/Frameworks/QuartzCore.framework; sourceTree = SDKROOT; };
|
||||
01532DA9137C099F0076F6BF /* icon.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = icon.png; sourceTree = "<group>"; };
|
||||
01790B7A137E5ED900E037D1 /* OpenGLES.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = OpenGLES.framework; path = System/Library/Frameworks/OpenGLES.framework; sourceTree = SDKROOT; };
|
||||
1D30AB110D05D00D00671497 /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = System/Library/Frameworks/Foundation.framework; sourceTree = SDKROOT; };
|
||||
1D6058910D05DD3D006BFB54 /* ##APPNAME##.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = ##APPNAME##.app; sourceTree = BUILT_PRODUCTS_DIR; };
|
||||
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>"; };
|
||||
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>"; };
|
||||
598E035914F8177A000D1362 /* libvorbisidec.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = libvorbisidec.a; path = ../build/lib/libvorbisidec.a; sourceTree = "<group>"; };
|
||||
59994D8C148D48E300863906 /* ImageIO.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = ImageIO.framework; path = System/Library/Frameworks/ImageIO.framework; sourceTree = SDKROOT; };
|
||||
59994D8F148D686900863906 /* libbz2.dylib */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.dylib"; name = libbz2.dylib; path = usr/lib/libbz2.dylib; sourceTree = SDKROOT; };
|
||||
59994D9D148E352F00863906 /* libz.dylib */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.dylib"; name = libz.dylib; path = usr/lib/libz.dylib; sourceTree = SDKROOT; };
|
||||
59994DA8148E558600863906 /* libfreetype.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = libfreetype.a; path = ../build/lib/libfreetype.a; sourceTree = "<group>"; };
|
||||
59994DA9148E558600863906 /* libkivy.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = libkivy.a; path = ../build/lib/libkivy.a; sourceTree = "<group>"; };
|
||||
59994DAA148E558600863906 /* libpython2.7.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = libpython2.7.a; path = ../build/lib/libpython2.7.a; sourceTree = "<group>"; };
|
||||
59994DAB148E558600863906 /* libSDL_ttf.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = libSDL_ttf.a; path = ../build/lib/libSDL_ttf.a; sourceTree = "<group>"; };
|
||||
59994DAC148E558600863906 /* libSDL.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = libSDL.a; path = ../build/lib/libSDL.a; sourceTree = "<group>"; };
|
||||
59994DB2148E564400863906 /* lib */ = {isa = PBXFileReference; lastKnownFileType = folder; name = lib; path = ../build/python/lib; sourceTree = SOURCE_ROOT; };
|
||||
59994E34148E815300863906 /* include */ = {isa = PBXFileReference; lastKnownFileType = folder; name = include; path = ../build/python/include; sourceTree = SOURCE_ROOT; };
|
||||
59994E3A148E85C800863906 /* YourApp */ = {isa = PBXFileReference; lastKnownFileType = folder; path = YourApp; sourceTree = "<group>"; };
|
||||
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>"; };
|
||||
/* End PBXFileReference section */
|
||||
|
||||
/* Begin PBXFrameworksBuildPhase section */
|
||||
1D60588F0D05DD3D006BFB54 /* Frameworks */ = {
|
||||
isa = PBXFrameworksBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
598E035A14F8177A000D1362 /* libvorbisidec.a in Frameworks */,
|
||||
598E035414F80578000D1362 /* libogg.a in Frameworks */,
|
||||
598E034D14F80187000D1362 /* libSDL_mixer.a in Frameworks */,
|
||||
59994DAD148E558600863906 /* libfreetype.a in Frameworks */,
|
||||
59994DAE148E558600863906 /* libkivy.a in Frameworks */,
|
||||
59994DAF148E558600863906 /* libpython2.7.a in Frameworks */,
|
||||
59994DB0148E558600863906 /* libSDL_ttf.a in Frameworks */,
|
||||
59994DB1148E558600863906 /* libSDL.a in Frameworks */,
|
||||
59994D90148D686900863906 /* libbz2.dylib in Frameworks */,
|
||||
59994D9E148E353000863906 /* libz.dylib in Frameworks */,
|
||||
59994D8D148D48E300863906 /* ImageIO.framework in Frameworks */,
|
||||
1D60589F0D05DD5A006BFB54 /* Foundation.framework in Frameworks */,
|
||||
1DF5F4E00D08C38300B7A737 /* UIKit.framework in Frameworks */,
|
||||
288765FD0DF74451002DB57D /* CoreGraphics.framework in Frameworks */,
|
||||
01790B81137E5ED900E037D1 /* OpenGLES.framework in Frameworks */,
|
||||
010731C2137F20B800A8D3A0 /* AudioToolbox.framework in Frameworks */,
|
||||
010731C4137F20C300A8D3A0 /* QuartzCore.framework in Frameworks */,
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
/* End PBXFrameworksBuildPhase section */
|
||||
|
||||
/* Begin PBXGroup section */
|
||||
080E96DDFE201D6D7F000001 /* Classes */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
);
|
||||
path = Classes;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
19C28FACFE9D520D11CA2CBB /* Products */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
1D6058910D05DD3D006BFB54 /* ##APPNAME##.app */,
|
||||
);
|
||||
name = Products;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
29B97314FDCFA39411CA2CEA /* CustomTemplate */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
080E96DDFE201D6D7F000001 /* Classes */,
|
||||
29B97315FDCFA39411CA2CEA /* Other Sources */,
|
||||
29B97317FDCFA39411CA2CEA /* Resources */,
|
||||
29B97323FDCFA39411CA2CEA /* Frameworks */,
|
||||
19C28FACFE9D520D11CA2CBB /* Products */,
|
||||
);
|
||||
name = CustomTemplate;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
29B97315FDCFA39411CA2CEA /* Other Sources */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
59994E34148E815300863906 /* include */,
|
||||
29B97316FDCFA39411CA2CEA /* main.m */,
|
||||
);
|
||||
name = "Other Sources";
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
29B97317FDCFA39411CA2CEA /* Resources */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
59994DB2148E564400863906 /* lib */,
|
||||
59994E3A148E85C800863906 /* YourApp */,
|
||||
01532DA9137C099F0076F6BF /* icon.png */,
|
||||
8D1107310486CEB800E47090 /* ##APPID##-Info.plist */,
|
||||
);
|
||||
name = Resources;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
29B97323FDCFA39411CA2CEA /* Frameworks */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
59994DA8148E558600863906 /* libfreetype.a */,
|
||||
59994DA9148E558600863906 /* libkivy.a */,
|
||||
59994DAA148E558600863906 /* libpython2.7.a */,
|
||||
59994DAB148E558600863906 /* libSDL_ttf.a */,
|
||||
598E035914F8177A000D1362 /* libvorbisidec.a */,
|
||||
598E035314F80578000D1362 /* libogg.a */,
|
||||
598E034C14F80187000D1362 /* libSDL_mixer.a */,
|
||||
59994DAC148E558600863906 /* libSDL.a */,
|
||||
59994D9D148E352F00863906 /* libz.dylib */,
|
||||
59994D8F148D686900863906 /* libbz2.dylib */,
|
||||
59994D8C148D48E300863906 /* ImageIO.framework */,
|
||||
010731C1137F20B800A8D3A0 /* AudioToolbox.framework */,
|
||||
010731C3137F20C300A8D3A0 /* QuartzCore.framework */,
|
||||
01790B7A137E5ED900E037D1 /* OpenGLES.framework */,
|
||||
1DF5F4DF0D08C38300B7A737 /* UIKit.framework */,
|
||||
1D30AB110D05D00D00671497 /* Foundation.framework */,
|
||||
288765FC0DF74451002DB57D /* CoreGraphics.framework */,
|
||||
);
|
||||
name = Frameworks;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
/* End PBXGroup section */
|
||||
|
||||
/* Begin PBXNativeTarget section */
|
||||
1D6058900D05DD3D006BFB54 /* ##APPID## */ = {
|
||||
isa = PBXNativeTarget;
|
||||
buildConfigurationList = 1D6058960D05DD3E006BFB54 /* Build configuration list for PBXNativeTarget "##APPID##" */;
|
||||
buildPhases = (
|
||||
1D60588D0D05DD3D006BFB54 /* Resources */,
|
||||
1D60588E0D05DD3D006BFB54 /* Sources */,
|
||||
1D60588F0D05DD3D006BFB54 /* Frameworks */,
|
||||
);
|
||||
buildRules = (
|
||||
);
|
||||
dependencies = (
|
||||
);
|
||||
name = ##APPID##;
|
||||
productName = ##APPID##;
|
||||
productReference = 1D6058910D05DD3D006BFB54 /* ##APPNAME##.app */;
|
||||
productType = "com.apple.product-type.application";
|
||||
};
|
||||
/* End PBXNativeTarget section */
|
||||
|
||||
/* Begin PBXProject section */
|
||||
29B97313FDCFA39411CA2CEA /* Project object */ = {
|
||||
isa = PBXProject;
|
||||
attributes = {
|
||||
LastUpgradeCheck = 0420;
|
||||
};
|
||||
buildConfigurationList = C01FCF4E08A954540054247B /* Build configuration list for PBXProject "##APPID##" */;
|
||||
compatibilityVersion = "Xcode 3.2";
|
||||
developmentRegion = English;
|
||||
hasScannedForEncodings = 1;
|
||||
knownRegions = (
|
||||
English,
|
||||
Japanese,
|
||||
French,
|
||||
German,
|
||||
);
|
||||
mainGroup = 29B97314FDCFA39411CA2CEA /* CustomTemplate */;
|
||||
projectDirPath = "";
|
||||
projectRoot = "";
|
||||
targets = (
|
||||
1D6058900D05DD3D006BFB54 /* ##APPID## */,
|
||||
);
|
||||
};
|
||||
/* End PBXProject section */
|
||||
|
||||
/* Begin PBXResourcesBuildPhase section */
|
||||
1D60588D0D05DD3D006BFB54 /* Resources */ = {
|
||||
isa = PBXResourcesBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
01532DAA137C099F0076F6BF /* icon.png in Resources */,
|
||||
59994DB3148E564400863906 /* lib in Resources */,
|
||||
59994E35148E815300863906 /* include in Resources */,
|
||||
59994E3B148E85C800863906 /* YourApp in Resources */,
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
/* End PBXResourcesBuildPhase section */
|
||||
|
||||
/* Begin PBXSourcesBuildPhase section */
|
||||
1D60588E0D05DD3D006BFB54 /* Sources */ = {
|
||||
isa = PBXSourcesBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
1D60589B0D05DD56006BFB54 /* main.m in Sources */,
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
/* End PBXSourcesBuildPhase section */
|
||||
|
||||
/* Begin XCBuildConfiguration section */
|
||||
1D6058940D05DD3E006BFB54 /* Debug */ = {
|
||||
isa = XCBuildConfiguration;
|
||||
buildSettings = {
|
||||
ALWAYS_SEARCH_USER_PATHS = NO;
|
||||
ARCHS = "$(ARCHS_STANDARD_32_BIT)";
|
||||
CODE_SIGN_IDENTITY = "iPhone Distribution";
|
||||
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Distribution";
|
||||
COPY_PHASE_STRIP = NO;
|
||||
GCC_DYNAMIC_NO_PIC = NO;
|
||||
GCC_OPTIMIZATION_LEVEL = 0;
|
||||
GCC_PRECOMPILE_PREFIX_HEADER = YES;
|
||||
GCC_PREFIX_HEADER = "";
|
||||
GCC_VERSION = com.apple.compilers.llvm.clang.1_0;
|
||||
HEADER_SEARCH_PATHS = (
|
||||
"\"$(PROJECT_DIR)/../build/include\"",
|
||||
"\"$(PROJECT_DIR)/../build/python/include\"",
|
||||
);
|
||||
INFOPLIST_FILE = "##APPID##-Info.plist";
|
||||
IPHONEOS_DEPLOYMENT_TARGET = 5.0;
|
||||
LIBRARY_SEARCH_PATHS = (
|
||||
"$(inherited)",
|
||||
"\"$(PROJECT_DIR)/../build/lib\"",
|
||||
);
|
||||
OTHER_LDFLAGS = "-all_load";
|
||||
PRODUCT_NAME = ##APPNAME##;
|
||||
PROVISIONING_PROFILE = "";
|
||||
"PROVISIONING_PROFILE[sdk=iphoneos*]" = "";
|
||||
SDKROOT = iphoneos;
|
||||
USER_HEADER_SEARCH_PATHS = "";
|
||||
};
|
||||
name = Debug;
|
||||
};
|
||||
1D6058950D05DD3E006BFB54 /* Release */ = {
|
||||
isa = XCBuildConfiguration;
|
||||
buildSettings = {
|
||||
ALWAYS_SEARCH_USER_PATHS = NO;
|
||||
ARCHS = "$(ARCHS_STANDARD_32_BIT)";
|
||||
CODE_SIGN_IDENTITY = "iPhone Distribution";
|
||||
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Distribution";
|
||||
COPY_PHASE_STRIP = NO;
|
||||
GCC_PRECOMPILE_PREFIX_HEADER = YES;
|
||||
GCC_PREFIX_HEADER = "";
|
||||
GCC_VERSION = com.apple.compilers.llvm.clang.1_0;
|
||||
HEADER_SEARCH_PATHS = (
|
||||
"\"$(PROJECT_DIR)/../build/include\"",
|
||||
"\"$(PROJECT_DIR)/../build/python/include\"",
|
||||
);
|
||||
INFOPLIST_FILE = "##APPID##-Info.plist";
|
||||
IPHONEOS_DEPLOYMENT_TARGET = 5.0;
|
||||
LIBRARY_SEARCH_PATHS = (
|
||||
"$(inherited)",
|
||||
"\"$(PROJECT_DIR)/../build/lib\"",
|
||||
);
|
||||
OTHER_LDFLAGS = "-all_load";
|
||||
PRODUCT_NAME = ##APPNAME##;
|
||||
PROVISIONING_PROFILE = "";
|
||||
"PROVISIONING_PROFILE[sdk=iphoneos*]" = "";
|
||||
SDKROOT = iphoneos;
|
||||
SKIP_INSTALL = NO;
|
||||
VALIDATE_PRODUCT = YES;
|
||||
};
|
||||
name = Release;
|
||||
};
|
||||
C01FCF4F08A954540054247B /* Debug */ = {
|
||||
isa = XCBuildConfiguration;
|
||||
buildSettings = {
|
||||
ARCHS = "$(ARCHS_STANDARD_32_BIT)";
|
||||
CODE_SIGN_IDENTITY = "iPhone Distribution";
|
||||
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Distribution";
|
||||
COPY_PHASE_STRIP = YES;
|
||||
DEAD_CODE_STRIPPING = NO;
|
||||
GCC_C_LANGUAGE_STANDARD = c99;
|
||||
GCC_VERSION = com.apple.compilers.llvmgcc42;
|
||||
GCC_WARN_ABOUT_RETURN_TYPE = YES;
|
||||
GCC_WARN_UNUSED_VARIABLE = YES;
|
||||
HEADER_SEARCH_PATHS = "";
|
||||
IPHONEOS_DEPLOYMENT_TARGET = 5.0;
|
||||
ONLY_ACTIVE_ARCH = YES;
|
||||
PROVISIONING_PROFILE = "";
|
||||
"PROVISIONING_PROFILE[sdk=iphoneos*]" = "";
|
||||
SDKROOT = iphoneos;
|
||||
STRIP_INSTALLED_PRODUCT = YES;
|
||||
STRIP_STYLE = all;
|
||||
SUPPORTED_PLATFORMS = iphoneos;
|
||||
TARGETED_DEVICE_FAMILY = 2;
|
||||
USER_HEADER_SEARCH_PATHS = "/Users/dennda/dev/sdl-1.3/Xcode-iPhoneOS/SDL/build/Debug-iphoneos/usr/local/include/";
|
||||
VALID_ARCHS = armv7;
|
||||
};
|
||||
name = Debug;
|
||||
};
|
||||
C01FCF5008A954540054247B /* Release */ = {
|
||||
isa = XCBuildConfiguration;
|
||||
buildSettings = {
|
||||
ARCHS = "$(ARCHS_STANDARD_32_BIT)";
|
||||
CODE_SIGN_IDENTITY = "iPhone Distribution";
|
||||
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Distribution";
|
||||
COPY_PHASE_STRIP = YES;
|
||||
DEAD_CODE_STRIPPING = NO;
|
||||
GCC_C_LANGUAGE_STANDARD = c99;
|
||||
GCC_VERSION = com.apple.compilers.llvmgcc42;
|
||||
GCC_WARN_ABOUT_RETURN_TYPE = YES;
|
||||
GCC_WARN_UNUSED_VARIABLE = YES;
|
||||
IPHONEOS_DEPLOYMENT_TARGET = 5.0;
|
||||
ONLY_ACTIVE_ARCH = YES;
|
||||
OTHER_CFLAGS = "-DNS_BLOCK_ASSERTIONS=1";
|
||||
PROVISIONING_PROFILE = "";
|
||||
"PROVISIONING_PROFILE[sdk=iphoneos*]" = "";
|
||||
SDKROOT = iphoneos;
|
||||
STRIP_INSTALLED_PRODUCT = YES;
|
||||
SUPPORTED_PLATFORMS = iphoneos;
|
||||
TARGETED_DEVICE_FAMILY = 2;
|
||||
USER_HEADER_SEARCH_PATHS = "";
|
||||
VALID_ARCHS = armv7;
|
||||
};
|
||||
name = Release;
|
||||
};
|
||||
/* End XCBuildConfiguration section */
|
||||
|
||||
/* Begin XCConfigurationList section */
|
||||
1D6058960D05DD3E006BFB54 /* Build configuration list for PBXNativeTarget "##APPID##" */ = {
|
||||
isa = XCConfigurationList;
|
||||
buildConfigurations = (
|
||||
1D6058940D05DD3E006BFB54 /* Debug */,
|
||||
1D6058950D05DD3E006BFB54 /* Release */,
|
||||
);
|
||||
defaultConfigurationIsVisible = 0;
|
||||
defaultConfigurationName = Release;
|
||||
};
|
||||
C01FCF4E08A954540054247B /* Build configuration list for PBXProject "##APPID##" */ = {
|
||||
isa = XCConfigurationList;
|
||||
buildConfigurations = (
|
||||
C01FCF4F08A954540054247B /* Debug */,
|
||||
C01FCF5008A954540054247B /* Release */,
|
||||
);
|
||||
defaultConfigurationIsVisible = 0;
|
||||
defaultConfigurationName = Release;
|
||||
};
|
||||
/* End XCConfigurationList section */
|
||||
};
|
||||
rootObject = 29B97313FDCFA39411CA2CEA /* Project object */;
|
||||
}
|
7
templates/template.xcodeproj/project.xcworkspace/contents.xcworkspacedata
generated
Normal file
7
templates/template.xcodeproj/project.xcworkspace/contents.xcworkspacedata
generated
Normal file
|
@ -0,0 +1,7 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<Workspace
|
||||
version = "1.0">
|
||||
<FileRef
|
||||
location = "self:##APPID##.xcodeproj">
|
||||
</FileRef>
|
||||
</Workspace>
|
35
tools/create-xcode-project.sh
Executable file
35
tools/create-xcode-project.sh
Executable file
|
@ -0,0 +1,35 @@
|
|||
#!/bin/bash
|
||||
|
||||
try () {
|
||||
"$@" || exit -1
|
||||
}
|
||||
|
||||
APPNAME=$1
|
||||
APPID=$(echo $APPNAME | tr '[A-Z]' '[a-z]')
|
||||
TEMPLATESDIR=$(dirname $0)/templates/
|
||||
APPDIR=$(dirname $0)/app-$APPID
|
||||
if [ "X$APPNAME" == "X" ]; then
|
||||
echo $(basename $0) "<appname>"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
echo "-> Create $APPDIR directory"
|
||||
try mkdir $APPDIR
|
||||
|
||||
echo "-> Copy templates"
|
||||
try cp $TEMPLATESDIR/main.m $APPDIR/main.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
|
||||
|
||||
echo "-> Customize templates"
|
||||
try find $APPDIR -type f -exec sed -i '' "s/##APPID##/$APPID/g" {} \;
|
||||
try find $APPDIR -type f -exec sed -i '' "s/##APPNAME##/$APPNAME/g" {} \;
|
||||
|
||||
echo "-> Done !"
|
||||
|
||||
echo
|
||||
echo "Your project is available at $APPDIR"
|
||||
echo
|
||||
echo "You can now type: open $APPDIR/$APPID.xcodeproj"
|
||||
echo
|
|
@ -17,7 +17,7 @@ export SDLTTF_VERSION=2.0.10
|
|||
export FT_VERSION=2.4.8
|
||||
|
||||
# where the build will be located
|
||||
export KIVYIOSROOT="$( cd -P "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
|
||||
export KIVYIOSROOT="$( cd -P "$( dirname "${BASH_SOURCE[0]}" )/../" && pwd )"
|
||||
export BUILDROOT="$KIVYIOSROOT/build"
|
||||
export CACHEROOT="$KIVYIOSROOT/.cache"
|
||||
|
40
tools/populate-project.sh
Executable file
40
tools/populate-project.sh
Executable file
|
@ -0,0 +1,40 @@
|
|||
#!/bin/bash
|
||||
|
||||
try () {
|
||||
"$@" || exit -1
|
||||
}
|
||||
|
||||
APPNAME=$1
|
||||
APPID=$(echo $APPNAME | tr '[A-Z]' '[a-z]')
|
||||
APPDIR=$(dirname $0)/app-$APPID
|
||||
SRCDIR=$2
|
||||
|
||||
if [ "X$APPNAME" == "X" ]; then
|
||||
echo $(basename $0) "<appname> <source directory>"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if [ "X$SRCDIR" == "X" ]; then
|
||||
echo $(basename $0) "<appname> <source directory>"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
echo "-> Copy $SRCDIR to $APPDIR/YourApp"
|
||||
YOURAPPDIR=$APPDIR/YourApp
|
||||
|
||||
echo "-> Remove any previous YourApp version"
|
||||
rm -r $YOURAPPDIR
|
||||
|
||||
echo "-> Copy the new source"
|
||||
try cp -a $SRCDIR $YOURAPPDIR
|
||||
|
||||
echo "-> Compile to pyo"
|
||||
python -OO -m compileall $YOURAPPDIR
|
||||
|
||||
echo "-> Remove unused files (pyc, py)"
|
||||
find $YOURAPPDIR -iname '*.py' -exec rm {} \;
|
||||
find $YOURAPPDIR -iname '*.pyc' -exec rm {} \;
|
||||
|
||||
|
||||
echo "-> Source code of $APPNAME updated."
|
||||
|
Loading…
Reference in a new issue