AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Code Snippets/Tutorials (https://forums.alliedmods.net/forumdisplay.php?f=83)
-   -   [TUT] Compiling AMXX plugins with Notepad++ (https://forums.alliedmods.net/showthread.php?t=292638)

OciXCrom 01-10-2017 13:51

[TUT] Compiling AMXX plugins with Notepad++
 
I'm sure that most of you are sick of dragging and dropping their .sma files in compile.exe, finding the compiled .amxx file and adding it in the plugins folder. All of this can be done automatically with the click of just one button.

For this you will need Notepad++ and of course a server platform with a working amxxpc.exe file. Follow these steps in order to configure Notepad++ to work with the compiler:

____________________________________________

Step #1: Open Notepad++ and click on Plugins => Plugin Manager => Show Plugin Manager.

Step #2: In the window that just popped up, click on the Available tab. Find the plugin NppExec and install it. If you can't find it in the list, it's probably already installed and you should continue to Step #3.

Step #3: Open Notepad++ and click on Run => Modify Shortcut/Delete Command.

http://i.imgur.com/iUdSeFx.jpg

Step #4: Go to Plugin Commands and find the Execute and Direct Execute Previous fields. The first field sets the button that will open the compile menu and the second one is the button for direct compile. I suggest you set F9 for the direct compile and Ctrl+F9 for the menu. You will find Show Console Dialog under these two fields, which is used for toggling the console and hiding it after the compilation is complete. My suggestion for this shortcut is the Escape button.

http://i.imgur.com/xzwldTn.jpg

Step #5: Hit the menu button (previously suggested as Ctrl+F9). A window will pop up where you need to insert the following code:

PHP Code:

SET compiler E:\OciXCrom\Servers\My Cool Server\cstrike\addons\amxmodx\scripting\amxxpc.exe
SET 
include = E:\OciXCrom\Servers\My Cool Server\cstrike\addons\amxmodx\scripting\include
SET output E:\OciXCrom\Servers\My Cool Server\cstrike\addons\amxmodx\plugins\$(NAME_PART).amxx

NPP_SAVE
"$(compiler)" -i"$(include)" -o"$(output)" "$(FULL_CURRENT_PATH)" 

Of course, the upper example shows my configuration, so you will need to change the path to every single required file. The first line shows the location of amxxpc.exe, the second one is the folder with the .inc files and the third one is the folder where the compiled .amxx files will be saved.

After you added the code, hit Save.

http://i.imgur.com/5nXSUt2.jpg

Step #6: Now the configuration is complete and you can compile your plugins when you hit the compile button (I have it on F9). The compile information will be shown in the console down below.

http://i.imgur.com/UpL99uV.jpg

Depresie 01-10-2017 15:42

Re: [TUT] Compiling AMXX plugins with Notepad++
 
Nice tut, thanks !

meTaLiCroSS 01-10-2017 18:32

Re: [TUT] Compiling AMXX plugins with Notepad++
 
https://forums.alliedmods.net/showthread.php?t=118119

OciXCrom 01-10-2017 18:52

Re: [TUT] Compiling AMXX plugins with Notepad++
 
Quote:

Originally Posted by meTaLiCroSS (Post 2485382)

It's totally different, even though it does the same thing. Another tutorial won't hurt anyone.

fysiks 01-10-2017 19:50

Re: [TUT] Compiling AMXX plugins with Notepad++
 
As far as I can tell, the differences are:
  • You can't compile a plugin based on the file's location. I.e. All your plugins will be compiled using the same includes and compiler and places the .amxx file in the same location regardless of where your source code is.

    In the first example of my thread, it allows me to compile plugins for the server in which I'm currently editing (useful when writing plugins for multiple types of server or servers that you want segregated). The method shown in the thread is more like the second example in my thread.
  • The console output is inside of Notepad++ (something I don't like; it takes up too much room; when I need to know what other errors there are to fix, I simply compile again, especially useful when errors are cascading).
  • It requires a non-standard plugin (I couldn't find the option that is referenced above). If it is truly a non-standard plugin as I expect, you should clearly state it as a prerequisite.

meTaLiCroSS 01-10-2017 20:44

Re: [TUT] Compiling AMXX plugins with Notepad++
 
Quote:

Originally Posted by OciXCrom (Post 2485387)
It's totally different, even though it does the same thing. Another tutorial won't hurt anyone.

Who's saying that? I'm just adding that link, you may be interested in knowing another ways to do it.

OciXCrom 01-14-2017 10:22

Re: [TUT] Compiling AMXX plugins with Notepad++
 
Quote:

Originally Posted by fysiks (Post 2485406)
As far as I can tell, the differences are:
  • You can't compile a plugin based on the file's location. I.e. All your plugins will be compiled using the same includes and compiler and places the .amxx file in the same location regardless of where your source code is.

    In the first example of my thread, it allows me to compile plugins for the server in which I'm currently editing (useful when writing plugins for multiple types of server or servers that you want segregated). The method shown in the thread is more like the second example in my thread.
  • The console output is inside of Notepad++ (something I don't like; it takes up too much room; when I need to know what other errors there are to fix, I simply compile again, especially useful when errors are cascading).
  • It requires a non-standard plugin (I couldn't find the option that is referenced above). If it is truly a non-standard plugin as I expect, you should clearly state it as a prerequisite.

- In my opinion, compiling the plugins in a predefined location is much better than putting them where the .sma file is. I have a bunch of different platforms on my computer, and when I want to transfer a plugin from one platform to another, I simply compile that plugin with the other platform's settings, instead of having to open that folder and copy the .sma file there. So, I can't say that's a disadvantage.

- About the plugin - I already had the plugin installed before I did this, so I totally forgot that it requires one. I edited my post.

Quote:

Originally Posted by meTaLiCroSS (Post 2485422)
Who's saying that? I'm just adding that link, you may be interested in knowing another ways to do it.

Well, usually posting a link to another thread in a tutorial and not saying anything by default means "this already exists, your topic is useless".

fysiks 01-14-2017 14:44

Re: [TUT] Compiling AMXX plugins with Notepad++
 
Quote:

Originally Posted by OciXCrom (Post 2486464)
- In my opinion, compiling the plugins in a predefined location is much better than putting them where the .sma file is. I have a bunch of different platforms on my computer, and when I want to transfer a plugin from one platform to another, I simply compile that plugin with the other platform's settings, instead of having to open that folder and copy the .sma file there. So, I can't say that's a disadvantage.

I didn't say that mine was better. I was just stating the difference (and a little about why I prefer my method; the parts that are my opinion are obvious in my post).

To clarify, mine doesn't put the .amxx file where the .sma file is located. I said that it puts it in a location based on the .sma location i.e. it puts it in the plugin folder of the AMX Mod X installation in which the .sma file resides (assuming it's in the scripting folder). I never have to copy a .amxx file anywhere (with the exception of FTP to a remote server).

edon1337 01-14-2017 15:15

Re: [TUT] Compiling AMXX plugins with Notepad++
 
Quote:

Originally Posted by fysiks (Post 2486521)
and a little about why I prefer my method;

Everyone prefers their own methods, isn't it obvious lol.

meTaLiCroSS 01-15-2017 02:26

Re: [TUT] Compiling AMXX plugins with Notepad++
 
Quote:

Originally Posted by edon1337 (Post 2486537)
Everyone prefers their own methods, isn't it obvious lol.

fysiks's method is based on letting user choose his file output method. Actually, topic author explained just 1 way and arguing about why just showed that, which isn't the best way to deal with because you're not thinking on users preferences or variety itself.

In my case, I prefer letting the output in sma file's folder. And I didn't think on adding nppexec plugin, so I will give it a try now.

edon1337 01-16-2017 08:28

Re: [TUT] Compiling AMXX plugins with Notepad++
 
Quote:

Originally Posted by meTaLiCroSS (Post 2486653)
fysiks's method is based on letting user choose his file output method. Actually, topic author explained just 1 way and arguing about why just showed that, which isn't the best way to deal with because you're not thinking on users preferences or variety itself.

In my case, I prefer letting the output in sma file's folder. And I didn't think on adding nppexec plugin, so I will give it a try now.

With 'file output method' , do you mean the format like 'sma' , 'cpp' ?

fysiks 01-16-2017 13:09

Re: [TUT] Compiling AMXX plugins with Notepad++
 
Quote:

Originally Posted by edon1337 (Post 2486997)
With 'file output method' , do you mean the format like 'sma' , 'cpp' ?

No. The file extension .sma is for plugin source code, .cpp is for C++ source code. All files output by the compiler will have the .amxx extension (this is the binary file that is actually executed by AMX Mod X).

The "file output method" to which he is referring is where the resulting .amxx file is located after compilation.

edon1337 01-17-2017 10:38

Re: [TUT] Compiling AMXX plugins with Notepad++
 
So it doesn't let you change the output location ?

fysiks 01-17-2017 20:40

Re: [TUT] Compiling AMXX plugins with Notepad++
 
Quote:

Originally Posted by edon1337 (Post 2487357)
So it doesn't let you change the output location ?

Like I said before, the method shown in this thread uses a static output location. Mine determines the output location relative to the .sma file location (i.e. it puts the .amxx file directly in the plugins folder of the AMX Mod X installation in which your .sma exists).

You could actually set up multiple methods/output file locations set on different hotkeys.

Depresie 01-19-2017 15:09

Re: [TUT] Compiling AMXX plugins with Notepad++
 
I rather have all the plugins output to one default folder... because I don't have to copy them all the time to the plugins folder of the server >.>

So many useless and annoying customizations and preferences in everything around here, different folder for includes, different folders for output, different project, bla bla bla

I like that ocixcrom kept it simple

fysiks 01-19-2017 21:22

Re: [TUT] Compiling AMXX plugins with Notepad++
 
Quote:

Originally Posted by Depresie (Post 2488126)
I rather have all the plugins output to one default folder... because I don't have to copy them all the time to the plugins folder of the server >.>

I haven't had to copy a .amxx file for 7+ years using my method.

meTaLiCroSS 01-21-2017 03:40

Re: [TUT] Compiling AMXX plugins with Notepad++
 
Quote:

Originally Posted by Depresie (Post 2488126)
I rather have all the plugins output to one default folder... because I don't have to copy them all the time to the plugins folder of the server >.>

Quote:

Originally Posted by meTaLiCroSS (Post 2486653)
which isn't the best way to deal with because you're not thinking on users preferences or variety itself.

You may learn it later

xTr3m3r 02-14-2017 01:08

Re: [TUT] Compiling AMXX plugins with Notepad++
 
Thank you very much!

staNioN 04-26-2017 20:01

Re: [TUT] Compiling AMXX plugins with Notepad++
 
a bit off topic but, can you share your defined language? i know that u posted ur own version in a new thread but it isnt the same.

OciXCrom 04-27-2017 05:08

Re: [TUT] Compiling AMXX plugins with Notepad++
 
It was different when I made this topic, but now it's the same as the one in my other thread. :)
I believe I can find my old one, but it will be missing a huge amount of stuff added in the new thread.
You should download the one in the other thread, it's pretty much the same. The only thing I changed is the forwards' (plugin_init, plugin_cfg, client_putinserver, etc) color from green to light blue because they were using the same color as the constants and I added folding. If you prefer green, you can easily change it.

Fuck For Fun 06-18-2018 13:11

Re: [TUT] Compiling AMXX plugins with Notepad++
 
Quote:

click on Plugins => Plugin Manager => Show Plugin Manager.
i dont have this way..

and im using the Lastest version

OciXCrom 06-18-2018 15:39

Re: [TUT] Compiling AMXX plugins with Notepad++
 
They f*cked things up in the new version. You will have to manually download the Plugin Manager and/or NppExec. Try from here - https://sourceforge.net/projects/npp...urce=directory

soumyadip77 12-18-2018 22:10

Re: [TUT] Compiling AMXX plugins with Notepad++
 
@OciXCrom Can you add autocomplete feature as sublime amxx have?

OciXCrom 12-19-2018 07:06

Re: [TUT] Compiling AMXX plugins with Notepad++
 
I no longer use Notepad++ as Sublime and many other editors are superior to it and don't require manual writing of every single function + don't have a ridiculous limit for keywords.

Barlap 09-08-2020 16:39

Re: [TUT] Compiling AMXX plugins with Notepad++
 
It's kinda outdated, better use a webcompiler instead: http://amx.icegame.ro/

ZaX 09-08-2020 17:56

Re: [TUT] Compiling AMXX plugins with Notepad++
 
What :?? Just use local compiler, drag and compile if you using your PC
Or if youre too lazy switch to Sublime Text or VS Code

fysiks 09-08-2020 21:45

Re: [TUT] Compiling AMXX plugins with Notepad++
 
Quote:

Originally Posted by Barlap (Post 2717174)
It's kinda outdated

What is outdated? Notepad++ works just fine and you can compile easily with it. Using a webcompiler, especially some questionable one on some random website, is not an appropriate response to this thread.

OciXCrom 09-09-2020 06:11

Re: [TUT] Compiling AMXX plugins with Notepad++
 
Quote:

Originally Posted by Barlap (Post 2717174)
It's kinda outdated, better use a webcompiler instead: http://amx.icegame.ro/

How is a web compiler more up-to-date than the actual compiler provided by the AMXX version which your server is running on?

artYY 10-21-2020 23:34

Re: [TUT] Compiling AMXX plugins with Notepad++
 
God! Amazing trick!

drakunovu6 10-25-2020 17:03

Re: [TUT] Compiling AMXX plugins with Notepad++
 
Pretty good, I was using this before, but now i'm in VSCode as it is much better than Notepad++

fysiks 10-26-2020 00:14

Re: [TUT] Compiling AMXX plugins with Notepad++
 
Quote:

Originally Posted by drakunovu6 (Post 2722533)
Pretty good, I was using this before, but now i'm in VSCode as it is much better than Notepad++

I'm using VS Code now too and it's nice for strictly writing code but Notepad++ is so much better at general purpose processing/editing of files. Sadly, I can't use Notepad++ at home.

drakunovu6 11-13-2020 22:03

Re: [TUT] Compiling AMXX plugins with Notepad++
 
Quote:

Originally Posted by fysiks (Post 2722572)
I'm using VS Code now too and it's nice for strictly writing code but Notepad++ is so much better at general purpose processing/editing of files. Sadly, I can't use Notepad++ at home.

Well, a thing I can see of VSCode is that eats more RAM than Notepad++, but hey now I can see the functions without entering the AMXX Scripting API Reference website, and that is another point, the general purpose so I just sometimes if I need to edit a file and that isn't for example in my Workspace (like a .ini file for another thing) I just open it with VSCode and see what I need to see and edit what I need to edit, and I close it

Rhytham 01-29-2021 04:11

Re: [TUT] Compiling AMXX plugins with Notepad++
 
My cool server!!


All times are GMT -4. The time now is 02:42.

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