From b80b72a76fdc9241161c4afdde74daf188f48811 Mon Sep 17 00:00:00 2001 From: Chris Bielow Date: Thu, 9 Nov 2023 10:54:27 +0100 Subject: [PATCH] remove installation of .NET and VS runtimes as dependency of proteowizard (msconvert): the current pwiz ships all vc-runtimes in its ./bin folder and requires a .NET runtime which is by default installed on every Win10 anyway (see https://learn.microsoft.com/en-us/archive/blogs/astebner/mailbag-what-version-of-the-net-framework-is-included-in-what-version-of-the-os) --- cmake/Windows/NSIS.template.in | 133 +++------------------------------ 1 file changed, 12 insertions(+), 121 deletions(-) diff --git a/cmake/Windows/NSIS.template.in b/cmake/Windows/NSIS.template.in index ec950b5539a..159dc677579 100644 --- a/cmake/Windows/NSIS.template.in +++ b/cmake/Windows/NSIS.template.in @@ -36,13 +36,6 @@ SetCompressor /SOLID lzma ### SCRIPT ### ################## -# pwiz needs alternative VS runtime libraries (32bit for Agilent libraries) -!define VS_PWIZ_REDISTRIBUTABLE_EXE "vcredist2010_x86_sp1.exe" - -# additional pwiz redistributables -!define VS_PWIZ_ADD1_REDISTRIBUTABLE_EXE "vcredist2012_x64_upd4.exe" -!define VS_PWIZ_ADD2_REDISTRIBUTABLE_EXE "vcredist2013_x64_upd2.exe" - # which extensions to connect to TOPPView and TOPPAS !macro OpenMSGUIExtensions _action !insertmacro ${_action} ".mzData" "TOPPView" @@ -79,7 +72,7 @@ SetCompressor /SOLID lzma # We could also define the following #CONTACT #URL_HELP_LINK - + # MultiUser defines !define MULTIUSER_INSTALLMODE_INSTDIR "${PRODUCT_NAME}-${VERSION}" # Otherwise it would just be PRODUCT_NAME @@ -314,7 +307,7 @@ Section "Documentation" SEC_Doc # open uninstall log file !insertmacro UNINSTALL.LOG_OPEN_INSTALL - # html docs + # html docs !if ${DEBUG_SKIP_DOCU} == 0 File /r "${OPENMSDOCDIR}\html\*.*" @@ -327,97 +320,15 @@ SectionEnd ## Third party libs ## TODO switch to packagedir SectionGroup "ThirdParty" SEC_ThirdParty - !if ${DEBUG_NO_THIRDPARTY} == 0 - Section "Proteowizard" SEC_pwiz - SectionIn 1 3 + !if ${DEBUG_NO_THIRDPARTY} == 0 + Section "Proteowizard" SEC_pwiz + SectionIn 1 3 SetOverwrite on CreateDirectory "$INSTDIR\share\OpenMS\THIRDPARTY\pwiz-bin" SetOutPath "$INSTDIR\share\OpenMS\THIRDPARTY\pwiz-bin" - !insertmacro UNINSTALL.LOG_OPEN_INSTALL - - File /r "${THIRDPARTYDIR}\pwiz-bin\*.*" - - !insertmacro UNINSTALL.LOG_CLOSE_INSTALL - SectionEnd - - Section ".NET and VSRuntime for Proteowizard" SEC_dotnet - SectionIn 1 3 - SetOverwrite on !insertmacro UNINSTALL.LOG_OPEN_INSTALL - Var /GLOBAL netSilentArgs - StrCpy $netSilentArgs "" - IfSilent 0 +2 - StrCpy $netSilentArgs "/q /norestart" - - ## download .NET 3.5 and 4.0 (required by pwiz) - - inetc::get /BANNER "Getting .NET 3.5 SP1 installer." \ - "http://www.microsoft.com/downloads/info.aspx?na=41&SrcFamilyId=AB99342F-5D1A-413D-8319-81DA479AB0D7&SrcDisplayLang=en&u=http%3a%2f%2fdownload.microsoft.com%2fdownload%2f0%2f6%2f1%2f061F001C-8752-4600-A198-53214C69B51F%2fdotnetfx35setup.exe" \ - "$EXEDIR\NET3.5_SP1_installer.exe" - Pop $0 - StrCmp $0 "OK" dl35ok net35_install_success - MessageBox MB_OK|MB_ICONEXCLAMATION "Downloading 'Microsoft .NET 3.5 SP1' failed. You must download and install it manually in order for Proteowizard to work!" /SD IDOK - - dl35ok: - ClearErrors - ExecWait '"$EXEDIR\NET3.5_SP1_installer.exe" $netSilentArgs' $0 - StrCmp $0 0 net35_install_success - MessageBox MB_OK|MB_ICONEXCLAMATION "The installation of the Microsoft .NET 3.5 SP1' package failed! You must download and install it manually in order for Proteowizard to work!" /SD IDOK - - net35_install_success: - ## .NET 3.5 installed, yeah! - - inetc::get /BANNER "Getting .NET 4.0 installer." \ - "http://www.microsoft.com/downloads/info.aspx?na=41&SrcFamilyId=AB99342F-5D1A-413D-8319-81DA479AB0D7&SrcDisplayLang=en&u=http%3a%2f%2fdownload.microsoft.com%2fdownload%2f9%2f5%2fA%2f95A9616B-7A37-4AF6-BC36-D6EA96C8DAAE%2fdotNetFx40_Full_x86_x64.exe" \ - "$EXEDIR\NET4.0_installer.exe" - - Pop $0 - StrCmp $0 "OK" dl40ok net40_install_success - MessageBox MB_OK|MB_ICONEXCLAMATION "Downloading 'Microsoft .NET 4.0' failed. You must download and install it manually in order for Proteowizard to work!" /SD IDOK - - dl40ok: - ClearErrors - ExecWait '"$EXEDIR\NET4.0_installer.exe" $netSilentArgs' $0 - StrCmp $0 0 net40_install_success - MessageBox MB_OK|MB_ICONEXCLAMATION "The installation of the Microsoft .NET 4.0' package failed! You must download and install it manually in order for Proteowizard to work!" /SD IDOK - - net40_install_success: - ## .NET 4.0 installed, yeah! - - ## pwiz now requires vs 2010 32bit (!) runtime libraries installed (Agilent libraries) - ## 2017: now also 2012 and 2013 of the corresponding platform - SetOutPath $TEMP - SetOverwrite on - - File "${THIRDPARTYDIR}\${VS_PWIZ_REDISTRIBUTABLE_EXE}" - ClearErrors - ExecWait '$TEMP\${VS_PWIZ_REDISTRIBUTABLE_EXE} /passive /norestart' $0 - StrCmp $0 0 vs_pwiz_install_success - StrCmp $0 1638 vs_pwiz_install_success - MessageBox MB_OK "The installation of the Visual Studio redistributable package '${VS_PWIZ_REDISTRIBUTABLE_EXE}' failed! Proteowizard will not work unless this package is installed! The package is located at '$TEMP\${VS_PWIZ_REDISTRIBUTABLE_EXE}'. Try to execute it as administrator - there will likely be an error which you can blame Microsoft for. If you cannot fix it contact the OpenMS developers!" - - vs_pwiz_install_success: - - File "${THIRDPARTYDIR}\${VS_PWIZ_ADD1_REDISTRIBUTABLE_EXE}" - ClearErrors - ExecWait '$TEMP\${VS_PWIZ_ADD1_REDISTRIBUTABLE_EXE} /passive /norestart' $0 - StrCmp $0 0 vs_pwiz_add1_install_success - StrCmp $0 1638 vs_pwiz_add1_install_success - MessageBox MB_OK "The installation of the Visual Studio redistributable package '${VS_PWIZ_ADD1_REDISTRIBUTABLE_EXE}' failed! Proteowizard will not work unless this package is installed! The package is located at '$TEMP\${VS_PWIZ_ADD1_REDISTRIBUTABLE_EXE}'. Try to execute it as administrator - there will likely be an error which you can blame Microsoft for. If you cannot fix it contact the OpenMS developers!" - - vs_pwiz_add1_install_success: - - File "${THIRDPARTYDIR}\${VS_PWIZ_ADD2_REDISTRIBUTABLE_EXE}" - ClearErrors - ExecWait '$TEMP\${VS_PWIZ_ADD2_REDISTRIBUTABLE_EXE} /install /passive /norestart' $0 - StrCmp $0 0 vs_pwiz_add2_install_success - StrCmp $0 1638 vs_pwiz_add2_install_success - MessageBox MB_OK "The installation of the Visual Studio redistributable package '${VS_PWIZ_ADD2_REDISTRIBUTABLE_EXE}' failed! Proteowizard will not work unless this package is installed! The package is located at '$TEMP\${VS_PWIZ_ADD2_REDISTRIBUTABLE_EXE}'. Try to execute it as administrator - there will likely be an error which you can blame Microsoft for. If you cannot fix it contact the OpenMS developers!" - - ## reasons why the install might fail: - - vs_pwiz_add2_install_success: + File /r "${THIRDPARTYDIR}\pwiz-bin\*.*" !insertmacro UNINSTALL.LOG_CLOSE_INSTALL SectionEnd @@ -427,8 +338,7 @@ SectionGroup "ThirdParty" SEC_ThirdParty !system 'FOR /D %A IN ("${THIRDPARTYDIR}\*") DO @( IF NOT "%~nA" == "pwiz-bin" ((echo Section "%~nA" & echo SectionIn 1 3 & echo !insertmacro UNINSTALL.LOG_OPEN_INSTALL & echo SetOverwrite on & echo CreateDirectory "$INSTDIR\share\OpenMS\THIRDPARTY\%~nA" & echo SetOutPath "$INSTDIR\share\OpenMS\THIRDPARTY\%~nA" & echo File /r "%~A\*.*" & echo Var /GLOBAL %~nAInstalled & echo StrCpy $%~nAInstalled "1" & echo !insertmacro UNINSTALL.LOG_CLOSE_INSTALL & echo SectionEnd) >> "${filelist}"))' !include "${filelist}" !delfile "${filelist}" - - !endif + !endif SectionGroupEnd @@ -447,8 +357,8 @@ SectionEnd Function CreateShortcuts !insertmacro MUI_STARTMENU_WRITE_BEGIN Application - ## warning: create shortcuts only AFTER installing files, OR renew SetOutPath - ## otherwise all files will be installed to the default install directory + ## warning: create shortcuts only AFTER installing files, OR renew SetOutPath + ## otherwise all files will be installed to the default install directory !insertmacro CREATE_SMGROUP_SHORTCUT "OpenMS Documentation (html)" $INSTDIR\share\doc\html\index.html !insertmacro CREATE_SMGROUP_SHORTCUT TOPPView $INSTDIR\bin\TOPPView.exe @@ -592,31 +502,16 @@ SectionEnd # hidden section, write install size as the final step Section "-Write Install Size" - !insertmacro MULTIUSER_RegistryAddInstallSizeInfo + !insertmacro MULTIUSER_RegistryAddInstallSizeInfo SectionEnd Function parseParameters - ClearErrors ; /nothirdparty ${GetOptions} $cmdLineParams '/nothirdparty' $R0 - IfErrors nopwiz 0 + IfErrors parsedParams 0 !insertmacro ClearSectionFlag ${SEC_ThirdParty} ${SF_SELECTED} - goto parsedParams - - ; /nopwiz - nopwiz: - ${GetOptions} $cmdLineParams '/nopwiz' $R0 - IfErrors nodotnet 0 - !insertmacro ClearSectionFlag ${SEC_pwiz} ${SF_SELECTED} - goto parsedParams - - ; /nodotnet - nodotnet: - ${GetOptions} $cmdLineParams '/nodotnet' $R0 - IfErrors parsedParams 0 - !insertmacro ClearSectionFlag ${SEC_dotnet} ${SF_SELECTED} parsedParams: @@ -646,8 +541,6 @@ Function .onInit /currentuser$\t- (un)install for current user only, case-insensitive$\r$\n\ /uninstall$\t- (installer only) run uninstaller, requires /allusers or /currentuser, case-insensitive$\r$\n\ /nothirdparty$\t- does not install thirdparty tools, case-sensitive$\r$\n\ - /nopwiz$\t- does not install proteowizard, case-sensitive$\r$\n\ - /nodotnet$\t- does not try to install dotnet framework, case-sensitive$\r$\n\ /S$\t- silent mode, requires /allusers or /currentuser, case-sensitive$\r$\n\ /D$\t- (installer only) set install directory, must be last parameter, without quotes, case-sensitive$\r$\n\ /?$\t- display this message$\r$\n\ @@ -759,9 +652,7 @@ FunctionEnd !insertmacro MUI_DESCRIPTION_TEXT ${SEC_TOPP} "TOPP (The OpenMS PiPeline) - chainable tools for data analysis" !insertmacro MUI_DESCRIPTION_TEXT ${SEC_Doc} "Documentation/Tutorials for TOPP, TOPPView and the OpenMS library itself." !insertmacro MUI_DESCRIPTION_TEXT ${SEC_ThirdParty} "Install third party libraries (e.g., ProteoWizard)." -!insertmacro MUI_DESCRIPTION_TEXT ${SEC_dotnet} "Install .NET and Microsoft Visual Studio Runtime for Proteowizard. (may require the installer to be run in admin mode). Deactivate if you are not admin and think this is installed already (or will be installed later) by an admin." !insertmacro MUI_DESCRIPTION_TEXT ${SEC_RegisterExt} "Register certain file types (e.g., '.mzML') with TOPPView.exe." -#!insertmacro MUI_DESCRIPTION_TEXT ${SEC_VSRuntime} "Install the required Microsoft Visual Studio runtime (may require the installer to be run in admin mode). Deactivate if you are not admin and think this is installed already (or will be installed later) by an admin." !insertmacro MUI_FUNCTION_DESCRIPTION_END ################ @@ -813,7 +704,7 @@ Section "-Uninstall" ${un.RefreshShellIcons} ## delete all installed files - !insertmacro UNINSTALL.NEW_UNINSTALL + !insertmacro UNINSTALL.NEW_UNINSTALL # remove directories which are now empty (in case some were forgotten) Push "$INSTDIR"