nppExec and remote compiling

NppExec
chaos51
2012-07-11
2013-05-21
  • chaos51
    chaos51
    2012-07-11

    Hi,

    I am using nppExec to remotely (using cygwin rexec or similar), execute makefiles on a unix server.
    This works fine.  I also got the errors highlighted in red. Which is great.  Now I wonder how to jump to the error in the console to the line in the source code file.

    This must be done, taking in account that the errormessage contains a different path to the file, as it's a unix path, and the local temporary file is on my windows machine.   Nicests would be if it somehow could ignore the path, and just match the name of the file alone, focus first best match, and jump to line.

    Can this be done?

    Thanks
    DaC

     
  • DV
    DV
    2012-07-11

    Probably you can use Replace Filters - e.g. 
    Find what:  /user/projects/ 
    Replace with:  C:\temp\projects\

     
  • chaos51
    chaos51
    2012-08-14

    Thanks.. That works ok…

    Now I have a second problem.  When I use the output filters to enable jumping to a line, when clicking on an error, another part of my script breaks.


    cmd /c type "C:\config\makepath.txt"
    cls
    echo Executing in $(OUTPUT1)


    When enabling the output filters "Enable Console Output Filter" checkbox, my $(OUTPUT1) becomes empty.
    Is there another way of getting the content of  my file "C:\config\makepath.txt" into a variable that I can use in my script commands?

     
  • chaos51
    chaos51
    2012-08-15

    Ok, so that got figured out.  The output filters filtered the result from the command

    > cmd /c type "C:\config\makepath.txt"

    This makes me wonder, is there a better way to get an file content (first line) into an NPPExec variable?
    Or maybe I should start a new thread for that?

     
  • DV
    DV
    2012-08-29

    I don't know better way for this. 
    Maybe you can adjust your output filters to keep the string from "makepath.txt" while filtering other strings by using include and exclude masks together.

     
  • DV
    DV
    2012-09-07

    In next version of NppExec - probably 0.4.3.1 - there will be ability to enable and disable filters during a script execution via NPE_CONSOLE f+/f- r+/r-

     
  • DV
    DV
    2013-01-16

    > This makes me wonder, is there a better way to get an file content (first line) into an NPPExec variable? 
    I've just needed something similar - and another guy pointed me to usage of  "FOR /F". See "for /?" for detailed examples. 
    You can print (and modify, if needed) lines of an input file via 

    cmd /c for /F %i in (filename.txt) do @echo %i
    

    and then use $(OUTPUT1) or whatever in NppExec.