File: findmsvccompiler.sci

package info (click to toggle)
scilab 4.0-12
  • links: PTS
  • area: non-free
  • in suites: etch, etch-m68k
  • size: 100,640 kB
  • ctags: 57,333
  • sloc: ansic: 377,889; fortran: 242,862; xml: 179,819; tcl: 42,062; sh: 10,593; ml: 9,441; makefile: 4,377; cpp: 1,354; java: 621; csh: 260; yacc: 247; perl: 130; lex: 126; asm: 72; lisp: 30
file content (63 lines) | stat: -rw-r--r-- 2,735 bytes parent folder | download
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
//-----------------------------------------------------------------------------
// Allan CORNET
// INRIA 2005
//-----------------------------------------------------------------------------
function MSCompiler=findmsvccompiler()
  
  MSCompiler='unknown'; // unknown
  
  if MSDOS then
    ierr=-1;
    
    ierr=execstr("MSVS80Pro=winqueryreg(''HKEY_LOCAL_MACHINE'',''Software\Microsoft\VisualStudio\8.0\Setup\VS\Pro'',''ProductDir'');","errcatch");
    if (ierr == 0) then 
 	    MSCompiler='msvc80pro'; // Microsoft Visual 2005 Studio Professional
      return;
    end
    
    ierr=execstr("MSVS80std=winqueryreg(''HKEY_LOCAL_MACHINE'',''Software\Microsoft\VisualStudio\8.0\Setup\VS\Std'',''ProductDir'');","errcatch");
    if (ierr == 0) then 
 	    MSCompiler='msvc80std'; // Microsoft Visual 2005 Studio Standard
      return;
    end
    
   ierr=execstr("MSVS71=winqueryreg(''HKEY_LOCAL_MACHINE'',''SOFTWARE\Microsoft\VisualStudio\7.1\Setup\VC'',''ProductDir'');","errcatch");
   if (ierr == 0) then
     MSCompiler='msvc71'; // Microsoft Visual Studio .NET 2003
     return;
   end
   
   ierr=execstr("MSVS70=winqueryreg(''HKEY_LOCAL_MACHINE'',''SOFTWARE\Microsoft\VisualStudio\7.0\Setup\VC'',''ProductDir'');","errcatch");
   if (ierr == 0) then
     MSCompiler='msvc70';  // Microsoft Visual Studio .NET 2002
     return;
   end
 
   ierr=execstr("MSVS80EXPRESS=winqueryreg(''HKEY_LOCAL_MACHINE'',''Software\Microsoft\VCExpress\8.0\Setup\VS'',''ProductDir'');","errcatch");
     if (ierr == 0) then 
       ierr2=execstr("W2003SDK=winqueryreg(''HKEY_LOCAL_MACHINE'',''Software\Microsoft\MicrosoftSDK\InstalledSDKs\8F9E5EF3-A9A5-491B-A889-C58EFFECE8B3'',''Install Dir'');","errcatch");
       if (ierr2 == 0) then 
         MSCompiler='msvc80express'; // Microsoft Visual C++ Express 8.0
         return;
       else
         printf('\nWarning : Microsoft Visual C++ 2005 Express Edition has been detected,\nbut not Microsoft Platform SDK for Windows Server 2003 SP1.\nPlease install this SDK if you want to use dynamic link with scilab.\n');
       end  
   end
     
   ierr=execstr("MSVS60=winqueryreg(''HKEY_LOCAL_MACHINE'',''SOFTWARE\Microsoft\DevStudio\6.0\Products\Microsoft Visual C++'',''ProductDir'');","errcatch");
   if (ierr == 0) then
     MSCompiler='msvc60';  // Microsoft Visual Studio 6
     return;
   end
   
   ierr=execstr("MSVS50=winqueryreg(''HKEY_LOCAL_MACHINE'',''SOFTWARE\Microsoft\DevStudio\5.0\Directories'',''ProductDir'');","errcatch");
   if (ierr == 0) then
     MSCompiler='msvc50';   // Microsoft Visual Studio 5
     return;
   end
   
  else // MSDOS
    MSCompiler='unknown'; // unknown
  end
endfunction
//-----------------------------------------------------------------------------