build5-2010.bat: simplify script

* This is a script for MSVC2010 so assume this is used
* Fix a typo
* Load the MSVC build environment
This commit is contained in:
Uwe Stöhr 2016-01-28 00:07:43 +01:00
parent 4a8a2ef9a8
commit deb8e48efa

View File

@ -2,11 +2,9 @@ echo off
echo -------------------------------------------------------------------------------------
echo -
echo Usage build.bat devel/install/deploy STUDIO(optional)
echo Usage build.bat devel/install
echo devel - Builds Visual Studio project files for development on LyX
echo install - Builds Visual Studio project files with all enabled for installation
echo STUDIO - Used Visual Studio version, default is "Visual Studio 10"
echo use "Visual Studio 9 2008" for Visual Studio 9
echo
echo -------------------------------------------------------------------------------------
echo -
@ -67,29 +65,25 @@ if not exist %LYX_BUILD% (
)
)
REM MSVC 2010 tools
call "C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\vcvarsall.bat" x86
cd "%LYX_BUILD%"
REM start with a new cmake run
::del CMakeCache.txt
if [%2]==[] (
set USED_STUDIO="Visual Studio 10"
) else (
set USED_STUDIO=%2%
)
if "%1%" == "devel" (
REM Build solution to develop LyX
REM you can add the option "-GNinja" for a faster compilation
cmake %LYX_SOURCE% -GNinja -G%USED_STUDIO% -DLYX_USE_QT=QT5 -DLYX_ENABLE_EXPORT_TESTS=ON -DLYX_MERGE_FILES=0 -DLYX_NLS=1 -DLYX_INSTALL=0 -DLYX_RELEASE=0 -DLYX_CONSOLE=FORCE -LYX_3RDPARTY_BUILD=1 %DEPENDENCIES_DOWNLOAD%
cmake %LYX_SOURCE% -GNinja -G"Visual Studio 10" -DLYX_USE_QT=QT5 -DLYX_ENABLE_EXPORT_TESTS=1 -DLYX_MERGE_FILES=0 -DLYX_NLS=1 -DLYX_INSTALL=0 -DLYX_RELEASE=0 -DLYX_CONSOLE=FORCE -DLYX_3RDPARTY_BUILD=1 %DEPENDENCIES_DOWNLOAD%
msbuild lyx.sln /p:Configuration=Debug /t:LyX /t:tex2lyx
)
if "%1%" == "install" (
REM Build solution to develop LyX
REM set -DLYX_MERGE_REBUILD and -DLYX_MERGE_FILES to 1 for a version released with an installer
cmake %LYX_SOURCE% -GNinja -G%USED_STUDIO% -DLYX_USE_QT=QT5 -DLYX_MERGE_FILES=1 -DLYX_NLS=1 -DLYX_INSTALL=1 -DLYX_RELEASE=1 -DLYX_CONSOLE=OFF %DEPENDENCIES_DOWNLOAD%
cmake %LYX_SOURCE% -GNinja -G"Visual Studio 10" -DLYX_USE_QT=QT5 -DLYX_MERGE_FILES=1 -DLYX_NLS=1 -DLYX_INSTALL=1 -DLYX_RELEASE=1 -DLYX_CONSOLE=OFF %DEPENDENCIES_DOWNLOAD%
msbuild lyx.sln /p:Configuration=Release /t:ALL_BUILD
msbuild INSTALL.vcxproj /p:Configuration=Release
)