sublime + cocos lua

1.创建lua编译系统cocosLua.sublime-build

{
	"cmd": ["python","D:/Lua_simulator/startLuaSimulator.py","$file"],"shell": true,}

2.创建 startLuaSimulator.py
# -*- coding: utf-8 -*-
# 使用utf8字符集

import  os
import  sys

tmppath =sys.argv[1]
tmp = tmppath.replace('\\','/')

srclist=[]

index=tmp.find('src')
while index!=-1:
    srclist.append(tmp[:index])
    index=tmp.find('src',index+1)

rightPath=""
for p in srclist:
    if  os.path.exists(p+"src") and os.path.exists(p+"res"):
        rightPath = p
        break

if rightPath=="":
    print "no suitable path"
    sys.exit(1)

#没有合适的路径,找到合适的路径后,就执行代码

os.system('D:/Lua_simulator/luaTest.exe -workdir '+rightPath)





3.编译好的模拟器,融合一下就ok

相关文章

    本文实践自 RayWenderlich、Ali Hafizji 的文章《...
Cocos-code-ide使用入门学习地点:杭州滨江邮箱:appdevzw@1...
第一次開始用手游引擎挺激动!!!进入正题。下载资源1:从C...
    Cocos2d-x是一款强大的基于OpenGLES的跨平台游戏开发...
1.  来源 QuickV3sample项目中的2048样例游戏,以及最近《...
   Cocos2d-x3.x已经支持使用CMake来进行构建了,这里尝试...