AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Snippets and Tutorials (https://forums.alliedmods.net/forumdisplay.php?f=112)
-   -   [tweak] Compile plugins by double click (https://forums.alliedmods.net/showthread.php?t=311594)

Dragokas 10-25-2018 00:09

[tweak] Compile plugins by double click
 
1 Attachment(s)
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.

Lubricant Jam 10-25-2018 05:45

Re: [tweak] Compile plugins by double click
 
Seems very useful, thanks!

Dragokas 10-25-2018 09:08

Re: [tweak] Compile plugins by double click
 
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++.

Lubricant Jam 10-29-2018 05:55

Re: [tweak] Compile plugins by double click
 
Quote:

Originally Posted by Dragokas (Post 2621231)
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.

Dragokas 10-29-2018 08:21

Re: [tweak] Compile plugins by double click
 
Quote:

Originally Posted by Lubricant Jam (Post 2621742)
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++ ?

Lubricant Jam 10-29-2018 09:49

Re: [tweak] Compile plugins by double click
 
Quote:

Originally Posted by Dragokas (Post 2621757)
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

Dragokas 12-14-2018 14:21

Re: [tweak] Compile plugins by double click
 
Updated archive in 1st post to set current directory (required by Notepad++).

SteveSmith10 01-15-2019 04:15

Re: [tweak] Compile plugins by double click
 
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..

Dragokas 01-15-2019 06:50

Re: [tweak] Compile plugins by double click
 
SteveSmith10, what is a goal of your post?
Are you asking about adding amx plugins support to double-click tweak?

404UserNotFound 01-30-2019 13:52

Re: [tweak] Compile plugins by double click
 
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.


All times are GMT -4. The time now is 00:51.

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