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

[tweak] Compile plugins by double click


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Dragokas
Veteran Member
Join Date: Nov 2017
Location: Ukraine on fire
Old 10-25-2018 , 00:09   [tweak] Compile plugins by double click
Reply With Quote #1

Purpose:

This allows you to compile .sp files by double click, offline.

Installation:
1. Download stand-alone (offline) compiler and unpack it to convenient folder, like "d:\dev\SourceMod" where it'll be untoched.
2. Unpack archive, attached below.
3. Right click on file "SP_Assoc.cmd" => choose "Edit", set correct path to spcomp.exe in this line:
Code:
set SPCompPath=d:\dev\SourceMod\addons\sourcemod\scripting\spcomp.exe
an save.
4. Right click on file "SP_Assoc.cmd" => choose "Run as Administrator".

My batch file will install for you required registry entries. Now, you are fine.

How to use:
Just double click on .sp file.
Console window will appear for ~2 sec if compilation is success. You'll have enough time to read "warnings".
If compilation is failed, console window will be set in pause.

P.S. Also, see notice:
- in post #3 about Notepad++ / Akelpad integration.
- in post #10 about Sublime Text integration.
Attached Files
File Type: zip SP_Assoc.zip (503 Bytes, 233 views)
__________________
Expert of CMD/VBS/VB6. Malware analyst. L4D fun (Bloody Witch & FreeZone)
[My plugins] [My tools] [GitHub] [Articles] [HiJackThis+] [Donate]

Last edited by Dragokas; 04-25-2022 at 11:43. Reason: added notice about Sublime
Dragokas is offline
Lubricant Jam
AlliedModders Donor
Join Date: Oct 2016
Location: United Kingdom
Old 10-25-2018 , 05:45   Re: [tweak] Compile plugins by double click
Reply With Quote #2

Seems very useful, thanks!
Lubricant Jam is offline
Dragokas
Veteran Member
Join Date: Nov 2017
Location: Ukraine on fire
Old 10-25-2018 , 09:08   Re: [tweak] Compile plugins by double click
Reply With Quote #3

You are welcome.

Using above tweak you can also compile plugins directly from AkelPad or Notepad++ editor.
That requires a little adjustment:

For AkelPad:

Main menu -> Options -> Settings -> General -> Execute ->

"Command" field, enter:
Code:
rundll32.exe shell32,ShellExec_RunDLL "%f"
"Working direcory" field, enter:
Code:
%d
Now, you can run compilation on Ctrl + F5 hotkey from AkelPad.


For Notepad++:

Press F5, enter in field:
Code:
rundll32.exe shell32,ShellExec_RunDLL "$(FULL_CURRENT_PATH)"
Press save, select convenient hotkey, e.g. Ctrl + F5, press OK. Close.

Now, you can run compilation on Ctrl + F5 hotkey from N++.
__________________
Expert of CMD/VBS/VB6. Malware analyst. L4D fun (Bloody Witch & FreeZone)
[My plugins] [My tools] [GitHub] [Articles] [HiJackThis+] [Donate]
Dragokas is offline
Lubricant Jam
AlliedModders Donor
Join Date: Oct 2016
Location: United Kingdom
Old 10-29-2018 , 05:55   Re: [tweak] Compile plugins by double click
Reply With Quote #4

Quote:
Originally Posted by Dragokas View Post
You are welcome.

Using above tweak you can also compile plugins directly from AkelPad or Notepad++ editor.
That requires a little adjustment:

For AkelPad:

Main menu -> Options -> Settings -> General -> Execute ->

"Command" field, enter:
Code:
rundll32.exe shell32,ShellExec_RunDLL "%f"
"Working direcory" field, enter:
Code:
%d
Now, you can run compilation on Ctrl + F5 hotkey from AkelPad.


For Notepad++:

Press F5, enter in field:
Code:
rundll32.exe shell32,ShellExec_RunDLL "$(FULL_CURRENT_PATH)"
Press save, select convenient hotkey, e.g. Ctrl + F5, press OK. Close.

Now, you can run compilation on Ctrl + F5 hotkey from N++.
If you could get it to work with Visual Studio Code, that'd be perfect.
Lubricant Jam is offline
Dragokas
Veteran Member
Join Date: Nov 2017
Location: Ukraine on fire
Old 10-29-2018 , 08:21   Re: [tweak] Compile plugins by double click
Reply With Quote #5

Quote:
Originally Posted by Lubricant Jam View Post
If you could get it to work with Visual Studio Code, that'd be perfect.
lol. MSVS is too slow donkey for such simple tasks.

N++ + Autocompletion/highlight + hotkey compilation + ftp uploader + autoreload + good theme => you are in chocolate

P.S. Or you mean compile C++ in N++ ?
__________________
Expert of CMD/VBS/VB6. Malware analyst. L4D fun (Bloody Witch & FreeZone)
[My plugins] [My tools] [GitHub] [Articles] [HiJackThis+] [Donate]

Last edited by Dragokas; 10-29-2018 at 08:22.
Dragokas is offline
Lubricant Jam
AlliedModders Donor
Join Date: Oct 2016
Location: United Kingdom
Old 10-29-2018 , 09:49   Re: [tweak] Compile plugins by double click
Reply With Quote #6

Quote:
Originally Posted by Dragokas View Post
lol. MSVS is too slow donkey for such simple tasks.

N++ + Autocompletion/highlight + hotkey compilation + ftp uploader + autoreload + good theme => you are in chocolate

P.S. Or you mean compile C++ in N++ ?
Nah, on about Visual Studio Code. I don't see no performance issues, probably because my PC is overkill xD
Lubricant Jam is offline
Dragokas
Veteran Member
Join Date: Nov 2017
Location: Ukraine on fire
Old 12-14-2018 , 14:21   Re: [tweak] Compile plugins by double click
Reply With Quote #7

Updated archive in 1st post to set current directory (required by Notepad++).
__________________
Expert of CMD/VBS/VB6. Malware analyst. L4D fun (Bloody Witch & FreeZone)
[My plugins] [My tools] [GitHub] [Articles] [HiJackThis+] [Donate]
Dragokas is offline
SteveSmith10
New Member
Join Date: Jan 2019
Old 01-15-2019 , 04:15   Re: [tweak] Compile plugins by double click
Reply With Quote #8

Windows Drag and Drop. Drag the .sma file onto "compile.exe". Look in the compiled folder for the output .amxx file. Compiling All Plugins. Double click compile.exe to compile all plugins into the compiled folder.For More Details..
__________________
SteveSmith10 is offline
Dragokas
Veteran Member
Join Date: Nov 2017
Location: Ukraine on fire
Old 01-15-2019 , 06:50   Re: [tweak] Compile plugins by double click
Reply With Quote #9

SteveSmith10, what is a goal of your post?
Are you asking about adding amx plugins support to double-click tweak?
__________________
Expert of CMD/VBS/VB6. Malware analyst. L4D fun (Bloody Witch & FreeZone)
[My plugins] [My tools] [GitHub] [Articles] [HiJackThis+] [Donate]
Dragokas is offline
404UserNotFound
BANNED
Join Date: Dec 2011
Old 01-30-2019 , 13:52   Re: [tweak] Compile plugins by double click
Reply With Quote #10

Any chance of a Sublime Text 3 compiler?

Also thanks for the double-click compile thing. I'm gonna spread this around as this is really useful.
404UserNotFound 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 22:38.


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