[Scummvm-cvs-logs] SF.net SVN: scummvm:[54308] scummvm/trunk/dists

littleboy at users.sourceforge.net littleboy at users.sourceforge.net
Thu Nov 18 02:29:45 CET 2010


Revision: 54308
          http://scummvm.svn.sourceforge.net/scummvm/?rev=54308&view=rev
Author:   littleboy
Date:     2010-11-18 01:29:44 +0000 (Thu, 18 Nov 2010)

Log Message:
-----------
TOOLS: Update create_msvc batch files

 - Add support for /clean switch to remove all created files
 - Add switches for generating stable & all engines
 - Add command line help
 - Properly initialize answer variables to default choice

Modified Paths:
--------------
    scummvm/trunk/dists/msvc10/create_msvc10.bat
    scummvm/trunk/dists/msvc8/create_msvc8.bat
    scummvm/trunk/dists/msvc9/create_msvc9.bat

Modified: scummvm/trunk/dists/msvc10/create_msvc10.bat
===================================================================
--- scummvm/trunk/dists/msvc10/create_msvc10.bat	2010-11-17 21:49:19 UTC (rev 54307)
+++ scummvm/trunk/dists/msvc10/create_msvc10.bat	2010-11-18 01:29:44 UTC (rev 54308)
@@ -1,13 +1,39 @@
 @echo off
+
 echo.
 echo Automatic creation of the MSVC10 project files
 echo.
 
+if "%~1"=="/stable" goto stable
+if "%~1"=="/STABLE" goto stable
+if "%~1"=="/all"    goto all
+if "%~1"=="/ALL"    goto all
+if "%~1"=="/clean"  goto clean_check
+if "%~1"=="/CLEAN"  goto clean_check
+if "%~1"=="/help"   goto command_help
+if "%~1"=="/HELP"   goto command_help
+if "%~1"=="/?"      goto command_help
+
+if "%~1"==""        goto check_tool
+
+echo Invalid command parameter: %~1
+echo.
+
+:command_help
+echo Valid command parameters are:
+echo   stable   Generated stable engines project files
+echo   all      Generate all engines project files
+echo   clean    Clean generated project files
+echo   help     Show help message
+goto done
+
+:check_tool
 if not exist create_project.exe goto no_tool
 
 :question
 echo.
-set /p batchanswer="Enable (S)table engines only, or (A)ll engines? (S/A)"
+set batchanswer=S
+set /p batchanswer="Enable stable engines only, or all engines? (S/a)"
 if "%batchanswer%"=="s" goto stable
 if "%batchanswer%"=="S" goto stable
 if "%batchanswer%"=="a" goto all
@@ -21,14 +47,38 @@
 goto done
 
 :all
+echo.
 echo Creating project files with all engines enabled (stable and unstable)
+echo.
 create_project ..\.. --enable-all-engines --msvc --msvc-version 10
 goto done
 
 :stable
+echo.
 echo Creating normal project files, with only the stable engines enabled
+echo.
 create_project ..\.. --msvc --msvc-version 10
 goto done
 
+:clean_check
+echo.
+set cleananswer=N
+set /p cleananswer="This will remove all project files. Are you sure you want to continue? (N/y)"
+if "%cleananswer%"=="n" goto done
+if "%cleananswer%"=="N" goto done
+if "%cleananswer%"=="y" goto clean
+if "%cleananswer%"=="Y" goto clean
+goto clean_check
+
+:clean
+echo.
+echo Removing all project files
+del /Q *.vcxproj* > NUL 2>&1
+del /Q *.props > NUL 2>&1
+del /Q *.sln* > NUL 2>&1
+del /Q scummvm* > NUL 2>&1
+goto done
+
 :done
+echo.
 pause

Modified: scummvm/trunk/dists/msvc8/create_msvc8.bat
===================================================================
--- scummvm/trunk/dists/msvc8/create_msvc8.bat	2010-11-17 21:49:19 UTC (rev 54307)
+++ scummvm/trunk/dists/msvc8/create_msvc8.bat	2010-11-18 01:29:44 UTC (rev 54308)
@@ -1,13 +1,39 @@
 @echo off
+
 echo.
-echo Automatic creation of the MSVC8 project files
+echo Automatic creation of the MSVC9 project files
 echo.
 
+if "%~1"=="/stable" goto stable
+if "%~1"=="/STABLE" goto stable
+if "%~1"=="/all"    goto all
+if "%~1"=="/ALL"    goto all
+if "%~1"=="/clean"  goto clean_check
+if "%~1"=="/CLEAN"  goto clean_check
+if "%~1"=="/help"   goto command_help
+if "%~1"=="/HELP"   goto command_help
+if "%~1"=="/?"      goto command_help
+
+if "%~1"==""        goto check_tool
+
+echo Invalid command parameter: %~1
+echo.
+
+:command_help
+echo Valid command parameters are:
+echo   stable   Generated stable engines project files
+echo   all      Generate all engines project files
+echo   clean    Clean generated project files
+echo   help     Show help message
+goto done
+
+:check_tool
 if not exist create_project.exe goto no_tool
 
 :question
 echo.
-set /p batchanswer="Enable (S)table engines only, or (A)ll engines? (S/A)"
+set batchanswer=S
+set /p batchanswer="Enable stable engines only, or all engines? (S/a)"
 if "%batchanswer%"=="s" goto stable
 if "%batchanswer%"=="S" goto stable
 if "%batchanswer%"=="a" goto all
@@ -21,14 +47,38 @@
 goto done
 
 :all
+echo.
 echo Creating project files with all engines enabled (stable and unstable)
+echo.
 create_project ..\.. --enable-all-engines --msvc --msvc-version 8
 goto done
 
 :stable
+echo.
 echo Creating normal project files, with only the stable engines enabled
+echo.
 create_project ..\.. --msvc --msvc-version 8
 goto done
 
+:clean_check
+echo.
+set cleananswer=N
+set /p cleananswer="This will remove all project files. Are you sure you want to continue? (N/y)"
+if "%cleananswer%"=="n" goto done
+if "%cleananswer%"=="N" goto done
+if "%cleananswer%"=="y" goto clean
+if "%cleananswer%"=="Y" goto clean
+goto clean_check
+
+:clean
+echo.
+echo Removing all project files
+del /Q *.vcproj* > NUL 2>&1
+del /Q *.vsprops > NUL 2>&1
+del /Q *.sln* > NUL 2>&1
+del /Q scummvm* > NUL 2>&1
+goto done
+
 :done
+echo.
 pause

Modified: scummvm/trunk/dists/msvc9/create_msvc9.bat
===================================================================
--- scummvm/trunk/dists/msvc9/create_msvc9.bat	2010-11-17 21:49:19 UTC (rev 54307)
+++ scummvm/trunk/dists/msvc9/create_msvc9.bat	2010-11-18 01:29:44 UTC (rev 54308)
@@ -1,13 +1,39 @@
 @echo off
+
 echo.
 echo Automatic creation of the MSVC9 project files
 echo.
 
+if "%~1"=="/stable" goto stable
+if "%~1"=="/STABLE" goto stable
+if "%~1"=="/all"    goto all
+if "%~1"=="/ALL"    goto all
+if "%~1"=="/clean"  goto clean_check
+if "%~1"=="/CLEAN"  goto clean_check
+if "%~1"=="/help"   goto command_help
+if "%~1"=="/HELP"   goto command_help
+if "%~1"=="/?"      goto command_help
+
+if "%~1"==""        goto check_tool
+
+echo Invalid command parameter: %~1
+echo.
+
+:command_help
+echo Valid command parameters are:
+echo   stable   Generated stable engines project files
+echo   all      Generate all engines project files
+echo   clean    Clean generated project files
+echo   help     Show help message
+goto done
+
+:check_tool
 if not exist create_project.exe goto no_tool
 
 :question
 echo.
-set /p batchanswer="Enable (S)table engines only, or (A)ll engines? (S/A)"
+set batchanswer=S
+set /p batchanswer="Enable stable engines only, or all engines? (S/a)"
 if "%batchanswer%"=="s" goto stable
 if "%batchanswer%"=="S" goto stable
 if "%batchanswer%"=="a" goto all
@@ -21,14 +47,38 @@
 goto done
 
 :all
+echo.
 echo Creating project files with all engines enabled (stable and unstable)
+echo.
 create_project ..\.. --enable-all-engines --msvc --msvc-version 9
 goto done
 
 :stable
+echo.
 echo Creating normal project files, with only the stable engines enabled
+echo.
 create_project ..\.. --msvc --msvc-version 9
 goto done
 
+:clean_check
+echo.
+set cleananswer=N
+set /p cleananswer="This will remove all project files. Are you sure you want to continue? (N/y)"
+if "%cleananswer%"=="n" goto done
+if "%cleananswer%"=="N" goto done
+if "%cleananswer%"=="y" goto clean
+if "%cleananswer%"=="Y" goto clean
+goto clean_check
+
+:clean
+echo.
+echo Removing all project files
+del /Q *.vcproj* > NUL 2>&1
+del /Q *.vsprops > NUL 2>&1
+del /Q *.sln* > NUL 2>&1
+del /Q scummvm* > NUL 2>&1
+goto done
+
 :done
+echo.
 pause


This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.




More information about the Scummvm-git-logs mailing list