MAMEWorld >> Programming
Previous thread Previous  View all threads Index   Next thread Next   Flat Mode Flat  

lharms
MAME Fan
Reged: 01/07/06
Posts: 908
Send PM
Re: Command line scripting
03/28/10 09:07 AM


>
> C:\~~\TortoiseProc.exe /command:update /path\Source\src /closeonend:1
> makeexe32.bat
> cd D:\
REM At this spot you want to run something else
CodeExtract.exe
REM this gets the return error code, in C it is the last thing you spit back out just as you exit main.
REM this puts the error code returned into a command shell variable
SET CODE = %ERRORLEVEL%
> ren program.exe %CODE%.exe
> cd D:\Old
> md %CODE%
> move D:\*.exe D:\Old\%CODE%\ (code syntax wrong?)
> move D:\Source\program.exe D:\ (code syntax wrong?)
> exit
>
>
> Any help? Would making a VBasic program be better? If so what code?

vbasic would work but probably overkill? Just depends.

On a command prompt do 'help set' to see how to mess around with command script vars. At one point I had all sorts of crazy scripts to build and do things. These days I do it in python or C. You eventually get to the point you need functions and batch files just dont cut it. I may have the '%' bits wrong up above. As sometimes you need to do %%ERRORLEVEL%% inside of command files. So you will have to mess around with it a bit. I am doing this off the top of my head (its been a long time) so you will have to mess with it.

I assume you are trying to create some sort of sub directory that contains the version number. You may also while you are building actually have it just go ahead and create the directory. I have done that in the past too as the program that is doing the compiling usually knows the version number anyway...







Entire thread
Subject Posted by Posted on
* Command line scripting Naoki 03/24/10 10:34 PM
. * Re: Command line scripting lharms  03/28/10 09:07 AM
. * Re: Command line scripting Naoki  03/28/10 02:36 PM
. * Re: Command line scripting lharms  03/28/10 05:32 PM
. * Re: Command line scripting Naoki  03/28/10 06:15 PM
. * Re: Command line scripting keshbach1  03/27/10 12:00 AM

Extra information Permissions
Moderator:  Pi 
0 registered and 5 anonymous users are browsing this forum.
You cannot start new topics
You cannot reply to topics
HTML is enabled
UBBCode is enabled
Thread views: 3683