[Ttssh2-commit] [6498] VSINSTALLDIR が設定されていない場合は Visual Studio を探して見つかった

Back to archive index

svnno****@sourc***** svnno****@sourc*****
2016年 9月 28日 (水) 21:00:27 JST


Revision: 6498
          http://sourceforge.jp/projects/ttssh2/scm/svn/commits/6498
Author:   doda
Date:     2016-09-28 21:00:27 +0900 (Wed, 28 Sep 2016)
Log Message:
-----------
VSINSTALLDIR が設定されていない場合は Visual Studio を探して見つかった
環境設定用バッチファイルを呼び出すようにした。
[Ttssh2-devel 3079]

Modified Paths:
--------------
    trunk/installer/build.bat

-------------- next part --------------
Modified: trunk/installer/build.bat
===================================================================
--- trunk/installer/build.bat	2016-09-27 12:37:18 UTC (rev 6497)
+++ trunk/installer/build.bat	2016-09-28 12:00:27 UTC (rev 6498)
@@ -1,4 +1,46 @@
 
+if not "%VSINSTALLDIR%" == "" goto vsinstdir
+
+if "%VS80COMNTOOLS%" == "" goto check_2008
+if not exist "%VS80COMNTOOLS%\vsvars32.bat" goto check_2008
+call "%VS80COMNTOOLS%\vsvars32.bat"
+goto vs2005
+
+:check_2008
+if "%VS90COMNTOOLS%" == "" goto check_2010
+if not exist "%VS90COMNTOOLS%\vsvars32.bat" goto check_2010
+call "%VS90COMNTOOLS%\vsvars32.bat"
+goto vs2008
+
+:check_2010
+if "%VS100COMNTOOLS%" == "" goto check_2012
+if not exist "%VS100COMNTOOLS%\vsvars32.bat" goto check_2012
+call "%VS100COMNTOOLS%\vsvars32.bat"
+goto vs2010
+
+:check_2012
+if "%VS110COMNTOOLS%" == "" goto check_2013
+if not exist "%VS110COMNTOOLS%\VsDevCmd.bat" goto check_2013
+call "%VS110COMNTOOLS%\VsDevCmd.bat"
+goto vs2012
+
+:check_2013
+if "%VS120COMNTOOLS%" == "" goto check_2015
+if not exist "%VS120COMNTOOLS%\VsDevCmd.bat" goto check_2015
+call "%VS120COMNTOOLS%\VsDevCmd.bat"
+goto vs2013
+
+:check_2015
+if "%VS140COMNTOOLS%" == "" goto novs
+if not exist "%VS140COMNTOOLS%\VsDevCmd.bat" goto novs
+call "%VS140COMNTOOLS%\VsDevCmd.bat"
+goto vs2015
+
+:novs
+echo "Can't find Visual Studio"
+exit /b
+
+:vsinstdir
 rem Visual Studio\x82̃o\x81[\x83W\x83\x87\x83\x93\x94\xBB\x95\xCA
 FOR /F "tokens=1,2 delims=\. " %%H IN ("%VSINSTALLDIR:*Visual Studio =Studio %") DO set VSVERSTR="%%H %%I"
 if %VSVERSTR% == "Studio 8" goto vs2005



Ttssh2-commit メーリングリストの案内
Back to archive index