Raised This Month: $89 Target: $400
 22% 

[TUT] Compiling AMXX plugins with Sublime Text


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
addons_zz
Veteran Member
Join Date: Aug 2015
Location: Dreams, zz
Old 01-30-2017 , 14:03   [TUT] Compiling AMXX plugins with Sublime Text
Reply With Quote #1

[TUT] Compiling AMXX plugins with Sublime Text

Quote:
Originally Posted by Depresie View Post
You should really consider making this simple IDE for PC since all we got now is the old bugged AMXX studio and other buggy / over developed IDEs full of crap when all there is needed is
Quote:
Open
Save
Compiler
Highlighting
Light + Dark skin
Output + Compiler path
Search + Replace
Disclaimer:

I did not wrote Sublime Text, or the several of its packages I providing on this setup.
Each package has its own README file stating its author, or at least should.
I just gathered them and put them all together, may be a few bug fixed if necessary
on some of them. See the change log for more details.


Contents' Table
  1. How to install?
  2. How to compile?
  3. The auto-completion
  4. Why Sublime Text?
  5. Change log
  6. What more you can do?
  7. Downloads

This is how the application looks like. Here I am using the commands:
  1. `Go To` by the keyboard bind `Ctrl+R`
  2. `Build` by the keyboard bind `F7`
  3. `Show Build` by the keyboard bind `F8`



There is also the commands:
  1. `Go To Line` by the keyboard bind `Ctrl+G`
  2. `Go To File` by the keyboard bind `Ctrl+P`
  3. `Command Palette` by the keyboard bind `Ctrl+Shift+P`




Change log Go to top
HTML Code:
v1.6.0 | 2017-09-26
 * Updated to Sublime Text 3 build 3143

v1.5.3 | 2017-09-10
 * Fixed specify include copy hanging with: a file name or directory name on the target.

v1.5.2 | 2017-09-08
 * Fixed the check for cyclic copies skip copying the include folder ending/blocking the compilation.

v1.5.1 | 2017-09-02
 * Fixed automatic update for the Amxx Pawn package.
 * Added automatic update for the amxmdox package.
 * Fixed the amxmdox package creating double new lines on the configuration files.

v1.5.0 | 2017-06-15
 * Added the package `Side-by-Side Settings`, just press `Ctrl+k` and `Ctrl+s` to view settings.
 * Updated the Amxx Pawn syntax files.
 * Updated the amxmodx package.
 * Updated the Notepad++ color scheme.
 * Allowed automatic update for the `Notepad++ Color Scheme` and `Amxx Pawn` packages.

v1.4.3 | 2017-01-17
 * Fixed functions redefinitions as: `#define message_begin xs__hook_message_begin` being recognized as constants.

v1.4.2 | 2017-01-15
 * Fixed pawn constants not being highlighted on the default syntax.

v1.4.1 | 2017-01-14
 * Updated the default Amxx Pawn sublime syntax.

v1.4.0 | 2017-01-12
 * Fixed misspelling blocking new includes from being processed.
 * Fixed compiler error when try to compile non saved files.
 * Fixed the some `#if defined` parsing forcing to skip all the source code after them.
 * Added support to define function parsing.

v1.3.0 | 2017-01-10
 * Fixed error message when compiling plugins on the default compiler's folder.
 * Fixed not recognizing all file functions when parsing comments and quotes in chars and strings.
 * Fixed the auto completion not working on non-saved files, i.e., you start writing a new sheet without saving it.
 * Added a new setting `word_autocomplete` to enable auto completing words from the current file.
 * Added a new setting `use_all_autocomplete` to use the package `All Autocomplete` to do the completing on the current file.
 * Added a new setting `function_autocomplete` to enable auto completing functions and global variables from the current file.

v1.2.1 | 2017-01-07
 * Fixed the `register_cvar` not being recognized at some cases on the AmxxPawn.sublime-syntax

v1.2.0 | 2017-01-06
 * Added new setting `add_function_parameters` to enable the parameters addition when autocompleting.

v1.1.1 | 2017-01-06
 * Moved the amxmodx settings to the user folder.

v1.1.0 | 2017-02-06
 * Added customs include folder detection and autocompletion.
 * Improved the Notepad++ Default Stylers Theme.

v1.0.0 | 2017-01-30
 * Initial release.


How to compile? Go to top
Spoiler


What more you can do? Go to top
Spoiler


Why Sublime Text? Go to top

Because you can customize anything: Key Bindings, Menus, Snippets, Macros, Completions and more, just about everything in Sublime Text is customizable.
  1. For a full featured Sublime Text, read: Versioned Sublime Text Settings
  2. The current version of Sublime Text Build 3126, is crashing on windows, that is why I give you the Build 3114.
  3. If you do not like to see the message `Update Available` every time you open Sublime Text, you need to buy a
    Sublime Text Licence for about $70 dollars. Or Update Sublime Text, but as I just said, currently update to version
    3126 is not good. May be on the next version the crashing is fixed and you can update.
See also:
  1. http://www.sublimetext.com/3
  2. https://www.sublimetext.com/buy
  3. https://packagecontrol.io/
  4. https://forum.sublimetext.com/
  5. https://github.com/SublimeTextIssues/Core/issues

Downloads Go to top

What do you need?
  1. Download Sublime Text:


  2. And the configuration files Packages.zip I created and attached on the `.zip` file at the end of this post, i.e., just below here:

Old Versions Downloads
Code:
Packages.zip (604.7  KB, 56 views) - v1.4.3 | 2017-01-17
Packages.zip (557.5  KB, 22 views) - v1.5.0 | 2017-06-15
Packages.zip (  1.04 MB, 17 views) - v1.5.3 | 2017-09-26
Attached Files
File Type: zip Packages.zip (1.04 MB, 40 views)

Last edited by addons_zz; 09-26-2017 at 18:57. Reason: release version 1.6.0
addons_zz is offline
addons_zz
Veteran Member
Join Date: Aug 2015
Location: Dreams, zz
Old 01-30-2017 , 14:04   Re: [TUT] How to setup a simple IDE to program/compile AMXX plugins
Reply With Quote #2

How to install? Go to top
Spoiler


The auto-completion by [Destro], Go to top

To use the auto-completion you need to configure your include folder going on the menu:
Code:
Amx Mod X -> Edit AMXX-Autocompletion Settings
And setting the path to your compiler's include folder on the `include_directory` setting value.


__________________
Plugin: Sublime Text Studio , Galileo
Multi-Mod: Manager / Plugin / Server

Help the AlliedModders' website stay online!

Last edited by addons_zz; 04-09-2017 at 10:09.
addons_zz is offline
Depresie
AlliedModders Donor
Join Date: Nov 2013
Old 02-03-2017 , 06:45   Re: [TUT] How to setup a simple IDE to program/compile AMXX plugins (with Sublime Tex
Reply With Quote #3

Thanks for the tutorial, i will try it as soon as i get the chance
__________________
Depresie is offline
Depresie
AlliedModders Donor
Join Date: Nov 2013
Old 02-04-2017 , 18:41   Re: [TUT] How to setup a simple IDE to program/compile AMXX plugins (with Sublime Tex
Reply With Quote #4

Ahm, custom includes support ? =\
__________________
Depresie is offline
fysiks
Veteran Member
Join Date: Sep 2007
Location: Flatland, USA
Old 02-04-2017 , 19:44   Re: [TUT] How to setup a simple IDE to program/compile AMXX plugins (with Sublime Tex
Reply With Quote #5

Quote:
Originally Posted by Depresie View Post
Ahm, custom includes support ? =\
Put the custom files in the include folder?
__________________
fysiks is offline
addons_zz
Veteran Member
Join Date: Aug 2015
Location: Dreams, zz
Old 02-04-2017 , 19:55   Re: [TUT] How to setup a simple IDE to program/compile AMXX plugins (with Sublime Tex
Reply With Quote #6

I am not searching for a include folder where the plugin is, and coping it to the folder of your compiler's include folder is.
For now you can manually copy them to yours compiler's folder.

Does it is really necessary?
I can include it on the compilation script later.

Update:

The load seems to be automatic just using the compiler parameter -I/plugin/include/folder
I tested and it works. Latter I will release a update with. Are there some other things you want to include?
__________________
Plugin: Sublime Text Studio , Galileo
Multi-Mod: Manager / Plugin / Server

Help the AlliedModders' website stay online!

Last edited by addons_zz; 02-06-2017 at 22:14.
addons_zz is offline
Depresie
AlliedModders Donor
Join Date: Nov 2013
Old 02-05-2017 , 08:59   Re: [TUT] How to setup a simple IDE to program/compile AMXX plugins (with Sublime Tex
Reply With Quote #7

I dont understand what you mean...

The include folder is located in the same folder with the compiler...
Funny tho, it doesn't read from my custom incs, but for some reason it has zombie plague natives, wth
__________________
Depresie is offline
addons_zz
Veteran Member
Join Date: Aug 2015
Location: Dreams, zz
Old 02-05-2017 , 10:41   Re: [TUT] How to setup a simple IDE to program/compile AMXX plugins (with Sublime Tex
Reply With Quote #8

Quote:
Originally Posted by Depresie View Post
I dont understand what you mean...
Usually there are two include folders, the first one is the compiler's one.
Code:
D:/
└── Game
    └── cstrike
        └── addons
            └─── amxmodx
                 └─── scripting
                      └─── amxxpc.exe
                           ├── compiler.exe
                           └── include
                               └── compiler_defeault.inc
The second one could exists or not. If there is one, it would be:
Code:
C:/
└── User
    └── Downloads
        ├── zp_plague_5.sma
        └── include
            └── zp_includes.inc
So, if we run the compiler with the parameter `-I` pointing to the `zp_plague_5.sma` special include folder,
we do not need to copy the include files to the compiler's default include folder. Example:
Code:
D:/Game/cstrike/addons/amxmodx/scripting/amxxpc.exe -I"C:/User/Downloads/include" "C:/User/Downloads/include/zp_plague_5.sma"
You do not need to copy the includes on `C:/User/Downloads/include` to the folder `D:/Game/cstrike/addons/amxmodx/scripting/include`.
__________________
Plugin: Sublime Text Studio , Galileo
Multi-Mod: Manager / Plugin / Server

Help the AlliedModders' website stay online!

Last edited by addons_zz; 02-05-2017 at 10:45.
addons_zz is offline
Depresie
AlliedModders Donor
Join Date: Nov 2013
Old 02-05-2017 , 12:04   Re: [TUT] How to setup a simple IDE to program/compile AMXX plugins (with Sublime Tex
Reply With Quote #9

Well, for me it seems to read only from the Download folder include..
How do i set it to read and read only includes from the compiler's folder ?

It also auto completes for all the includes even tho they are not defined in the actual script =/
__________________

Last edited by Depresie; 02-05-2017 at 12:07.
Depresie is offline
addons_zz
Veteran Member
Join Date: Aug 2015
Location: Dreams, zz
Old 02-05-2017 , 12:59   Re: [TUT] How to setup a simple IDE to program/compile AMXX plugins (with Sublime Tex
Reply With Quote #10

Quote:
Originally Posted by Depresie View Post
Well, for me it seems to read only from the Download folder include..
How do i set it to read and read only includes from the compiler's folder ?
If it was not reading from the compiler folder you would get error like:
Code:
fatal error 100: cannot read from file: "amxmodx"
fatal error 100: cannot read from file: "amxmisc"
fatal error 100: cannot read from file: "fun"
The `-I` parameter is an addition only. Will not remove the include folder never. It will only increase the folders it is able to find includes. The command line can be like this:
Code:
D:/Game/cstrike/addons/amxmodx/scripting/amxxpc.exe -I"C:/User/Downloads/include/" -I"F:/AMXX/include/" -I"D:/User/Downloads/include/" "C:/User/Downloads/include/zp_plague_5.sma"
Assuming your compiler is on `D:/Game/cstrike/addons/amxmodx/scripting/`, doing the include:
Code:
D:/Game/cstrike/addons/amxmodx/scripting/amxxpc.exe -I"D:/Game/cstrike/addons/amxmodx/scripting/include/" -I"C:/User/Downloads/include/" -I"F:/AMXX/include/" -I"D:/User/Downloads/include/" "C:/User/Downloads/include/zp_plague_5.sma"
Would be redundant to include the folder `D:/Game/cstrike/addons/amxmodx/scripting/include/`, as it is added by default, if it exists.

Quote:
Originally Posted by Depresie View Post
It also auto completes for all the includes even tho they are not defined in the actual script =/
The auto completion comes from a standard file with all auto completes.
To do auto completion based on the included files, I need to parse the plugin file, detect which includes it uses, and parse the include folder to get their definitions.

I will see if I can get it working here.
__________________
Plugin: Sublime Text Studio , Galileo
Multi-Mod: Manager / Plugin / Server

Help the AlliedModders' website stay online!

Last edited by addons_zz; 02-06-2017 at 22:17.
addons_zz is offline
Reply


Thread Tools
Display Modes

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 10:13.


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