GNUStep Automation from Notepad ++

I use GNUStep to compile Objective-C on Windows 7 using GCC and MinGW. I would like to be able to automate the "make" statement (with make files) from Notepad ++ and report any complier errors to the Notepad ++ console window.

Edit: What I'm trying to do is a GNUStep / Bash script to go into the right directory, create a directory, then exit. Currently I have to enter the following:

sh -login -i $ cd d:\directory $ make 

Does anyone have any experience?

Rich

+4
source share
3 answers

I did this with the considerable help of my friends.

  • Create a Bash script called 'nppmake'. I saved it in c: \ GNUStep. The file should contain the following:

    #! / Ben / bash

    cd $ 1 do

  • Create a DOS batch file named "nppmake.bat" which I saved again in c: \ GNUStep. This file contains the following:

    sh --login -i C: \ GNUstep \ nppmake% 1

  • In N ++, go to the "Plugins> NppExec> Run" section and enter the following:

    C: \ GNUstep \ nppmake.bat $ (CURRENT_DIRECTORY)

  • Click "Save" and call the script "make".

  • In 'Plugins> NppExec> Advanced Options ...' create a menu item that I called 'Build' and associate it with a script called make (I am a Visual Studio developer, build โ€œfeels more natural to me). Make sure that the "Place in the macro submenu" checkbox is selected.
  • You may need to restart N ++ at this point, but then all that remains to be done is to add a keyboard shortcut. Go to Settings> Shortcut> Plugin Commands and find Build. I assigned "Ctrl-Shift-B", this is the same as VS.

You are done. Now open the file in the Objective-C project that has the GNUmakefile and press "Ctrl-Shift-B". The NppExec window reports any errors or, hopefully, a successful build!

+1
source

npp-plugins gives you the most of what you are looking for. Install the plugin and:

  • Press F6 to open the NppExec Execute window.
  • Type "make" (you can also copy cd to the appropriate directory first) and click "OK"
  • The exit from make is displayed in the notepad ++ console

Another interesting feature is that it saves the command if you restart notepad ++, so you only need to type โ€œmakeโ€ at a time.

You may need to make some changes to only show compiler errors.

+2
source

Just a small correction for kim3er's answer.

cd $1 make

it should be

 cd $1 make 
0
source

Source: https://habr.com/ru/post/1304072/


All Articles