forked from rime/librime
-
Notifications
You must be signed in to change notification settings - Fork 0
/
shell.bat
71 lines (63 loc) · 2.23 KB
/
shell.bat
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
@echo off
setlocal
if exist env.bat call env.bat
if defined BOOST_ROOT (
if exist "%BOOST_ROOT%\boost" goto boost_found
)
echo Boost not found! please set BOOST_ROOT in env.bat.
exit /b 1
:boost_found
if defined CMAKE_INSTALL_PATH (
if exist "%CMAKE_INSTALL_PATH%\bin" goto cmake_found
)
echo Detecting CMake install path.
set CMAKE_INSTALL_PATH=%ProgramFiles(x86)%\CMake
if exist "%CMAKE_INSTALL_PATH%\bin" goto cmake_found
set CMAKE_INSTALL_PATH=%ProgramFiles%\CMake
if exist "%CMAKE_INSTALL_PATH%\bin" goto cmake_found
set CMAKE_INSTALL_PATH=
echo CMake not found! please set CMAKE_INSTALL_PATH in env.bat.
exit /b 1
:cmake_found
if defined GIT_INSTALL_PATH (
if exist "%GIT_INSTALL_PATH%\bin" goto git_found
)
echo Detecting Git install path.
set GIT_INSTALL_PATH=%ProgramFiles(x86)%\Git
if exist "%GIT_INSTALL_PATH%\bin" goto git_found
set GIT_INSTALL_PATH=%ProgramFiles%\Git
if exist "%GIT_INSTALL_PATH%\bin" goto git_found
set GIT_INSTALL_PATH=
echo Git not found! please set GIT_INSTALL_PATH in env.bat.
exit /b 1
:git_found
if defined VS_INSTALL_PATH (
if exist "%VS_INSTALL_PATH%\VC" goto vs_found
)
echo Detecting Visual Studio install path.
set VS_INSTALL_PATH=%ProgramFiles(x86)%\Microsoft Visual Studio 12.0
if exist "%VS_INSTALL_PATH%\VC" goto vs_found
set VS_INSTALL_PATH=%ProgramFiles%\Microsoft Visual Studio 12.0
if exist "%VS_INSTALL_PATH%\VC" goto vs_found
set VS_INSTALL_PATH=
echo Visual Studio not found! please set VS_INSTALL_PATH in env.bat.
exit /b 1
:vs_found
:start
set OLD_PATH=%PATH%
if defined DEV_PATH set PATH=%OLD_PATH%;%DEV_PATH%
rem add cmake executable to PATH
set PATH=%PATH%;%CMAKE_INSTALL_PATH%/bin
rem git start
@rem Get the abolute path to the current directory, which is assumed to be the
@rem Git installation root.
@for /F "delims=" %%I in ("%GIT_INSTALL_PATH%") do @set git_install_root=%%~fI
@set PATH=%git_install_root%\bin;%git_install_root%\mingw\bin;%git_install_root%\cmd;%PATH%
@if not exist "%HOME%" @set HOME=%HOMEDRIVE%%HOMEPATH%
@if not exist "%HOME%" @set HOME=%USERPROFILE%
@set PLINK_PROTOCOL=ssh
@cd %HOME%
rem git end
rem start command prompt with Visual C++ tools
rem %comspec%
%comspec% /k ""%VS_INSTALL_PATH%\VC\vcvarsall.bat"" x86