IDE : build WDK Code on sourceInsight
来源:互联网 发布:拓知教育 编辑:程序博客网 时间:2024/06/05 18:44
在sourceinsight中使用 Custom Commands 的官方说明:
http://www.sourceinsight.com/docs35/ad1036756.htm
使用 sourceinsight 集成WDK工具来编译WDK程序是轻量级的选择.
sourceinsight 在非Windows平台也有版本, 在sourceinsight中集成外部工具以后也能用到.
优点
* 比 "记事本编辑代码 + WDK工具编译代码" 好
* 由于 sourceinsight 强大的代码分析能力, 不比"VS编辑编译WDK代码"逊色
搭建WDK编译环境
在本地的固定目录中编辑一个批处理文件 BuildWdkCode.cmd, e.g. my file is D:\LsWorkDir\BuildWdkCode.cmd
cmd中的 %1 代表批处理文件的参数1
这个批处理文件在本地只有一个
rem @file BuildWdkCode.cmd
call D:\WinDDK\7600.16385.1\bin\setenv.bat D:\WinDDK\7600.16385.1\ chk x86 WXPcd %1build
编译Win7X86和Win7X64的批处理
整理了2个.cmd, 用于编译X86和X64 驱动,
发现 BuildWdkCode-win7X86.cmd 编译出来的驱动,在WinXpSp3下也跑的很好.
rem @fileBuildWdkCode-win7X86.cmdcall D:\WinDDK\7600.16385.1\bin\setenv.bat D:\WinDDK\7600.16385.1\ chk x86 WIN7cd %1build -ceZ
rem @fileBuildWdkCode-win7X64.cmdcall D:\WinDDK\7600.16385.1\bin\setenv.bat D:\WinDDK\7600.16385.1\ chk x64 WIN7cd %1build -ceZ
当WDK和工程不在一个分区时的批处理
e.g. WDK 在C盘根目录, 工程在D盘子目录
echo onrem @fileBuildWdkCode-winxpX86.cmdcall C:\WinDDK\7600.16385.1\bin\setenv.bat C:\WinDDK\7600.16385.1\ chk x86 WXPrem 分区不同, 手工切过来pushd %1build -ceZ
设置工程路径
我们用SourceInsight时, 有可能是浏览一个庞杂的WDK工程文件夹(e.g. x:\WinDDK\7600.16385.1\src), 有可能需要编译不同的WDK工程.找到要编译的WDK工程路径
在要编译的工程中的一个文件上右击, 选择新建文件, 弹出的对话框上有该文件的全路径, 拷贝下来
BuildWdkCode.cmd 中用到了当前工程路径, 所以编译不同的WDK工程时, 需要设置当前WDK工程路径.
增加扩展菜单
在弹出的已有模板上, 随意选择一个进行编辑, 然后保存成我们的扩展菜单
Run 参数中的 %j 代表当前工程路径.
调整我们新增的扩展菜单到想要的菜单位置
运行扩展命令
运行后的效果
如果WDK程序本身有语法错误, 编译有错, 在SourceInsight中找到那个文件, 组合键 CTRL + G 转到出错代码, 进行修正.
在SourceInsight中浏览编译WDK程序的感受
相对于"记事本 + WDK 编译工具", 感觉好很多.
相对于"VS2008中浏览修改代码 + WDK编译工具", 方便很多
传说中的VS11自带WDK编译功能, 没用过.
SourceInsight 有跨平台的版本, 这样加扩展命令有通用性
很多程序编译都能用命令行实现
以后换个操作系统编程, 可以少学一个代码编辑器~
在SourceInsight中设置文档编辑格式
设置编辑器右边界, 防止写出超长代码
设置空格代替Tab键, 防止到不同编译器上代码格式不对齐
sourceInsight 其他设置 => SourceInsight 操作整理
- IDE : build WDK Code on sourceInsight
- How to compile and debug VLC player source code in eclipse IDE on Ubuntu 10.04 (lucid)?
- How to compile and debug VLC player source code in eclipse IDE on Ubuntu 10.04 (lucid)
- WDK
- WDK
- The APK file D:\Code\Air\app\build\outputs\apk\.apk does not exist on disk.
- code::blocks IDE
- window安装code ide
- Code Blocks IDE
- Cocos code ide 常见问题
- cocos code ide快捷键
- cocos code IDE 快捷键
- kettle build code
- build qgroundcontrol source code
- SourceInsight
- sourceinsight
- SourceInsight
- sourceinsight
- SpringMVC+Apache Shiro+JPA(hibernate)案例教学(三)给Shiro登录验证加上验证码
- myeclipse js报错
- QTime类介绍
- 记录:使用外网IP访问内部服务
- cf 323A A. Black-and-White Cube 立体构造 不知道为什么当k为奇数时构造不出来 挺有趣的题目吧
- IDE : build WDK Code on sourceInsight
- Github下载Android源码
- 使用Hamcrest增强JUnit的测试能力
- [珠玑之椟]字符串和序列:左移、哈希、最长重复子序列的后缀数组解法、最大连续子序列
- 伪静态URLRewrite学习笔记
- 学习总结 基础知识的理解
- 彻底搞定c语言指针
- 程序运行时间的测量
- JVM terminated.Exit错误:ubuntu11.10+JDK1.7.0+Eclipse