Commit fd98244e authored by Ghislain MARY's avatar Ghislain MARY

Handle compilation of autotools projects with MinGW on Windows.

parent f90586a8
......@@ -15,4 +15,5 @@ export LDFLAGS="@LINPHONE_BUILDER_TOOLCHAIN_LDFLAGS@ @EP_ffmpeg_EXTRA_LDFLAGS@"
export PKG_CONFIG_LIBDIR="@LINPHONE_BUILDER_PKG_CONFIG_LIBDIR@"
cd @ep_build@
make V=@AUTOTOOLS_VERBOSE_MAKEFILE@
......@@ -16,6 +16,8 @@ export LDFLAGS="@LINPHONE_BUILDER_TOOLCHAIN_LDFLAGS@ @EP_ffmpeg_EXTRA_LDFLAGS@"
export PKG_CONFIG_PATH="@LINPHONE_BUILDER_PKG_CONFIG_PATH@"
export PKG_CONFIG_LIBDIR="@LINPHONE_BUILDER_PKG_CONFIG_LIBDIR@"
cd @ep_build@
if [ ! -f config.h ]
then
@ep_source@/configure "--prefix=@CMAKE_INSTALL_PREFIX@" "--arch=${EP_ffmpeg_ARCH}" "--target-os=${EP_ffmpeg_TARGET_OS}" @EP_ffmpeg_CONFIGURE_OPTIONS@
......
......@@ -15,4 +15,5 @@ export LDFLAGS="@LINPHONE_BUILDER_TOOLCHAIN_LDFLAGS@ @EP_ffmpeg_EXTRA_LDFLAGS@"
export PKG_CONFIG_LIBDIR="@LINPHONE_BUILDER_PKG_CONFIG_LIBDIR@"
cd @ep_build@
make V=@CMAKE_VERBOSE_MAKEFILE@ install
......@@ -15,4 +15,5 @@ export LDFLAGS="@LINPHONE_BUILDER_TOOLCHAIN_LDFLAGS@ @EP_linphone_EXTRA_LDFLAGS@
export PKG_CONFIG_LIBDIR="@LINPHONE_BUILDER_PKG_CONFIG_LIBDIR@"
cd @ep_build@
make V=@AUTOTOOLS_VERBOSE_MAKEFILE@
......@@ -16,6 +16,8 @@ export LDFLAGS="@LINPHONE_BUILDER_TOOLCHAIN_LDFLAGS@ @EP_linphone_EXTRA_LDFLAGS@
export PKG_CONFIG_PATH="@LINPHONE_BUILDER_PKG_CONFIG_PATH@"
export PKG_CONFIG_LIBDIR="@LINPHONE_BUILDER_PKG_CONFIG_LIBDIR@"
cd @ep_build@
if [ ! -f config.h ]
then
@ep_source@/autogen.sh
......
......@@ -15,4 +15,5 @@ export LDFLAGS="@LINPHONE_BUILDER_TOOLCHAIN_LDFLAGS@ @EP_linphone_EXTRA_LDFLAGS@
export PKG_CONFIG_LIBDIR="@LINPHONE_BUILDER_PKG_CONFIG_LIBDIR@"
cd @ep_build@
make V=@CMAKE_VERBOSE_MAKEFILE@ install
......@@ -15,4 +15,5 @@ export LDFLAGS="@LINPHONE_BUILDER_TOOLCHAIN_LDFLAGS@ @EP_ms2_EXTRA_LDFLAGS@"
export PKG_CONFIG_LIBDIR="@LINPHONE_BUILDER_PKG_CONFIG_LIBDIR@"
cd @ep_build@
make V=@AUTOTOOLS_VERBOSE_MAKEFILE@
......@@ -16,6 +16,8 @@ export LDFLAGS="@LINPHONE_BUILDER_TOOLCHAIN_LDFLAGS@ @EP_ms2_EXTRA_LDFLAGS@"
export PKG_CONFIG_PATH="@LINPHONE_BUILDER_PKG_CONFIG_PATH@"
export PKG_CONFIG_LIBDIR="@LINPHONE_BUILDER_PKG_CONFIG_LIBDIR@"
cd @ep_build@
if [ ! -f mediastreamer-config.h ]
then
@ep_source@/autogen.sh
......
......@@ -15,4 +15,5 @@ export LDFLAGS="@LINPHONE_BUILDER_TOOLCHAIN_LDFLAGS@ @EP_ms2_EXTRA_LDFLAGS@"
export PKG_CONFIG_LIBDIR="@LINPHONE_BUILDER_PKG_CONFIG_LIBDIR@"
cd @ep_build@
make V=@CMAKE_VERBOSE_MAKEFILE@ install
......@@ -15,4 +15,5 @@ export LDFLAGS="@LINPHONE_BUILDER_TOOLCHAIN_LDFLAGS@ @EP_opus_EXTRA_LDFLAGS@"
export PKG_CONFIG_LIBDIR="@LINPHONE_BUILDER_PKG_CONFIG_LIBDIR@"
cd @ep_build@
make V=@AUTOTOOLS_VERBOSE_MAKEFILE@
......@@ -16,6 +16,8 @@ export LDFLAGS="@LINPHONE_BUILDER_TOOLCHAIN_LDFLAGS@ @EP_opus_EXTRA_LDFLAGS@"
export PKG_CONFIG_PATH="@LINPHONE_BUILDER_PKG_CONFIG_PATH@"
export PKG_CONFIG_LIBDIR="@LINPHONE_BUILDER_PKG_CONFIG_LIBDIR@"
cd @ep_build@
if [ ! -f config.h ]
then
@ep_source@/autogen.sh
......
......@@ -15,4 +15,5 @@ export LDFLAGS="@LINPHONE_BUILDER_TOOLCHAIN_LDFLAGS@ @EP_opus_EXTRA_LDFLAGS@"
export PKG_CONFIG_LIBDIR="@LINPHONE_BUILDER_PKG_CONFIG_LIBDIR@"
cd @ep_build@
make V=@CMAKE_VERBOSE_MAKEFILE@ install
......@@ -15,4 +15,5 @@ export LDFLAGS="@LINPHONE_BUILDER_TOOLCHAIN_LDFLAGS@ @EP_ortp_EXTRA_LDFLAGS@"
export PKG_CONFIG_LIBDIR="@LINPHONE_BUILDER_PKG_CONFIG_LIBDIR@"
cd @ep_build@
make V=@AUTOTOOLS_VERBOSE_MAKEFILE@
......@@ -16,6 +16,8 @@ export LDFLAGS="@LINPHONE_BUILDER_TOOLCHAIN_LDFLAGS@ @EP_ortp_EXTRA_LDFLAGS@"
export PKG_CONFIG_PATH="@LINPHONE_BUILDER_PKG_CONFIG_PATH@"
export PKG_CONFIG_LIBDIR="@LINPHONE_BUILDER_PKG_CONFIG_LIBDIR@"
cd @ep_build@
if [ ! -f ortp-config.h ]
then
@ep_source@/autogen.sh
......
......@@ -15,4 +15,5 @@ export LDFLAGS="@LINPHONE_BUILDER_TOOLCHAIN_LDFLAGS@ @EP_ortp_EXTRA_LDFLAGS@"
export PKG_CONFIG_LIBDIR="@LINPHONE_BUILDER_PKG_CONFIG_LIBDIR@"
cd @ep_build@
make V=@CMAKE_VERBOSE_MAKEFILE@ install
......@@ -15,4 +15,5 @@ export LDFLAGS="@LINPHONE_BUILDER_TOOLCHAIN_LDFLAGS@ @EP_v4l_EXTRA_LDFLAGS@"
export PKG_CONFIG_LIBDIR="@LINPHONE_BUILDER_PKG_CONFIG_LIBDIR@"
cd @ep_build@
make V=@AUTOTOOLS_VERBOSE_MAKEFILE@
......@@ -16,6 +16,8 @@ export LDFLAGS="@LINPHONE_BUILDER_TOOLCHAIN_LDFLAGS@ @EP_v4l_EXTRA_LDFLAGS@"
export PKG_CONFIG_PATH="@LINPHONE_BUILDER_PKG_CONFIG_PATH@"
export PKG_CONFIG_LIBDIR="@LINPHONE_BUILDER_PKG_CONFIG_LIBDIR@"
cd @ep_build@
if [ ! -f config.h ]
then
@ep_source@/configure "--prefix=@CMAKE_INSTALL_PREFIX@" "--host=@LINPHONE_BUILDER_TOOLCHAIN_HOST@" @EP_v4l_CONFIGURE_OPTIONS@
......
......@@ -15,4 +15,5 @@ export LDFLAGS="@LINPHONE_BUILDER_TOOLCHAIN_LDFLAGS@ @EP_v4l_EXTRA_LDFLAGS@"
export PKG_CONFIG_LIBDIR="@LINPHONE_BUILDER_PKG_CONFIG_LIBDIR@"
cd @ep_build@
make V=@CMAKE_VERBOSE_MAKEFILE@ install
......@@ -15,4 +15,5 @@ export LDFLAGS="@LINPHONE_BUILDER_TOOLCHAIN_LDFLAGS@ @EP_vpx_EXTRA_LDFLAGS@"
export PKG_CONFIG_LIBDIR="@LINPHONE_BUILDER_PKG_CONFIG_LIBDIR@"
cd @ep_build@
make V=@AUTOTOOLS_VERBOSE_MAKEFILE@
......@@ -16,6 +16,8 @@ export LDFLAGS="@LINPHONE_BUILDER_TOOLCHAIN_LDFLAGS@ @EP_vpx_EXTRA_LDFLAGS@"
export PKG_CONFIG_PATH="@LINPHONE_BUILDER_PKG_CONFIG_PATH@"
export PKG_CONFIG_LIBDIR="@LINPHONE_BUILDER_PKG_CONFIG_LIBDIR@"
cd @ep_build@
if [ ! -f config.h ]
then
@ep_source@/configure "--prefix=@CMAKE_INSTALL_PREFIX@" "--target=${EP_vpx_TARGET}" @EP_vpx_CONFIGURE_OPTIONS@
......
......@@ -15,4 +15,5 @@ export LDFLAGS="@LINPHONE_BUILDER_TOOLCHAIN_LDFLAGS@ @EP_vpx_EXTRA_LDFLAGS@"
export PKG_CONFIG_LIBDIR="@LINPHONE_BUILDER_PKG_CONFIG_LIBDIR@"
cd @ep_build@
make V=@CMAKE_VERBOSE_MAKEFILE@ install
......@@ -15,4 +15,5 @@ export LDFLAGS="@LINPHONE_BUILDER_TOOLCHAIN_LDFLAGS@ @EP_xml2_EXTRA_LDFLAGS@"
export PKG_CONFIG_LIBDIR="@LINPHONE_BUILDER_PKG_CONFIG_LIBDIR@"
cd @ep_build@
make V=@AUTOTOOLS_VERBOSE_MAKEFILE@
......@@ -16,6 +16,8 @@ export LDFLAGS="@LINPHONE_BUILDER_TOOLCHAIN_LDFLAGS@ @EP_xml2_EXTRA_LDFLAGS@"
export PKG_CONFIG_PATH="@LINPHONE_BUILDER_PKG_CONFIG_PATH@"
export PKG_CONFIG_LIBDIR="@LINPHONE_BUILDER_PKG_CONFIG_LIBDIR@"
cd @ep_build@
if [ ! -f config.h ]
then
@ep_source@/autogen.sh "--prefix=@CMAKE_INSTALL_PREFIX@" "--host=@LINPHONE_BUILDER_TOOLCHAIN_HOST@" @EP_xml2_CONFIGURE_OPTIONS@
......
......@@ -15,4 +15,5 @@ export LDFLAGS="@LINPHONE_BUILDER_TOOLCHAIN_LDFLAGS@ @EP_xml2_EXTRA_LDFLAGS@"
export PKG_CONFIG_LIBDIR="@LINPHONE_BUILDER_PKG_CONFIG_LIBDIR@"
cd @ep_build@
make V=@CMAKE_VERBOSE_MAKEFILE@ install
......@@ -33,6 +33,17 @@ else(${CMAKE_VERBOSE_MAKEFILE})
endif(${CMAKE_VERBOSE_MAKEFILE})
if(MSVC)
find_program(SH_PROGRAM
NAMES sh.exe
HINTS "C:/MinGW/msys/1.0/bin"
)
if(NOT SH_PROGRAM)
message(FATAL_ERROR "Could not find MinGW!")
endif(NOT SH_PROGRAM)
endif(MSVC)
set(LINPHONE_BUILDER_EP_VARS)
macro(linphone_builder_expand_external_project_vars)
......@@ -162,14 +173,26 @@ macro(linphone_builder_add_project PROJNAME)
linphone_builder_expand_external_project_vars()
if("${EP_${PROJNAME}_AUTOTOOLS}" STREQUAL "yes")
if(MSVC)
set(SCRIPT_EXTENSION bat)
set(MSVC_PROJNAME ${PROJNAME})
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/cmake/mingw_configure.bat.cmake ${CMAKE_CURRENT_BINARY_DIR}/EP_${PROJNAME}_configure.bat)
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/cmake/mingw_build.bat.cmake ${CMAKE_CURRENT_BINARY_DIR}/EP_${PROJNAME}_build.bat)
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/cmake/mingw_install.bat.cmake ${CMAKE_CURRENT_BINARY_DIR}/EP_${PROJNAME}_install.bat)
# Build in source with MinGW as build out-of-source does not work
set(ep_build ${ep_source})
else(MSVC)
set(SCRIPT_EXTENSION sh)
endif(MSVC)
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/builders/${PROJNAME}/configure.sh.cmake ${CMAKE_CURRENT_BINARY_DIR}/EP_${PROJNAME}_configure.sh)
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/builders/${PROJNAME}/build.sh.cmake ${CMAKE_CURRENT_BINARY_DIR}/EP_${PROJNAME}_build.sh)
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/builders/${PROJNAME}/install.sh.cmake ${CMAKE_CURRENT_BINARY_DIR}/EP_${PROJNAME}_install.sh)
set(BUILD_COMMANDS
CONFIGURE_COMMAND ${CMAKE_CURRENT_BINARY_DIR}/EP_${PROJNAME}_configure.sh
BUILD_COMMAND ${CMAKE_CURRENT_BINARY_DIR}/EP_${PROJNAME}_build.sh
INSTALL_COMMAND ${CMAKE_CURRENT_BINARY_DIR}/EP_${PROJNAME}_install.sh
CONFIGURE_COMMAND ${CMAKE_CURRENT_BINARY_DIR}/EP_${PROJNAME}_configure.${SCRIPT_EXTENSION}
BUILD_COMMAND ${CMAKE_CURRENT_BINARY_DIR}/EP_${PROJNAME}_build.${SCRIPT_EXTENSION}
INSTALL_COMMAND ${CMAKE_CURRENT_BINARY_DIR}/EP_${PROJNAME}_install.${SCRIPT_EXTENSION}
)
else("${EP_${PROJNAME}_AUTOTOOLS}" STREQUAL "yes")
set(BUILD_COMMANDS
......
@echo off
rem Script based on msys.bat from the MinGW32 project
rem ember value of GOTO: is used to know recursion has happened.
if "%1" == "GOTO:" goto %2
set WD=C:\MinGW\msys\1.0\bin\
rem ember command.com only uses the first eight characters of the label.
goto _WindowsNT
rem ember that we only execute here if we are in command.com.
:_Windows
if "x%COMSPEC%" == "x" set COMSPEC=command.com
start /min %COMSPEC% /e:4096 /c %0 GOTO: _Resume %0 %1 %2 %3 %4 %5 %6 %7 %8 %9
goto EOF
rem ember that we execute here if we recursed.
:_Resume
for %%F in (1 2 3) do shift
if NOT EXIST %WD%msys-1.0.dll set WD=.\bin\
rem ember that we get here even in command.com.
:_WindowsNT
rem Hopefully a temporary workaround for getting MSYS shell to run on x64
rem (WoW64 cmd prompt sets PROCESSOR_ARCHITECTURE to x86)
if not "x%PROCESSOR_ARCHITECTURE%" == "xAMD64" goto _NotX64
set COMSPEC=%WINDIR%\SysWOW64\cmd.exe
%COMSPEC% /c %0 %1 %2 %3 %4 %5 %6 %7 %8 %9
goto EOF
:_NotX64
if NOT EXIST %WD%msys-1.0.dll set WD=%~dp0\bin\
rem ember Set up option to use rxvt based on value of %1
set MSYSCON=unknown
if "x%1" == "x-norxvt" set MSYSCON=sh.exe
if "x%1" == "x--norxvt" set MSYSCON=sh.exe
if "x%1" == "x-rxvt" set MSYSCON=rxvt.exe
if "x%1" == "x--rxvt" set MSYSCON=rxvt.exe
if "x%1" == "x-mintty" set MSYSCON=mintty.exe
if "x%1" == "x--mintty" set MSYSCON=mintty.exe
if NOT "x%MSYSCON%" == "xunknown" shift
if "x%MSYSCON%" == "xunknown" set MSYSCON=sh.exe
if "x%MSYSTEM%" == "x" set MSYSTEM=MINGW32
if "%1" == "MINGW32" set MSYSTEM=MINGW32
if "%1" == "MSYS" set MSYSTEM=MSYS
if NOT "x%DISPLAY%" == "x" set DISPLAY=
if "x%MSYSCON%" == "xmintty.exe" goto startmintty
if "x%MSYSCON%" == "xrxvt.exe" goto startrxvt
if "x%MSYSCON%" == "xsh.exe" goto startsh
:unknowncon
echo %MSYSCON% is an unknown option for msys.bat.
pause
exit 1
:notfound
echo Cannot find the rxvt.exe or sh.exe binary -- aborting.
pause
exit 1
:startmintty
if NOT EXIST %WD%mintty.exe goto startsh
start %WD%mintty /bin/bash -l
exit
:startrxvt
if NOT EXIST %WD%rxvt.exe goto startsh
rem Setup the default colors for rxvt.
if "x%MSYSBGCOLOR%" == "x" set MSYSBGCOLOR=White
if "x%MSYSFGCOLOR%" == "x" set MSYSFGCOLOR=Black
if "x%MINGW32BGCOLOR%" == "x" set MINGW32BGCOLOR=LightYellow
if "x%MINGW32FGCOLOR%" == "x" set MINGW32FGCOLOR=Navy
if "%MSYSTEM%" == "MSYS" set BGCOLOR=%MSYSBGCOLOR%
if "%MSYSTEM%" == "MSYS" set FGCOLOR=%MSYSFGCOLOR%
if "%MSYSTEM%" == "MINGW32" set BGCOLOR=%MINGW32BGCOLOR%
if "%MSYSTEM%" == "MINGW32" set FGCOLOR=%MINGW32FGCOLOR%
start %WD%rxvt -backspacekey  -sl 2500 -fg %FGCOLOR% -bg %BGCOLOR% -sr -fn Courier-12 -tn msys -geometry 80x25 -e /bin/sh --login -i
exit
:startsh
if NOT EXIST %WD%sh.exe goto notfound
start /W %WD%sh --login -i @CMAKE_CURRENT_BINARY_DIR@/EP_@MSVC_PROJNAME@_build.sh
:EOF
@echo off
rem Script based on msys.bat from the MinGW32 project
rem ember value of GOTO: is used to know recursion has happened.
if "%1" == "GOTO:" goto %2
set WD=C:\MinGW\msys\1.0\bin\
rem ember command.com only uses the first eight characters of the label.
goto _WindowsNT
rem ember that we only execute here if we are in command.com.
:_Windows
if "x%COMSPEC%" == "x" set COMSPEC=command.com
start /min %COMSPEC% /e:4096 /c %0 GOTO: _Resume %0 %1 %2 %3 %4 %5 %6 %7 %8 %9
goto EOF
rem ember that we execute here if we recursed.
:_Resume
for %%F in (1 2 3) do shift
if NOT EXIST %WD%msys-1.0.dll set WD=.\bin\
rem ember that we get here even in command.com.
:_WindowsNT
rem Hopefully a temporary workaround for getting MSYS shell to run on x64
rem (WoW64 cmd prompt sets PROCESSOR_ARCHITECTURE to x86)
if not "x%PROCESSOR_ARCHITECTURE%" == "xAMD64" goto _NotX64
set COMSPEC=%WINDIR%\SysWOW64\cmd.exe
%COMSPEC% /c %0 %1 %2 %3 %4 %5 %6 %7 %8 %9
goto EOF
:_NotX64
if NOT EXIST %WD%msys-1.0.dll set WD=%~dp0\bin\
rem ember Set up option to use rxvt based on value of %1
set MSYSCON=unknown
if "x%1" == "x-norxvt" set MSYSCON=sh.exe
if "x%1" == "x--norxvt" set MSYSCON=sh.exe
if "x%1" == "x-rxvt" set MSYSCON=rxvt.exe
if "x%1" == "x--rxvt" set MSYSCON=rxvt.exe
if "x%1" == "x-mintty" set MSYSCON=mintty.exe
if "x%1" == "x--mintty" set MSYSCON=mintty.exe
if NOT "x%MSYSCON%" == "xunknown" shift
if "x%MSYSCON%" == "xunknown" set MSYSCON=sh.exe
if "x%MSYSTEM%" == "x" set MSYSTEM=MINGW32
if "%1" == "MINGW32" set MSYSTEM=MINGW32
if "%1" == "MSYS" set MSYSTEM=MSYS
if NOT "x%DISPLAY%" == "x" set DISPLAY=
if "x%MSYSCON%" == "xmintty.exe" goto startmintty
if "x%MSYSCON%" == "xrxvt.exe" goto startrxvt
if "x%MSYSCON%" == "xsh.exe" goto startsh
:unknowncon
echo %MSYSCON% is an unknown option for msys.bat.
pause
exit 1
:notfound
echo Cannot find the rxvt.exe or sh.exe binary -- aborting.
pause
exit 1
:startmintty
if NOT EXIST %WD%mintty.exe goto startsh
start %WD%mintty /bin/bash -l
exit
:startrxvt
if NOT EXIST %WD%rxvt.exe goto startsh
rem Setup the default colors for rxvt.
if "x%MSYSBGCOLOR%" == "x" set MSYSBGCOLOR=White
if "x%MSYSFGCOLOR%" == "x" set MSYSFGCOLOR=Black
if "x%MINGW32BGCOLOR%" == "x" set MINGW32BGCOLOR=LightYellow
if "x%MINGW32FGCOLOR%" == "x" set MINGW32FGCOLOR=Navy
if "%MSYSTEM%" == "MSYS" set BGCOLOR=%MSYSBGCOLOR%
if "%MSYSTEM%" == "MSYS" set FGCOLOR=%MSYSFGCOLOR%
if "%MSYSTEM%" == "MINGW32" set BGCOLOR=%MINGW32BGCOLOR%
if "%MSYSTEM%" == "MINGW32" set FGCOLOR=%MINGW32FGCOLOR%
start %WD%rxvt -backspacekey  -sl 2500 -fg %FGCOLOR% -bg %BGCOLOR% -sr -fn Courier-12 -tn msys -geometry 80x25 -e /bin/sh --login -i
exit
:startsh
if NOT EXIST %WD%sh.exe goto notfound
start /W %WD%sh --login -i @CMAKE_CURRENT_BINARY_DIR@/EP_@MSVC_PROJNAME@_configure.sh
:EOF
@echo off
rem Script based on msys.bat from the MinGW32 project
rem ember value of GOTO: is used to know recursion has happened.
if "%1" == "GOTO:" goto %2
set WD=C:\MinGW\msys\1.0\bin\
rem ember command.com only uses the first eight characters of the label.
goto _WindowsNT
rem ember that we only execute here if we are in command.com.
:_Windows
if "x%COMSPEC%" == "x" set COMSPEC=command.com
start /min %COMSPEC% /e:4096 /c %0 GOTO: _Resume %0 %1 %2 %3 %4 %5 %6 %7 %8 %9
goto EOF
rem ember that we execute here if we recursed.
:_Resume
for %%F in (1 2 3) do shift
if NOT EXIST %WD%msys-1.0.dll set WD=.\bin\
rem ember that we get here even in command.com.
:_WindowsNT
rem Hopefully a temporary workaround for getting MSYS shell to run on x64
rem (WoW64 cmd prompt sets PROCESSOR_ARCHITECTURE to x86)
if not "x%PROCESSOR_ARCHITECTURE%" == "xAMD64" goto _NotX64
set COMSPEC=%WINDIR%\SysWOW64\cmd.exe
%COMSPEC% /c %0 %1 %2 %3 %4 %5 %6 %7 %8 %9
goto EOF
:_NotX64
if NOT EXIST %WD%msys-1.0.dll set WD=%~dp0\bin\
rem ember Set up option to use rxvt based on value of %1
set MSYSCON=unknown
if "x%1" == "x-norxvt" set MSYSCON=sh.exe
if "x%1" == "x--norxvt" set MSYSCON=sh.exe
if "x%1" == "x-rxvt" set MSYSCON=rxvt.exe
if "x%1" == "x--rxvt" set MSYSCON=rxvt.exe
if "x%1" == "x-mintty" set MSYSCON=mintty.exe
if "x%1" == "x--mintty" set MSYSCON=mintty.exe
if NOT "x%MSYSCON%" == "xunknown" shift
if "x%MSYSCON%" == "xunknown" set MSYSCON=sh.exe
if "x%MSYSTEM%" == "x" set MSYSTEM=MINGW32
if "%1" == "MINGW32" set MSYSTEM=MINGW32
if "%1" == "MSYS" set MSYSTEM=MSYS
if NOT "x%DISPLAY%" == "x" set DISPLAY=
if "x%MSYSCON%" == "xmintty.exe" goto startmintty
if "x%MSYSCON%" == "xrxvt.exe" goto startrxvt
if "x%MSYSCON%" == "xsh.exe" goto startsh
:unknowncon
echo %MSYSCON% is an unknown option for msys.bat.
pause
exit 1
:notfound
echo Cannot find the rxvt.exe or sh.exe binary -- aborting.
pause
exit 1
:startmintty
if NOT EXIST %WD%mintty.exe goto startsh
start %WD%mintty /bin/bash -l
exit
:startrxvt
if NOT EXIST %WD%rxvt.exe goto startsh
rem Setup the default colors for rxvt.
if "x%MSYSBGCOLOR%" == "x" set MSYSBGCOLOR=White
if "x%MSYSFGCOLOR%" == "x" set MSYSFGCOLOR=Black
if "x%MINGW32BGCOLOR%" == "x" set MINGW32BGCOLOR=LightYellow
if "x%MINGW32FGCOLOR%" == "x" set MINGW32FGCOLOR=Navy
if "%MSYSTEM%" == "MSYS" set BGCOLOR=%MSYSBGCOLOR%
if "%MSYSTEM%" == "MSYS" set FGCOLOR=%MSYSFGCOLOR%
if "%MSYSTEM%" == "MINGW32" set BGCOLOR=%MINGW32BGCOLOR%
if "%MSYSTEM%" == "MINGW32" set FGCOLOR=%MINGW32FGCOLOR%
start %WD%rxvt -backspacekey  -sl 2500 -fg %FGCOLOR% -bg %BGCOLOR% -sr -fn Courier-12 -tn msys -geometry 80x25 -e /bin/sh --login -i
exit
:startsh
if NOT EXIST %WD%sh.exe goto notfound
start /W %WD%sh --login -i @CMAKE_CURRENT_BINARY_DIR@/EP_@MSVC_PROJNAME@_install.sh
:EOF
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment