近期使用LUA开发手游,团队里大神自研了个框架,底层C++渲染,上层LUA处理逻辑。

LUA的IDE选择LDT,不爽的是它不能自己主动启动模拟器,看过COCOSIDE能自启动,于是我想改造下LDT让它支持自启动模拟器。

參考原型:http://wiki.eclipse.org/Koneki/LDT/Developer_Area/Building_LDT_from_source

注意地方:

1.安装git,在Git Shell下输入 git clone  git://git.eclipse.org/gitroot/koneki/org.eclipse.koneki.ldt.git

2.安装mvn编译环境http://maven.apache.org/download.html,特别注意要下载3.0.5版本号apache-maven-3.0.5-bin.zip

其它的版本号不行,在使用mvn clean package -P build-product命令时会下载一些依赖包,要三小时左右。

3.在1中检出的LDT源码,打开org.eclipse.koneki.ldt.debug.ui.internal.launchconfiguration.attach.LuaAttachMainTab,

改动UI,在doCreateControl方法里加入以下代码

// ======= SIMULATOR GROUP ==========
final Group grpSimulator = new Group(composite, SWT.NONE);
GridLayoutFactory.swtDefaults().numColumns(2).applyTo(grpSimulator);
GridDataFactory.fillDefaults().grab(true, false).applyTo(grpSimulator);
grpSimulator.setText(Messages.LuaAttachMainTab_simulator_group); Label lblWin32 = new Label(grpSimulator, SWT.NONE);
lblWin32.setText(Messages.LuaAttachMainTab_win32_label);
GridDataFactory.swtDefaults().applyTo(lblWin32); txtWin32 = new Text(grpSimulator, SWT.BORDER);
GridDataFactory.fillDefaults().grab(true, false).applyTo(txtWin32);
txtWin32.addModifyListener(textModifyListener);

在doInitializeForm方法里初始化文本框路径内容,doPerformApply方法保存属性。
运行bat的入口在org.eclipse.koneki.ldt.debug.core.internal.attach.LuaAttachDebuggingEngineRunner里,
createDebugTarget方法头部加上
try {
ILaunchConfiguration configuration = launch.getLaunchConfiguration();
String path = configuration.getAttribute("simulator_path", "");
// Runtime.getRuntime().exec("cmd.exe /c start D:\\trunk_data\\tools\\Simulator\\Simulator_start.bat");
if(path != "") {
Runtime.getRuntime().exec("cmd.exe /c start " + path);
}
} catch (IOException e) {
}
 
4.做完这些后就是编译代码了,先cd切到代码所在的文件夹,如 cd C:\Users\Administrator\Documents\GitHub\org.eclipse.koneki.ldt
然后编译mvn clean package -P build-product
大约5分钟时间,提示SUCCESS则成功,假设FAILURE的话,看下报错,假设是显示代码哪行的话就是代码错了要改。另一种情况是编译器
的问题,如doc.user插件,这时仅仅要又一次编译,总会成功的。
 
成功后会在org.eclipse.koneki.ldt\product\target\products文件夹下生成几个不同系统的IDE包,注意不要覆盖,要解压到新文件夹才起作用。

LDT自己定义启动模拟器的更多相关文章

  1. unable to boot the simulator,无法启动模拟器已解决

    突然模拟器报错:unable to boot the simulator(无法启动模拟器) 试了好几种解决办法,删除所有的模拟器重启以后再添加,删除钥匙串登陆中的证书,重新安装Xcode都不行 最后通 ...

  2. Android Studio 无法启动模拟器的一种可能是你装的是Ghost版的系统

    我遇到的问题是,打开模拟器,进度条走到最后,突然出现了emulator error,然后模拟器就无法启动(不好意思当时没有截图).我是在Ghost版 win7系统下运行Android Studio 的 ...

  3. AS启动模拟器报'mksdcard.exe' is missing from the SDK tools folder.异常、启动模拟器失败

    这个问题是因为SDK下的tools文件夹中找不到mksdcard.exe程序所以无法启动模拟器,下载android-sdk_r20-windows.zip压缩包解压缩后将tools文件覆盖到SDK的t ...

  4. Android 启动模拟器是出现“Failed to allocate memory: 8”错误提示的原因及解决办法

    某天,Android 启动模拟器是出现“Failed to allocate memory: 8”错误,模拟器无法启动,如下图: 原因:设置了不正确AVD显示屏模式,4.0版默认的模式为WVGA800 ...

  5. Android studio 启动模拟器出现 VT-x is disabled in BIOS 以及 /dev/kvm is not found

    Android studio 启动模拟器出现 VT-x is disabled in BIOS 以及 /dev/kvm is not found 网上大部分文章都是说在bios开启vt-x支持等.这里 ...

  6. react-native 设置启动模拟器

    react-native 设置启动模拟器 查看iOS可选设备: xcrun simctl list devices iPhone7 Plus启动(下次启动会默认使用最后一次选择设备,直接启动npx r ...

  7. android启动模拟器命令

    参考资料:http://blog.csdn.net/sanjinxiong/article/details/6758222 启动模拟器 首先通过android list avd 查看建好的虚拟设备: ...

  8. 十六:SpringBoot-自定义启动页,项目打包和指定运行环境

    SpringBoot-自定义启动页,项目打包和指定运行环境 1.自定义启动页 2.打包配置 2.1 打包pom配置 2.2 多环境配置 3.环境测试接口 4.打包执行 4.1 指定模块打包 4.2 运 ...

  9. Android命令行启动模拟器

    我们在平时的开发中会经常需要使用模拟器进行调试,这个时候我们就要先打开Android Studio来启动模拟器,然后再运行App.这个流程中启动Android Studio需要花费一些时间,而模拟器的 ...

随机推荐

  1. wireshark的 rdp dissector

    开源 wireshark的 rdp dissector https://github.com/boytm/wireshark_rdp. 1)support TCP reassemble 2)Fastp ...

  2. OpenLayers实现覆盖物选择信息提示

    var map; function init() { map = new OpenLayers.Map("map",{projection:"EPSG:3857" ...

  3. linux之SQL语句简明教程---LIKE

    LIKE 是另一个在 WHERE 子句中会用到的指令.基本上,LIKE 能让我们依据一个套式 (pattern) 来找出我们要的资料.相对来说,在运用 IN 的时候,我们完全地知道我们需要的条件:在运 ...

  4. aliCloud基于RAMService实现跨账户资源访问

    1,aliCloud基于RAM service实现跨账户ECS资源访问Example 主要的资源为Instance,Image,Snapshot,disk,SecurityGroup Action太多 ...

  5. word2vec 入门(三)模型介绍

    两种模型,两种方法 模型:CBOW和Skip-Gram 方法:Hierarchical Softmax和Negative Sampling CBOW模型Hierarchical Softmax方法 C ...

  6. block的一点知识

    一个block的笔记: http://www.cnblogs.com/xinye/archive/2013/03/03/2941203.html http://segmentfault.com/q/1 ...

  7. OC基础3:一些基本概念

    "OC基础"这个分类的文章是我在自学Stephen G.Kochan的<Objective-C程序设计第6版>过程中的笔记. 1.关于NSLog函数中的“%2i”: ( ...

  8. as3 页游中,新手指导中,屏蔽所有交互对象,但除了指定交互对象可用的方法【转http://blog.csdn.net/linjf520/article/details/9450945】

    package { import flash.display.InteractiveObject; import flash.display.Stage; import flash.events.Mo ...

  9. HTML5开发 BUG解决

    1.点透Q:元素A上定位另外一个元素B,点击元素B,如果元素A有事件或链接,会触发元素A上的事件或链接,即点透A:在元素B的touchend中增加ev.preventDefault();阻止默认事件即 ...

  10. odbc连接数据库

    using System; using System.Collections.Generic; using System.Text; using Console = System.Console; u ...