Skip to content

Commit

Permalink
Handle snapshots in stub installer
Browse files Browse the repository at this point in the history
Signed-off-by: Maxime Gervais <gervais.maxime@gmail.com>
  • Loading branch information
g-maxime committed Dec 5, 2024
1 parent 689454c commit 135da9a
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 4 deletions.
6 changes: 5 additions & 1 deletion Release/Release_GUI_Windows.bat
Original file line number Diff line number Diff line change
Expand Up @@ -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 "%SNAPSHOT%"== "1" (
makensis.exe "%~dp0\..\Source\Install\MediaInfo_GUI_Windows_Stub.nsi" /DSNAPSHOT
) 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"
Expand Down
12 changes: 9 additions & 3 deletions Source/Install/MediaInfo_GUI_Windows_Stub.nsi
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,12 @@ 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
${Explode} $0 "." "${PRODUCT_VERSION4}"
!define /redef BASEURL "https://mediaarea.net/download/snapshots/binary/mediainfo-gui/${3}/"
!endif

; Compression
SetCompressor /FINAL /SOLID lzma

Expand Down Expand Up @@ -49,14 +55,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}/${PRODUCT_VERSION}/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}

Expand Down

0 comments on commit 135da9a

Please sign in to comment.