Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
31 changes: 25 additions & 6 deletions windows/web/dlmacro.nsh
Original file line number Diff line number Diff line change
Expand Up @@ -16,12 +16,31 @@
!macro dlFile source_type name version url_or_path local_file
!if "${source_type}" == "url"
DetailPrint "Downloading ${name} ${version}..."
NScurl::http GET "${url_or_path}" "${SLIMETEMP}\${local_file}" /CANCEL /RESUME /END
Pop $0 ; Status text ("OK" for success)
${If} $0 != "OK"
Abort "Failed to download ${name} ${version}. Reason: $0."
${EndIf}
DetailPrint "Downloaded!"

Push $R0 ; Retry counter
StrCpy $R0 0

download_retry:
IntOp $R0 $R0 + 1
NScurl::http GET "${url_or_path}" "${SLIMETEMP}\${local_file}" /CANCEL /RESUME /END
Pop $0 ; Status text ("OK" for success)

${If} $0 == "OK"
Goto download_success
${EndIf}

${If} $R0 < 3
DetailPrint "Download attempt $R0 failed ($0). Retrying in 3 seconds..."
Sleep 3000
Goto download_retry
${EndIf}

Pop $R0
Abort "Failed to download ${name} ${version} after 3 attempts. Last reason: $0."

download_success:
Pop $R0
DetailPrint "Downloaded!"
!else
!if "${source_type}" == "local"
DetailPrint "Using bundled ${name} ${version}..."
Expand Down
18 changes: 9 additions & 9 deletions windows/web/slimevr_web_installer.nsi
Original file line number Diff line number Diff line change
Expand Up @@ -40,19 +40,19 @@ Unicode True
!define MVCDLFileZip "vc_redist.x64.exe"

# Define the Java Version Strings and to Check (JRE\relase -> JAVA_RUNTIME_VERSION=)
!define JREVersion "17.0.17+10"
!define JREVersion "25.0.4_7"
!define JREURLType "url" ; "url" or "local"
!define JREDLURL "https://github.com/adoptium/temurin17-binaries/releases/download/jdk-17.0.17%2B10/OpenJDK17U-jre_x64_windows_hotspot_17.0.17_10.zip"
!define JREDLFileZip "OpenJDK17U-jre_x64_windows_hotspot_17.0.17_10.zip"
!define JREDLURL "https://github.com/adoptium/temurin25-binaries/releases/download/jdk-25.0.4%2B7/OpenJDK25U-jre_x64_windows_hotspot_25.0.4_7.zip"
!define JREDLFileZip "OpenJDK25U-jre_x64_windows_hotspot_25.0.4_7.zip"

!define SVRServerVersion "latest"
!define SVRServerVersion "v22.0.0-rc.4"
!define SVRServerURLType "url" ; "url" or "local"
!define SVRServerDLURL "https://github.com/SlimeVR/SlimeVR-Server/releases/latest/download/SlimeVR-win64.zip"
!define SVRServerDLURL "https://github.com/SlimeVR/SlimeVR-Server/releases/download/v22.0.0-rc.4/SlimeVR-win64.zip"
!define SVRServerDLFileZip "SlimeVR-Server-latest.zip"

!define SVRDriverVersion "latest"
!define SVRDriverVersion "v7.0.0-rc.2"
!define SVRDriverURLType "url" ; "url" or "local"
!define SVRDriverDLURL "https://github.com/SlimeVR/SlimeVR-OpenVR-Driver/releases/latest/download/slimevr-openvr-driver-win64.zip"
!define SVRDriverDLURL "https://github.com/SlimeVR/SlimeVR-OpenVR-Driver/releases/download/v7.0.0-rc.2/slimevr-openvr-driver-win64.zip"
!define SVRDriverDLFileZip "slimevr-openvr-driver-win64.zip"

SetCompressor lzma
Expand Down Expand Up @@ -468,7 +468,7 @@ Section "Java JRE" SEC_JRE
CreateDirectory "$INSTDIR\jre"
SEC_JRE_DIRNOTFOUND:
# Todo: Make a better way to copy the jre folder, since the version number is in the folder name
FindFirst $0 $1 "${SLIMETEMP}\OpenJDK\jdk-17.*-jre"
FindFirst $0 $1 "${SLIMETEMP}\OpenJDK\jdk-25.*"
loop:
StrCmp $1 "" done
CopyFiles /SILENT "${SLIMETEMP}\OpenJDK\$1\*" "$INSTDIR\jre"
Expand Down Expand Up @@ -764,7 +764,7 @@ Section "-un." un.SEC_POST_UNINSTALL
SectionEnd

LangString DESC_SEC_SERVER ${LANG_ENGLISH} "Installs latest SlimeVR Server."
LangString DESC_SEC_JRE ${LANG_ENGLISH} "Downloads and copies Java JRE 17 to installation folder. Required for SlimeVR Server."
LangString DESC_SEC_JRE ${LANG_ENGLISH} "Downloads and copies Java JRE 25 to installation folder. Required for SlimeVR Server."
LangString DESC_SEC_VRDRIVER ${LANG_ENGLISH} "Installs latest SteamVR Driver for SlimeVR."
LangString DESC_SEC_USBDRIVERS ${LANG_ENGLISH} "A list of USB drivers that are used by various boards."
LangString DESC_SEC_MSVCPP ${LANG_ENGLISH} "Installs the latest Microsoft Visual C++ Redistributable Version (required by the SteamVR Driver)"
Expand Down