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

Compile to plugins directory.


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
rompom7
Senior Member
Join Date: May 2004
Old 06-12-2004 , 08:55   Compile to plugins directory.
Reply With Quote #1

I made this while I was bored. It compiles the plugins to the plugins directory, and dumps a text with all the compile errors. So you don't have to keep the command window open.

Code:
@echo off
:: AMX-X Compile batch to plugins folder
:: By James Romeril
:: This file comes with no warranty

if exist Latest_Compile_Summary.txt del Latest_Compile_Summary.txt
if exist temp.txt del temp.txt
if exist temp2.txt del temp2.txt
if exist Myfile.tmp del Myfile.tmp

echo ()=============================================================()
echo []Compiling, Please Wait...                                    []

for %%i in (*.sma) do sc %%i -o..\plugins\%%i>> Latest_Compile_Summary.txt

echo []Compiling finished. Copying files...                         []

Find /V "Small compiler 2.1.0		Copyright (c) 1997-2002, ITB CompuPhase" < Latest_Compile_Summary.txt > Myfile.tmp
Copy Myfile.tmp Latest_Compile_Summary.txt>>temp2.txt
if exist Myfile.tmp del Myfile.tmp>>temp2.txt

copy ..\plugins\*.sma ..\plugins\*.amx >> temp.txt
del ..\plugins\*.sma
::cls

echo []Copied and Compiled the following files: -                   []
echo ()=============================================================()
type temp.txt
del temp.txt
del temp2.txt
echo ()=============================================================()
echo []Please read Latest Compile Summary.txt for debug information.[]
echo ()=============================================================()
pause
__________________
Forgive your enimies, but never forget their name.
rompom7 is offline
Send a message via MSN to rompom7
devicenull
Veteran Member
Join Date: Mar 2004
Location: CT
Old 06-12-2004 , 12:23  
Reply With Quote #2

Wow...
too much code there
if you search, you will find my 2 lines that do that

Here, lemme get em
Code:
for %%i in (*.sma) do sc %%i -o..\plugins\%%i 
pause
__________________
Various bits of semi-useful code in a bunch of languages: http://code.devicenull.org/
devicenull is offline
]FUSION[ Gray Death
Member
Join Date: Mar 2004
Location: Hamburg / Germany
Old 06-12-2004 , 12:29  
Reply With Quote #3

Not really the same, and I think my P1 90MHz can handle ten more batch-lines.
]FUSION[ Gray Death is offline
devicenull
Veteran Member
Join Date: Mar 2004
Location: CT
Old 06-12-2004 , 14:02  
Reply With Quote #4

What are you talking about? The middle of his batch file:

for %%i in (*.sma) do sc %%i -o..\plugins\%%i>> Latest_Compile_Summary.txt

He then preforms various find, copy, and delete commands.. so I can't see how his is more cpu efficient..
__________________
Various bits of semi-useful code in a bunch of languages: http://code.devicenull.org/
devicenull is offline
Johnny got his gun
Veteran Member
Join Date: Jan 2004
Location: Tokyo
Old 06-12-2004 , 14:30  
Reply With Quote #5

Why not just put all the smas in plugin directory like I do, no need for moving anything.
Johnny got his gun is offline
rompom7
Senior Member
Join Date: May 2004
Old 06-12-2004 , 16:51  
Reply With Quote #6

Yeah thats a good idea jghg. I was helping a guy with some batch and it gave me this idea, so I thought I would write up a little batch.

Hey I know its not time critical code, but it works.
__________________
Forgive your enimies, but never forget their name.
rompom7 is offline
Send a message via MSN to rompom7
rompom7
Senior Member
Join Date: May 2004
Old 06-12-2004 , 16:53  
Reply With Quote #7

Quote:
Originally Posted by devicenull
Wow...
too much code there
if you search, you will find my 2 lines that do that

Here, lemme get em
Code:
for %%i in (*.sma) do sc %%i -o..\plugins\%%i 
pause
That wouldn't work. It would compile them, then move them to the plugins directory. BUT the amx files would still end with the extention .sma
__________________
Forgive your enimies, but never forget their name.
rompom7 is offline
Send a message via MSN to rompom7
IceMouse[WrG]
Senior Member
Join Date: Mar 2004
Old 06-12-2004 , 17:09  
Reply With Quote #8

No because isn't %%i created for *?
IceMouse[WrG] is offline
Send a message via AIM to IceMouse[WrG] Send a message via MSN to IceMouse[WrG] Send a message via Yahoo to IceMouse[WrG]
devicenull
Veteran Member
Join Date: Mar 2004
Location: CT
Old 06-12-2004 , 17:13  
Reply With Quote #9

Quote:
Originally Posted by rompom7
Quote:
Originally Posted by devicenull
Wow...
too much code there
if you search, you will find my 2 lines that do that

Here, lemme get em
Code:
for %%i in (*.sma) do sc %%i -o..\plugins\%%i 
pause
That wouldn't work. It would compile them, then move them to the plugins directory. BUT the amx files would still end with the extention .sma
I used that and outputed amx files
I just use a script that I added to my small editor now
__________________
Various bits of semi-useful code in a bunch of languages: http://code.devicenull.org/
devicenull is offline
QwertyAccess
Veteran Member
Join Date: Feb 2004
Location: Enjiru Layer
Old 06-12-2004 , 18:33  
Reply With Quote #10

the batch file you wrote looks like it has alot of unneeded things if you ask me.
__________________
QwertyAccess 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 03:10.


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