Changeset 82587 in vbox for trunk/src/VBox/Additions/WINNT
- Timestamp:
- Dec 16, 2019 4:33:00 PM (5 years ago)
- svn:sync-xref-src-repo-rev:
- 135472
- Location:
- trunk/src/VBox/Additions/WINNT/Installer
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Additions/WINNT/Installer/VBoxGuestAdditionsCommon.nsh
r80278 r82587 833 833 !define PrepareWRPFileEx "!insertmacro PrepareWRPFileEx" 834 834 835 ; 836 ; Validates backed up and replaced Direct3D files; either the d3d*.dll have 837 ; to be from Microsoft or the (already) backed up msd3d*.dll files. If both 838 ; don't match we have a corrupted / invalid installation. 839 ; @return Stack: "0" if files are valid; otherwise "1". 840 ; 841 !macro ValidateFilesDirect3D un 842 Function ${un}ValidateD3DFiles 843 844 Push $0 845 846 ; We need to switch to 64-bit app mode to handle the "real" 64-bit files in 847 ; "system32" on a 64-bit guest 848 Call ${un}SetAppMode64 849 850 ; Note: Not finding a file (like *d3d8.dll) on Windows Vista/7 is fine; 851 ; it simply is not present there. 852 853 ; Note 2: On 64-bit systems there are no 64-bit *d3d8 DLLs, only 32-bit ones 854 ; in SysWOW64 (or in system32 on 32-bit systems). 855 856 !if $%BUILD_TARGET_ARCH% == "x86" 857 ${VerifyFileEx} "${un}" "$SYSDIR\d3d8.dll" "Microsoft Corporation" "$%BUILD_TARGET_ARCH%" 858 Pop $0 859 ${If} $0 == "1" 860 Goto verify_msd3d 861 ${EndIf} 862 !endif 863 864 ${VerifyFileEx} "${un}" "$SYSDIR\d3d9.dll" "Microsoft Corporation" "$%BUILD_TARGET_ARCH%" 865 Pop $0 866 ${If} $0 == "1" 867 Goto verify_msd3d 868 ${EndIf} 869 870 ${If} $g_bCapDllCache == "true" 871 !if $%BUILD_TARGET_ARCH% == "x86" 872 ${VerifyFileEx} "${un}" "$SYSDIR\dllcache\d3d8.dll" "Microsoft Corporation" "$%BUILD_TARGET_ARCH%" 873 Pop $0 874 ${If} $0 == "1" 875 Goto verify_msd3d 876 ${EndIf} 877 !endif 878 ${VerifyFileEx} "${un}" "$SYSDIR\dllcache\d3d9.dll" "Microsoft Corporation" "$%BUILD_TARGET_ARCH%" 879 Pop $0 880 ${If} $0 == "1" 881 Goto verify_msd3d 882 ${EndIf} 883 ${EndIf} 884 885 !if $%BUILD_TARGET_ARCH% == "amd64" 886 ${VerifyFileEx} "${un}" "$g_strSysWow64\d3d8.dll" "Microsoft Corporation" "x86" 887 Pop $0 888 ${If} $0 == "1" 889 Goto verify_msd3d 890 ${EndIf} 891 ${VerifyFileEx} "${un}" "$g_strSysWow64\d3d9.dll" "Microsoft Corporation" "x86" 892 Pop $0 893 ${If} $0 == "1" 894 Goto verify_msd3d 895 ${EndIf} 896 897 ${If} $g_bCapDllCache == "true" 898 ${VerifyFileEx} "${un}" "$g_strSysWow64\dllcache\d3d8.dll" "Microsoft Corporation" "x86" 899 Pop $0 900 ${If} $0 == "1" 901 Goto verify_msd3d 902 ${EndIf} 903 ${VerifyFileEx} "${un}" "$g_strSysWow64\dllcache\d3d9.dll" "Microsoft Corporation" "x86" 904 Pop $0 905 ${If} $0 == "1" 906 Goto verify_msd3d 907 ${EndIf} 908 ${EndIf} 909 910 !endif 911 912 Goto valid 913 914 verify_msd3d: 915 916 !if $%BUILD_TARGET_ARCH% == "x86" 917 ${VerifyFileEx} "${un}" "$SYSDIR\msd3d8.dll" "Microsoft Corporation" "$%BUILD_TARGET_ARCH%" 918 Pop $0 919 ${If} $0 == "1" 920 Goto invalid 921 ${EndIf} 922 !endif 923 ${VerifyFileEx} "${un}" "$SYSDIR\msd3d9.dll" "Microsoft Corporation" "$%BUILD_TARGET_ARCH%" 924 Pop $0 925 ${If} $0 == "1" 926 Goto invalid 927 ${EndIf} 928 929 ${If} $g_bCapDllCache == "true" 930 !if $%BUILD_TARGET_ARCH% == "x86" 931 ${VerifyFileEx} "${un}" "$SYSDIR\dllcache\msd3d8.dll" "Microsoft Corporation" "$%BUILD_TARGET_ARCH%" 932 Pop $0 933 ${If} $0 == "1" 934 Goto invalid 935 ${EndIf} 936 !endif 937 ${VerifyFileEx} "${un}" "$SYSDIR\dllcache\msd3d9.dll" "Microsoft Corporation" "$%BUILD_TARGET_ARCH%" 938 Pop $0 939 ${If} $0 == "1" 940 Goto invalid 941 ${EndIf} 942 ${EndIf} 943 944 !if $%BUILD_TARGET_ARCH% == "amd64" 945 ${VerifyFileEx} "${un}" "$g_strSysWow64\msd3d8.dll" "Microsoft Corporation" "x86" 946 Pop $0 947 ${If} $0 == "1" 948 Goto invalid 949 ${EndIf} 950 ${VerifyFileEx} "${un}" "$g_strSysWow64\msd3d9.dll" "Microsoft Corporation" "x86" 951 Pop $0 952 ${If} $0 == "1" 953 Goto invalid 954 ${EndIf} 955 956 ${If} $g_bCapDllCache == "true" 957 ${VerifyFileEx} "${un}" "$g_strSysWow64\dllcache\msd3d8.dll" "Microsoft Corporation" "x86" 958 Pop $0 959 ${If} $0 == "1" 960 Goto invalid 961 ${EndIf} 962 ${VerifyFileEx} "${un}" "$g_strSysWow64\dllcache\msd3d9.dll" "Microsoft Corporation" "x86" 963 Pop $0 964 ${If} $0 == "1" 965 Goto invalid 966 ${EndIf} 967 ${EndIf} 968 !endif 969 970 Goto valid 971 972 valid: 973 974 StrCpy $0 "0" ; Installation valid 975 Goto end 976 977 invalid: 978 979 StrCpy $0 "1" ; Installation invalid / corrupted 980 Goto end 981 982 end: 983 984 Exch $0 985 986 FunctionEnd 987 !macroend 988 !insertmacro ValidateFilesDirect3D "" 989 !insertmacro ValidateFilesDirect3D "un." 990 835 ; Note: We don't ship modified Direct3D files anymore, but we need to (try to) 836 ; restore the original (backed up) DLLs when upgrading from an old(er) 837 ; installation. 991 838 ; 992 839 ; Restores formerly backed up Direct3D original files, which were replaced by … … 1041 888 !endif 1042 889 1043 ; Do a re-validation afterwards. 1044 Call ${un}ValidateD3DFiles 1045 Pop $0 1046 ${If} $0 == "1" ; D3D files are invalid 1047 ${LogVerbose} $(VBOX_UNINST_UNABLE_TO_RESTORE_D3D) 1048 MessageBox MB_ICONSTOP|MB_OK $(VBOX_UNINST_UNABLE_TO_RESTORE_D3D) /SD IDOK 1049 ${EndIf} 1050 1051 Exch $0 890 Pop $0 1052 891 1053 892 FunctionEnd -
trunk/src/VBox/Additions/WINNT/Installer/VBoxGuestAdditionsVista.nsh
r76553 r82587 22 22 ${LogVerbose} "Checking for installation requirements for Vista / Windows 7 / Windows 8 ..." 23 23 24 ${If} $g_bForceInstall == "true" 25 ${LogVerbose} "Forcing installation, checking requirements skipped" 26 goto success 27 ${EndIf} 28 29 ; Validate D3D files, regardless whether D3D support is selected or not 30 Call ValidateD3DFiles 31 Pop $0 32 ${If} $0 == "1" ; D3D files are invalid, notify user 33 MessageBox MB_ICONSTOP|MB_OKCANCEL $(VBOX_COMPONENT_D3D_INVALID) /SD IDOK IDCANCEL failure 34 ; Offer to open up the VBox online manual on how to fix missing/corrupted D3D files 35 MessageBox MB_ICONQUESTION|MB_YESNO $(VBOX_COMPONENT_D3D_INVALID_MANUAL) /SD IDNO IDYES open_handbook_d3d_invalid 36 ${EndIf} 37 Goto success 38 39 open_handbook_d3d_invalid: 40 41 ; @todo Add a language GET parameter (e.g. ?lang=enUS) here as soon as we got the 42 ; handbook online in different languages 43 ; Don't use https here (even if we offer it) -- we only want to display the handbook 44 Call SetAppMode64 ; For shell execution we need to switch to 64-bit mode first 45 ExecShell open "http://www.virtualbox.org/manual/ch12.html#ts_d3d8-d3d9-restore" 46 IfErrors 0 +2 47 MessageBox MB_ICONSTOP|MB_OK $(VBOX_ERROR_OPEN_LINK) /SD IDOK 48 Call SetAppMode32 49 Goto failure 50 51 failure: 52 53 Abort "ERROR: Requirements not met! Installation aborted." 54 goto exit 55 56 success: 57 58 ; Nothing to do here right now 59 Goto exit 60 61 exit: 24 ; Nothing to do here right now. 62 25 63 26 Pop $0
Note:
See TracChangeset
for help on using the changeset viewer.