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
版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。