从记事本自动化 GNUStep++
我使用 GNUStep 在 Windows 7 上使用 GCC 和 MinGW 编译 Objective-C。我希望能够从 Notepad++ 自动执行“make”指令(带有 make 文件),并将任何编译器错误报告到 Notepad++ 的控制台窗口。
编辑: 我想做的是编写 GNUStep/Bash 脚本来登录到正确的目录,构建目录,然后退出。目前我必须输入以下内容:
sh -login -i
$ cd d:\directory
$ make
有人有这方面的经验吗?
富有的
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
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
npp-plugins 为您提供了您正在寻找的大部分内容。安装插件并:
另一个很酷的功能是它会保存如果你重新启动notepad++,该命令就会生效,所以你只需要输入“make”一次。
但是,您可能需要进行一些调整才能仅显示编译器错误。
The npp-plugins gives you most of what you are looking for. Install the plugin and:
Another cool feature is that it will save the command if you restart notepad++, so you only need to type 'make' a single time.
You may need to make some tweaks to only show compiler errors, however.
在朋友们的大力帮助下,我已经做到了。
创建一个名为“nppmake”的 Bash 脚本。我将其保存在 c:\GNUStep 中。该文件应包含以下内容:
#! /bin/bash
cd $1
make
创建一个名为“nppmake.bat”的 DOS 批处理文件,我再次将其保存在 c:\GNUStep 中。该文件包含以下内容:
sh --login -i C:\GNUstep\nppmake %1
在 N++ 中,转到“插件 >” NppExec>执行并输入以下内容:
C:\GNUstep\nppmake.bat $(CURRENT_DIRECTORY)
点击“保存”并调用脚本“make”。
你完成了。现在在 Objective-C 项目中打开一个包含 GNUmakefile 的文件,然后按“Ctrl-Shift-B”。 NppExec 窗口报告任何错误,或者希望构建成功!
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'.
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!
只是对 kim3er 的答案做了一个小小的修正。
cd $1 make
应该是
Just a small correction to kim3er's answer.
cd $1 make
should be