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

[TUT] Compiling AMXX plugins with Sublime Text


Post New Thread Reply   
 
Thread Tools Display Modes
addons_zz
Veteran Member
Join Date: Aug 2015
Location: Dreams, zz
Old 07-25-2018 , 02:12   Re: [TUT] Compiling AMXX plugins with Sublime Text
Reply With Quote #101

Released a new version:

v3.0.0 | 2018-07-24
* Renamed the package from `amxmodx` to `AmxxEditor`:
* Add command to create the `Amx Mod X`
* Fixed storage.type.vars.pawn being pushed into the stack when it should not
* Set the AmxxEditor.sh shell complaint with koalaman/shellcheck

If you had the older version installed, you do not need to do anything, as Package Control will update everything for you automatically.
__________________
Plugin: Sublime Text - ITE , Galileo
Multi-Mod: Manager / Plugin / Server

Support me on Patreon, Ko-fi, Liberapay or Open Collective
addons_zz is offline
OciXCrom
Veteran Member
Join Date: Oct 2013
Location: Macedonia
Old 07-25-2018 , 08:18   Re: [TUT] Compiling AMXX plugins with Sublime Text
Reply With Quote #102

Thanks. I found some more bugs though.

1. The "Install" and "Uninstall" buttons for the menu are greyed out for me. I configured all the given settings.
2. When there's an error in one of the include files used in the plugin, double-clicking on the error creates a new file with the include's name rather than taking you to the existing file.
__________________

Last edited by OciXCrom; 07-25-2018 at 08:19.
OciXCrom is offline
Send a message via Skype™ to OciXCrom
addons_zz
Veteran Member
Join Date: Aug 2015
Location: Dreams, zz
Old 07-25-2018 , 17:42   Re: [TUT] Compiling AMXX plugins with Sublime Text
Reply With Quote #103

  1. Can you close your Sublime Text,
  2. And open it again,
  3. And open the Sublime Text console, and wait until all packages finished loading
  4. Then post here the console contents?
__________________
Plugin: Sublime Text - ITE , Galileo
Multi-Mod: Manager / Plugin / Server

Support me on Patreon, Ko-fi, Liberapay or Open Collective
addons_zz is offline
OciXCrom
Veteran Member
Join Date: Oct 2013
Location: Macedonia
Old 07-26-2018 , 09:35   Re: [TUT] Compiling AMXX plugins with Sublime Text
Reply With Quote #104

1.

PHP Code:
DPI modesystem
DPI scale
1
startup
version3176 windows x64 channelstable
executable
: /C/Program Files/Sublime Text 3/sublime_text.exe
working dir
: /C/Program Files/Sublime Text 3
packages path
: /C/Users/OciXCrom/AppData/Roaming/Sublime Text 3/Packages
state path
: /C/Users/OciXCrom/AppData/Roaming/Sublime Text 3/Local
zip path
: /C/Program Files/Sublime Text 3/Packages
zip path
: /C/Users/OciXCrom/AppData/Roaming/Sublime Text 3/Installed Packages
ignored_packages
: ["Vintage"]
pre session restore time0.0723137
startup time
0.0923137
first paint time
0.0923137
reloading plugin 
Default.arithmetic
reloading plugin 
Default.auto_indent_tag
reloading plugin 
Default.block
reloading plugin 
Default.colors
reloading plugin 
Default.comment
reloading plugin 
Default.convert_color_scheme
reloading plugin 
Default.convert_syntax
reloading plugin 
Default.copy_path
reloading plugin 
Default.delete_word
reloading plugin 
Default.detect_indentation
reloading plugin 
Default.duplicate_line
reloading plugin 
Default.echo
reloading plugin Default.exec
reloading plugin 
Default.fold
reloading plugin 
Default.font
reloading plugin 
Default.goto_line
reloading plugin 
Default.history_list
reloading plugin 
Default.indentation
reloading plugin 
Default.install_package_control
reloading plugin 
Default.kill_ring
reloading plugin 
Default.mark
reloading plugin 
Default.new_templates
reloading plugin 
Default.open_context_url
reloading plugin 
Default.open_in_browser
reloading plugin 
Default.pane
reloading plugin 
Default.paragraph
reloading plugin 
Default.paste_from_history
reloading plugin 
Default.profile
reloading plugin 
Default.quick_panel
reloading plugin 
Default.rename
reloading plugin 
Default.run_syntax_tests
reloading plugin 
Default.save_on_focus_lost
reloading plugin 
Default.scroll
reloading plugin 
Default.set_unsaved_view_name
reloading plugin 
Default.settings
reloading plugin 
Default.show_scope_name
reloading plugin 
Default.side_bar
reloading plugin 
Default.sort
reloading plugin 
Default.swap_line
reloading plugin 
Default.switch_file
reloading plugin 
Default.symbol
reloading plugin 
Default.transform
reloading plugin 
Default.transpose
reloading plugin 
Default.trim_trailing_white_space
reloading plugin 
Default.ui
reloading plugin CSS
.css_completions
reloading plugin Diff
.diff
reloading plugin HTML
.encode_html_entities
reloading plugin HTML
.html_completions
reloading plugin ShellScript
.ShellScript
reloading plugin 0_package_control_loader.00
-package_control
reloading plugin Package Control.1_reloader
reloading plugin Package Control.2_bootstrap
reloading plugin Package Control
.Package Control
reloading plugin AmxxEditor
.AmxxEditor
reloading plugin AmxxEditor
.install_main_menu
Traceback 
(most recent call last):
  
File "C:\Program Files\Sublime Text 3\sublime_plugin.py"line 116in reload_plugin
    m 
importlib.import_module(modulename)
  
File "./python3.3/importlib/__init__.py"line 90in import_module
  File 
"<frozen importlib._bootstrap>"line 1584in _gcd_import
  File 
"<frozen importlib._bootstrap>"line 1565in _find_and_load
  File 
"<frozen importlib._bootstrap>"line 1532in _find_and_load_unlocked
  File 
"<frozen importlib._bootstrap>"line 584in _check_name_wrapper
  File 
"<frozen importlib._bootstrap>"line 1022in load_module
  File 
"<frozen importlib._bootstrap>"line 1003in load_module
  File 
"<frozen importlib._bootstrap>"line 560in module_for_loader_wrapper
  File 
"<frozen importlib._bootstrap>"line 868in _load_module
  File 
"<frozen importlib._bootstrap>"line 313in _call_with_frames_removed
  File 
"C:\Users\OciXCrom\AppData\Roaming\Sublime Text 3\Packages\AmxxEditor\install_main_menu.py"line 39in <module>
    
from debug_tools import getLogger
ImportError
No module named 'debug_tools'
plugins loaded
Unable to fetch update url contents
Package Control
Skipping automatic upgradelast run at 2018-07-26 14:53:45next run at 2018-07-26 15:53:45 or after 
It's still greyed out.

2. I mean when you compile a plugin and let's say there's an error in amxmisc.inc.



Then if you double-click the error, it creates a new file instead of taking you to the original amxmisc.inc.

__________________
OciXCrom is offline
Send a message via Skype™ to OciXCrom
CrazY.
Veteran Member
Join Date: May 2015
Location: SP, Brazil
Old 07-26-2018 , 11:28   Re: [TUT] Compiling AMXX plugins with Sublime Text
Reply With Quote #105

Autocomplete doesn't work with "includes included into other includes".

AmxxEditor syntax doesn't auto set in include files.

I tried to define a key binding through AmxxEditor.sublime-build to compile plugins, but sometimes this file is auto "restarted", that means, delete all my changes and keep it as an the original. then it compile through "variant linux" instead of "variant windows".

Code:
[
	{ "keys": ["f8"], "command": "build", "args": {"build_system": "Packages/AmxxEditor/AmxxEditor.sublime-build"} },
]
Code:
{
    "working_dir": "$file_path",
    "cmd": ["sh","$packages/User/AmxxEditor/AmxxEditor.sh","$file", "$file_base_name", "$packages", "$file_path"],

    // "target": "ansi_color_build",
    "syntax": "Packages/AmxxEditor/AmxxEditorConsole.sublime-syntax",

    "variants":
    [
        {
            "name": "Build Plugin with Windows/Bat",
            "cmd": ["$packages/User/AmxxEditor/AmxxEditor.bat","$file", "$file_base_name", "$packages", "$file_path"],
        },
    ],

    "selector": "source.AmxxEditor, source.AMXX, source.sma",
    "file_regex": "^.*[\\/\\\\]+(.+)\\(([0-9]+ ?.*)\\) : (.*)",
}
__________________









Last edited by CrazY.; 07-26-2018 at 11:35.
CrazY. is offline
addons_zz
Veteran Member
Join Date: Aug 2015
Location: Dreams, zz
Old 07-26-2018 , 13:12   Re: [TUT] Compiling AMXX plugins with Sublime Text
Reply With Quote #106

Quote:
Originally Posted by OciXCrom View Post
Thanks. I found some more bugs though.

1. The "Install" and "Uninstall" buttons for the menu are greyed out for me. I configured all the given settings.
2. When there's an error in one of the include files used in the plugin, double-clicking on the error creates a new file with the include's name rather than taking you to the existing file.
Thanks for the console info. I just fixed both issues. In a few hours package control should update your package.


Quote:
Originally Posted by CrazY. View Post
I tried to define a key binding through AmxxEditor.sublime-build to compile plugins, but sometimes this file is auto "restarted", that means, delete all my changes and keep it as an the original. then it compile through "variant linux" instead of "variant windows".
This is happening because when the package gets updated, it override your changes. Usually, you should not edit the files outside your `User` directory as when the package updates, your changes get lost. You do not need to override the package file AmxxEditor.sublime-build, you can just create a new one on your user directory. (May be you need to change the AmxxEditor.sublime-build name to something else, I am not sure).

But assuming your are using the AmxxChannel, not just the AmxxEditor, you can override the package original file just by creating the file AmxxEditor.sublime-build.hide on the directory `AmxxEditor` on your `Packages/User/OverrideUnpackedPackages` directory. If you are not using the AmxxChannel, you can manually install the package OverrideUnpackedPackages: Allow to override Sublime Text unpacked packages files when they update

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`

__________________
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; 07-26-2018 at 14:05.
addons_zz is offline
CrazY.
Veteran Member
Join Date: May 2015
Location: SP, Brazil
Old 07-26-2018 , 13:54   Re: [TUT] Compiling AMXX plugins with Sublime Text
Reply With Quote #107

Thanks, looks like it's all ok now.
__________________








CrazY. is offline
Old 07-27-2018, 09:21
CrazY.
This message has been deleted by CrazY.. Reason: nvm
CrazY.
Veteran Member
Join Date: May 2015
Location: SP, Brazil
Old 07-27-2018 , 10:54   Re: [TUT] Compiling AMXX plugins with Sublime Text
Reply With Quote #108

Code:
 File "C:\Users\Desktop\AppData\Roaming\Sublime Text 3\Packages\AmxxEditor\AmxxEditor.py", line 60, in <module>
    process_thread = ProcessQueueThread()
NameError: name 'ProcessQueueThread' is not defined
__________________








CrazY. is offline
addons_zz
Veteran Member
Join Date: Aug 2015
Location: Dreams, zz
Old 07-27-2018 , 12:24   Re: [TUT] Compiling AMXX plugins with Sublime Text
Reply With Quote #109

Thanks for the console log. I fixed it. In a few hours Package Control should update your package.
__________________
Plugin: Sublime Text - ITE , Galileo
Multi-Mod: Manager / Plugin / Server

Support me on Patreon, Ko-fi, Liberapay or Open Collective
addons_zz is offline
CrazY.
Veteran Member
Join Date: May 2015
Location: SP, Brazil
Old 07-27-2018 , 13:55   Re: [TUT] Compiling AMXX plugins with Sublime Text
Reply With Quote #110

Code:
14:50:53:004.882097 1.56e+00 - AmxxEditor.AmxxEditor.load_from_file:805 - (analyzer) Include File Not Found: VexdUM
Exception in thread Thread-2:
Traceback (most recent call last):
  File "./python3.3/threading.py", line 901, in _bootstrap_inner
  File "C:\Users\Desktop\AppData\Roaming\Sublime Text 3\Packages\AmxxEditor\AmxxEditor.py", line 761, in run
    self.process(file_name, view_buffer)
  File "C:\Users\Desktop\AppData\Roaming\Sublime Text 3\Packages\AmxxEditor\AmxxEditor.py", line 772, in process
    self.load_from_file(view_file_name, include, current_node, current_node, base_includes)
  File "C:\Users\Desktop\AppData\Roaming\Sublime Text 3\Packages\AmxxEditor\AmxxEditor.py", line 821, in load_from_file
    self.load_from_file(view_file_name, include, node, base_node, base_includes)
  File "C:\Users\Desktop\AppData\Roaming\Sublime Text 3\Packages\AmxxEditor\AmxxEditor.py", line 816, in load_from_file
    with open(file_name, 'r') as f :
FileNotFoundError: [Errno 2] No such file or directory: 'C:\\Counter-Strike 1.6\\cstrike\\addons\\amxmodx\\scripting\\include\\VexdUM.inc'
__________________








CrazY. 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 02:31.


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