3 echo -------------------------------------------------------------------------------------
5 echo Usage build.bat devel/install
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
9 echo -------------------------------------------------------------------------------------
11 echo Call this script from a build directory or set variables (or edit this file)
15 echo Be sure you've set qmake in PATH.
17 echo GNUWin32 will be downloaded if you don't set the variable GNUWIN32_DIR
18 echo -------------------------------------------------------------------------------------
23 echo ERROR: no options.
28 REM Uncomment the following line if you want to compile in parallel.
29 REM This uses N cl.exe processes, where N is the number of cores.
35 REM Add path to qmake here or set PATH correctly on your system.
36 set PATH=C:\Qt\Qt5.6.0-MSVC2015-x64\5.6\msvc2015_64\bin;%PATH%
38 REM Edit pathes here or set the environment variables on your system.
39 set GNUWIN32_DIR=D:\LyXGit\Master\lyx-windows-deps-msvc2015-x64
40 set LYX_SOURCE=D:\LyXGit\Master\
41 set LYX_BUILD=D:\LyXGit\Master\compile-2015-x64
43 if [%LYX_SOURCE%]==[] (
44 set LYX_SOURCE=%~DP0\..\..
46 echo LyX source: "%LYX_SOURCE%"
48 if [%LYX_BUILD%]==[] (
51 echo LyX build : "%LYX_BUILD%"
53 if [%GNUWIN32_DIR%]==[] (
54 echo GNUWIN32_DIR not set.
55 echo Downloading win32 deps.
56 set DEPENDENCIES_DOWNLOAD="-DLYX_DEPENDENCIES_DOWNLOAD=1"
57 ) else set PATH="%GNUWIN32_DIR%\bin";%PATH%
59 if not exist %LYX_BUILD% (
60 echo creating "%LYX_BUILD%"
62 if not exist %LYX_BUILD% (
70 REM start with a new cmake run
74 REM Build solution to develop LyX
75 REM you can add the option "-GNinja" for a faster compilation
76 cmake %LYX_SOURCE% -G"Visual Studio 14 2015 Win64" -DLYX_ENABLE_CXX11=ON -DLYX_USE_QT=QT5 -DLYX_ENABLE_EXPORT_TESTS=0 -DLYX_MERGE_FILES=0 -DLYX_NLS=1 -DLYX_INSTALL=0 -DLYX_RELEASE=0 -DLYX_CONSOLE=FORCE -DLYX_3RDPARTY_BUILD=1 %DEPENDENCIES_DOWNLOAD%
77 msbuild src\LyX.vcxproj /p:Configuration=Debug
78 msbuild src\tex2lyx\tex2lyx.vcxproj /p:Configuration=Debug
81 if "%1%" == "install" (
82 REM Build solution to develop LyX
83 REM set -DLYX_MERGE_REBUILD and -DLYX_MERGE_FILES to 1 for a version released with an installer
84 cmake %LYX_SOURCE% -GNinja -G"Visual Studio 14 2015 Win64" -DLYX_ENABLE_CXX11=ON -DLYX_USE_QT=QT5 -DLYX_MERGE_REBUILD=0 -DLYX_MERGE_FILES=0 -DLYX_NLS=1 -DLYX_INSTALL=1 -DLYX_RELEASE=1 -DLYX_CONSOLE=OFF %DEPENDENCIES_DOWNLOAD%
85 msbuild INSTALL.vcxproj /p:Configuration=Release
88 REM go back to the dir where the script was called from