View Single Post
Author Message
VlaxSRB
Junior Member
Join Date: Feb 2013
Old 02-23-2013 , 07:24   Easy Offline Compiler
Reply With Quote #1

Good day!

Firstly, I must say that I like the idea how compiler works! Just one problem might occur when people don't have internet connection. I guess most of people don't really know how to use the offline compiler (probably it might be a bit confusing when it comes to compiling throughout the command prompt!). I know for myself, even if I know how to use command prompt, it is a bit boring to compile like that, so I have made a batch script that pretty much automates this, and decided to share it here. It is simple. All you gotta do is open it and type the name of the plugin you wish to compile and press enter, easy as it can be. Also you can type /all to compile all plugins located in the same folder. But, before this, you have to make sure that:

1)you have a compiler in your computer ("spcomp.exe" or w/e if you have renamed it)
2)you have configured the batch script (pretty much copy the spcomp.exe's path in it)

Okay, this might have been a bit spooky, but it really isn't! Let me explain all this in details.

After downloading it, extract it. You will get a "Compiler.bat" file. Before you start "configuring" it, find your spcomp.exe (it is within the sourcemod plugin, in "scripting" folder, it looks like: "<cstrike>\addons\sourcemod\scripting", eg: "C:\Program Files (x86)\Counter-Strike Source\cstrike\addons\sourcemod\scripting\"). When you find it, copy its path, so in above example, it would be:

C:\Program Files (x86)\Counter-Strike Source\cstrike\addons\sourcemod\scripting

(Don't copy the quotemarks of course). Head back to the batch file, right click on it, and press "Edit". You should be able to see 2 lines that look like this:

Set CompilerExePath="..."
Set CompilerExeName="spcomp"

Delete all that is between the first two quotemarks, then paste the path you have copied between them. Important: make sure you don't have a backslash ("\") at the end of the path (delete it if you have of course)! Leave "spcomp" as it is, change it only if you have renamed the "spcomp.exe"! Save the batch file and close the notepad. Open it, you should see "Plugin name=" wrote in green color. If you see that, you have configured it correctly. Otherwise, you will see red sign saying that compiler is not found (not configured correctly!).

So, in short words, all you have to do is put the spcomp.exe's path (location) between those two quotemarks. When you have done so, you are ready to use the file.

How to use:
!).sp file MUST be in the same folder where the batch file is!!!

1)Open the batch file
2)Type in the name of the script you want to compile (no need to put .sp at the end)

NOTE:Compiled plugins are in the "Compiled" folder!
NOTE:As said, typing /all will compile all plugins!

Have fun and good luck!
------------------------
VlaxSRB
Attached Files
File Type: zip Compiler.zip (808 Bytes, 136 views)

Last edited by VlaxSRB; 02-23-2013 at 07:25.
VlaxSRB is offline