3 echo -------------------------------------------------------------------------------------
5 echo Usage build.bat devel/install/deploy STUDIO(optional)
6 echo devel - Builds Visual Studio project files for development on LyX
7 echo install - Builds Visual Studio project files with all enabled for installation
8 echo STUDIO - Used Visual Studio version, default is "Visual Studio 10"
9 echo use "Visual Studio 9 2008" for Visual Studio 9
11 echo -------------------------------------------------------------------------------------
13 echo Call this script from a build directory or set variables (or edit this file)
17 echo Be sure you've set qmake in PATH.
19 echo GNUWin32 will be downloaded if you don't set the variable GNUWIN32_DIR
20 echo -------------------------------------------------------------------------------------
25 echo ERROR: no options.
30 REM Uncomment the following line if you want to compile in parallel.
31 REM This uses N cl.exe processes, where N is the number of cores.
37 REM Add path to qmake here or set PATH correctly on your system.
38 set PATH=C:\Qt\Qt5-5-1-2013-32bit\5.5\msvc2013\bin;%PATH%
40 REM Edit pathes here or set the environment variables on you system.
41 set GNUWIN32_DIR=D:\LyXGit\Master\lyx-windows-deps-msvc2013
42 set LYX_SOURCE=D:\LyXGit\Master\
43 set LYX_BUILD=D:\LyXGit\Master\compile-2013
45 if [%LYX_SOURCE%]==[] (
46 set LYX_SOURCE=%~DP0\..\..
48 echo LyX source: "%LYX_SOURCE%"
50 if [%LYX_BUILD%]==[] (
53 echo LyX build : "%LYX_BUILD%"
55 if [%GNUWIN32_DIR%]==[] (
56 echo GNUWIN32_DIR not set.
57 echo Downloading win32 deps.
58 set DEPENDENCIES_DOWNLOAD="-DLYX_DEPENDENCIES_DOWNLOAD=1"
59 ) else set PATH="%GNUWIN32_DIR%\bin";%PATH%
61 if not exist %LYX_BUILD% (
62 echo creating "%LYX_BUILD%"
64 if not exist %LYX_BUILD% (
72 REM start with a new cmake run
76 set USED_STUDIO="Visual Studio 12 2013"
83 REM Build solution to develop LyX
84 cmake %LYX_SOURCE% -GNinja -G%USED_STUDIO% -DLYX_ENABLE_CXX11=ON -DLYX_USE_QT=QT5 -DLYX_MERGE_FILES=0 -DLYX_NLS=1 -DLYX_INSTALL=0 -DLYX_RELEASE=0 -DLYX_CONSOLE=FORCE %DEPENDENCIES_DOWNLOAD%
85 msbuild lyx.sln /p:Configuration=Debug /t:ALL_BUILD
88 if "%1%" == "install" (
89 REM Build solution to develop LyX
90 REM set -DLYX_MERGE_REBUILD and -DLYX_MERGE_FILES to 1 for a version released with an installer
91 cmake %LYX_SOURCE% -G%USED_STUDIO% -DLYX_ENABLE_CXX11=ON -DLYX_USE_QT=QT5 -DLYX_MERGE_REBUILD=1 -DLYX_MERGE_FILES=1 -DLYX_NLS=1 -DLYX_INSTALL=1 -DLYX_RELEASE=1 -DLYX_CONSOLE=OFF %DEPENDENCIES_DOWNLOAD%
92 msbuild lyx.sln /p:Configuration=Release /t:ALL_BUILD
93 msbuild INSTALL.vcxproj /p:Configuration=Release
96 REM go back to the dir where the script was called from