source: tol/building/MinGW_64/build.bat @ b7e40d4

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

Refs #1880
Instrucciones para TOL64 en Windows

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

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