PDA

View Full Version : AutoCompiler Tool (*UPDATED*)


Podunk
09-15-2007, 16:52
Automatic compiler for Small Scripts
Specify the folder to watch, and any file changes will cause it to run the compiler on the file.I included the compiled binary for the daring :mrgreen:

To Compile:

Install VC# Express Edition (http://msdn2.microsoft.com/en-us/express/aa975050.aspx)
Download the archive
open the csproj file
click build
exe is output in the bin/release folder

Changelog:
sound toggle
compiler selectable
arguments option
compiler help
compiler no longer embedded

Podunk
09-16-2007, 11:29
changes:

now includes compiler embedded within the exe file
doesnt use batch files, uses the O/S directly
now remembers the watched path
settings file is saved in proper data path

I need comments!!!

THIS IS YOUR CHANCE TO CUSTOMIZE YOUR COMPILER, simply reply to this thread with your feature requests, and I'll do it asap!

YamiKaitou
09-16-2007, 14:16
In all honesty, I would rather stick to AmxX Studio/PawnStudio or Notepad and compiling manually. And, embedding the compiler may not be a good idea. What if someone is using a version that is different than the compiler you have enbedded, such as an old AmxModX version of the one from the SVN? Also, your link that you posted does not work in either Firefox nor IE. It displays an XML file both times

Podunk
09-16-2007, 19:44
such as an old AmxModX version of the one from the SVN?

This is true, but you can easily use any version you need by simply replacing the origonal compiler files in the project folder and then recompiling
Sample Output:

SMA Buddy Version 1.0.0
Copyright (c) 2007 [email protected]
SMA Buddy was origonally coded by Podunk/FoolyCooly

compiling C:\hlds test\cstrike\addons\amxmodx\scripting\ggl_bas e.sma
============================================= ===========================
Welcome to the AMX Mod X 1.76-300 Compiler.
Copyright (c) 1997-2006 ITB CompuPhase, AMX Mod X Team

Header size: 528 bytes
Code size: 3688 bytes
Data size: 2260 bytes
Stack/heap size: 16384 bytes; estimated max. usage=1227 cells (4908 bytes)
Total requirements: 22860 bytes
Done.

============================================= ===========================
amxxpc.exe time: 0.515625 seconds
Compile Process Succesful
Assembly File Moved toC:\hlds test\cstrike\addons\amxmodx\plugins\ggl_base. amxxTo be honest I think NP++ and this tool are my favorite tools right now

The latest source is attached below :)

Podunk
09-17-2007, 19:46
New version below :up:

Rolnaaba
09-17-2007, 22:38
I agree YamiKaitou, we always try to be backwards compatible, atleast 99% of us do. Also I like the freedom of manually compiling what i want when i want, if I am working on a project and save often it would start compiling that saved project when i KNOW it will compile wrong, because I am still working on it. I find this useless. also dont make people scroll to the last post to DL place on first post.

Podunk
09-18-2007, 08:26
I agree YamiKaitou, we always try to be backwards compatible, atleast 99% of us do. Also I like the freedom of manually compiling what i want when i want, if I am working on a project and save often it would start compiling that saved project when i KNOW it will compile wrong, because I am still working on it. I find this useless. also dont make people scroll to the last post to DL place on first post.


Well, different strokes for different folks :)

You can change the compiler version *easily* by simply replacing amxxpc.exe, and the 2 dll files in the project folder, and then recompiling :wink:

Actually I think your complaint can be turned into a feature request, but I don't have time to maintain 10 different versions of the compiler.

*sarcasm* I enjoy making people have to scroll down :mrgreen:

Actually I don't like leaving old versions up, and I like bumping my thread with new versions of sma buddy.

Rolnaaba
09-19-2007, 22:50
then post saying "[updated] added "x" feature and "y" thing-a-ma-bob." then leave file on main post.

Podunk
09-19-2007, 23:33
but then it wont bump :(

lol j/k I will for now on :)

YamiKaitou
09-21-2007, 19:18
Suggestion: Allow users to pick the location of their compiler. Cause, I have all of my plugins located in a different folder than my compiler is in. So, whenever I use this, it always fails compiling

Podunk
09-21-2007, 19:59
Thank you for the suggestion!

I will put this in asap!

Podunk
09-25-2007, 12:22
Suggestion: Allow users to pick the location of their compiler. Cause, I have all of my plugins located in a different folder than my compiler is in. So, whenever I use this, it always fails compiling

feature added, take a look please

YamiKaitou
09-25-2007, 12:48
Problem: It is compiling stuff that I don't even open. If I put my cursor over a sma file in the folder that I am watching, it will compile that file.

Another Problem:
I tested it using PawnStudio as my text editor (to lazy to open up notepad since this comp defaults sma's to PS). I used the same compiler for both programs. Here were the results.

PawnStudio:

Welcome to the AMX Mod X 1.76-300 Compiler.
Copyright (c) 1997-2006 ITB CompuPhase, AMX Mod X Team

Header size: 708 bytes
Code size: 4392 bytes
Data size: 2152 bytes
Stack/heap size: 16384 bytes; estimated max. usage=274 cells (1096 bytes)
Total requirements: 23636 bytes
Done.

Compilation Time: 1.80 sec

Your program:
SMA Buddy Version 1.0.0
Copyright (c) 2007 [email protected]
SMA Buddy was origonally coded by Podunk/FoolyCooly

compiler: F:\AMXX_Studio_1.4.3_final\amxmodx-1.76d\amxxpc.exe

arguments: "F:\Plugins\FFONEND.SMA" -i"F:\Plugins\include" -D"F:\Plugins"

============================================= ===========================
Welcome to the AMX Mod X 1.76-300 Compiler.
Copyright (c) 1997-2006 ITB CompuPhase, AMX Mod X Team

Header size: 708 bytes
Code size: 4392 bytes
Data size: 2152 bytes
Stack/heap size: 16384 bytes; estimated max. usage=274 cells (1096 bytes)
Total requirements: 23636 bytes
Done.

============================================= ===========================
amxxpc.exe time: 2.3905332 seconds
Compile Process Succesful
Could not find file 'F:\Plugins\FFONEND.amxx'.


Your plugin is using the incorrect -i parameter. My includes folder is in the same folder where my compiler is, as with most peoples. So, I don't think it should default to the location of the sma. The plugin name is not in all caps, so I don't see why your program is reading it that way. You are not defining the output location by default, the -o arg. Since you aren't telling it where to put the files, it is not creating them anywheres, thus making the program pointless.

So, here is the command lines that both of the programs are using, in case you want to know

PawnStudio:
amxxpc.exe "F:\Plugins\ffonend.sma" -o "F:\Plugins\ffonend.amxx"

Your Program:
amxxpc.exe "F:\Plugins\FFONEND.sma" -i"F:\Plugins\include" -D"F:\Plugins"

So, the PS command actually compiles the plugin using the includes folder that is in the same directory as the amxxpc.exe file, and then outputs the compiled code to the same folder the source code is in.

Your program compiles the plugin using an include folder that does not exist so it has to find where the true includes folder is (same directory as the amxxpc.exe) and then it does not output the compiled code to any folder.


If you need me to go into any more detail with this, just say so and I will see if I can

Podunk
09-25-2007, 17:01
Thanks for the feedback, and the research you've done :up:

I've been using this tool with the file structure within the download package from the AMXMODX homepage, and tailored it around that, hence the ./include folder and the moving the .amxx to ../plugins folder after compile.

What I didn't realize is people need the following additional options:

1: Specify include folder if neccesary
2: Move output file to folder X after compile


Also I didn't realize the -o argument is needed, and I'll factor that in now as well as those options.

Thanks for the help, and please check back to this thread in a bit :)