从Notepad ++自动化GNUStep [英] Automating GNUStep from Notepad++
问题描述
我使用GNUStep在Windows 7上使用GCC和MinGW编译Objective-C.我希望能够从Notepad ++中自动执行"make"指令(带有make文件),并将任何编译器错误报告给Notepad ++的控制台窗口.
我正在尝试执行的脚本是GNUStep/Bash,以登录到正确的目录,构建目录,然后退出.目前,我必须输入以下内容:
sh -login -i
$ cd d:\directory
$ make
有人对此有任何经验吗?
丰富
在朋友的大力帮助下,我做到了.
-
创建一个名为"nppmake"的Bash脚本.我将其保存在c:\ GNUStep中.该文件应包含以下内容:
#! /bin/bash
cd $ 1 制作 -
创建一个名为"nppmake.bat"的DOS批处理文件,我再次将其保存在c:\ GNUStep中.该文件包含以下内容:
sh --login -i C:\ GNUstep \ nppmake%1
-
在N ++中,转到插件> NppExec>执行",然后输入以下内容:
C:\ GNUstep \ nppmake.bat $(CURRENT_DIRECTORY)
-
单击保存",然后将脚本命名为"make".
- 在插件> NppExec>高级选项..."中,创建一个菜单项,我将其称为构建",并将其与名为"make"的脚本相关联(我是Visual Studio开发人员,因此是构建"对我来说更自然).确保选中放置到宏子菜单".
- 此时您可能需要重新启动N ++,但是剩下要做的就是添加键盘快捷键.转到设置>快捷方式映射器>插件命令",然后找到构建".我分配了"Ctrl-Shift-B",它和VS一样.
您完成了.现在在Objective-C项目中打开一个具有GNUmakefile的文件,然后单击"Ctrl-Shift-B". NppExec窗口会报告任何错误,或者希望构建成功!
I use GNUStep to compile Objective-C on Windows 7 using GCC and MinGW. I'd like to be able to automate the "make" instruction (with make files) from Notepad++ and have any complier errors reported to Notepad++s console window.
Edit: What I am trying to do is script GNUStep/Bash to login to the right directory, build the directory, then exit. Currently I have to type in the following:
sh -login -i
$ cd d:\directory
$ make
Does anyone have any experience with this?
Rich
I have done it, with considerable help from my friends.
Create a Bash script called 'nppmake'. I saved it in c:\GNUStep. The file should contain the following:
#! /bin/bash
cd $1 make
Create a DOS batch file called 'nppmake.bat', which again I saved in c:\GNUStep. This file contains the following:
sh --login -i C:\GNUstep\nppmake %1
In N++, go to 'Plugins > NppExec > Execute' and type in the following:
C:\GNUstep\nppmake.bat $(CURRENT_DIRECTORY)
Hit 'Save' and call the script 'make'.
- In 'Plugins > NppExec > Advanced Options...', create a menu item, which I called 'Build' and associate it to the script called 'make' (I'm a Visual Studio developer, so 'build' feels more natural to me). Make sure 'Place to the Macros submenu' is checked.
- You may need to restart N++ at this point, but then all that is left to do is add the keyboard shortcut. Go to 'Settings > Shortcut Mapper > Plugin Commands' and find 'Build'. I assigned 'Ctrl-Shift-B', is it is the same as VS.
You're done. Now open up a file in a Objective-C project, that has a GNUmakefile, and hit 'Ctrl-Shift-B'. The NppExec window reports any errors, or hopefully a successful build!
这篇关于从Notepad ++自动化GNUStep的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!