[Ttssh2-commit] [6499] VS のバージョン判定を VSxxCOMNTOOLS との比較をする方式に変更

Back to archive index

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


Revision: 6499
          http://sourceforge.jp/projects/ttssh2/scm/svn/commits/6499
Author:   doda
Date:     2016-09-28 21:00:30 +0900 (Wed, 28 Sep 2016)
Log Message:
-----------
VS のバージョン判定を VSxxCOMNTOOLS との比較をする方式に変更

[Ttssh2-devel 3080]

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

-------------- next part --------------
Modified: trunk/installer/build.bat
===================================================================
--- trunk/installer/build.bat	2016-09-28 12:00:27 UTC (rev 6498)
+++ trunk/installer/build.bat	2016-09-28 12:00:30 UTC (rev 6499)
@@ -42,27 +42,15 @@
 
 :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
-if %VSVERSTR% == "Studio 9" goto vs2008
-if %VSVERSTR% == "Studio 10" goto vs2010
-if %VSVERSTR% == "Studio 11" goto vs2012
-if %VSVERSTR% == "Studio 12" goto vs2013
-if %VSVERSTR% == "Studio 14" goto vs2015
+set VSCMNDIR="%VSINSTALLDIR%\Common7\Tools\"
+set VSCMNDIR=%VSCMNDIR:\\=\%
 
-rem \x8A\xFA\x91Ғʂ\xE8\x82ɓ\xAE\x82\xA9\x82Ȃ\xA9\x82\xC1\x82\xBD\x8Fꍇ\x82ׁ̈A\x8B\x8C\x94\xBB\x92\xE8\x8F\xF0\x8C\x8F\x82\xE0\x8Ec\x82\xB5\x82Ă\xA8\x82\xAD
-echo %VSINSTALLDIR% | find "Studio 8"
-if not ERRORLEVEL 1 goto vs2005
-echo %VSINSTALLDIR% | find "Studio 9"
-if not ERRORLEVEL 1 goto vs2008
-echo %VSINSTALLDIR% | find "Studio 10"
-if not ERRORLEVEL 1 goto vs2010
-echo %VSINSTALLDIR% | find "Studio 11"
-if not ERRORLEVEL 1 goto vs2012
-echo %VSINSTALLDIR% | find "Studio 12"
-if not ERRORLEVEL 1 goto vs2013
-echo %VSINSTALLDIR% | find "Studio 14"
-if not ERRORLEVEL 1 goto vs2015
+if /I %VSCMNDIR% EQU "%VS80COMNTOOLS%" goto vs2005
+if /I %VSCMNDIR% EQU "%VS90COMNTOOLS%" goto vs2008
+if /I %VSCMNDIR% EQU "%VS100COMNTOOLS%" goto vs2010
+if /I %VSCMNDIR% EQU "%VS110COMNTOOLS%" goto vs2012
+if /I %VSCMNDIR% EQU "%VS120COMNTOOLS%" goto vs2013
+if /I %VSCMNDIR% EQU "%VS140COMNTOOLS%" goto vs2015
 
 echo Unknown Visual Studio version
 exit /b



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