2017-03-08 21:30:53 +00:00
|
|
|
@echo off
|
|
|
|
|
|
|
|
echo.
|
2019-04-16 01:49:08 +00:00
|
|
|
echo Automatic creation of the MSVC project files
|
2017-03-08 21:30:53 +00:00
|
|
|
echo.
|
|
|
|
|
|
|
|
if "%~1"=="/stable" goto stable
|
|
|
|
if "%~1"=="/STABLE" goto stable
|
|
|
|
if "%~1"=="/all" goto all
|
|
|
|
if "%~1"=="/ALL" goto all
|
|
|
|
if "%~1"=="/tools" goto tools
|
|
|
|
if "%~1"=="/TOOLS" goto tools
|
|
|
|
if "%~1"=="/tests" goto tests
|
|
|
|
if "%~1"=="/TESTS" goto tests
|
|
|
|
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:
|
2022-10-21 12:58:44 +00:00
|
|
|
echo /stable Generate stable engines project files
|
2022-10-18 10:38:46 +00:00
|
|
|
echo /all Generate all engines project files
|
|
|
|
echo /tools Generate project files for the devtools
|
|
|
|
echo /clean Clean generated project files
|
|
|
|
echo /help Show help message
|
2017-03-08 21:30:53 +00:00
|
|
|
goto done
|
|
|
|
|
|
|
|
:check_tool
|
|
|
|
if not exist create_project.exe goto no_tool
|
|
|
|
|
|
|
|
:question
|
|
|
|
echo.
|
|
|
|
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
|
|
|
|
if "%batchanswer%"=="A" goto all
|
|
|
|
goto question
|
|
|
|
|
|
|
|
:no_tool
|
|
|
|
echo create_project.exe not found in the current folder.
|
|
|
|
echo You need to build it first and copy it in this
|
|
|
|
echo folder
|
|
|
|
goto done
|
|
|
|
|
|
|
|
:all
|
|
|
|
echo.
|
|
|
|
echo Creating project files with all engines enabled (stable and unstable)
|
|
|
|
echo.
|
2021-03-31 22:32:57 +00:00
|
|
|
create_project ..\.. --enable-all-engines --use-canonical-lib-names --msvc
|
2017-03-08 21:30:53 +00:00
|
|
|
goto done
|
|
|
|
|
|
|
|
:stable
|
|
|
|
echo.
|
|
|
|
echo Creating normal project files, with only the stable engines enabled
|
|
|
|
echo.
|
2020-08-22 08:21:04 +00:00
|
|
|
create_project ..\.. --use-canonical-lib-names --msvc
|
2017-03-08 21:30:53 +00:00
|
|
|
goto done
|
|
|
|
|
|
|
|
:tools
|
|
|
|
echo.
|
|
|
|
echo Creating tools project files
|
|
|
|
echo.
|
2021-02-22 12:01:47 +00:00
|
|
|
create_project ..\.. --tools --use-canonical-lib-names --msvc
|
2017-03-08 21:30:53 +00:00
|
|
|
goto done
|
|
|
|
|
|
|
|
:tests
|
|
|
|
echo.
|
|
|
|
echo Creating tests project files
|
|
|
|
echo.
|
2021-02-22 12:01:47 +00:00
|
|
|
create_project ..\.. --tests --use-canonical-lib-names --msvc
|
2017-03-08 21:30:53 +00:00
|
|
|
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
|
2019-04-16 01:49:08 +00:00
|
|
|
del /Q *.vcproj* > NUL 2>&1
|
|
|
|
del /Q *.vsprops > NUL 2>&1
|
2017-03-08 21:30:53 +00:00
|
|
|
del /Q *.vcxproj* > NUL 2>&1
|
|
|
|
del /Q *.props > NUL 2>&1
|
|
|
|
del /Q *.sln* > NUL 2>&1
|
|
|
|
del /Q scummvm* > NUL 2>&1
|
|
|
|
del /Q devtools* > NUL 2>&1
|
|
|
|
del /Q test_runner.cpp > NUL 2>&1
|
|
|
|
goto done
|
|
|
|
|
|
|
|
:done
|
|
|
|
echo.
|
|
|
|
pause
|