Changeset 42292 in vbox
- Timestamp:
- Jul 20, 2012 10:10:51 PM (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/configure.vbs
r37204 r42292 10 10 11 11 ' 12 ' Copyright (C) 2006-201 1Oracle Corporation12 ' Copyright (C) 2006-2012 Oracle Corporation 13 13 ' 14 14 ' This file is part of VirtualBox Open Source Edition (OSE), as … … 36 36 Set g_objFileSys = WScript.CreateObject("Scripting.FileSystemObject") 37 37 38 dim g_strPathkBuild, g_strPathkBuildBin, g_strPathDev, g_strPathVCC, g_strPathPSDK, g_str PathDDK, g_strSubOutput38 dim g_strPathkBuild, g_strPathkBuildBin, g_strPathDev, g_strPathVCC, g_strPathPSDK, g_strVerPSDK, g_strPathDDK, g_strSubOutput 39 39 g_strPathkBuild = "" 40 40 g_strPathDev = "" … … 43 43 g_strPathDDK = "" 44 44 45 dim g_strTargetArch 46 g_strTargetArch = "x86" 47 45 48 dim g_blnDisableCOM, g_strDisableCOM 46 49 g_blnDisableCOM = False … … 54 57 dim g_blnInternalFirst 55 58 g_blnInternalFirst = True 56 57 ' Whether to try the new tools: Visual Studio 10.0, Windows 7 SDK and WDK.58 dim g_blnNewTools59 g_blnNewTools = False 'True60 59 61 60 … … 383 382 LogPrint "EnvPrepend: " & strName & "=" & strValue & str 384 383 end sub 384 385 '' 386 ' Gets the first non-empty environment variable of the given two. 387 function EnvGetFirst(strName1, strName2) 388 EnvGetFirst = g_objShell.Environment("PROCESS")(strName1) 389 if EnvGetFirst = "" then 390 EnvGetFirst = g_objShell.Environment("PROCESS")(strName2) 391 end if 392 end function 385 393 386 394 … … 800 808 ' 801 809 ' Check if there is a 'kmk' in the path somewhere without 802 ' any PATH_KBUILD*stuff around.810 ' any KBUILD_*PATH stuff around. 803 811 ' 804 812 blnNeedEnvVars = True … … 806 814 g_strPathkBuildBin = "" 807 815 if (g_strPathkBuild = "") _ 808 And (EnvGet ("PATH_KBUILD") = "") _809 And (EnvGet ("PATH_KBUILD_BIN") = "") _816 And (EnvGetFirst("KBUILD_PATH", "PATH_KBUILD") = "") _ 817 And (EnvGetFirst("KBUILD_BIN_PATH", "PATH_KBUILD_BIN") = "") _ 810 818 And (Shell("kmk.exe --version", True) = 0) _ 811 819 And (InStr(1,g_strShellOutput, "kBuild Make 0.1") > 0) _ 812 And (InStr(1,g_strShellOutput, " PATH_KBUILD") > 0) _813 And (InStr(1,g_strShellOutput, " PATH_KBUILD_BIN") > 0) then814 '' @todo Need to parse out the PATH_KBUILD and PATH_KBUILD_BINvalues to complete the other tests.820 And (InStr(1,g_strShellOutput, "KBUILD_PATH") > 0) _ 821 And (InStr(1,g_strShellOutput, "KBUILD_BIN_PATH") > 0) then 822 '' @todo Need to parse out the KBUILD_PATH and KBUILD_BIN_PATH values to complete the other tests. 815 823 'blnNeedEnvVars = False 816 824 MsgWarning "You've installed kBuild it seems. configure.vbs hasn't been updated to " _ … … 819 827 820 828 ' 821 ' Check for the PATH_KBUILDenv.var. and fall back on root/kBuild otherwise.829 ' Check for the KBUILD_PATH env.var. and fall back on root/kBuild otherwise. 822 830 ' 823 831 if g_strPathkBuild = "" then 824 g_strPathkBuild = EnvGet ("PATH_KBUILD")832 g_strPathkBuild = EnvGetFirst("KBUILD_PATH", "PATH_KBUILD") 825 833 if (g_strPathkBuild <> "") and (FileExists(g_strPathkBuild & "/footer.kmk") = False) then 826 MsgWarning "Ignoring incorrect kBuild path ( PATH_KBUILD=" & g_strPathkBuild & ")"834 MsgWarning "Ignoring incorrect kBuild path (KBUILD_PATH=" & g_strPathkBuild & ")" 827 835 g_strPathkBuild = "" 828 836 end if … … 836 844 837 845 ' 846 ' Check for env.vars that kBuild uses (do this early to set g_strTargetArch). 847 ' 848 str = EnvGetFirst("KBUILD_TYPE", "BUILD_TYPE") 849 if (str <> "") _ 850 And (InStr(1, "|release|debug|profile|kprofile", str) <= 0) then 851 EnvPrint "set KBUILD_TYPE=release" 852 EnvSet "KBUILD_TYPE", "release" 853 MsgWarning "Found unknown KBUILD_TYPE value '" & str &"' in your environment. Setting it to 'release'." 854 end if 855 856 str = EnvGetFirst("KBUILD_TARGET", "BUILD_TARGET") 857 if (str <> "") _ 858 And (InStr(1, "win|win32|win64", str) <= 0) then '' @todo later only 'win' will be valid. remember to fix this check! 859 EnvPrint "set KBUILD_TARGET=win" 860 EnvSet "KBUILD_TARGET", "win" 861 MsgWarning "Found unknown KBUILD_TARGET value '" & str &"' in your environment. Setting it to 'win32'." 862 end if 863 864 str = EnvGetFirst("KBUILD_TARGET_ARCH", "BUILD_TARGET_ARCH") 865 if (str <> "") _ 866 And (InStr(1, "x86|amd64", str) <= 0) then 867 EnvPrint "set KBUILD_TARGET_ARCH=x86" 868 EnvSet "KBUILD_TARGET_ARCH", "x86" 869 MsgWarning "Found unknown KBUILD_TARGET_ARCH value '" & str &"' in your environment. Setting it to 'x86'." 870 str = "x86" 871 end if 872 if str <> "" then 873 g_strTargetArch = str 874 elseif (EnvGet("PROCESSOR_ARCHITEW6432") = "AMD64" ) _ 875 Or (EnvGet("PROCESSOR_ARCHITECTURE") = "AMD64" ) then 876 g_strTargetArch = "amd64" 877 else 878 g_strTargetArch = "x86" 879 end if 880 881 str = EnvGetFirst("KBUILD_TARGET_CPU", "BUILD_TARGET_CPU") 882 ' perhaps a bit pedantic this since this isn't clearly define nor used much... 883 if (str <> "") _ 884 And (InStr(1, "i386|i486|i686|i786|i868|k5|k6|k7|k8", str) <= 0) then 885 EnvPrint "set BUILD_TARGET_CPU=i386" 886 EnvSet "KBUILD_TARGET_CPU", "i386" 887 MsgWarning "Found unknown KBUILD_TARGET_CPU value '" & str &"' in your environment. Setting it to 'i386'." 888 end if 889 890 str = EnvGetFirst("KBUILD_HOST", "BUILD_PLATFORM") 891 if (str <> "") _ 892 And (InStr(1, "win|win32|win64", str) <= 0) then '' @todo later only 'win' will be valid. remember to fix this check! 893 EnvPrint "set KBUILD_HOST=win" 894 EnvSet "KBUILD_HOST", "win" 895 MsgWarning "Found unknown KBUILD_HOST value '" & str &"' in your environment. Setting it to 'win32'." 896 end if 897 898 str = EnvGetFirst("KBUILD_HOST_ARCH", "BUILD_PLATFORM_ARCH") 899 if (str <> "") _ 900 And (InStr(1, "x86|amd64", str) <= 0) then 901 EnvPrint "set KBUILD_HOST_ARCH=x86" 902 EnvSet "KBUILD_HOST_ARCH", "x86" 903 MsgWarning "Found unknown KBUILD_HOST_ARCH value '" & str &"' in your environment. Setting it to 'x86'." 904 end if 905 906 str = EnvGetFirst("KBUILD_HOST_CPU", "BUILD_PLATFORM_CPU") 907 ' perhaps a bit pedantic this since this isn't clearly define nor used much... 908 if (str <> "") _ 909 And (InStr(1, "i386|i486|i686|i786|i868|k5|k6|k7|k8", str) <= 0) then 910 EnvPrint "set KBUILD_HOST_CPU=i386" 911 EnvSet "KBUILD_HOST_CPU", "i386" 912 MsgWarning "Found unknown KBUILD_HOST_CPU value '" & str &"' in your environment. Setting it to 'i386'." 913 end if 914 915 ' 838 916 ' Determin the location of the kBuild binaries. 839 917 ' 840 918 if g_strPathkBuildBin = "" then 841 dim str2 842 if EnvGet("PROCESSOR_ARCHITECTURE") = "x86" then 843 g_strPathkBuildBin = g_strPathkBuild & "/bin/win.x86" 844 else ' boldly assumes there is only x86 and amd64. 845 g_strPathkBuildBin = g_strPathkBuild & "/bin/win.amd64" 846 if FileExists(g_strPathkBuild & "/kmk.exe") = False then 847 g_strPathkBuildBin = g_strPathkBuild & "/bin/win.x86" 848 end if 849 end if 919 g_strPathkBuildBin = g_strPathkBuild & "/bin/win." & g_strTargetArch 850 920 if FileExists(g_strPathkBuild & "/kmk.exe") = False then 851 921 g_strPathkBuildBin = g_strPathkBuild & "/bin/win.x86" … … 860 930 Or (FileExists(g_strPathkBuild & "/rules.kmk") = False) then 861 931 MsgFatal "Can't find valid kBuild at '" & g_strPathkBuild & "'. Either there is an " _ 862 & "incorrect PATH_KBUILDin the environment or the checkout didn't succeed."932 & "incorrect KBUILD_PATH in the environment or the checkout didn't succeed." 863 933 exit sub 864 934 end if … … 866 936 Or (FileExists(g_strPathkBuildBin & "/kmk_ash.exe") = False) then 867 937 MsgFatal "Can't find valid kBuild binaries at '" & g_strPathkBuildBin & "'. Either there is an " _ 868 & "incorrect PATH_KBUILDin the environment or the checkout didn't succeed."938 & "incorrect KBUILD_PATH in the environment or the checkout didn't succeed." 869 939 exit sub 870 940 end if … … 873 943 MsgFatal "Can't execute '" & g_strPathkBuildBin & "/kmk.exe --version'. check configure.log for the out." 874 944 exit sub 875 end if876 877 '878 ' Check for env.vars that kBuild uses.879 '880 str = EnvGet("BUILD_TYPE")881 if (str <> "") _882 And (InStr(1, "|release|debug|profile|kprofile", str) <= 0) then883 EnvPrint "set BUILD_TYPE=release"884 EnvSet "BUILD_TYPE", "release"885 MsgWarning "Found unknown BUILD_TYPE value '" & str &"' in your environment. Setting it to 'release'."886 end if887 888 str = EnvGet("BUILD_TARGET")889 if (str <> "") _890 And (InStr(1, "win|win32|win64", str) <= 0) then '' @todo later only 'win' will be valid. remember to fix this check!891 EnvPrint "set BUILD_TARGET=win"892 EnvSet "BUILD_TARGET", "win"893 MsgWarning "Found unknown BUILD_TARGET value '" & str &"' in your environment. Setting it to 'win32'."894 end if895 896 str = EnvGet("BUILD_TARGET_ARCH")897 if (str <> "") _898 And (InStr(1, "x86|amd64", str) <= 0) then899 EnvPrint "set BUILD_TARGET_ARCH=x86"900 EnvSet "BUILD_TARGET_ARCH", "x86"901 MsgWarning "Found unknown BUILD_TARGET_ARCH value '" & str &"' in your environment. Setting it to 'x86'."902 end if903 904 str = EnvGet("BUILD_TARGET_CPU")905 ' perhaps a bit pedantic this since this isn't clearly define nor used much...906 if (str <> "") _907 And (InStr(1, "i386|i486|i686|i786|i868|k5|k6|k7|k8", str) <= 0) then908 EnvPrint "set BUILD_TARGET_CPU=i386"909 EnvSet "BUILD_TARGET_CPU", "i386"910 MsgWarning "Found unknown BUILD_TARGET_CPU value '" & str &"' in your environment. Setting it to 'i386'."911 end if912 913 str = EnvGet("BUILD_PLATFORM")914 if (str <> "") _915 And (InStr(1, "win|win32|win64", str) <= 0) then '' @todo later only 'win' will be valid. remember to fix this check!916 EnvPrint "set BUILD_PLATFORM=win"917 EnvSet "BUILD_PLATFORM", "win"918 MsgWarning "Found unknown BUILD_PLATFORM value '" & str &"' in your environment. Setting it to 'win32'."919 end if920 921 str = EnvGet("BUILD_PLATFORM_ARCH")922 if (str <> "") _923 And (InStr(1, "x86|amd64", str) <= 0) then924 EnvPrint "set BUILD_PLATFORM_ARCH=x86"925 EnvSet "BUILD_PLATFORM_ARCH", "x86"926 MsgWarning "Found unknown BUILD_PLATFORM_ARCH value '" & str &"' in your environment. Setting it to 'x86'."927 end if928 929 str = EnvGet("BUILD_PLATFORM_CPU")930 ' perhaps a bit pedantic this since this isn't clearly define nor used much...931 if (str <> "") _932 And (InStr(1, "i386|i486|i686|i786|i868|k5|k6|k7|k8", str) <= 0) then933 EnvPrint "set BUILD_PLATFORM_CPU=i386"934 EnvSet "BUILD_PLATFORM_CPU", "i386"935 MsgWarning "Found unknown BUILD_PLATFORM_CPU value '" & str &"' in your environment. Setting it to 'i386'."936 945 end if 937 946 … … 952 961 953 962 ' 954 ' Write PATH_KBUILDto the environment script if necessary.963 ' Write KBUILD_PATH to the environment script if necessary. 955 964 ' 956 965 if blnNeedEnvVars = True then 957 EnvPrint "set PATH_KBUILD=" & g_strPathkBuild958 EnvSet " PATH_KBUILD", g_strPathkBuild966 EnvPrint "set KBUILD_PATH=" & g_strPathkBuild 967 EnvSet "KBUILD_PATH", g_strPathkBuild 959 968 EnvPrint "set PATH=" & g_strPathkBuildBin & ";%PATH%" 960 969 EnvPrepend "PATH", g_strPathkBuildBin & ";" … … 967 976 968 977 '' 969 ' Checks for Visual C++ version 7.1, 8 or 10.978 ' Checks for Visual C++ version 10 (2010). 970 979 sub CheckForVisualCPP(strOptVC, strOptVCCommon, blnOptVCExpressEdition) 971 980 dim strPathVC, strPathVCCommon, str, str2, blnNeedMsPDB … … 985 994 986 995 if (strPathVC = "") And (g_blnInternalFirst = True) Then 987 if g_blnNewTools Then 988 strPathVC = g_strPathDev & "/win.x86/vcc/v10" 989 if CheckForVisualCPPSub(strPathVC, "", blnOptVCExpressEdition) = False then 990 strPathVC = "" 991 end if 992 end if 993 if strPathVC = "" then 994 strPathVC = g_strPathDev & "/win.x86/vcc/v8" 995 if CheckForVisualCPPSub(strPathVC, "", blnOptVCExpressEdition) = False then 996 strPathVC = g_strPathDev & "/win.x86/vcc/v7" 997 if CheckForVisualCPPSub(strPathVC, "", blnOptVCExpressEdition) = False then 998 strPathVC = "" 999 end if 1000 end if 996 strPathVC = g_strPathDev & "/win.x86/vcc/v10sp1" 997 if CheckForVisualCPPSub(strPathVC, "", blnOptVCExpressEdition) = False then 998 strPathVC = "" 1001 999 end if 1002 1000 end if … … 1014 1012 end if 1015 1013 1016 if (strPathVC = "") And g_blnNewToolsthen1014 if (strPathVC = "") then 1017 1015 str = RegGetString("HKLM\SOFTWARE\Wow6432Node\Microsoft\VisualStudio\10.0\Setup\VS\ProductDir") 1018 1016 if str <> "" Then … … 1026 1024 end if 1027 1025 1028 if (strPathVC = "") And g_blnNewToolsthen1026 if (strPathVC = "") then 1029 1027 str = RegGetString("HKLM\SOFTWARE\Microsoft\VisualStudio\10.0\Setup\VS\ProductDir") 1030 1028 if str <> "" Then … … 1038 1036 end if 1039 1037 1040 if strPathVC = "" then1041 str = RegGetString("HKLM\SOFTWARE\Wow6432Node\Microsoft\VisualStudio\8.0\Setup\VS\ProductDir")1042 str2 = RegGetString("HKLM\SOFTWARE\Wow6432Node\Microsoft\VisualStudio\8.0\Setup\VS\EnvironmentDirectory")1043 if str <> "" And str2 <> "" Then1044 str = str & "VC"1045 str2 = PathParent(str2)1046 if CheckForVisualCPPSub(str, str2, blnOptVCExpressEdition) then1047 strPathVC = str1048 strPathVCCommon = str21049 end if1050 end if1051 end if1052 1053 if strPathVC = "" then1054 str = RegGetString("HKLM\SOFTWARE\Microsoft\VisualStudio\8.0\Setup\VS\ProductDir")1055 str2 = RegGetString("HKLM\SOFTWARE\Microsoft\VisualStudio\8.0\Setup\VS\EnvironmentDirectory")1056 if str <> "" And str2 <> "" Then1057 str = str & "VC"1058 str2 = PathParent(str2)1059 if CheckForVisualCPPSub(str, str2, blnOptVCExpressEdition) then1060 strPathVC = str1061 strPathVCCommon = str21062 end if1063 end if1064 end if1065 1066 if strPathVC = "" then1067 '' @todo check what this really looks like on 7.11068 str = RegGetString("HKLM\SOFTWARE\Microsoft\VisualStudio\7.1\Setup\VS\ProductDir")1069 str2 = RegGetString("HKLM\SOFTWARE\Microsoft\VisualStudio\7.1\Setup\VS\EnvironmentDirectory")1070 if str <> "" And str2 <> "" Then1071 str = str & "VC7"1072 str2 = PathParent(str2)1073 if CheckForVisualCPPSub(str, str2, blnOptVCExpressEdition) then1074 strPathVC = str1075 strPathVCCommon = str21076 end if1077 end if1078 end if1079 1080 if strPathVC = "" then1081 str = RegGetString("HKLM\SOFTWARE\Microsoft\VisualStudio\7.0\Setup\VS\ProductDir")1082 str2 = RegGetString("HKLM\SOFTWARE\Microsoft\VisualStudio\7.0\Setup\VS\EnvironmentDirectory")1083 if str <> "" And str2 <> "" Then1084 str = str & "VC7"1085 str2 = PathParent(str2)1086 if CheckForVisualCPPSub(str, str2, blnOptVCExpressEdition) then1087 strPathVC = str1088 strPathVCCommon = str21089 end if1090 end if1091 end if1092 1093 if strPathVC = "" then1094 str = RegGetString("HKLM\SOFTWARE\Microsoft\Wow6432Node\VisualStudio\SxS\VC7\8.0")1095 if str <> "" then1096 str2 = PathParent(str) & "/Common7"1097 if CheckForVisualCPPSub(str, str2, blnOptVCExpressEdition) then1098 strPathVC = str1099 strPathVCCommon = str21100 end if1101 end if1102 end if1103 1104 if strPathVC = "" then1105 str = RegGetString("HKLM\SOFTWARE\Microsoft\VisualStudio\SxS\VC7\8.0")1106 if str <> "" then1107 str2 = PathParent(str) & "/Common7"1108 if CheckForVisualCPPSub(str, str2, blnOptVCExpressEdition) then1109 strPathVC = str1110 strPathVCCommon = str21111 end if1112 end if1113 end if1114 1115 ' finally check for the express edition.1116 if strPathVC = "" then1117 str = RegGetString("HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\Microsoft Visual C++ 2005 Express Edition - ENU\InstallLocation")1118 if str <> "" then1119 str2 = str & "Common7"1120 str = str & "VC/"1121 if CheckForVisualCPPSub(str, str2, blnOptVCExpressEdition) then1122 strPathVC = str1123 strPathVCCommon = str21124 end if1125 end if1126 end if1127 1128 1038 if (strPathVC = "") And (g_blnInternalFirst = False) Then 1129 strPathVC = g_strPathDev & "/win.x86/vcc/v 8"1039 strPathVC = g_strPathDev & "/win.x86/vcc/v10sp1" 1130 1040 if CheckForVisualCPPSub(strPathVC, "", blnOptVCExpressEdition) = False then 1131 strPathVC = g_strPathDev & "/win.x86/vcc/v7" 1132 if CheckForVisualCPPSub(strPathVC, "", blnOptVCExpressEdition) = False then 1133 strPathVC = "" 1134 end if 1041 strPathVC = "" 1135 1042 end if 1136 1043 end if … … 1159 1066 end if 1160 1067 1161 if (InStr(1, g_strShellOutput, "Version 13.10") <= 0) _ 1162 And (InStr(1, g_strShellOutput, "Version 14.") <= 0) _ 1163 And (InStr(1, g_strShellOutput, "Version 16.") <= 0) then 1164 MsgError "The Visual C++ compiler we found ('" & strPathVC & "') isn't 7.1, 8.0 or 10.0. Check the build requirements." 1068 if (InStr(1, g_strShellOutput, "Version 16.") <= 0) _ 1069 And (InStr(1, g_strShellOutput, "Version 17.") <= 0) then 1070 MsgError "The Visual C++ compiler we found ('" & strPathVC & "') isn't 10.0 or 11.0. Check the build requirements." 1165 1071 exit sub 1166 1072 end if … … 1170 1076 ' 1171 1077 if InStr(1, g_strShellOutput, "Version 16.") > 0 then 1172 CfgPrint "VBOX_USE_VCC100 := 1"1173 1078 CfgPrint "PATH_TOOL_VCC100 := " & g_strPathVCC 1174 CfgPrint "PATH_TOOL_VCC100X86 1175 CfgPrint "PATH_TOOL_VCC100AMD64 1079 CfgPrint "PATH_TOOL_VCC100X86 := $(PATH_TOOL_VCC100)" 1080 CfgPrint "PATH_TOOL_VCC100AMD64 := $(PATH_TOOL_VCC100)" 1176 1081 if LogFileExists(strPathVC, "atlmfc/include/atlbase.h") then 1177 1082 PrintResult "Visual C++ v10 with ATL", g_strPathVCC 1178 1083 elseif LogFileExists(g_strPathDDK, "inc/atl71/atlbase.h") _ 1179 1084 And LogFileExists(g_strPathDDK, "lib/ATL/i386/atls.lib") then 1180 CfgPrint "TOOL_VCC100X86_MT = $(PATH_SDK_WINPSDK)/Bin/mt.exe"1181 CfgPrint "TOOL_VCC100AMD64_MT = $(TOOL_VCC100X86_MT)"1182 1085 CfgPrint "VBOX_WITHOUT_COMPILER_REDIST=1" 1183 1086 CfgPrint "PATH_TOOL_VCC100_ATLMFC_INC = " & g_strPathDDK & "/inc/atl71" … … 1190 1093 PrintResult "Visual C++ v10 with DDK ATL", g_strPathVCC 1191 1094 else 1192 CfgPrint "TOOL_VCC100X86_MT = $(PATH_SDK_WINPSDK)/Bin/mt.exe"1193 CfgPrint "TOOL_VCC100AMD64_MT = $(TOOL_VCC100X86_MT)"1194 1095 CfgPrint "VBOX_WITHOUT_COMPILER_REDIST=1" 1195 1096 DisableCOM "No ATL" 1196 1097 PrintResult "Visual C++ v10 (or later) without ATL", g_strPathVCC 1197 1098 end if 1198 elseif InStr(1, g_strShellOutput, "Version 14.") > 0 then 1199 CfgPrint "VBOX_USE_VCC80 := 1" 1200 CfgPrint "PATH_TOOL_VCC80 := " & g_strPathVCC 1201 CfgPrint "PATH_TOOL_VCC80X86 = $(PATH_TOOL_VCC80)" 1202 CfgPrint "PATH_TOOL_VCC80AMD64 = $(PATH_TOOL_VCC80)" 1203 if blnOptVCExpressEdition _ 1204 And LogFileExists(strPathVC, "atlmfc/include/atlbase.h") = False _ 1205 then 1206 CfgPrint "TOOL_VCC80X86_MT = $(PATH_SDK_WINPSDK)/Bin/mt.exe" 1207 CfgPrint "TOOL_VCC80AMD64_MT = $(TOOL_VCC80X86_MT)" 1208 CfgPrint "VBOX_WITHOUT_COMPILER_REDIST=1" 1209 DisableCOM "No ATL" 1210 PrintResult "Visual C++ v8 (or later) without ATL", g_strPathVCC 1211 else 1212 PrintResult "Visual C++ v8 (or later)", g_strPathVCC 1213 end if 1099 1100 elseif InStr(1, g_strShellOutput, "Version 17.") > 0 then 1101 CfgPrint "PATH_TOOL_VCC110 := " & g_strPathVCC 1102 CfgPrint "PATH_TOOL_VCC110X86 := $(PATH_TOOL_VCC110)" 1103 CfgPrint "PATH_TOOL_VCC110AMD64 := $(PATH_TOOL_VCC110)" 1104 PrintResult "Visual C++ v11", g_strPathVCC 1105 MsgWarning "The support for Visual C++ v11 (aka 2012) is experimental" 1106 1214 1107 else 1215 CfgPrint "PATH_TOOL_VCC70 := " & g_strPathVCC 1216 if blnOptVCExpressEdition _ 1217 And LogFileExists(strPathVC, "atlmfc/include/atlbase.h") = False _ 1218 then 1219 CfgPrint "VBOX_WITHOUT_COMPILER_REDIST=1" 1220 DisableCOM "No ATL" 1221 PrintResult "Visual C++ v7.1 without ATL", g_strPathVCC 1222 else 1223 PrintResult "Visual C++ v7.1", g_strPathVCC 1224 end if 1108 MsgError "The Visual C++ compiler we found ('" & strPathVC & "') isn't 10.0 or 11.0. Check the build requirements." 1109 exit sub 1225 1110 end if 1226 1111 … … 1272 1157 ' The tools location (first). 1273 1158 if strPathPSDK = "" And g_blnInternalFirst then 1274 str = g_strPathDev & "/win.x86/sdk/ 200604"1159 str = g_strPathDev & "/win.x86/sdk/v7.1" 1275 1160 if CheckForPlatformSDKSub(str) then strPathPSDK = str 1276 1161 end if 1277 1162 1278 1163 if strPathPSDK = "" And g_blnInternalFirst then 1279 str = g_strPathDev & "/win.x86/sdk/200504" 1280 if CheckForPlatformSDKSub(str) then strPathPSDK = str 1281 end if 1282 1283 if strPathPSDK = "" And g_blnInternalFirst then 1284 str = g_strPathDev & "/win.x86/sdk/200209" 1164 str = g_strPathDev & "/win.x86/sdk/v8.0" 1285 1165 if CheckForPlatformSDKSub(str) then strPathPSDK = str 1286 1166 end if … … 1303 1183 end if 1304 1184 1305 ' Check the registry next (ASSUMES sorting). (first pair is vista, second is pre-vista)1185 ' Check the registry next (ASSUMES sorting). 1306 1186 arrSubKeys = RegEnumSubKeysRSort("HKLM", "SOFTWARE\Microsoft\Microsoft SDKs\Windows") 1307 1187 for each strSubKey in arrSubKeys … … 1319 1199 Next 1320 1200 1321 arrSubKeys = RegEnumSubKeysRSort("HKLM", "SOFTWARE\Microsoft\MicrosoftSDK\InstalledSDKs")1322 for each strSubKey in arrSubKeys1323 str = RegGetString("HKLM\SOFTWARE\Microsoft\MicrosoftSDK\InstalledSDKs\" & strSubKey & "\Install Dir")1324 if strPathPSDK = "" And str <> "" then1325 if CheckForPlatformSDKSub(str) then strPathPSDK = str1326 end if1327 Next1328 arrSubKeys = RegEnumSubKeysRSort("HKCU", "SOFTWARE\Microsoft\MicrosoftSDK\InstalledSDKs")1329 for each strSubKey in arrSubKeys1330 str = RegGetString("HKCU\SOFTWARE\Microsoft\MicrosoftSDK\InstalledSDKs\" & strSubKey & "\Install Dir")1331 if strPathPSDK = "" And str <> "" then1332 if CheckForPlatformSDKSub(str) then strPathPSDK = str1333 end if1334 Next1335 1336 1201 ' The tools location (post). 1337 1202 if (strPathPSDK = "") And (g_blnInternalFirst = False) then 1338 str = g_strPathDev & "/win.x86/sdk/ 200604"1203 str = g_strPathDev & "/win.x86/sdk/v7.1" 1339 1204 if CheckForPlatformSDKSub(str) then strPathPSDK = str 1340 1205 end if 1341 1206 1342 1207 if (strPathPSDK = "") And (g_blnInternalFirst = False) then 1343 str = g_strPathDev & "/win.x86/sdk/200504" 1344 if CheckForPlatformSDKSub(str) then strPathPSDK = str 1345 end if 1346 1347 if (strPathPSDK = "") And (g_blnInternalFirst = False) then 1348 str = g_strPathDev & "/win.x86/sdk/200209" 1208 str = g_strPathDev & "/win.x86/sdk/v8.0" 1349 1209 if CheckForPlatformSDKSub(str) then strPathPSDK = str 1350 1210 end if … … 1360 1220 ' 1361 1221 strPathPSDK = UnixSlashes(PathAbs(strPathPSDK)) 1362 CfgPrint "PATH_SDK_WINPSDK := " & strPathPSDK 1363 CfgPrint "PATH_SDK_WINPSDKINCS = $(PATH_SDK_WINPSDK)" 1364 CfgPrint "PATH_SDK_WIN32SDK = $(PATH_SDK_WINPSDK)" 1365 CfgPrint "PATH_SDK_WIN64SDK = $(PATH_SDK_WINPSDK)" 1366 1367 PrintResult "Windows Platform SDK", strPathPSDK 1222 CfgPrint "PATH_SDK_WINPSDK" & g_strVerPSDK & " := " & strPathPSDK 1223 CfgPrint "VBOX_WINPSDK := WINPSDK" & g_strVerPSDK 1224 1225 PrintResult "Windows Platform SDK (v" & g_strVerPSDK & ")", strPathPSDK 1368 1226 g_strPathPSDK = strPathPSDK 1369 1227 end sub … … 1377 1235 And LogFileExists(strPathPSDK, "lib/Kernel32.Lib") _ 1378 1236 And LogFileExists(strPathPSDK, "lib/User32.Lib") _ 1237 And LogFileExists(strPathPSDK, "bin/rc.exe") _ 1238 And Shell("""" & DosSlashes(strPathPSDK & "/bin/rc.exe") & """" , True) <> 0 _ 1379 1239 then 1380 CheckForPlatformSDKSub = True 1381 end if 1382 end function 1383 1384 1385 '' 1386 ' Checks for a Windows 2003 DDK or Windows 7 Driver Kit. 1387 sub CheckForWin2k3DDK(strOptDDK) 1240 if InStr(1, g_strShellOutput, "Resource Compiler Version 6.2.") > 0 then 1241 g_strVerPSDK = "80" 1242 CheckForPlatformSDKSub = True 1243 elseif InStr(1, g_strShellOutput, "Resource Compiler Version 6.1.") > 0 then 1244 g_strVerPSDK = "71" 1245 CheckForPlatformSDKSub = True 1246 end if 1247 end if 1248 end function 1249 1250 1251 '' 1252 ' Checks for a Windows 7 Driver Kit. 1253 sub CheckForWinDDK(strOptDDK) 1388 1254 dim strPathDDK, str, strSubKeys 1389 PrintHdr "Windows 2003 DDK, build 3790 or later"1255 PrintHdr "Windows DDK v7.1" 1390 1256 1391 1257 ' … … 1395 1261 ' The specified path. 1396 1262 if strPathDDK = "" And strOptDDK <> "" then 1397 if CheckForWin 2k3DDKSub(strOptDDK, True) then strPathDDK = strOptDDK1263 if CheckForWinDDKSub(strOptDDK, True) then strPathDDK = strOptDDK 1398 1264 end if 1399 1265 1400 1266 ' The tools location (first). 1401 1267 if strPathDDK = "" And g_blnInternalFirst then 1402 str = g_strPathDev & "/win.x86/ddkwin2k3/200503" 1403 if CheckForWin2k3DDKSub(str, False) then strPathDDK = str 1404 end if 1405 1406 if strPathDDK = "" And g_blnInternalFirst then 1407 str = g_strPathDev & "/win.x86/ddkwin2k3/2004" 1408 if CheckForWin2k3DDKSub(str, False) then strPathDDK = str 1268 str = g_strPathDev & "/win.x86/ddk/7600.16385.1" 1269 if CheckForWinDDKSub(str, False) then strPathDDK = str 1409 1270 end if 1410 1271 … … 1413 1274 if strPathDDK = "" And str <> "" then 1414 1275 str = PathParent(PathParent(str)) 1415 if CheckForWin 2k3DDKSub(str, True) then strPathDDK = str1276 if CheckForWinDDKSub(str, True) then strPathDDK = str 1416 1277 end if 1417 1278 1418 1279 str = EnvGet("BASEDIR") 1419 1280 if strPathDDK = "" And str <> "" then 1420 if CheckForWin 2k3DDKSub(str, True) then strPathDDK = str1281 if CheckForWinDDKSub(str, True) then strPathDDK = str 1421 1282 end if 1422 1283 … … 1439 1300 arrLocations = ArrayRSortStrings(arrLocations) 1440 1301 1441 ' Vista WDK.1442 for each strRoot in arrRoots1443 for each strSubKey in RegEnumSubKeysFullRSort(strRoot, "SOFTWARE\Microsoft\WINDDK")1444 str = RegGetString(strRoot & "\" & strSubKey & "\Setup\BUILD")1445 if str <> "" then arrLocations = ArrayAppend(arrLocations, PathAbsLong(str))1446 Next1447 next1448 1449 ' Pre-Vista WDK?1450 for each strRoot in arrRoots1451 for each strSubKey in RegEnumSubKeysFullRSort(strRoot, "SOFTWARE\Microsoft\WINDDK")1452 str = RegGetString(strRoot & "\" & strSubKey & "\SFNDirectory")1453 if str <> "" then arrLocations = ArrayAppend(arrLocations, PathAbsLong(str))1454 Next1455 next1456 1457 1302 ' Check the locations we've gathered. 1458 1303 for each str in arrLocations 1459 1304 if strPathDDK = "" then 1460 if CheckForWin 2k3DDKSub(str, True) then strPathDDK = str1305 if CheckForWinDDKSub(str, True) then strPathDDK = str 1461 1306 end if 1462 1307 next … … 1464 1309 ' The tools location (post). 1465 1310 if (strPathDDK = "") And (g_blnInternalFirst = False) then 1466 str = g_strPathDev & "/win.x86/ddkwin2k3/200503" 1467 if CheckForWin2k3DDKSub(str, False) then strPathDDK = str 1468 end if 1469 1470 if (strPathDDK = "") And (g_blnInternalFirst = False) then 1471 str = g_strPathDev & "/win.x86/ddkwin2k3/2004" 1472 if CheckForWin2k3DDKSub(str, False) then strPathDDK = str 1311 str = g_strPathDev & "/win.x86/ddk/7600.16385.1" 1312 if CheckForWinDDKSub(str, False) then strPathDDK = str 1473 1313 end if 1474 1314 1475 1315 ' Give up. 1476 1316 if strPathDDK = "" then 1477 MsgError "Cannot find a suitable Windows 2003 DDK. Check configure.log and the build requirements."1317 MsgError "Cannot find the Windows DDK v7.1. Check configure.log and the build requirements." 1478 1318 exit sub 1479 1319 end if … … 1483 1323 ' 1484 1324 strPathDDK = UnixSlashes(PathAbs(strPathDDK)) 1485 if LogFileExists(strPathDDK, "inc/api/ntdef.h") then 1486 CfgPrint "VBOX_USE_WINDDK := 1" 1487 CfgPrint "PATH_SDK_WINDDK := " & strPathDDK 1488 else 1489 CfgPrint "PATH_SDK_W2K3DDK := " & strPathDDK 1490 CfgPrint "PATH_SDK_W2K3DDKX86 = $(PATH_SDK_W2K3DDK)" 1491 CfgPrint "PATH_SDK_W2K3DDKAMD64 = $(PATH_SDK_W2K3DDK)" 1492 end if 1493 1494 PrintResult "Windows 2003 DDK", strPathDDK 1325 CfgPrint "PATH_SDK_WINDDK71 := " & strPathDDK 1326 1327 PrintResult "Windows DDK v7.1", strPathDDK 1495 1328 g_strPathDDK = strPathDDK 1496 1329 end sub 1497 1330 1498 1331 '' Quick check if the DDK is in the specified directory or not. 1499 function CheckForWin 2k3DDKSub(strPathDDK, blnCheckBuild)1500 CheckForWin 2k3DDKSub = False1332 function CheckForWinDDKSub(strPathDDK, blnCheckBuild) 1333 CheckForWinDDKSub = False 1501 1334 LogPrint "trying: strPathDDK=" & strPathDDK & " blnCheckBuild=" & blnCheckBuild 1502 if g_blnNewTools _ 1503 And LogFileExists(strPathDDK, "inc/api/ntdef.h") _ 1335 if LogFileExists(strPathDDK, "inc/api/ntdef.h") _ 1336 And LogFileExists(strPathDDK, "lib/win7/i386/int64.lib") _ 1337 And LogFileExists(strPathDDK, "lib/wlh/i386/int64.lib") _ 1504 1338 And LogFileExists(strPathDDK, "lib/wnet/i386/int64.lib") _ 1339 And LogFileExists(strPathDDK, "lib/wxp/i386/int64.lib") _ 1340 And Not LogFileExists(strPathDDK, "lib/win8/i386/int64.lib") _ 1341 And LogFileExists(strPathDDK, "bin/x86/rc.exe") _ 1505 1342 then 1506 '' @todo figure out a way we can verify the version/build! 1507 CheckForWin2k3DDKSub = True 1508 end if 1509 1510 if LogFileExists(strPathDDK, "inc/ddk/wnet/ntdef.h") _ 1511 And LogFileExists(strPathDDK, "lib/wnet/i386/int64.lib") _ 1512 then 1513 '' @todo figure out a way we can verify the version/build! 1514 CheckForWin2k3DDKSub = True 1343 if Not blnCheckBuild then 1344 CheckForWinDDKSub = True 1345 '' @todo Find better build check. 1346 elseif Shell("""" & DosSlashes(strPathPSDK & "bin/x86/rc.exe") & """" , True) <> 0 _ 1347 And InStr(1, g_strShellOutput, "Resource Compiler Version 6.1.") > 0 then 1348 CheckForWinDDKSub = True 1349 end if 1515 1350 end if 1516 1351 end function … … 1544 1379 end if 1545 1380 1546 CfgPrint "VBOX_MAIN_IDL = " & strMidl1381 CfgPrint "VBOX_MAIN_IDL := " & strMidl 1547 1382 PrintResult "Midl.exe", strMidl 1548 1383 end sub … … 1607 1442 strPathDXSDK = UnixSlashes(PathAbs(strPathDXSDK)) 1608 1443 CfgPrint "PATH_SDK_DXSDK := " & strPathDXSDK 1609 CfgPrint "PATH_SDK_DXSDKX86 1610 CfgPrint "PATH_SDK_DXSDKAMD64 1444 CfgPrint "PATH_SDK_DXSDKX86 := $(PATH_SDK_DXSDK)" 1445 CfgPrint "PATH_SDK_DXSDKAMD64 := $(PATH_SDK_DXSDK)" 1611 1446 1612 1447 PrintResult "Direct X SDK", strPathDXSDK … … 1703 1538 PrintResult "MinGW (GCC v" & g_strSubOutput & ")", strPathMingW 1704 1539 if (strPathMingW = strPathW32API) Or strPathW32API = "" then 1705 CfgPrint "PATH_SDK_W32API 1540 CfgPrint "PATH_SDK_W32API := $(PATH_TOOL_MINGW32)" 1706 1541 else 1707 CfgPrint "PATH_SDK_W32API 1542 CfgPrint "PATH_SDK_W32API := " & strPathW32API 1708 1543 PrintResult "W32API", strPathW32API 1709 1544 end if … … 2135 1970 2136 1971 '' 2137 ''2138 1972 ' Checks for any Qt4 binaries. 2139 1973 sub CheckForQt4(strOptQt4) … … 2153 1987 end if 2154 1988 1989 ' Check the dev tools 1990 if (strPathQt4 = "") Then 1991 strPathQt4 = g_strPathDev & "/win." & g_strTargetArch & "/qt/v4.7.3-vcc100" 1992 if CheckForQt4Sub(strPathQt4) = False then strPathQt4 = "" 1993 end if 1994 1995 ' Display the result. 2155 1996 if strPathQt4 = "" then 2156 1997 CfgPrint "VBOX_WITH_QT4GUI=" … … 2158 1999 else 2159 2000 CfgPrint "PATH_SDK_QT4 := " & strPathQt4 2160 CfgPrint "PATH_TOOL_QT4 2161 CfgPrint "VBOX_PATH_QT4 2001 CfgPrint "PATH_TOOL_QT4 := $(PATH_SDK_QT4)" 2002 CfgPrint "VBOX_PATH_QT4 := $(PATH_SDK_QT4)" 2162 2003 PrintResult "Qt4 ", strPathQt4 2163 2004 end if … … 2165 2006 2166 2007 2167 ' 2168 ' 2008 '' 2009 ' Checks if the specified path points to an usable Qt library. 2169 2010 function CheckForQt4Sub(strPathQt4) 2170 2011 … … 2381 2222 end if 2382 2223 if g_strShellOutput <> "TESTING_ENVIRONMENT_INHERITANCE=This works" & CHR(13) & CHR(10) then 2383 MsgFatal "shell inheritance or shell execution isn't working right." 2224 Print "Shell test Test -> '" & g_strShellOutput & "'" 2225 MsgFatal "shell inheritance or shell execution isn't working right. Make sure you use cmd.exe." 2384 2226 end if 2385 2227 g_objShell.Environment("PROCESS")("TESTING_ENVIRONMENT_INHERITANCE") = "" … … 2397 2239 CheckSourcePath 2398 2240 CheckForkBuild strOptkBuild 2399 CheckForWin2k3DDK strOptDDK 2241 CheckForWinDDK strOptDDK 2242 CfgPrint "VBOX_WITH_WDDM_W8 := " '' @todo look for WinDDKv8; Check with Misha if we _really_ need the v8 DDK... 2400 2243 CheckForVisualCPP strOptVC, strOptVCCommon, blnOptVCExpressEdition 2401 2244 CheckForPlatformSDK strOptSDK
Note:
See TracChangeset
for help on using the changeset viewer.