Changeset 96428 in vbox
- Timestamp:
- Aug 23, 2022 7:27:21 AM (2 years ago)
- Location:
- trunk
- Files:
-
- 22 edited
-
Config.kmk (modified) (1 diff)
-
src/VBox/Installer/win/InstallHelper/VBoxCommon.cpp (modified) (2 diffs)
-
src/VBox/Installer/win/InstallHelper/VBoxCommon.h (modified) (1 diff)
-
src/VBox/Installer/win/InstallHelper/VBoxInstallHelper.cpp (modified) (1 diff)
-
src/VBox/Installer/win/InstallHelper/VBoxInstallHelper.def (modified) (1 diff)
-
src/VBox/Installer/win/Makefile.kmk (modified) (4 diffs)
-
src/VBox/Installer/win/NLS/de_DE.wxl (modified) (1 diff)
-
src/VBox/Installer/win/NLS/el_GR.wxl (modified) (1 diff)
-
src/VBox/Installer/win/NLS/en_US.wxl (modified) (1 diff)
-
src/VBox/Installer/win/NLS/fa_IR.wxl (modified) (1 diff)
-
src/VBox/Installer/win/NLS/fr_FR.wxl (modified) (1 diff)
-
src/VBox/Installer/win/NLS/it_IT.wxl (modified) (1 diff)
-
src/VBox/Installer/win/NLS/ru_RU.wxl (modified) (1 diff)
-
src/VBox/Installer/win/NLS/tr_TR.wxl (modified) (1 diff)
-
src/VBox/Installer/win/NLS/zh_CN.wxl (modified) (1 diff)
-
src/VBox/Installer/win/NLS/zh_TW.wxl (modified) (1 diff)
-
src/VBox/Installer/win/UserInterface.wxi (modified) (1 diff)
-
src/VBox/Installer/win/VBoxMergeApp.wxi (modified) (1 diff)
-
src/VBox/Installer/win/VBoxMergeAppCA.wxi (modified) (1 diff)
-
src/VBox/Installer/win/VBoxMergeAppSeq.wxi (modified) (1 diff)
-
src/VBox/Installer/win/VBoxMergeCOM32On64.wxi (modified) (1 diff)
-
src/VBox/Installer/win/VirtualBox.wxs (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/Config.kmk
r96424 r96428 387 387 # Include additions in the package 388 388 VBOX_WITH_ADDITIONS_PACKING = 1 389 # Don't include any CRTs. 390 ## @todo For now we need to include the (MS)CRT, needs tweaking the testcases first! 391 VBOX_WITH_CRT_PACKING = 1 389 392 # Only build the additions (for the additions build server). 390 393 #VBOX_ONLY_ADDITIONS = 1 -
trunk/src/VBox/Installer/win/InstallHelper/VBoxCommon.cpp
r96407 r96428 55 55 #endif 56 56 57 UINT VBoxGetMsiProp(MSIHANDLE hMsi, WCHAR *pwszName, WCHAR *pwszValue, DWORD dwSize)57 UINT VBoxGetMsiProp(MSIHANDLE hMsi, const WCHAR *pwszName, WCHAR *pwszValue, DWORD dwSize) 58 58 { 59 59 DWORD dwBuffer = 0; … … 105 105 #endif 106 106 107 UINT VBoxSetMsiProp(MSIHANDLE hMsi, WCHAR *pwszName,WCHAR *pwszValue)107 UINT VBoxSetMsiProp(MSIHANDLE hMsi, const WCHAR *pwszName, const WCHAR *pwszValue) 108 108 { 109 109 return MsiSetPropertyW(hMsi, pwszName, pwszValue); 110 110 } 111 111 112 UINT VBoxSetMsiPropDWORD(MSIHANDLE hMsi, const WCHAR *pwszName, DWORD dwVal) 113 { 114 wchar_t wszTemp[32]; 115 swprintf(wszTemp, sizeof(wszTemp) / sizeof(wchar_t), L"%ld", dwVal); 116 return VBoxSetMsiProp(hMsi, pwszName, wszTemp); 117 } 118 -
trunk/src/VBox/Installer/win/InstallHelper/VBoxCommon.h
r96407 r96428 36 36 #endif 37 37 38 UINT VBoxGetMsiProp(MSIHANDLE hMsi, WCHAR *pwszName, WCHAR *pwszValue, DWORD dwSize);38 UINT VBoxGetMsiProp(MSIHANDLE hMsi, const WCHAR *pwszName, WCHAR *pwszValue, DWORD dwSize); 39 39 int VBoxGetMsiPropUtf8(MSIHANDLE hMsi, const char *pcszName, char **ppszValue); 40 UINT VBoxSetMsiProp(MSIHANDLE hMsi, WCHAR *pwszName, WCHAR *pwszValue); 40 UINT VBoxSetMsiProp(MSIHANDLE hMsi, const WCHAR *pwszName, const WCHAR *pwszValue); 41 UINT VBoxSetMsiPropDWORD(MSIHANDLE hMsi, const WCHAR *pwszName, DWORD dwVal); 41 42 42 43 #endif /* !VBOX_INCLUDED_SRC_InstallHelper_VBoxCommon_h */ -
trunk/src/VBox/Installer/win/InstallHelper/VBoxInstallHelper.cpp
r96407 r96428 441 441 442 442 VBoxSetMsiProp(hModule, L"VBOX_PYTHON_DEPS_INSTALLED", dwErr == ERROR_SUCCESS ? L"1" : L"0"); 443 return ERROR_SUCCESS; /* Never return failure. */ 444 } 445 446 /** 447 * Checks if all required MS CRTs (Visual Studio Redistributable Package) are installed on the system. 448 * 449 * Called from the MSI installer as custom action. 450 * 451 * @returns Always ERROR_SUCCESS. 452 * Sets public property VBOX_MSCRT_INSTALLED to "" (false, to use "NOT" in WiX) or "1" (success). 453 * 454 * Also exposes public properties VBOX_MSCRT_VER_MIN + VBOX_MSCRT_VER_MAJ strings 455 * with the most recent MSCRT version detected. 456 * 457 * @param hModule Windows installer module handle. 458 * 459 * @sa https://docs.microsoft.com/en-us/cpp/windows/redistributing-visual-cpp-files?view=msvc-170 460 */ 461 UINT __stdcall IsMSCRTInstalled(MSIHANDLE hModule) 462 { 463 HKEY hKeyVS = NULL; 464 LSTATUS dwErr = RegOpenKeyExW(HKEY_LOCAL_MACHINE, 465 L"SOFTWARE\\Microsoft\\VisualStudio\\14.0\\VC\\Runtimes\\X64", 466 0, KEY_READ, &hKeyVS); 467 if (dwErr == ERROR_SUCCESS) 468 { 469 DWORD dwVal = 0; 470 DWORD cbVal = sizeof(dwVal); 471 DWORD dwValueType = REG_DWORD; 472 473 dwErr = RegQueryValueExW(hKeyVS, L"Installed", NULL, &dwValueType, (LPBYTE)&dwVal, &cbVal); 474 if (dwErr == ERROR_SUCCESS) 475 { 476 if (dwVal >= 1) 477 { 478 DWORD dwMin, dwMaj; 479 dwErr = RegQueryValueExW(hKeyVS, L"Major", NULL, &dwValueType, (LPBYTE)&dwMaj, &cbVal); 480 if (dwErr == ERROR_SUCCESS) 481 { 482 VBoxSetMsiPropDWORD(hModule, L"VBOX_MSCRT_VER_MAJ", dwMaj); 483 484 dwErr = RegQueryValueExW(hKeyVS, L"Minor", NULL, &dwValueType, (LPBYTE)&dwMin, &cbVal); 485 if (dwErr == ERROR_SUCCESS) 486 { 487 VBoxSetMsiPropDWORD(hModule, L"VBOX_MSCRT_VER_MIN", dwMin); 488 489 logStringF(hModule, L"IsMSCRTInstalled: Found v%ld.%ld\n", dwMaj, dwMin); 490 491 /* Check for at least 2019. */ 492 if (dwMaj >= 14 && dwMin >= 20) 493 VBoxSetMsiProp(hModule, L"VBOX_MSCRT_INSTALLED", L"1"); 494 } 495 else 496 logStringF(hModule, L"IsMSCRTInstalled: Found, but 'Minor' key not present"); 497 } 498 else 499 logStringF(hModule, L"IsMSCRTInstalled: Found, but 'Major' key not present"); 500 } 501 else 502 { 503 logStringF(hModule, L"IsMSCRTInstalled: Found, but not marked as installed"); 504 dwErr = ERROR_NOT_INSTALLED; 505 } 506 } 507 else 508 logStringF(hModule, L"IsMSCRTInstalled: Found, but 'Installed' key not present"); 509 } 510 511 if (dwErr != ERROR_SUCCESS) 512 logStringF(hModule, L"IsMSCRTInstalled: Failed with dwErr=%ld", dwErr); 513 443 514 return ERROR_SUCCESS; /* Never return failure. */ 444 515 } -
trunk/src/VBox/Installer/win/InstallHelper/VBoxInstallHelper.def
r96407 r96428 30 30 IsSerialCheckNeeded 31 31 CheckSerial 32 IsMSCRTInstalled 32 33 IsPythonInstalled 33 34 IsWindows10 -
trunk/src/VBox/Installer/win/Makefile.kmk
r96407 r96428 644 644 $(if $(VBOX_WITH_32_ON_64_MAIN_API),$(VBOX_WIN_INST_OUT_DIR)/VirtualBox_TypeLib_x86.wxi,) \ 645 645 $(VBOX_WIN_INST_OUT_DIR)/VBoxKey.wxi \ 646 $( VBOX_WIN_INST_OUT_DIR)/VBoxCrtDlls.wxi\647 $( VBOX_WIN_INST_OUT_DIR)/VBoxCrtDlls32.wxi\646 $(if $(VBOX_WITH_CRT_PACKING),$(VBOX_WIN_INST_OUT_DIR)/VBoxCrtDlls.wxi,) \ 647 $(if $(VBOX_WITH_CRT_PACKING),$(VBOX_WIN_INST_OUT_DIR)/VBoxCrtDlls32.wxi,) \ 648 648 $(VBOX_WIN_INST_OUT_DIR)/VBoxUnattendedTemplateComponent.wxi \ 649 649 $(if $(VBOX_WITH_QTGUI),$(VBOX_WIN_INST_OUT_DIR)/VBoxGuiNLS.wxi) \ … … 686 686 -E 'VBOX_WITH_ADDITIONS_PACKING=$(if $(VBOX_WITH_ADDITIONS_PACKING),yes,no)' \ 687 687 -E 'VBOX_WITH_COMBINED_PACKAGE=$(if-expr defined(VBOX_WITH_COMBINED_PACKAGE),yes,no)' \ 688 -E 'VBOX_WITH_CRT_PACKING=$(if-expr defined(VBOX_WITH_CRT_PACKING),yes,no)' \ 688 689 -E 'VBOX_WITH_DEBUGGER_GUI=$(if-expr defined(VBOX_WITH_DEBUGGER_GUI) && defined(VBOX_WITH_QTGUI),yes,no)' \ 689 690 -E 'VBOX_WITH_DOCS_PACKING=$(if $(VBOX_WITH_DOCS_PACKING),yes,no)' \ … … 809 810 $(if $(VBOX_WITH_32_ON_64_MAIN_API),$(VBOX_WIN_INST_OUT_DIR)/VirtualBox_TypeLib_x86.wxi,) \ 810 811 $(VBOX_WIN_INST_OUT_DIR)/VBoxKey.wxi \ 811 $( VBOX_WIN_INST_OUT_DIR)/VBoxCrtDlls.wxi\812 $( VBOX_WIN_INST_OUT_DIR)/VBoxCrtDlls32.wxi\812 $(if $(VBOX_WITH_CRT_PACKING),$(VBOX_WIN_INST_OUT_DIR)/VBoxCrtDlls.wxi,) \ 813 $(if $(VBOX_WITH_CRT_PACKING),$(VBOX_WIN_INST_OUT_DIR)/VBoxCrtDlls32.wxi,) \ 813 814 $(VBOX_WIN_INST_OUT_DIR)/VBoxUnattendedTemplateComponent.wxi \ 814 815 $(if $(VBOX_WITH_QTGUI),$(VBOX_WIN_INST_OUT_DIR)/VBoxGuiNLS.wxi) \ … … 847 848 -E 'VBOX_WITH_ADDITIONS_PACKING=$(if $(VBOX_WITH_ADDITIONS_PACKING),yes,no)' \ 848 849 -E 'VBOX_WITH_COMBINED_PACKAGE=$(if-expr defined(VBOX_WITH_COMBINED_PACKAGE),yes,no)' \ 850 -E 'VBOX_WITH_CRT_PACKING=$(if-expr defined(VBOX_WITH_CRT_PACKING),yes,no)' \ 849 851 -E 'VBOX_WITH_DEBUGGER_GUI=$(if-expr defined(VBOX_WITH_DEBUGGER_GUI) && defined(VBOX_WITH_QTGUI),yes,no)' \ 850 852 -E 'VBOX_WITH_DOCS_PACKING=$(if $(VBOX_WITH_DOCS_PACKING),yes,no)' \ -
trunk/src/VBox/Installer/win/NLS/de_DE.wxl
r96407 r96428 70 70 71 71 <String Id="NeedAdmin">Sie benötigen Administrations-Rechte zum (De-)Installieren von [ProductName]! Das Setup wird nun beendet.</String> 72 <String Id="NeedMSCRT">Für [ProductName] muss zuerst das Microsoft Visual C++ 2019 Redistributable Package installiert werden. Bitte installieren und danach die Installation von [ProductName] wiederholen.</String> 72 73 <String Id="WrongOS">[ProductName] läuft nur auf Windows XP oder höher!</String> 73 74 <String Id="Only32Bit">Diese Applikation läuft nur auf 32-bit Windows-Systemen. Bitte installieren Sie die 64-bit Version von [ProductName]!</String> -
trunk/src/VBox/Installer/win/NLS/el_GR.wxl
r96407 r96428 70 70 71 71 <String Id="NeedAdmin">Πρέπει να έχετε δικαιώματα διαχειριστή για την (απ)εγκατάσταση του [ProductName]! Η εφαρμογή θα τερματιστεί τώρα.</String> 72 <String Id="NeedMSCRT">[ProductName] needs the Microsoft Visual C++ 2019 Redistributable Package being installed first. Please install and restart the installation of [ProductName].</String> 72 73 <String Id="WrongOS">Αυτή η εφαρμογή τρέχει μόνο σε Windows XP ή παραπάνω.</String> 73 74 <String Id="Only32Bit">Αυτή η εφαρμογή τρέχει μόνο σε συστήματα Windows 32 bit. Εγκαταστήστε την έκδοση 64-bit του [ProductName]!</String> -
trunk/src/VBox/Installer/win/NLS/en_US.wxl
r96407 r96428 70 70 71 71 <String Id="NeedAdmin">You need to have administrator rights to (un)install [ProductName]! This setup will abort now.</String> 72 <String Id="NeedMSCRT">[ProductName] needs the Microsoft Visual C++ 2019 Redistributable Package being installed first. Please install and restart the installation of [ProductName].</String> 72 73 <String Id="WrongOS">This application only runs on Windows XP or above.</String> 73 74 <String Id="Only32Bit">This application only runs on 32-bit Windows systems. Please install the 64-bit version of [ProductName]!</String> -
trunk/src/VBox/Installer/win/NLS/fa_IR.wxl
r96407 r96428 63 63 <!----> 64 64 <String Id="NeedAdmin">برای حذف [ProductName] شما نیاز به اجازه مدیر دارید! این راه انداز حالا لغو میشود.</String> 65 <String Id="NeedMSCRT">[ProductName] needs the Microsoft Visual C++ 2019 Redistributable Package being installed first. Please install and restart the installation of [ProductName].</String> 65 66 <String Id="WrongOS">این برنامه فقط در ویندوز ایکس پی یا بالاتر اِجرا میشود.</String> 66 67 <String Id="Only32Bit">این برنامه فقط روی ویندوز 32 بیتی اِجرا میشود. لطفا نسخه 64 بیتی [ProductName] را نصب کنید!</String> -
trunk/src/VBox/Installer/win/NLS/fr_FR.wxl
r96407 r96428 70 70 71 71 <String Id="NeedAdmin">Vous ne pouvez pas (dés)installer [ProductName] sans droits d'administrateur! Ce programme d'installation terminera maintenant.</String> 72 <String Id="NeedMSCRT">[ProductName] needs the Microsoft Visual C++ 2019 Redistributable Package being installed first. Please install and restart the installation of [ProductName].</String> 72 73 <String Id="WrongOS">Cette application nécéssite Windows XP ou plus récent.</String> 73 74 <String Id="Only32Bit">Cette application ne marche que sur des systèmes Windows 32-bit. Veuillez installer la version 64-bit de [ProductName]!</String> -
trunk/src/VBox/Installer/win/NLS/it_IT.wxl
r96407 r96428 63 63 <!----> 64 64 <String Id="NeedAdmin">Devi avere diritti di amministrazione per (dis)installare [ProductName]! L'installazione sarà interrotta immediatamente.</String> 65 <String Id="NeedMSCRT">[ProductName] needs the Microsoft Visual C++ 2019 Redistributable Package being installed first. Please install and restart the installation of [ProductName].</String> 65 66 <String Id="WrongOS">Questa applicazione può essere eseguita solo su Windows XP o superiori.</String> 66 67 <String Id="Only32Bit">Questa applicazione può essere eseguita solo su sistemi Windows a 32 bit. Installa la versione a 64 bit di [ProductName]!</String> -
trunk/src/VBox/Installer/win/NLS/ru_RU.wxl
r96407 r96428 70 70 71 71 <String Id="NeedAdmin">You need to have administrator rights to (un)install [ProductName]! This setup will abort now.</String> 72 <String Id="NeedMSCRT">[ProductName] needs the Microsoft Visual C++ 2019 Redistributable Package being installed first. Please install and restart the installation of [ProductName].</String> 72 73 <String Id="WrongOS">This application only runs on Windows XP or above.</String> 73 74 <String Id="Only32Bit">This application only runs on 32-bit Windows systems. Please install the 64-bit version of [ProductName]!</String> -
trunk/src/VBox/Installer/win/NLS/tr_TR.wxl
r96407 r96428 70 70 71 71 <String Id="NeedAdmin">[ProductName] uygulamasını yüklemek(kaldırmak) için yönetici haklarına sahip olmanız gerekir! Bu kur şimdi iptal edilecek.</String> 72 <String Id="NeedMSCRT">[ProductName] needs the Microsoft Visual C++ 2019 Redistributable Package being installed first. Please install and restart the installation of [ProductName].</String> 72 73 <String Id="WrongOS">Bu uygulama yalnızca Windows XP veya üzerinde çalışır.</String> 73 74 <String Id="Only32Bit">Bu uygulama yalnızca 32-bit Windows sistemlerinde çalışır. Lütfen [ProductName] 64-bit sürümünü yükleyin!</String> -
trunk/src/VBox/Installer/win/NLS/zh_CN.wxl
r96407 r96428 70 70 71 71 <String Id="NeedAdmin">需要系统管理员权限安装 (或卸载)[ProductName]!此安装程序现在将中止。</String> 72 <String Id="NeedMSCRT">[ProductName] needs the Microsoft Visual C++ 2019 Redistributable Package being installed first. Please install and restart the installation of [ProductName].</String> 72 73 <String Id="WrongOS">此应用程序只能运行在 Windows XP 或以上。</String> 73 74 <String Id="Only32Bit">此应用程序只能运行在 32 位 Windows 系统。 请安装 [ProductName] 的 64 位版本!</String> -
trunk/src/VBox/Installer/win/NLS/zh_TW.wxl
r96407 r96428 70 70 71 71 <String Id="NeedAdmin">您需要有系統管理員特殊權限以安裝 (或解除安裝)[ProductName]!此安裝程式現在將中止。</String> 72 <String Id="NeedMSCRT">[ProductName] needs the Microsoft Visual C++ 2019 Redistributable Package being installed first. Please install and restart the installation of [ProductName].</String> 72 73 <String Id="WrongOS">此應用程式只能執行在 Windows XP 或以上。</String> 73 74 <String Id="Only32Bit">此應用程式只能執行在 32 位元的 Windows 系統。 請安裝 [ProductName] 的 64 位元版本!</String> -
trunk/src/VBox/Installer/win/UserInterface.wxi
r96407 r96428 1209 1209 <InstallUISequence> 1210 1210 1211 <?if $(env.VBOX_WITH_CRT_PACKING) = "no" ?> 1212 <Custom Action="ca_IsMSCRTInstalled" After="AppSearch" /> 1213 <?endif?> 1211 1214 <Custom Action="ca_OriginalTargetDir" After="FileCost"><![CDATA[(NOT INSTALLDIR) AND (NOT EXISTINGINSTALLDIR)]]></Custom> 1212 1215 <Custom Action="ca_DefaultTargetDir" After="FileCost"><![CDATA[NOT Installed AND (NOT INSTALLDIR) AND EXISTINGINSTALLDIR]]></Custom> -
trunk/src/VBox/Installer/win/VBoxMergeApp.wxi
r96407 r96428 391 391 <?endif?> 392 392 393 <?if $(env.VBOX_WITH_CRT_PACKING) = "yes" ?> 393 394 <!-- Include CRT Dlls (specific to the compiler). --> 394 395 <?include $(env.PATH_TARGET)\VBoxCrtDlls.wxi ?> 396 <?endif?> 395 397 396 398 <!-- EFI firmware --> -
trunk/src/VBox/Installer/win/VBoxMergeAppCA.wxi
r96407 r96428 28 28 xmlns:difxapp="http://schemas.microsoft.com/wix/DifxAppExtension"> 29 29 30 <?if $(env.VBOX_WITH_CRT_PACKING) = "no" ?> 31 <CustomAction Id="ca_IsMSCRTInstalled" BinaryKey="VBoxInstallHelper" 32 DllEntry="IsMSCRTInstalled" Execute="immediate" Return="ignore" Impersonate="no" /> 33 <?endif?> 34 30 35 <CustomAction Id="ca_IsWindows10" BinaryKey="VBoxInstallHelper" 31 36 DllEntry="IsWindows10" Execute="immediate" Return="ignore" Impersonate="no" /> 32 37 33 38 </Include> 39 -
trunk/src/VBox/Installer/win/VBoxMergeAppSeq.wxi
r96407 r96428 28 28 xmlns:difxapp="http://schemas.microsoft.com/wix/DifxAppExtension"> 29 29 30 <Custom Action="ca_IsWindows10" After="FileCost">1</Custom> 30 <?if $(env.VBOX_WITH_CRT_PACKING) = "no" ?> 31 <Custom Action="ca_IsMSCRTInstalled" After="AppSearch">1</Custom> 32 <?endif?> 33 34 <Custom Action="ca_IsWindows10" After="FileCost">1</Custom> 31 35 32 36 </Include> -
trunk/src/VBox/Installer/win/VBoxMergeCOM32On64.wxi
r96407 r96428 57 57 <?include $(env.PATH_TARGET)\VirtualBox_TypeLib_x86.wxi ?> 58 58 59 <?if $(env.VBOX_WITH_CRT_PACKING) = "yes" ?> 59 60 <!-- Include CRT Dlls (specific to the compiler). --> 60 61 <?include $(env.PATH_TARGET)\VBoxCrtDlls32.wxi ?> 62 <?endif?> 61 63 </Component> 62 64 </Directory> -
trunk/src/VBox/Installer/win/VirtualBox.wxs
r96423 r96428 121 121 Privileged 122 122 </Condition> 123 124 <?if $(env.VBOX_WITH_CRT_PACKING) = "no" ?> 125 <!-- Check if we have the required MS CRT(s) installed when we're not shipping those. --> 126 <Condition Message="!(loc.NeedMSCRT)"> 127 Installed OR (VBOX_MSCRT_INSTALLED) 128 </Condition> 129 <?endif ?> 123 130 124 131 <!-- Detect old innotek installation -->
Note:
See TracChangeset
for help on using the changeset viewer.

