diff --git a/Source/Install/MediaInfo_GUI_Windows.nsi b/Source/Install/MediaInfo_GUI_Windows.nsi index 19452c37b..d2690ace1 100644 --- a/Source/Install/MediaInfo_GUI_Windows.nsi +++ b/Source/Install/MediaInfo_GUI_Windows.nsi @@ -22,6 +22,9 @@ SetCompressor /FINAL /SOLID lzma ; x64 stuff !include "x64.nsh" +; Logic stuff +!include LogicLib.nsh + ; Library macros for handling install/uninstall of exe/dll ; https://nsis.sourceforge.io/Docs/AppendixB.html !include "Library.nsh" @@ -120,7 +123,11 @@ ShowInstDetails nevershow ShowUnInstDetails nevershow Function .onInit - ${If} ${RunningX64} + ${If} ${IsNativeARM64} + ${AndIf} ${AtLeastWin11} + SetRegView 64 + ${EndIf} + ${If} ${IsNativeAMD64} SetRegView 64 ${EndIf} !insertmacro MUI_LANGDLL_DISPLAY @@ -136,30 +143,50 @@ Section "SectionPrincipale" SEC01 SetOutPath "$SMPROGRAMS" CreateShortCut "$SMPROGRAMS\MediaInfo.lnk" "$INSTDIR\MediaInfo.exe" "" "" "" "" "" "Convenient unified display of the most relevant technical and tag data for video and audio files" SetOutPath "$INSTDIR" + + ; Architecture neutral files File "/oname=History.txt" "..\..\History_GUI.txt" File "..\..\License.html" File "/oname=ReadMe.txt" "..\..\Release\ReadMe_GUI_Windows.txt" - ${If} ${RunningX64} - File "/oname=MediaInfo.exe" "..\..\Project\BCB\GUI\Win64\Release\MediaInfo_GUI.exe" - File "..\..\..\MediaInfoLib\Project\MSVC2022\x64\Release\MediaInfo_InfoTip.dll" - File "..\..\..\MediaInfoLib\Project\MSVC2022\x64\Release\MediaInfo.dll" - File "C:\Program Files (x86)\Embarcadero\Studio\22.0\Redist\win64\WebView2Loader.dll" - File "$%BPATH%\Windows\libcurl\x64\Release\LIBCURL.DLL" - ${If} ${AtLeastWin11} - File "..\..\Project\MSVC2022\x64\Release\MediaInfo_SparsePackage.msix" - File "..\..\Project\MSVC2022\x64\Release\MediaInfo_WindowsShellExtension.dll" - File "..\..\Project\MSVC2022\win32\Release\MediaInfo_PackageHelper.dll" - File "..\WindowsSparsePackage\Resources\resources.pri" - SetOutPath "$INSTDIR\Assets" - File "..\WindowsSparsePackage\Resources\Assets\*.png" - ${EndIf} + + ; Architecture specific files + ${If} ${IsNativeARM64} + ${AndIf} ${AtLeastWin11} + File "/oname=MediaInfo.exe" "..\..\Project\BCB\GUI\Win64\Release\MediaInfo_GUI.exe" + File "C:\Program Files (x86)\Embarcadero\Studio\22.0\Redist\win64\WebView2Loader.dll" + File "$%BPATH%\Windows\libcurl\x64\Release\LIBCURL.DLL" + File "..\..\..\MediaInfoLib\Project\MSVC2022\ARM64\Release\MediaInfo_InfoTip.dll" + File "..\..\..\MediaInfoLib\Project\MSVC2022\ARM64EC\Release\MediaInfo.dll" + File "..\..\Project\MSVC2022\ARM64\Release\MediaInfo_WindowsShellExtension.dll" ${Else} - File "/oname=MediaInfo.exe" "..\..\Project\BCB\GUI\Win32\Release\MediaInfo_GUI.exe" - File "..\..\..\MediaInfoLib\Project\MSVC2022\Win32\Release\MediaInfo_InfoTip.dll" - File "..\..\..\MediaInfoLib\Project\MSVC2022\Win32\Release\MediaInfo.dll" - File "C:\Program Files (x86)\Embarcadero\Studio\22.0\Redist\win32\WebView2Loader.dll" - File "$%BPATH%\Windows\libcurl\Win32\Release\LIBCURL.DLL" + ${If} ${IsNativeAMD64} + File "/oname=MediaInfo.exe" "..\..\Project\BCB\GUI\Win64\Release\MediaInfo_GUI.exe" + File "C:\Program Files (x86)\Embarcadero\Studio\22.0\Redist\win64\WebView2Loader.dll" + File "$%BPATH%\Windows\libcurl\x64\Release\LIBCURL.DLL" + File "..\..\..\MediaInfoLib\Project\MSVC2022\x64\Release\MediaInfo_InfoTip.dll" + File "..\..\..\MediaInfoLib\Project\MSVC2022\x64\Release\MediaInfo.dll" + ${If} ${AtLeastWin11} + File "..\..\Project\MSVC2022\x64\Release\MediaInfo_WindowsShellExtension.dll" + ${EndIf} + ${Else} + File "/oname=MediaInfo.exe" "..\..\Project\BCB\GUI\Win32\Release\MediaInfo_GUI.exe" + File "C:\Program Files (x86)\Embarcadero\Studio\22.0\Redist\win32\WebView2Loader.dll" + File "$%BPATH%\Windows\libcurl\Win32\Release\LIBCURL.DLL" + File "..\..\..\MediaInfoLib\Project\MSVC2022\Win32\Release\MediaInfo_InfoTip.dll" + File "..\..\..\MediaInfoLib\Project\MSVC2022\Win32\Release\MediaInfo.dll" + ${EndIf} ${EndIf} + + ; Windows 11 sparse package files + ${If} ${AtLeastWin11} + File "..\..\Project\MSVC2022\x64\Release\MediaInfo_SparsePackage.msix" + File "..\..\Project\MSVC2022\win32\Release\MediaInfo_PackageHelper.dll" + File "..\WindowsSparsePackage\Resources\resources.pri" + SetOutPath "$INSTDIR\Assets" + File "..\WindowsSparsePackage\Resources\Assets\*.png" + ${EndIf} + + ; Plugin files SetOverwrite try SetOutPath "$INSTDIR\Plugin\Custom" File "..\Resource\Plugin\Custom\*.csv" @@ -212,7 +239,13 @@ SectionEnd Section Uninstall - SetRegView 64 + ${If} ${IsNativeARM64} + ${AndIf} ${AtLeastWin11} + SetRegView 64 + ${EndIf} + ${If} ${IsNativeAMD64} + SetRegView 64 + ${EndIf} !insertmacro MediaInfo_Extensions_Uninstall ExecWait '"$SYSDIR\regsvr32.exe" "$INSTDIR\MediaInfo_InfoTip.dll" /u /s' @@ -267,7 +300,6 @@ Section Uninstall RMDir /r "$INSTDIR\WebView2" RMDir "$INSTDIR" - SetRegView 64 DeleteRegKey HKLM "${PRODUCT_REGISTRY}" DeleteRegKey /ifempty HKLM "${COMPANY_REGISTRY}" DeleteRegKey HKCU "${PRODUCT_REGISTRY}" diff --git a/Source/Install/MediaInfo_GUI_Windows_ARM64.nsi b/Source/Install/MediaInfo_GUI_Windows_ARM64.nsi index 2cd4a4383..d20b8a63f 100644 --- a/Source/Install/MediaInfo_GUI_Windows_ARM64.nsi +++ b/Source/Install/MediaInfo_GUI_Windows_ARM64.nsi @@ -107,7 +107,7 @@ VIAddVersionKey /LANG=0 "ProductVersion" "${PRODUCT_VERSION4}" VIAddVersionKey /LANG=0 "FileDescription" "All about your audio and video files" VIAddVersionKey /LANG=0 "FileVersion" "${PRODUCT_VERSION4}" VIAddVersionKey /LANG=0 "LegalCopyright" "${PRODUCT_PUBLISHER}" -VIAddVersionKey /LANG=0 "OriginalFilename" "${PRODUCT_NAME}_GUI_${PRODUCT_VERSION}_Windows.exe" +VIAddVersionKey /LANG=0 "OriginalFilename" "${PRODUCT_NAME}_GUI_${PRODUCT_VERSION}_Windows_ARM64.exe" BrandingText " " ; Modern UI end @@ -143,24 +143,39 @@ Section "SectionPrincipale" SEC01 SetOutPath "$SMPROGRAMS" CreateShortCut "$SMPROGRAMS\MediaInfo.lnk" "$INSTDIR\MediaInfo.exe" "" "" "" "" "" "Convenient unified display of the most relevant technical and tag data for video and audio files" SetOutPath "$INSTDIR" + + ; Architecture neutral files File "/oname=History.txt" "..\..\History_GUI.txt" File "..\..\License.html" File "/oname=ReadMe.txt" "..\..\Release\ReadMe_GUI_Windows.txt" - ; ${If} ${RunningX64} - File "/oname=MediaInfo.exe" "..\..\Project\BCB\GUI\Win64\Release\MediaInfo_GUI.exe" - File "..\..\..\MediaInfoLib\Project\MSVC2022\ARM64\Release\MediaInfo_InfoTip.dll" - File "..\..\..\MediaInfoLib\Project\MSVC2022\ARM64EC\Release\MediaInfo.dll" - File "C:\Program Files (x86)\Embarcadero\Studio\22.0\Redist\win64\WebView2Loader.dll" - File "$%BPATH%\Windows\libcurl\x64\Release\LIBCURL.DLL" - ; ${If} ${AtLeastWin11} - File "..\..\Project\MSVC2022\x64\Release\MediaInfo_SparsePackage.msix" + + ; Architecture specific files + ;${If} ${IsNativeARM64} + ; ${AndIf} ${AtLeastWin11} + File "/oname=MediaInfo.exe" "..\..\Project\BCB\GUI\Win64\Release\MediaInfo_GUI.exe" + File "C:\Program Files (x86)\Embarcadero\Studio\22.0\Redist\win64\WebView2Loader.dll" + File "$%BPATH%\Windows\libcurl\x64\Release\LIBCURL.DLL" + File "..\..\..\MediaInfoLib\Project\MSVC2022\ARM64\Release\MediaInfo_InfoTip.dll" + File "..\..\..\MediaInfoLib\Project\MSVC2022\ARM64EC\Release\MediaInfo.dll" File "..\..\Project\MSVC2022\ARM64\Release\MediaInfo_WindowsShellExtension.dll" - File "..\..\Project\MSVC2022\win32\Release\MediaInfo_PackageHelper.dll" - File "..\WindowsSparsePackage\Resources\resources.pri" - SetOutPath "$INSTDIR\Assets" - File "..\WindowsSparsePackage\Resources\Assets\*.png" - ; ${EndIf} - ; ${EndIf} + ;${Else} + ; ${If} ${IsNativeAMD64} + ; ${If} ${AtLeastWin11} + ; ${EndIf} + ; ${Else} + ; ${EndIf} + ;${EndIf} + + ; Windows 11 sparse package files + ;${If} ${AtLeastWin11} + File "..\..\Project\MSVC2022\x64\Release\MediaInfo_SparsePackage.msix" + File "..\..\Project\MSVC2022\win32\Release\MediaInfo_PackageHelper.dll" + File "..\WindowsSparsePackage\Resources\resources.pri" + SetOutPath "$INSTDIR\Assets" + File "..\WindowsSparsePackage\Resources\Assets\*.png" + ;${EndIf} + + ; Plugin files SetOverwrite try SetOutPath "$INSTDIR\Plugin\Custom" File "..\Resource\Plugin\Custom\*.csv" @@ -268,7 +283,6 @@ Section Uninstall RMDir /r "$INSTDIR\WebView2" RMDir "$INSTDIR" - SetRegView 64 DeleteRegKey HKLM "${PRODUCT_REGISTRY}" DeleteRegKey /ifempty HKLM "${COMPANY_REGISTRY}" DeleteRegKey HKCU "${PRODUCT_REGISTRY}" diff --git a/Source/Install/MediaInfo_GUI_Windows_Stub.nsi b/Source/Install/MediaInfo_GUI_Windows_Stub.nsi index 51618db47..24856379a 100644 --- a/Source/Install/MediaInfo_GUI_Windows_Stub.nsi +++ b/Source/Install/MediaInfo_GUI_Windows_Stub.nsi @@ -33,7 +33,7 @@ VIAddVersionKey /LANG=0 "ProductVersion" "${PRODUCT_VERSION4}" VIAddVersionKey /LANG=0 "FileDescription" "All about your audio and video files" VIAddVersionKey /LANG=0 "FileVersion" "${PRODUCT_VERSION4}" VIAddVersionKey /LANG=0 "LegalCopyright" "${PRODUCT_PUBLISHER}" -VIAddVersionKey /LANG=0 "OriginalFilename" "${PRODUCT_NAME}_GUI_${PRODUCT_VERSION}_Windows.exe" +VIAddVersionKey /LANG=0 "OriginalFilename" "${PRODUCT_NAME}_GUI_${PRODUCT_VERSION}_Windows_Online.exe" BrandingText " " Name "${PRODUCT_NAME} ${PRODUCT_VERSION}" diff --git a/Source/Install/MediaInfo_GUI_Windows_i386.nsi b/Source/Install/MediaInfo_GUI_Windows_i386.nsi index 06140c7fd..f1f48a89f 100644 --- a/Source/Install/MediaInfo_GUI_Windows_i386.nsi +++ b/Source/Install/MediaInfo_GUI_Windows_i386.nsi @@ -107,7 +107,7 @@ VIAddVersionKey /LANG=0 "ProductVersion" "${PRODUCT_VERSION4}" VIAddVersionKey /LANG=0 "FileDescription" "All about your audio and video files" VIAddVersionKey /LANG=0 "FileVersion" "${PRODUCT_VERSION4}" VIAddVersionKey /LANG=0 "LegalCopyright" "${PRODUCT_PUBLISHER}" -VIAddVersionKey /LANG=0 "OriginalFilename" "${PRODUCT_NAME}_GUI_${PRODUCT_VERSION}_Windows.exe" +VIAddVersionKey /LANG=0 "OriginalFilename" "${PRODUCT_NAME}_GUI_${PRODUCT_VERSION}_Windows_i386.exe" BrandingText " " ; Modern UI end @@ -141,17 +141,38 @@ Section "SectionPrincipale" SEC01 SetOutPath "$SMPROGRAMS" CreateShortCut "$SMPROGRAMS\MediaInfo.lnk" "$INSTDIR\MediaInfo.exe" "" "" "" "" "" "Convenient unified display of the most relevant technical and tag data for video and audio files" SetOutPath "$INSTDIR" + + ; Architecture neutral files File "/oname=History.txt" "..\..\History_GUI.txt" File "..\..\License.html" File "/oname=ReadMe.txt" "..\..\Release\ReadMe_GUI_Windows.txt" - ; ${If} ${RunningX64} - ; ${Else} - File "/oname=MediaInfo.exe" "..\..\Project\BCB\GUI\Win32\Release\MediaInfo_GUI.exe" - File "..\..\..\MediaInfoLib\Project\MSVC2022\Win32\Release\MediaInfo_InfoTip.dll" - File "..\..\..\MediaInfoLib\Project\MSVC2022\Win32\Release\MediaInfo.dll" - File "C:\Program Files (x86)\Embarcadero\Studio\22.0\Redist\win32\WebView2Loader.dll" - File "$%BPATH%\Windows\libcurl\Win32\Release\LIBCURL.DLL" - ; ${EndIf} + + ; Architecture specific files + ;${If} ${IsNativeARM64} + ; ${AndIf} ${AtLeastWin11} + ;${Else} + ; ${If} ${IsNativeAMD64} + ; ${If} ${AtLeastWin11} + ; ${EndIf} + ; ${Else} + File "/oname=MediaInfo.exe" "..\..\Project\BCB\GUI\Win32\Release\MediaInfo_GUI.exe" + File "C:\Program Files (x86)\Embarcadero\Studio\22.0\Redist\win32\WebView2Loader.dll" + File "$%BPATH%\Windows\libcurl\Win32\Release\LIBCURL.DLL" + File "..\..\..\MediaInfoLib\Project\MSVC2022\Win32\Release\MediaInfo_InfoTip.dll" + File "..\..\..\MediaInfoLib\Project\MSVC2022\Win32\Release\MediaInfo.dll" + ; ${EndIf} + ;${EndIf} + + ; Windows 11 sparse package files + ;${If} ${AtLeastWin11} + ; File "..\..\Project\MSVC2022\x64\Release\MediaInfo_SparsePackage.msix" + ; File "..\..\Project\MSVC2022\win32\Release\MediaInfo_PackageHelper.dll" + ; File "..\WindowsSparsePackage\Resources\resources.pri" + ; SetOutPath "$INSTDIR\Assets" + ; File "..\WindowsSparsePackage\Resources\Assets\*.png" + ;${EndIf} + + ; Plugin files SetOverwrite try SetOutPath "$INSTDIR\Plugin\Custom" File "..\Resource\Plugin\Custom\*.csv" diff --git a/Source/Install/MediaInfo_GUI_Windows_x64.nsi b/Source/Install/MediaInfo_GUI_Windows_x64.nsi index d9c9f4da2..aa801264d 100644 --- a/Source/Install/MediaInfo_GUI_Windows_x64.nsi +++ b/Source/Install/MediaInfo_GUI_Windows_x64.nsi @@ -107,7 +107,7 @@ VIAddVersionKey /LANG=0 "ProductVersion" "${PRODUCT_VERSION4}" VIAddVersionKey /LANG=0 "FileDescription" "All about your audio and video files" VIAddVersionKey /LANG=0 "FileVersion" "${PRODUCT_VERSION4}" VIAddVersionKey /LANG=0 "LegalCopyright" "${PRODUCT_PUBLISHER}" -VIAddVersionKey /LANG=0 "OriginalFilename" "${PRODUCT_NAME}_GUI_${PRODUCT_VERSION}_Windows.exe" +VIAddVersionKey /LANG=0 "OriginalFilename" "${PRODUCT_NAME}_GUI_${PRODUCT_VERSION}_Windows_x64.exe" BrandingText " " ; Modern UI end @@ -139,24 +139,39 @@ Section "SectionPrincipale" SEC01 SetOutPath "$SMPROGRAMS" CreateShortCut "$SMPROGRAMS\MediaInfo.lnk" "$INSTDIR\MediaInfo.exe" "" "" "" "" "" "Convenient unified display of the most relevant technical and tag data for video and audio files" SetOutPath "$INSTDIR" + + ; Architecture neutral files File "/oname=History.txt" "..\..\History_GUI.txt" File "..\..\License.html" File "/oname=ReadMe.txt" "..\..\Release\ReadMe_GUI_Windows.txt" - ; ${If} ${IsNativeAMD64} - File "/oname=MediaInfo.exe" "..\..\Project\BCB\GUI\Win64\Release\MediaInfo_GUI.exe" - File "..\..\..\MediaInfoLib\Project\MSVC2022\x64\Release\MediaInfo_InfoTip.dll" - File "..\..\..\MediaInfoLib\Project\MSVC2022\x64\Release\MediaInfo.dll" - File "C:\Program Files (x86)\Embarcadero\Studio\22.0\Redist\win64\WebView2Loader.dll" - File "$%BPATH%\Windows\libcurl\x64\Release\LIBCURL.DLL" - ${If} ${AtLeastWin11} - File "..\..\Project\MSVC2022\x64\Release\MediaInfo_SparsePackage.msix" - File "..\..\Project\MSVC2022\x64\Release\MediaInfo_WindowsShellExtension.dll" - File "..\..\Project\MSVC2022\win32\Release\MediaInfo_PackageHelper.dll" - File "..\WindowsSparsePackage\Resources\resources.pri" - SetOutPath "$INSTDIR\Assets" - File "..\WindowsSparsePackage\Resources\Assets\*.png" - ${EndIf} - ; ${EndIf} + + ; Architecture specific files + ;${If} ${IsNativeARM64} + ; ${AndIf} ${AtLeastWin11} + ;${Else} + ; ${If} ${IsNativeAMD64} + File "/oname=MediaInfo.exe" "..\..\Project\BCB\GUI\Win64\Release\MediaInfo_GUI.exe" + File "C:\Program Files (x86)\Embarcadero\Studio\22.0\Redist\win64\WebView2Loader.dll" + File "$%BPATH%\Windows\libcurl\x64\Release\LIBCURL.DLL" + File "..\..\..\MediaInfoLib\Project\MSVC2022\x64\Release\MediaInfo_InfoTip.dll" + File "..\..\..\MediaInfoLib\Project\MSVC2022\x64\Release\MediaInfo.dll" + ${If} ${AtLeastWin11} + File "..\..\Project\MSVC2022\x64\Release\MediaInfo_WindowsShellExtension.dll" + ${EndIf} + ; ${Else} + ; ${EndIf} + ;${EndIf} + + ; Windows 11 sparse package files + ${If} ${AtLeastWin11} + File "..\..\Project\MSVC2022\x64\Release\MediaInfo_SparsePackage.msix" + File "..\..\Project\MSVC2022\win32\Release\MediaInfo_PackageHelper.dll" + File "..\WindowsSparsePackage\Resources\resources.pri" + SetOutPath "$INSTDIR\Assets" + File "..\WindowsSparsePackage\Resources\Assets\*.png" + ${EndIf} + + ; Plugin files SetOverwrite try SetOutPath "$INSTDIR\Plugin\Custom" File "..\Resource\Plugin\Custom\*.csv" @@ -264,7 +279,6 @@ Section Uninstall RMDir /r "$INSTDIR\WebView2" RMDir "$INSTDIR" - SetRegView 64 DeleteRegKey HKLM "${PRODUCT_REGISTRY}" DeleteRegKey /ifempty HKLM "${COMPANY_REGISTRY}" DeleteRegKey HKCU "${PRODUCT_REGISTRY}"