AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   General (https://forums.alliedmods.net/forumdisplay.php?f=58)
-   -   Easy Offline Compiler (https://forums.alliedmods.net/showthread.php?t=209244)

VlaxSRB 02-23-2013 07:24

Easy Offline Compiler
 
1 Attachment(s)
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

Jackmaster 02-23-2013 07:43

Re: Easy Offline Compiler
 
Or use Pawn Studio.

gruß

VlaxSRB 02-23-2013 07:47

Re: Easy Offline Compiler
 
True, but idk I like this because it is fast :P

rhelgeby 02-23-2013 08:42

Re: Easy Offline Compiler
 
Nice to see others with such ideas.

We use a complete offline environment bundled with tools and build scripts for our projects. Example: https://code.google.com/p/smprojectb...late-1.4.6.zip

We also have a Makefile that can be used on Linux and Mac.

VlaxSRB 02-23-2013 09:39

Re: Easy Offline Compiler
 
Yes well I have made this for "quick testing" plugins and figured that other people might be needing something similar. :)

YamiKaitou 02-23-2013 09:47

Re: Easy Offline Compiler
 
What's wrong with Drag&Drop?

TnTSCS 02-23-2013 09:52

Re: Easy Offline Compiler
 
nothing wrong with d&d... however, having this option is pretty cool too - has a log along with compiling :)

If you drag and drop an SP file into the .bat file, will it take it that way?

psychonic 02-23-2013 10:30

Re: Easy Offline Compiler
 
I just double click compile.exe. It just happily skips over anything that hasn't changed.

VlaxSRB 02-23-2013 10:56

Re: Easy Offline Compiler
 
Quote:

Originally Posted by YamiKaitou (Post 1900184)
What's wrong with Drag&Drop?

I agree with you, in beginning I was D&Ding too, but later I found it boring to open the same directory over and over again :)

VlaxSRB 02-23-2013 11:01

Re: Easy Offline Compiler
 
Quote:

Originally Posted by psychonic (Post 1900209)
I just double click compile.exe. It just happily skips over anything that hasn't changed.

Sure, but again, every time you have to navigate to the same directory. Think of this as a shortcut. I'm not saying that my way is better or anything, this is just faster if you don't want to think about where your compiler is located (for lazy dudes like me xD) :D


All times are GMT -4. The time now is 19:06.

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