From 78c5cd3e158207aa276e0286bd3227a00a6fe94a Mon Sep 17 00:00:00 2001 From: Maxime Gervais Date: Thu, 5 Dec 2024 13:16:30 +0100 Subject: [PATCH] Handle snapshots in stub installer Signed-off-by: Maxime Gervais --- Release/Release_GUI_Windows.bat | 6 +++++- Source/Install/MediaInfo_GUI_Windows_Stub.nsi | 11 ++++++++--- 2 files changed, 13 insertions(+), 4 deletions(-) diff --git a/Release/Release_GUI_Windows.bat b/Release/Release_GUI_Windows.bat index a0b520a5f..4e6f57b7a 100644 --- a/Release/Release_GUI_Windows.bat +++ b/Release/Release_GUI_Windows.bat @@ -23,7 +23,11 @@ del MediaInfo_GUI_Windows_i386.exe rem --- Installer --- pushd %BPATH%\Windows\NSIS makensis.exe "%~dp0\..\Source\Install\MediaInfo_GUI_Windows.nsi" -makensis.exe "%~dp0\..\Source\Install\MediaInfo_GUI_Windows_Stub.nsi" +if not "%SNAPSHOT%"=="" ( + makensis.exe /DSNAPSHOT=%SNAPSHOT% "%~dp0\..\Source\Install\MediaInfo_GUI_Windows_Stub.nsi" +) else ( + makensis.exe "%~dp0\..\Source\Install\MediaInfo_GUI_Windows_Stub.nsi" +) makensis.exe "%~dp0\..\Source\Install\MediaInfo_GUI_Windows_x64.nsi" makensis.exe "%~dp0\..\Source\Install\MediaInfo_GUI_Windows_ARM64.nsi" makensis.exe "%~dp0\..\Source\Install\MediaInfo_GUI_Windows_i386.nsi" diff --git a/Source/Install/MediaInfo_GUI_Windows_Stub.nsi b/Source/Install/MediaInfo_GUI_Windows_Stub.nsi index 51618db47..795f7900d 100644 --- a/Source/Install/MediaInfo_GUI_Windows_Stub.nsi +++ b/Source/Install/MediaInfo_GUI_Windows_Stub.nsi @@ -7,6 +7,11 @@ RequestExecutionLevel admin !define PRODUCT_VERSION "24.11" !define PRODUCT_VERSION4 "${PRODUCT_VERSION}.0.0" +!define BASEURL "https://mediaarea.net/download/binary/mediainfo-gui/${PRODUCT_VERSION}" +!ifdef SNAPSHOT + !define /redef BASEURL "https://mediaarea.net/download/snapshots/binary/mediainfo-gui/${SNAPSHOT}" +!endif + ; Compression SetCompressor /FINAL /SOLID lzma @@ -49,14 +54,14 @@ Section ${If} ${IsNativeARM64} ${AndIf} ${AtLeastWin11} inetc::get /CAPTION "MediaInfo Online Installer" /BANNER "Downloading MediaInfo ${PRODUCT_VERSION} ARM64..." \ - "https://mediaarea.net/download/binary/mediainfo-gui/${PRODUCT_VERSION}/MediaInfo_GUI_${PRODUCT_VERSION}_Windows_ARM64.exe" "$PLUGINSDIR\MediaInfoInstaller.exe" + "${BASEURL}/MediaInfo_GUI_${PRODUCT_VERSION}_Windows_ARM64.exe" "$PLUGINSDIR\MediaInfoInstaller.exe" ${Else} ${If} ${IsNativeAMD64} inetc::get /CAPTION "MediaInfo Online Installer" /BANNER "Downloading MediaInfo ${PRODUCT_VERSION} x64..." \ - "https://mediaarea.net/download/binary/mediainfo-gui/${PRODUCT_VERSION}/MediaInfo_GUI_${PRODUCT_VERSION}_Windows_x64.exe" "$PLUGINSDIR\MediaInfoInstaller.exe" + "${BASEURL}/MediaInfo_GUI_${PRODUCT_VERSION}_Windows_x64.exe" "$PLUGINSDIR\MediaInfoInstaller.exe" ${Else} inetc::get /CAPTION "MediaInfo Online Installer" /BANNER "Downloading MediaInfo ${PRODUCT_VERSION} i386..." \ - "https://mediaarea.net/download/binary/mediainfo-gui/${PRODUCT_VERSION}/MediaInfo_GUI_${PRODUCT_VERSION}_Windows_i386.exe" "$PLUGINSDIR\MediaInfoInstaller.exe" + "${BASEURL}/MediaInfo_GUI_${PRODUCT_VERSION}_Windows_i386.exe" "$PLUGINSDIR\MediaInfoInstaller.exe" ${EndIf} ${EndIf}