mirror of https://github.com/axmolengine/axmol.git
* update xcode4 template generator
This commit is contained in:
parent
c4a7ec6d9a
commit
1a5d4e00eb
|
@ -18,7 +18,7 @@ python ./tools/xcode4_template_generator/template_generator.py --directory chipm
|
|||
|
||||
echo "generating liblua"
|
||||
mkdir -p template/xcode4/lib_lua.xctemplate
|
||||
python ./tools/xcode4_template_generator/template_generator.py --directory lua --identifier liblua --prefix libs --exclude "android win32 airplay wophone bada Makefile Linux linux CMakeFiles qnx marmalade" > ./template/xcode4/lib_lua.xctemplate/TemplateInfo.plist
|
||||
python ./tools/xcode4_template_generator/template_generator.py --directory lua --identifier liblua --prefix libs --append ./tools/xcode4_template_generator/template_lua_patch.txt --exclude "android win32 airplay wophone bada Makefile Linux linux CMakeFiles qnx marmalade" > ./template/xcode4/lib_lua.xctemplate/TemplateInfo.plist
|
||||
|
||||
echo "done"
|
||||
|
||||
|
|
|
@ -38,7 +38,7 @@ import getopt
|
|||
import glob
|
||||
|
||||
class Xcode4Template(object):
|
||||
def __init__( self, directory, group=0, identifier="XXX", prefix="libs", exclude=[] ):
|
||||
def __init__( self, directory, group=0, identifier="XXX", prefix="libs", exclude=[], append="" ):
|
||||
self.directory = directory
|
||||
self.files_to_include = []
|
||||
self.wildcard = '*'
|
||||
|
@ -145,6 +145,8 @@ class Xcode4Template(object):
|
|||
#
|
||||
def generate_xml( self ):
|
||||
self.output.append( _template_open_body % self.identifier )
|
||||
if append != "":
|
||||
self.output.append( "".join(open(append, "r").readlines()) )
|
||||
self.generate_definitions()
|
||||
self.generate_nodes()
|
||||
self.output.append( _template_close_body )
|
||||
|
@ -174,10 +176,11 @@ if __name__ == "__main__":
|
|||
identifier = None
|
||||
prefix = ""
|
||||
exclude = []
|
||||
append = ""
|
||||
|
||||
argv = sys.argv[1:]
|
||||
try:
|
||||
opts, args = getopt.getopt(argv, "d:g:i:p:e:", ["directory=","group=","identifier=","prefix=", "exclude="])
|
||||
opts, args = getopt.getopt(argv, "d:g:i:p:e:a:", ["directory=","group=","identifier=","prefix=", "exclude=", "append="])
|
||||
for opt, arg in opts:
|
||||
if opt in ("-d","--directory"):
|
||||
directory = arg
|
||||
|
@ -189,6 +192,8 @@ if __name__ == "__main__":
|
|||
prefix = arg
|
||||
if opt in ("-e","--exclude"):
|
||||
exclude = arg.split()
|
||||
if opt in ("-a","--append"):
|
||||
append = arg
|
||||
except getopt.GetoptError,e:
|
||||
print e
|
||||
|
||||
|
@ -196,5 +201,5 @@ if __name__ == "__main__":
|
|||
help()
|
||||
|
||||
#generate libs/cocos2dx
|
||||
gen = Xcode4Template( directory=directory, group=group, identifier=identifier, prefix=prefix, exclude=exclude )
|
||||
gen = Xcode4Template( directory=directory, group=group, identifier=identifier, prefix=prefix, exclude=exclude, append=append )
|
||||
gen.generate()
|
||||
|
|
|
@ -0,0 +1,20 @@
|
|||
<key>Project</key>
|
||||
<dict>
|
||||
<key>Configurations</key>
|
||||
<dict>
|
||||
<key>Debug</key>
|
||||
<dict>
|
||||
<key>GCC_PREPROCESSOR_DEFINITIONS</key>
|
||||
<array>
|
||||
<string>CC_LUA_ENGINE_ENABLED=1</string>
|
||||
</array>
|
||||
</dict>
|
||||
<key>Release</key>
|
||||
<dict>
|
||||
<key>GCC_PREPROCESSOR_DEFINITIONS</key>
|
||||
<array>
|
||||
<string>CC_LUA_ENGINE_ENABLED=1</string>
|
||||
</array>
|
||||
</dict>
|
||||
</dict>
|
||||
</dict>
|
Loading…
Reference in New Issue