Raised This Month: $7 Target: $400
 1% 

[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.

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. FAQ: Frequently Asked Questions
  8. Downloads

You can have tooltips with your function documentations:




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`



You can see the parameter by putting the mouse over the function name and waiting about 2 seconds:





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.

    Note: On the first time you open Sublime Text, you will may see a message like this:



    This is just showing up because Package Control just updated something,
    but needs Sublime Text to be restarted before finishing the updates.

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
Data.zip     ( 673.4 KB, 234 views) - v2.0.0 | 2018-07-24
Data.zip     ( 747.5 KB, 69  views) - v3.0.0 | 2018-12-21
Data.zip     ( 1.12  MB, 268 views) - v3.0.1 | 2020-04-26
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 (1.17 MB, 916 views)

Last edited by addons_zz; 06-06-2020 at 23:41. Reason: Release Version 3.0.2
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:
Preferences -> Package Settings -> AmxxEditor -> Edit AmxxEditor Autocompletion Settings
And setting the path to your compiler's include folder on the `include_directory` setting value.
Spoiler



FAQ: Frequently Asked Questions Go to top
  1. Quote:
    Originally Posted by iceeedr View Post
    Would you have an updated "how to"? I tried installing yesterday, however the application is totally different from the images, probably because of updates ...
    Sublime Text version changed and the new version as a very new theme, also, I updated the colors schemes used, them, the images became pretty different. But the text inside the images still the names, so you should be able to just ignore the colors/theme/fonts and just follow written the text.



  2. Quote:
    Originally Posted by CrazY. View Post
    Autocomplete doesn't work with "includes included into other includes".
    AmxxEditor syntax doesn't auto set in include files.
    I am not sure why this is happening, as by default that should be working.

    Anyways, you can force all files with `.inc` extension to open with the correct syntax:

    1. Opening a `.inc` file
    2. And going on the menu `View -> Syntax -> Open all with current extension as... -> Amxmodx -> AmxmodxPawn`
      Spoiler



  3. Quote:
    Originally Posted by DruGzOG View Post
    How would I go about opening inc files? Checking your first post, I don't have that option
    You can open any `.inc` file the same way you open a `.sma` file. If this is not recognized by your system, you can choose `Open with...` on and choose `sublime_text` as your default program: https://forum.sublimetext.com/t/cant-set-st3-as-default-app-win10-pro/29586



  4. Quote:
    Originally Posted by JocAnis View Post
    Did anyone accomplished auto-filling the new file (just like in Amxx studio), is it even possible?
    Yes.

    1. Just go to the menu `Tools -> Packages -> AmxxEditor -> New Plug-in`
      Spoiler

    2. Alternatively, you can go to the menu `Preferences -> Packages Settings -> AmxxEditor -> Install AmxxEditor Menu`
      Spoiler

    3. Then, you can use the menu `AmxxEditor -> New Plug-in`
      Spoiler
__________________
Plugin: Sublime Text - ITE , Galileo
Multi-Mod: Manager / Plugin / Server

Support me on Patreon, Ko-fi, Liberapay or Open Collective

Last edited by addons_zz; 05-03-2020 at 15:18.
addons_zz is offline
Depresie
Veteran Member
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
Veteran Member
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 - ITE , Galileo
Multi-Mod: Manager / Plugin / Server

Support me on Patreon, Ko-fi, Liberapay or Open Collective

Last edited by addons_zz; 02-06-2017 at 22:14.
addons_zz is offline
Depresie
Veteran Member
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 - ITE , Galileo
Multi-Mod: Manager / Plugin / Server

Support me on Patreon, Ko-fi, Liberapay or Open Collective

Last edited by addons_zz; 02-05-2017 at 10:45.
addons_zz is offline
Depresie
Veteran Member
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 - ITE , Galileo
Multi-Mod: Manager / Plugin / Server

Support me on Patreon, Ko-fi, Liberapay or Open Collective

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 03:03.


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