source: tol/building/MinGW_32/build.bat @ 43b2d5c

1941-docker-image-to-testdevel
Last change on this file since 43b2d5c was 43b2d5c, checked in by Pedro Gea <pgea@…>, 11 years ago

Refs #1880
Véase el cambio [6859] en CMakeLists.txt de toltcl.
CMAKE_INSTALL_PREFIX no es vacío por defecto sino %PROGRAMFILES%\TOLTCL.

git-svn-id: ​https://www.tol-project.org/svn/tolp/trunk@6922 be4846ae-f051-483a-831f-b64e7d08527f

  • Property mode set to 100644
File size: 2.8 KB
Line 
1@echo off
2rem *********************************************************
3rem  La llamada al script recibe dos argumentos:
4rem    build [tol|toltcl|tolbase|all] [|Release|Debug]
5rem *********************************************************
6rem  Se ha de ejecutar desde el propio directorio MinGW_32.
7rem  Durante el proceso por cada una de las etapas.
8rem *********************************************************
9
10call cmake_prepare.bat
11
12set project=%1
13if "%project%"=="all" (
14  build tol %2
15  build toltcl %2
16  build tolbase %2
17  exit /b
18)
19if "%project%"=="tol" goto project_ok
20if "%project%"=="toltcl" goto project_ok
21if "%project%"=="tolbase" goto project_ok
22echo.First argument should be: tol, toltcl, tolbase or all.
23exit /b
24:project_ok
25
26set mode=%2
27if "%mode%"=="" set mode=Release
28if "%mode%"=="Release" goto type_ok
29if "%mode%"=="Debug" goto type_ok
30echo.Second argument should be: Release, Debug or should be avoided.
31exit /b
32:type_ok
33
34set tolp_root=%CD%\..\..\..
35if not exist "%tolp_root%\trunk" (
36  echo./!\ Cannot find 'trunk' at %tolp_root%
37  exit /b
38)
39
40echo.
41echo.----------------------------------------------------
42echo. Building %project% - %mode%
43echo.----------------------------------------------------
44
45set init_dir=%CD%
46set tolp_trunk=%tolp_root%\trunk
47echo.  tolp_trunk=%tolp_trunk%
48if "%project%"=="tol" (
49  set tol_contribs=%tolp_root%\toldevel-rtools-m32
50  echo.  tol_contribs=%tol_contribs%
51)
52if exist "%tolp_trunk%\%project%\CodeLite\%mode%" (
53  echo./!\ There is already a built folder of %project%
54  set is_built=y
55) else (
56  set is_built=n
57)
58
59echo.
60set /p cont="continue? (y/n) "
61if "%cont%"=="y" GOTO continue_ok
62exit /b
63:continue_ok
64
65echo.
66set /p cont="mkdir? (y/n) "
67if "%cont%"=="n" GOTO skip_mkdir
68cd "%tolp_trunk%"
69if "%is_built%"=="y" rmdir /S /Q "%tolp_trunk%\%project%\CodeLite\%mode%"
70mkdir "%tolp_trunk%\%project%\CodeLite\%mode%"
71:skip_mkdir
72
73cd "%tolp_trunk%\%project%\CodeLite\%mode%"
74
75echo.
76set /p cont="cmake? (y/n) "
77if "%cont%"=="n" GOTO skip_cmake
78if "%project%"=="tol" (
79  cmake -DTOL_EXTERNAL_DEVEL_DIR="%tol_contribs%" -DCMAKE_TOOLCHAIN_FILE="%tolp_trunk%\tol\cmake\mingw-m32.toolchain.cmake" -DCMAKE_BUILD_TYPE=%mode% -G"CodeLite - MinGW Makefiles" "%tolp_trunk%\%project%"
80) else (
81  cmake -DTOL_PREFIX_PATH="%tolp_trunk%\tol\CodeLite\Release\Runtime_Base" -DCMAKE_TOOLCHAIN_FILE="%tolp_trunk%\tol\cmake\mingw-m32.toolchain.cmake" -DCMAKE_INSTALL_PREFIX= -DCMAKE_BUILD_TYPE=%mode% -G"CodeLite - MinGW Makefiles" "%tolp_trunk%\%project%"
82)
83:skip_cmake
84
85echo.
86set /p cont="make? (y/n) "
87if "%cont%"=="n" GOTO skip_make
88echo %CD%
89mingw32-make
90:skip_make
91
92echo.
93set /p cont="install? (y/n) "
94if "%cont%"=="n" GOTO skip_install
95mingw32-make install
96:skip_install
97
98cd "%init_dir%"
99echo.
100pause
101exit /b
102
103
Note: See TracBrowser for help on using the repository browser.