]> git.lyx.org Git - lyx.git/blob - development/cmake/build.bat
* po/fr.po: update by Jean-Pierre.
[lyx.git] / development / cmake / build.bat
1 echo off
2
3 echo -------------------------------------------------------------------------------------
4 echo Usage build.bat devel/install/deploy STUDIO(optional)
5 echo     devel   - Builds Visual Studio project files for development on LyX
6 echo     install - Builds Visual Studio project files with all enabled for installation
7 echo     deploy  - Builds Makefiles and installs LyX
8 echo     STUDIO  - Used Visual Studio version, default is "Visual Studio 9 2008"
9 echo               use "Visual Studio 10" for Visual Studio 10
10 echo -------------------------------------------------------------------------------------
11 echo Be sure you've set qmake in PATH and set the variables:
12 echo     GNUWIN32_DIR
13 echo     LYX_SOURCE
14 echo     LXY_BUILD
15 echo Or edit this file.
16 echo -------------------------------------------------------------------------------------
17
18
19 if [%1]==[] (
20         echo ERROR: no options.
21     echo Exiting now.
22         goto :eof
23 )
24
25 REM Add path to qmake here or set PATH correctly on your system.
26 ::set PATH=D:\Qt\bin;%PATH%
27
28 REM Edit pathes here or set the environment variables on you system.
29 ::set GNUWIN32_DIR=D:\LyXSVN\lyx-devel\lyx-windows-deps-msvc2008
30 ::set LYX_SOURCE=D:\LyXSVN\lyx-devel.
31 ::set LXY_BUILD=D:\LyXSVN\compile-result
32
33 if [%LYX_BUILD%]==[] (
34         echo ERROR:  LYX_BUILD not set.
35         echo Exiting now.
36         goto :eof
37 )
38
39 if [%LYX_SOURCE%]==[] (
40         echo ERROR:  LYX_SOURCE not set.
41         echo Exiting now.
42         goto :eof
43 )
44
45 if [%GNUWIN32_DIR%]==[] (
46         echo ERROR:  GNUWIN32_DIR not set.
47         echo Exiting now.
48         goto :eof
49 )
50
51 echo LyX source: "%LYX_SOURCE%"
52 echo LyX build : "%LYX_BUILD%"
53 echo LyX deps  : "%GNUWIN32_DIR%"
54
55 set PATH=%GNUWIN32_DIR%\bin;%PATH%
56
57
58 mkdir "%LYX_BUILD%"
59 if not exist %LYX_BUILD% (
60         echo Exiting script.
61         goto :eof
62 )
63 cd "%LYX_BUILD%"
64
65
66 REM Delete all files indirectory
67 del /s/q *
68 del CMakeCache.txt
69
70 if [%2]==[] (
71         set USED_STUDIO="Visual Studio 9 2008"
72 ) else (
73         set USED_STUDIO=%2%
74 )
75
76
77 if "%1%" == "devel" (
78         REM Build solution to develop LyX
79         cmake %LYX_SOURCE%\development\cmake -G%USED_STUDIO% -DLYX_MERGE_FILES=0 -DLYX_NLS=1 -DLYX_DEBUG=1
80         REM needed when running lyx from the debugger
81         set LYX_DIR_20x=%LYX_SOURCE%\lib
82         start lyx.sln /build Debug
83 )
84
85 if "%1%" == "install" (
86         REM Build solution to develop LyX
87         cmake %LYX_SOURCE%\development\cmake -G%USED_STUDIO% -DLYX_MERGE_FILES=1 -DLYX_INSTALL=1 -DLYX_RELEASE=1
88         REM needed when running lyx from the debugger
89         set LYX_DIR_20x=
90         start lyx.sln /build Debug
91 )
92
93 if "%1%" == "deploy" (
94         REM Build complete installed LyX
95         cmake "%LYX_SOURCE%"\development\cmake -G"NMake Makefiles" -DLYX_MERGE_FILES=1 -DLYX_INSTALL=1 -DLYX_RELEASE=1
96         nmake
97         nmake install
98 )
99
100
101
102 :eof