Raised This Month: $51 Target: $400
 12% 

Easy Offline Compiler


Post New Thread Reply   
 
Thread Tools Display Modes
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, 132 views)

Last edited by VlaxSRB; 02-23-2013 at 07:25.
VlaxSRB is offline
Jackmaster
SourceMod Donor
Join Date: May 2011
Old 02-23-2013 , 07:43   Re: Easy Offline Compiler
Reply With Quote #2

Or use Pawn Studio.

gruß
__________________

Minigames - the way forward
Visit our Minigame Server: 37.157.252.236:27015
Jackmaster is offline
VlaxSRB
Junior Member
Join Date: Feb 2013
Old 02-23-2013 , 07:47   Re: Easy Offline Compiler
Reply With Quote #3

True, but idk I like this because it is fast
VlaxSRB is offline
rhelgeby
Veteran Member
Join Date: Oct 2008
Location: 0x4E6F72776179
Old 02-23-2013 , 08:42   Re: Easy Offline Compiler
Reply With Quote #4

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.
__________________
Richard Helgeby

Zombie:Reloaded | PawnUnit | Object Library
(Please don't send private messages for support, they will be ignored. Use the forum.)

Last edited by rhelgeby; 02-23-2013 at 08:44.
rhelgeby is offline
Send a message via MSN to rhelgeby
VlaxSRB
Junior Member
Join Date: Feb 2013
Old 02-23-2013 , 09:39   Re: Easy Offline Compiler
Reply With Quote #5

Yes well I have made this for "quick testing" plugins and figured that other people might be needing something similar.
VlaxSRB is offline
YamiKaitou
Has a lovely bunch of coconuts
Join Date: Apr 2006
Location: Texas
Old 02-23-2013 , 09:47   Re: Easy Offline Compiler
Reply With Quote #6

What's wrong with Drag&Drop?
__________________
ProjectYami Laboratories

I do not browse the forums regularly anymore. If you need me for anything (asking questions or anything else), then PM me (be descriptive in your PM, message containing only a link to a thread will be ignored).
YamiKaitou is offline
TnTSCS
AlliedModders Donor
Join Date: Oct 2010
Location: Undisclosed...
Old 02-23-2013 , 09:52   Re: Easy Offline Compiler
Reply With Quote #7

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?
__________________
View my Plugins | Donate
TnTSCS is offline
psychonic

BAFFLED
Join Date: May 2008
Old 02-23-2013 , 10:30   Re: Easy Offline Compiler
Reply With Quote #8

I just double click compile.exe. It just happily skips over anything that hasn't changed.
psychonic is offline
VlaxSRB
Junior Member
Join Date: Feb 2013
Old 02-23-2013 , 10:56   Re: Easy Offline Compiler
Reply With Quote #9

Quote:
Originally Posted by YamiKaitou View Post
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

Last edited by VlaxSRB; 02-23-2013 at 10:58.
VlaxSRB is offline
VlaxSRB
Junior Member
Join Date: Feb 2013
Old 02-23-2013 , 11:01   Re: Easy Offline Compiler
Reply With Quote #10

Quote:
Originally Posted by psychonic View Post
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)
VlaxSRB is offline
Reply



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 09:42.


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