Anri-chan/Source/builddir.bat

From SDA Knowledge Base

< Anri-chan‎ | Source
Revision as of 20:35, 9 July 2008 by Ballofsnow (Talk | contribs)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search
@ECHO OFF
SET basedir=C:\Program Files\anrichan3

IF EXIST install.txt DEL install.txt
IF EXIST uninstall.txt DEL uninstall.txt

SETLOCAL ENABLEDELAYEDEXPANSION
FOR /F "delims=" %%G IN ('DIR /B /A-D "%basedir%"') DO (
  ECHO   File "%basedir%\%%G" >> install.txt
)
FOR /F "delims=" %%G IN ('DIR /B /AD /S "%basedir%"') DO (
  SET str=%%G
  SET relativepath=!str:%basedir%\=!
  ECHO   SetOutPath "$INSTDIR\!relativepath!" >> install.txt
  FOR /F "delims=" %%H IN ('DIR /B /A-D "!str!"') DO (
    ECHO   File "!str!\%%H" >> install.txt
  )
)

FOR /F "delims=" %%G IN ('dir /B /A-D /S "%basedir%"') DO (
  SET str=%%G
  ECHO   Delete "$INSTDIR\!str:~27!" >> uninstall.txt
)
ENDLOCAL ENABLEDELAYEDEXPANSION
EXIT
Personal tools