Clean up fixes for main.m and toolchain.py
This commit is contained in:
parent
490b87206f
commit
ec2a343795
2 changed files with 6 additions and 8 deletions
|
@ -1145,7 +1145,7 @@ Xcode:
|
|||
|
||||
def distclean(self):
|
||||
parser = argparse.ArgumentParser(
|
||||
description="Clean the build, download and dist")
|
||||
description="Clean the build, download, and dist")
|
||||
args = parser.parse_args(sys.argv[2:])
|
||||
ctx = Context()
|
||||
if exists(ctx.build_dir):
|
||||
|
@ -1175,7 +1175,7 @@ Xcode:
|
|||
parser = argparse.ArgumentParser(
|
||||
description="Create a new xcode project")
|
||||
parser.add_argument("name", help="Name of your project")
|
||||
parser.add_argument("directory", help="Directory where your project live")
|
||||
parser.add_argument("directory", help="Directory where your project lives")
|
||||
args = parser.parse_args(sys.argv[2:])
|
||||
|
||||
from cookiecutter.main import cookiecutter
|
||||
|
|
|
@ -5,8 +5,6 @@
|
|||
|
||||
#import <Foundation/Foundation.h>
|
||||
#import <UIKit/UIKit.h>
|
||||
//#include <python2.7/Python.h>
|
||||
//#include <Python.h>
|
||||
#include "../dist/root/python/include/python2.7/Python.h"
|
||||
#include "../dist/include/common/sdl2/SDL_main.h"
|
||||
#include <dlfcn.h>
|
||||
|
@ -23,14 +21,14 @@ int main(int argc, char *argv[]) {
|
|||
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.
|
||||
// because the process will not have a write attribute on the device.
|
||||
putenv("PYTHONOPTIMIZE=2");
|
||||
putenv("PYTHONDONTWRITEBYTECODE=1");
|
||||
putenv("PYTHONNOUSERSITE=1");
|
||||
putenv("PYTHONPATH=.");
|
||||
//putenv("PYTHONVERBOSE=1");
|
||||
|
||||
// Kivy environment to prefer some implementation on ios platform
|
||||
// Kivy environment to prefer some implementation on iOS platform
|
||||
putenv("KIVY_BUILD=ios");
|
||||
putenv("KIVY_NO_CONFIG=1");
|
||||
putenv("KIVY_NO_FILELOG=1");
|
||||
|
@ -52,7 +50,7 @@ int main(int argc, char *argv[]) {
|
|||
Py_Initialize();
|
||||
PySys_SetArgv(argc, argv);
|
||||
|
||||
// If other modules are using thread, we need to initialize them before.
|
||||
// If other modules are using the thread, we need to initialize them before.
|
||||
PyEval_InitThreads();
|
||||
|
||||
// Add an importer for builtin modules
|
||||
|
@ -78,7 +76,7 @@ int main(int argc, char *argv[]) {
|
|||
|
||||
[pool release];
|
||||
|
||||
// Look like the app still runn even when we leaved here.
|
||||
// Look like the app still runs even when we left here.
|
||||
exit(ret);
|
||||
return ret;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue