Raised This Month: $100 Target: $400
 25% 

[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 , 15: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.

The distributed packages by the Data.zip or later downloaded by the AmxxChannel
installer, in addition to each one own license, are distributed under the following conditions for
its usage and installation:
Code:
ALL THE SOFTWARES, PACKAGES, PLUGINS, SETTINGS, DOCUMENTATION, EVERYTHING ELSE, ARE PROVIDED
"AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO
THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN
NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

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
Spoiler


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. If you do not like to see the message `This is an unregistered copy` every time you open Sublime Text, you need to buy a
    Sublime Text Licence for about $80 dollars.
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 Data.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
Packages.zip (  1.04 MB, 40 views) - v1.6.0 | 2017-10-25
License

The distributed packages by the Data.zip or later downloaded by the AmxxChannel
installer, in addition to each one own license, are distributed under the following conditions for
its usage and installation:
Code:
ALL THE SOFTWARES, PACKAGES, PLUGINS, SETTINGS, DOCUMENTATION, EVERYTHING ELSE, ARE PROVIDED
"AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO
THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN
NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
Attached Files
File Type: zip Data.zip (673.4 KB, 32 views)

Last edited by addons_zz; 10-25-2017 at 18:41. Reason: release version 2.0.0
addons_zz is offline
addons_zz
Veteran Member
Join Date: Aug 2015
Location: Dreams, zz
Old 01-30-2017 , 15: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; 10-25-2017 at 11:36.
addons_zz is offline
Depresie
Veteran Member
Join Date: Nov 2013
Old 02-03-2017 , 07: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
Veteran Member
Join Date: Nov 2013
Old 02-04-2017 , 19: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 , 20: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 , 20: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 23:14.
addons_zz is offline
Depresie
Veteran Member
Join Date: Nov 2013
Old 02-05-2017 , 09: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 , 11: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 11:45.
addons_zz is offline
Depresie
Veteran Member
Join Date: Nov 2013
Old 02-05-2017 , 13: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 13:07.
Depresie is offline
addons_zz
Veteran Member
Join Date: Aug 2015
Location: Dreams, zz
Old 02-05-2017 , 13: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 23: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 07:59.


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