Raised This Month: $ Target: $400
 0% 

Compile plugins easily in Notepad++


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
KissLick
Veteran Member
Join Date: Nov 2012
Location: void
Old 05-29-2015 , 07:48   Re: Compile plugins easily in Notepad++
Reply With Quote #5

My ultimate compiler script, compiles current .sp, .c, .cpp or .py file.
PHP Code:
set SourcePawn_compiler D:/Dropbox/SourcePawn/spcomp.exe
set SourcePawn_output 
D:/Dropbox/SourcePawn/compiled
set C_compiler 
= $(NPP_DIRECTORY)/bin/gcc.exe
set Cpp_compiler 
= $(NPP_DIRECTORY)/bin/cpp.exe
set Python_interpreter 
D:/Python/python.exe

if "$(EXT_PART)" == ".sp" goto @SourcePawn
if "$(EXT_PART)" == ".cpp" goto @C++
if 
"$(EXT_PART)" == ".c" goto @C
if "$(EXT_PART)" == ".py" goto @Python

echo !!! File extension not found !!!
goto @
end

:@SourcePawn
    NPP_SAVE
    
$(SourcePawn_compiler"$(FULL_CURRENT_PATH)" -o"$(SourcePawn_output)/$(NAME_PART).smx"
    
// place to copy compiled plugin somewhere else
    
goto @end
    
:@C
    NPP_SAVE
    
$(C_compiler"$(FULL_CURRENT_PATH)" -o"$(CURRENT_DIRECTORY)/$(NAME_PART).exe" -pedantic -Wall -Werror -std=c99
    
$(CURRENT_DIRECTORY)/$(NAME_PART).exe
    
goto @end

:@C++
    
NPP_SAVE
    
$(Cpp_compiler"$(FULL_CURRENT_PATH)" -o"$(CURRENT_DIRECTORY)/$(NAME_PART).exe" 
    
$(CURRENT_DIRECTORY)/$(NAME_PART).exe
    
goto @end

:@Python
    NPP_SAVE
    
$(Python_interpreter"$(FULL_CURRENT_PATH)"
    
goto @end

:@end 

Last edited by KissLick; 05-29-2015 at 07:52.
KissLick is offline
 



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 18:28.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode