GLBasic forum

Codesnippets => Macros => Topic started by: Kitty Hello on 2010-Jan-04

Title: Macro: Update bin file on Wiz SD card
Post by: Kitty Hello on 2010-Jan-04
This macro overwrites the gp2xwiz.prg program file for this project on an inserted SD card (any drive letter).

Code: (glbasic) [Select]
:: Update WIZ program on the SD card if it exists
@ECHO OFF

IF "%GLB_PROJ_NAME%" == "" EXIT

CLS
FOR %%a IN (d e f g h i j k l m n o p q) DO (
IF EXIST "%%a:\game\%GLB_PROJ_NAME%.app.ini" (
IF EXIST "%%a:\game\%GLB_PROJ_NAME%.app\gp2xwiz.prg" (
ECHO Updating WIZ binary on %%a:
COPY /Y "%GLB_PROJ_PATH%\%GLB_PROJ_NAME%.app\gp2xwiz.prg" "%%a:\game\%GLB_PROJ_NAME%.app\gp2xwiz.prg"
PAUSE
GOTO:EOF
)
)
)


CLS
ECHO NO FILE "/game/%GLB_PROJ_NAME%.app.ini" ON SD-CARD FOUND!
PAUSE
Title: Re: Macro: Update bin file on Wiz SD card
Post by: Schranz0r on 2010-Jan-04
 :enc:

Ohhhhhhh MACROOOOOO :)
Nice one  :booze: