cocos compile

cocos compile,第1张

概述转自 : http://blog.csdn.net/wanglang3081/article/details/39692459 cocos compile cocos compile Overview Usage Available Arguments Common Arguments Android Arguments Web Arguments iOS/Mac Arguments iOS Ar

转自 : http://blog.csdn.net/wanglang3081/article/details/39692459

cocos compile cocos compile Overview Usage Available Arguments Common Arguments Android Arguments Web Arguments iOS/Mac Arguments iOS Arguments lua/js project Arguments lua project Arguments Attentions Samples OvervIEw

Build an existed project.

Usage
usage: cocos compile [-h] [-s SRC_DIR] [-q] [-p PLATFORM] [-m MODE] [-j JOBS]                     [--ap ANDROID_PLATFORM] [--ndk-mode NDK_MODE]                     [--source-map] [--sign-IDentity SIGN_ID] [--no-res]                     [--compile-script {0,1}] [--lua-encrypt]                     [--lua-encrypt-key LUA_ENCRYPT_KEY]                     [--lua-encrypt-sign LUA_ENCRYPT_SIGN]
Available Arguments Common Arguments
arg available value sample description necessary
-h,--help - - Show the help message and exit no
-s,--src project path ./projects/MyLuaGame Specify the project path. Default value is current directory. no
-p,--platform the target platform androID Specify the target platform. yes
-m,--mode the compiling mode release Set the compile mode,should bedeBUGorrelease. Default is deBUG. no
-j,--jobs number of jobs at once 4 Use N jobs at once. It's only take effect with targetandroID&linux. no
-o,--output-dir absolute/relative path ./release/androID Specify the output directory. no
AndroID Arguments
arg available value sample description necessary
--ap folder name inANDROID_SDK_ROOT/platforms androID-16 Specify the API-Level of androID sdk. Console will auto select it if not specifIEd. no
--ndk-mode the compiling mode of ndk-build release Set the compile mode of ndk-build,should be one of {deBUG,release,none},native code will not be compiled when the value is none. Default is same value with-m no
Web Arguments
arg available value sample description necessary
--source-map - - Enable source-map no
--advanced - - Set thecompilationLevelvalue asadvancedfor Js compiling. no
iOS/Mac Arguments
arg available value sample description necessary
-t,--target Target name in XCode project MyGame iOS Specify the target name to compile. no
iOS Arguments
arg available value sample description necessary
--sign-IDentity the code sign IDentity "iPhone distribution:xxxxxxxx" The code sign IDentity for iOS. It's required when the value of "-m,-mode" is release.
lua/Js project Arguments
arg available value sample description necessary
--compile-script {0,1} 1 disable/Enable the compiling of lua/Js script files. If not specifIEd,the value is1when-m,--modeisrelease. Otherwise,the value is0 no
lua project Arguments
arg available value sample description necessary
--lua-encrypt - - Enable the encrypting of lua scripts. It's only take effect when--compile-scriptvalue is1 no
--lua-encrypt-key any string MyLuaKey Specify the encrypt key for the encrypting of lua scripts. It's only take effect when--lua-encryptis enabled. Default value is2dxLua. no
--lua-encrypt-sign any string MyLuaSign Specify the encrypt sign for the encrypting of lua scripts. It's only take effect when--lua-encryptis enabled. Default value isXXTEA. no
Attentions You can see the valID target platforms without specify-p,--platformfirst. The available platforms will be shown like this: --compile-scriptwill not take effect when target islinuxorweb

If--lua-encryptis enabled,you should modify the C++ codeframeworks/runtime-src/Classes/AppDelegate.cpplike this:

bool AppDelegate::applicationDIDFinishLaunching(){    ...    auto engine = LuaEngine::getInstance();    ScriptEngineManager::getInstance()->setScriptEngine(engine);    // add these two lines     // "MyLuaKey" is the string specifIEd by "--lua-encrypt-key"    // "MyLuaSign" is the string specifIEd by "--lua-encrypt-sign"    LuaStack* stack = engine->getLuaStack();    stack->setXXTEAKeyAndSign("MyLuaKey",strlen("MyLuaKey"),"MyLuaSign",strlen("MyLuaSign"));    ...}
Samples cocos compile -h. Show the help message. cocos compile -s ./projects/MyLuaGame -p androID --ndk-mode release --compile-script 1 --lua-encrypt
BuildMyLuaGamefor androID with ndk-build is release. And compile lua script files with encrypting. cocos compile -s ./projects/MyLuaGame -p ios -m release --sign-IDentity "iPhone distribution:xxxxxxxx"
BuildMyLuaGamefor ios with release mode. Use the code sign IDentity"iPhone distribution:xxxxxxxx". 总结

以上是内存溢出为你收集整理的cocos compile全部内容,希望文章能够帮你解决cocos compile所遇到的程序开发问题。

如果觉得内存溢出网站内容还不错,欢迎将内存溢出网站推荐给程序员好友。

欢迎分享,转载请注明来源:内存溢出

原文地址: http://outofmemory.cn/web/1063820.html

(0)
打赏 微信扫一扫 微信扫一扫 支付宝扫一扫 支付宝扫一扫
上一篇 2022-05-26
下一篇 2022-05-26

发表评论

登录后才能评论

评论列表(0条)

保存