SourceForge has been redesigned. Learn more.
Close

nppexec

jack
2013-10-31
2013-11-02
  • jack

    jack - 2013-10-31

    I am trying to compile my source code (blahblah64.asm) to check for errors in nppexec.
    All the following resides in the D: partition including notepad++.
    Codejps is the folder that contains GoAsm, GoLink and the program blahblah64.asm
    I did read the manual but oh my.

    THIS IS WHAT I EXECUTED:
    chdir D:\codejps\blahblah64.asm
    Set INCLUDE=D:\codejps
    Set PATH=D:\codejps
    GoAsm /x64/b/c blahblah64.asm
    GoLink /unused blahblah64.obj

    EXECUTION RESULTS FROM NPPEXEC:
    Set INCLUDE=D:\codejps
    $(Include)=D:\codejps
    Set PATH=D:\codejps
    $(Path)=D:codejps
    GoAsm /x64/b/c blahblah64.asm
    CreateProcess() failed with error code 2:
    The system cannot find the file specified
    GoLink /unused blahblah64.obj
    CreateProcess() failed with error code 2:
    The system cannot find the file specified

    Thanks for any help.

     
  • DV

    DV - 2013-10-31

    This looks suspecious: "chdir D:\codejps\blahblah64.asm".
    Probably you mean "cd D:\codejps" - or, in general case, "cd $(CURRENT_DIRECTORY)".

     
  • DV

    DV - 2013-10-31

    Looking closer at your example makes me think you did not read NppExec's Manual at all... Because being inspired by its ready-to-use examples and topics, your script should be looking similar to the following:

    set CODEJPS = D:\codejps
    cd $(CODEJPS)
    env_set INCLUDE = $(CODEJPS)
    env_set PATH = $(CODEJPS)
    GoAsm /x64/b/c "$(FILE_NAME)"
    GoLink /unused "$(NAME_PART).obj"

    Each of these things: set, cd, env_set and double-quotes around variables - were mentioned several times in different examples and topics.

     
  • jack

    jack - 2013-10-31

    I'm absolutely green at this.
    I tried your 1st suggestion and had no luck.
    I thank you for this code and will give it a whirl and if
    it doesn't work will go back to the manual.
    Thanks much DV...

     
  • jack

    jack - 2013-11-02

    Script file as of 11-2-2013
    "D:\codejps\Notepad++\GoAsm.exe""$(FULL_CURRENT_PATH)"-run
    "D:\codejps\Notepad++\GoLink.exe""$(FULL_CURRENT_PATH)"-run
    set codejps=D:\codejps
    cd $(codejps)
    env_set INCLUDE=$(codejps)
    env_set PATH=$(codejps)
    GoAsm /x64/b/c"$(FILE_NAME)"
    GoLink /unused"$(NAME_PART).obj"

    I moved GoAsm.exe into D:\codejps\Notepad++
    I moved GoLink.exe into D:\codejps\Notepad++
    I moved the script file G64btch.bat into D:\codejps\Notepad++

    These are the errors I got running the above script:
    D:\codejps\Notepad++>"D:\codejps\Notepad++\GoAsm.exe""$(Full_current_Path)"-run
    Not recognized as an internal or external command, operable program or batch file.

    D:\codejps\Notepad++>"D:\codejps\Notepad++\GoLink.exe""$(Full_current_Path)"-run
    Not recognized as an internal or external command, operable program or batch file.

    D:\codejps\Notepad++>set codejps=D:\codejps

    D:\codejps\Notepad++>cd $(codejps)
    The system cannot find the path specified.

    D:\codejps\Notepad++>env_set INCLUDE=$(codejps)
    'env_set' is not recognized as an internal or external command,
    operable program or batch file.

    D:\codejps\Notepad++>env_set Path=$(codejps)
    'env_set' is not recognized as an internal or external command,
    operable program or batch file.

    D:\codejps\Notepad++>GoAsm/x64/b/c"$(FILE_NAME)"

    ERROR!
    Could not open assembler source file ($(FILE_NAME).asm) OBJ file not made

    D:\codejps\Notepad++>GoLink/unused"$(NAME_PART).obj"

    ERROR!
    Did not recognize switch:-
    /unused"$(NAME_PART).obj"
    Output file not made

     
  • DV

    DV - 2013-11-02

    Sorry, but you last example looks like a complete mess. It does look, really. Sorry to say that, but it's true...
    First, what did you try to achieve by "D:\codejps\Notepad++\GoAsm.exe""$(FULL_CURRENT_PATH)"-run and the very beginning of the mentioned lines? I just don't understand it.
    Then, you said "I moved GoAsm.exe into D:\codejps\Notepad++". So why do you still use "set codejps=D:\codejps" if you said by yourself that you have moved it to "D:\codejps\Notepad++"?
    Finally, are you trying to use all these commands from a .bat or .cmd file? In case of NppExec usage you should do it from NppExec's script - because NppExec proposes its own special commands for better integration with Notepad++.
    Probably before going further you should carefully read the following sections of NppExec Manual:
    1.1. Introduction
    3.1. Getting help
    3.3. Do something (how-to)
    3.6. NppExec's "Execute..."
    3.7. NppExec's script
    4.0. Introduction to compiling/interpreting/etc

    The section 4.0 is the most important here, but you need the knowledge from 1.1, 3.1, 3.3, 3.6 and 3.7 to understand it completely.
    Or instead you can just continue to use all-inclusive .bat or .cmd files and avoid usage of any NppExec-specific things.