This commit is contained in:
2023-12-04 14:24:07 +05:00
parent 73aa1f1606
commit f6f3c03fd1
44 changed files with 3756 additions and 22 deletions
File diff suppressed because it is too large Load Diff
+5 -5
View File
@@ -9,8 +9,8 @@ bIsVisibleForAssets=True
+CVars=r.Nanite.MaxPixelsPerEdge=2 +CVars=r.Nanite.MaxPixelsPerEdge=2
+CVars=r.RayTracing.Culling=1 +CVars=r.RayTracing.Culling=1
+CVars=r.Shadow.DistanceScale=2 +CVars=r.Shadow.DistanceScale=2
-TextureLODGroups= +CVars=r.Tonemapper.Sharpen=1
(Group=TEXTUREGROUP_World,LODBias=0,LODBias_Smaller=-1,LODBias_Smallest=-1,NumStreamedMips=-1,MipGenSettings=TMGS_SimpleAverage,MinLODSize=1,MaxLODSize=1024,MaxLODSize_Smaller=-1,MaxLODSize_Smallest=-1,MaxLODSize_VT=0,OptionalLODBias=0,OptionalMaxLODSize=4096,MinMagFilter="aniso",MipFilter="point",MipLoadOptions=AllMips,HighPriorityLoad=False,DuplicateNonOptionalMips=False,Downscale=1.000000,DownscaleOptions=SimpleAverage,VirtualTextureTileCountBias=0,VirtualTextureTileSizeBias=0,LossyCompressionAmount=TLCA_Default) +TextureLODGroups=(Group=TEXTUREGROUP_WorldNormalMap,LODBias=0,LODBias_Smaller=-1,LODBias_Smallest=-1,NumStreamedMips=-1,MipGenSettings=TMGS_SimpleAverage,MinLODSize=1,MaxLODSize=1024,MaxLODSize_Smaller=-1,MaxLODSize_Smallest=-1,MaxLODSize_VT=0,OptionalLODBias=0,OptionalMaxLODSize=4096,MinMagFilter="aniso",MipFilter="point",MipLoadOptions=AllMips,HighPriorityLoad=False,DuplicateNonOptionalMips=False,Downscale=1.000000,DownscaleOptions=SimpleAverage,VirtualTextureTileCountBias=0,VirtualTextureTileSizeBias=0,LossyCompressionAmount=TLCA_Default,CookPlatformTilingDisabled=False,MaxAniso=0)
+TextureLODGroups=(Group=TEXTUREGROUP_WorldNormalMap,LODBias=0,LODBias_Smaller=-1,LODBias_Smallest=-1,NumStreamedMips=-1,MipGenSettings=TMGS_SimpleAverage,MinLODSize=1,MaxLODSize=1024,MaxLODSize_Smaller=-1,MaxLODSize_Smallest=-1,MaxLODSize_VT=0,OptionalLODBias=0,OptionalMaxLODSize=4096,MinMagFilter="aniso",MipFilter="point",MipLoadOptions=AllMips,HighPriorityLoad=False,DuplicateNonOptionalMips=False,Downscale=1.000000,DownscaleOptions=SimpleAverage,VirtualTextureTileCountBias=0,VirtualTextureTileSizeBias=0,LossyCompressionAmount=TLCA_Default) +TextureLODGroups=(Group=TEXTUREGROUP_Character,LODBias=0,LODBias_Smaller=-1,LODBias_Smallest=-1,NumStreamedMips=-1,MipGenSettings=TMGS_SimpleAverage,MinLODSize=1,MaxLODSize=1024,MaxLODSize_Smaller=-1,MaxLODSize_Smallest=-1,MaxLODSize_VT=0,OptionalLODBias=0,OptionalMaxLODSize=4096,MinMagFilter="aniso",MipFilter="point",MipLoadOptions=AllMips,HighPriorityLoad=False,DuplicateNonOptionalMips=False,Downscale=1.000000,DownscaleOptions=SimpleAverage,VirtualTextureTileCountBias=0,VirtualTextureTileSizeBias=0,LossyCompressionAmount=TLCA_Default,CookPlatformTilingDisabled=False,MaxAniso=0)
+TextureLODGroups=(Group=TEXTUREGROUP_Character,LODBias=0,LODBias_Smaller=-1,LODBias_Smallest=-1,NumStreamedMips=-1,MipGenSettings=TMGS_SimpleAverage,MinLODSize=1,MaxLODSize=1024,MaxLODSize_Smaller=-1,MaxLODSize_Smallest=-1,MaxLODSize_VT=0,OptionalLODBias=0,OptionalMaxLODSize=4096,MinMagFilter="aniso",MipFilter="point",MipLoadOptions=AllMips,HighPriorityLoad=False,DuplicateNonOptionalMips=False,Downscale=1.000000,DownscaleOptions=SimpleAverage,VirtualTextureTileCountBias=0,VirtualTextureTileSizeBias=0,LossyCompressionAmount=TLCA_Default) +TextureLODGroups=(Group=TEXTUREGROUP_CharacterNormalMap,LODBias=0,LODBias_Smaller=-1,LODBias_Smallest=-1,NumStreamedMips=-1,MipGenSettings=TMGS_SimpleAverage,MinLODSize=1,MaxLODSize=1024,MaxLODSize_Smaller=-1,MaxLODSize_Smallest=-1,MaxLODSize_VT=0,OptionalLODBias=0,OptionalMaxLODSize=4096,MinMagFilter="aniso",MipFilter="point",MipLoadOptions=AllMips,HighPriorityLoad=False,DuplicateNonOptionalMips=False,Downscale=1.000000,DownscaleOptions=SimpleAverage,VirtualTextureTileCountBias=0,VirtualTextureTileSizeBias=0,LossyCompressionAmount=TLCA_Default,CookPlatformTilingDisabled=False,MaxAniso=0)
+TextureLODGroups=(Group=TEXTUREGROUP_CharacterNormalMap,LODBias=0,LODBias_Smaller=-1,LODBias_Smallest=-1,NumStreamedMips=-1,MipGenSettings=TMGS_SimpleAverage,MinLODSize=1,MaxLODSize=1024,MaxLODSize_Smaller=-1,MaxLODSize_Smallest=-1,MaxLODSize_VT=0,OptionalLODBias=0,OptionalMaxLODSize=4096,MinMagFilter="aniso",MipFilter="point",MipLoadOptions=AllMips,HighPriorityLoad=False,DuplicateNonOptionalMips=False,Downscale=1.000000,DownscaleOptions=SimpleAverage,VirtualTextureTileCountBias=0,VirtualTextureTileSizeBias=0,LossyCompressionAmount=TLCA_Default)
+7 -13
View File
@@ -7,8 +7,6 @@ ProjectID=B89CCC284A7D213231762AB505314AAD
Build=IfProjectHasCode Build=IfProjectHasCode
BuildConfiguration=PPBC_Development BuildConfiguration=PPBC_Development
BuildTarget= BuildTarget=
LaunchOnTarget=
StagingDirectory=(Path="D:/shared/Builds/ivazowsky/ivazowsky-pixel-streaming-v4")
FullRebuild=False FullRebuild=False
ForDistribution=False ForDistribution=False
IncludeDebugFiles=False IncludeDebugFiles=False
@@ -16,7 +14,7 @@ BlueprintNativizationMethod=Disabled
bIncludeNativizedAssetsInProjectGeneration=False bIncludeNativizedAssetsInProjectGeneration=False
bExcludeMonolithicEngineHeadersInNativizedCode=False bExcludeMonolithicEngineHeadersInNativizedCode=False
UsePakFile=True UsePakFile=True
bUseIoStore=False bUseIoStore=True
bUseZenStore=False bUseZenStore=False
bMakeBinaryConfig=False bMakeBinaryConfig=False
bGenerateChunks=True bGenerateChunks=True
@@ -32,9 +30,9 @@ PackageCompressionFormat=Oodle
bForceUseProjectCompressionFormatIgnoreHardwareOverride=False bForceUseProjectCompressionFormatIgnoreHardwareOverride=False
PackageAdditionalCompressionOptions= PackageAdditionalCompressionOptions=
PackageCompressionMethod=Kraken PackageCompressionMethod=Kraken
PackageCompressionLevel_DebugDevelopment=4 PackageCompressionLevel_DebugDevelopment=2
PackageCompressionLevel_TestShipping=5 PackageCompressionLevel_TestShipping=3
PackageCompressionLevel_Distribution=7 PackageCompressionLevel_Distribution=4
PackageCompressionMinBytesSaved=1024 PackageCompressionMinBytesSaved=1024
PackageCompressionMinPercentSaved=5 PackageCompressionMinPercentSaved=5
bPackageCompressionEnableDDC=False bPackageCompressionEnableDDC=False
@@ -52,8 +50,8 @@ InternationalizationPreset=English
+CulturesToStage=en +CulturesToStage=en
+CulturesToStage=ru-RU +CulturesToStage=ru-RU
LocalizationTargetCatchAllChunkId=0 LocalizationTargetCatchAllChunkId=0
bCookAll=False bCookAll=True
bCookMapsOnly=False bCookMapsOnly=True
bSkipEditorContent=False bSkipEditorContent=False
bSkipMovies=False bSkipMovies=False
-IniKeyDenylist=KeyStorePassword -IniKeyDenylist=KeyStorePassword
@@ -97,7 +95,6 @@ bSkipMovies=False
+IniSectionDenylist=HordeStorageServers +IniSectionDenylist=HordeStorageServers
+IniSectionDenylist=StorageServers +IniSectionDenylist=StorageServers
+DirectoriesToAlwaysCook=(Path="/Game/Blueprints/Utils") +DirectoriesToAlwaysCook=(Path="/Game/Blueprints/Utils")
+DirectoriesToAlwaysCook=(Path="/Game/Maps/Interiors")
+DirectoriesToAlwaysCook=(Path="/Game/Blueprints/UI/Others") +DirectoriesToAlwaysCook=(Path="/Game/Blueprints/UI/Others")
+DirectoriesToAlwaysCook=(Path="/Game/Blueprints/UI/WBPS/Imgs/flatPlans") +DirectoriesToAlwaysCook=(Path="/Game/Blueprints/UI/WBPS/Imgs/flatPlans")
+DirectoriesToAlwaysCook=(Path="/Game/Blueprints/UI/WBPS/Imgs/floorPlans") +DirectoriesToAlwaysCook=(Path="/Game/Blueprints/UI/WBPS/Imgs/floorPlans")
@@ -106,10 +103,7 @@ bSkipMovies=False
+DirectoriesToAlwaysCook=(Path="/Interchange/Materials") +DirectoriesToAlwaysCook=(Path="/Interchange/Materials")
+DirectoriesToAlwaysCook=(Path="/Interchange/Pipelines") +DirectoriesToAlwaysCook=(Path="/Interchange/Pipelines")
+DirectoriesToAlwaysCook=(Path="/Interchange/Utilities") +DirectoriesToAlwaysCook=(Path="/Interchange/Utilities")
+DirectoriesToAlwaysCook=(Path="/Game/Maps") +DirectoriesToAlwaysCook=(Path="/Game/AssetPacks/CarsPack")
+DirectoriesToAlwaysStageAsNonUFS=(Path="Xml") +DirectoriesToAlwaysStageAsNonUFS=(Path="Xml")
+DirectoriesToAlwaysStageAsNonUFS=(Path="script") +DirectoriesToAlwaysStageAsNonUFS=(Path="script")
PerPlatformBuildConfig=()
PerPlatformTargetFlavorName=()
PerPlatformBuildTarget=()
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
+10 -4
View File
@@ -270,13 +270,11 @@
}, },
{ {
"Name": "OpenXR", "Name": "OpenXR",
"Enabled": false, "Enabled": true,
"SupportedTargetPlatforms": [ "SupportedTargetPlatforms": [
"Win32",
"Win64", "Win64",
"Linux", "Linux",
"Android", "Android"
"HoloLens"
] ]
}, },
{ {
@@ -348,6 +346,14 @@
{ {
"Name": "SunPosition", "Name": "SunPosition",
"Enabled": true "Enabled": true
},
{
"Name": "TcpMessaging",
"Enabled": false
},
{
"Name": "UdpMessaging",
"Enabled": false
} }
], ],
"TargetPlatforms": [ "TargetPlatforms": [
@@ -0,0 +1,199 @@
@Rem Copyright Epic Games, Inc. All Rights Reserved.
@echo off
@Rem Set script location as working directory for commands.
pushd "%~dp0"
@Rem Turned on delayed expansion so we have variables evaluated in nested scope
setlocal EnableDelayedExpansion
@Rem Unset all our variables as these persist between cmd sessions if cmd not closed.
SET "PSInfraOrg="
SET "PSInfraRepo="
SET "PSInfraTagOrBranch="
SET "ReleaseVersion="
SET "ReleaseUrl="
SET "IsTag="
SET "RefType="
SET "Url="
SET "DownloadVersion="
SET "FlagPassed="
:arg_loop_start
SET ARG=%1
if DEFINED ARG (
if "%ARG%"=="/h" (
goto print_help
)
if "%ARG%"=="/v" (
SET UEVersion=%2
SET FlagPassed=1
SHIFT
)
if "%ARG%"=="/b" (
SET PSInfraTagOrBranch=%2
SET IsTag=0
SET FlagPassed=1
SHIFT
)
if "%ARG%"=="/t" (
SET PSInfraTagOrBranch=%2
SET IsTag=1
SET FlagPassed=1
SHIFT
)
if "%ARG%"=="/r" (
SET "ReleaseVersion=%2"
SET "ReleaseUrl=https://github.com/EpicGames/PixelStreamingInfrastructure/releases/download/!ReleaseVersion!/!ReleaseVersion!.zip"
SET IsTag=0
SET FlagPassed=1
SHIFT
)
SHIFT
goto arg_loop_start
)
@Rem Name and version of ps-infra that we are downloading
SET PSInfraOrg=EpicGames
SET PSInfraRepo=PixelStreamingInfrastructure
@Rem If a UE version is supplied set the right branch or tag to fetch for that version of UE
if DEFINED UEVersion (
if "%UEVersion%"=="4.26" (
SET PSInfraTagOrBranch=UE4.26
SET IsTag=0
)
if "%UEVersion%"=="4.27" (
SET PSInfraTagOrBranch=UE4.27
SET IsTag=0
)
if "%UEVersion%"=="5.0" (
SET PSInfraTagOrBranch=UE5.0
SET IsTag=0
)
if "%UEVersion%"=="5.1" (
SET PSInfraTagOrBranch=UE5.1
SET IsTag=0
)
if "%UEVersion%"=="5.2" (
SET PSInfraTagOrBranch=UE5.2
SET IsTag=0
)
if "%UEVersion%"=="5.3" (
SET PSInfraTagOrBranch=UE5.3
SET IsTag=0
)
)
@Rem If no arguments select a specific version, fetch the appropriate default
if NOT DEFINED PSInfraTagOrBranch (
SET PSInfraTagOrBranch=UE5.3
SET IsTag=0
)
echo Tag or branch: !PSInfraTagOrBranch!
@Rem Whether the named reference is a tag or a branch affects the Url we fetch it on
if %IsTag%==1 (
SET RefType=tags
) else (
SET RefType=heads
)
@Rem We have a branch, no user-specified release, then check repo for the presence of a RELEASE_VERSION file in the current branch
if %IsTag%==0 (
if NOT DEFINED ReleaseUrl (
@Rem We don't want to auto-set the release version if the user passed an explicit flag.
if NOT DEFINED FlagPassed (
FOR /F "tokens=* USEBACKQ" %%F IN (`curl -s -f -L https://raw.githubusercontent.com/EpicGames/PixelStreamingInfrastructure/%PSInfraTagOrBranch%/RELEASE_VERSION`) DO (
SET "ReleaseVersion=!PSInfraTagOrBranch!-%%F"
SET "ReleaseUrl=https://github.com/EpicGames/PixelStreamingInfrastructure/releases/download/!ReleaseVersion!/!ReleaseVersion!.zip"
)
)
)
)
@Rem Set our DownloadVersion here as we use this to check the contents of our DOWNLOAD_VERSION file shortly.
SET "DownloadVersion=%PSInfraTagOrBranch%"
if DEFINED ReleaseVersion (
SET "DownloadVersion=!ReleaseVersion!"
echo Release: !ReleaseVersion!
)
@Rem Check for the existence of a DOWNLOAD_VERSION file and if found, check its contents against our %DownloadVersion%
if exist DOWNLOAD_VERSION (
@Rem Read DOWNLOAD_VERSION file into variable
FOR /F "delims=" %%F IN ( DOWNLOAD_VERSION ) DO (
SET "PreviousDownloadVersion=%%F"
@Rem Remove whitespace
SET "PreviousDownloadVersion=!PreviousDownloadVersion: =!"
)
if !DownloadVersion! == !PreviousDownloadVersion! (
echo Downloaded version ^(!DownloadVersion!^) of PS infra matches release version ^(!PreviousDownloadVersion!^)...skipping install.
goto :EOF
) else (
echo There is a newer released version ^(!DownloadVersion!^) - had ^(!PreviousDownloadVersion!^), downloading...
)
) else (
echo DOWNLOAD_VERSION file not found...beginning ps-infra download.
)
@Rem By default set the download url to the .zip of the branch
SET Url=https://github.com/%PSInfraOrg%/%PSInfraRepo%/archive/refs/%RefType%/%PSInfraTagOrBranch%.zip
@Rem If we have a ReleaseUrl then set it to our download url
if DEFINED ReleaseUrl (
SET Url=!ReleaseUrl!
)
@Rem Download ps-infra and follow redirects.
echo Attempting downloading Pixel Streaming infrastructure from: !Url!
curl -L !Url! > ps-infra.zip
@Rem Unarchive the .zip
tar -xmf ps-infra.zip || echo bad archive, contents: && type ps-infra.zip && exit 0
@Rem Remove old infra
if exist Frontend\ ( rmdir /s /q Frontend )
if exist Matchmaker\ ( rmdir /s /q Matchmaker )
if exist SignallingWebserver\ ( rmdir /s /q SignallingWebserver )
if exist SFU\ ( rmdir /s /q SFU )
@Rem Rename the extracted, versioned, directory
for /d %%i in ("PixelStreamingInfrastructure-*") do (
for /d %%j in ("%%i/*") do (
echo "%%i\%%j"
move "%%i\%%j" .
)
for %%j in ("%%i/*") do (
echo "%%i\%%j"
move "%%i\%%j" .
)
echo "%%i"
rmdir /s /q "%%i"
)
@Rem Delete the downloaded zip
del ps-infra.zip
@Rem Create a DOWNLOAD_VERSION file, which we use as a comparison file to check if we should auto upgrade when these scripts are run again
echo %DownloadVersion%> DOWNLOAD_VERSION
goto :EOF
:print_help
echo.
echo Tool for fetching PixelStreaming Infrastructure. If no flags are set specifying a version to fetch,
echo the recommended version will be chosen as a default.
echo.
echo Usage:
echo %~n0%~x0 [^/h] [^/v ^<UE version^>] [^/b ^<branch^>] [^/t ^<tag^>] [^/r ^<release^>]
echo Where:
echo /v Specify a version of Unreal Engine to download the recommended release for
echo /b Specify a specific branch for the tool to download from repo
echo /t Specify a specific tag for the tool to download from repo
echo /r Specify a specific release url path e.g. https://github.com/EpicGames/PixelStreamingInfrastructure/releases/download/${RELEASE_HERE}.zip
echo /h Display this help message
goto :EOF
@@ -0,0 +1,179 @@
#!/bin/bash
# Copyright Epic Games, Inc. All Rights Reserved.
BASH_LOCATION=$( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )
pushd "${BASH_LOCATION}" > /dev/null
print_help() {
echo "
Tool for fetching PixelStreaming Infrastructure. If no flags are set specifying a version to fetch,
the recommended version will be chosen as a default.
Usage:
${0} [-h] [-v <UE version>] [-b <branch>] [-t <tag>]
Where:
-v Specify a version of Unreal Engine to download the recommended
release for
-b Specify a specific branch for the tool to download from repo
-t Specify a specific tag for the tool to download from repo
-r Specify a specific release url path e.g. https://github.com/EpicGames/PixelStreamingInfrastructure/releases/download/<RELEASE_VERSION>/<RELEASE_VERSION>.zip
-h Display this help message
"
exit 1
}
# Set all default variables (e.g. # Name and version of ps-infra that we are downloading)
PSInfraOrg=EpicGames
PSInfraRepo=PixelStreamingInfrastructure
PSInfraTagOrBranch=UE5.3
RefType=heads
IsTag=0
ReleaseUrlBase=https://github.com/EpicGames/PixelStreamingInfrastructure/releases/download
# Unset any variables that don't have defaults that we use that may have persisted between bash terminals.
unset Url
unset DownloadVersion
unset FlagPassed
unset ReleaseVersion
unset ReleaseUrl
while(($#)) ; do
case "$1" in
-h ) print_help;;
-v ) UEVersion="$2"; FlagPassed=1; shift 2;;
-b ) PSInfraTagOrBranch="$2"; FlagPassed=1; IsTag=0; shift 2;;
-t ) PSInfraTagOrBranch="$2"; FlagPassed=1; IsTag=1; shift 2;;
-r ) ReleaseVersion="$2"; FlagPassed=1; IsTag=0; ReleaseUrl=$ReleaseUrlBase/$ReleaseVersion/$ReleaseVersion.tar.gz; shift 2;;
* ) echo "Unknown command: $1"; shift;;
esac
done
# If a UE version is supplied set the right branch or tag to fetch for that version of UE
if [ ! -z "$UEVersion" ]
then
if [ "$UEVersion" = "4.26" ]
then
PSInfraTagOrBranch=UE4.26
IsTag=0
fi
if [ "$UEVersion" = "4.27" ]
then
PSInfraTagOrBranch=UE4.27
IsTag=0
fi
if [ "$UEVersion" = "5.0" ]
then
PSInfraTagOrBranch=UE5.0
IsTag=0
fi
if [ "$UEVersion" = "5.1" ]
then
PSInfraTagOrBranch=UE5.1
IsTag=0
fi
if [ "$UEVersion" = "5.2" ]
then
PSInfraTagOrBranch=UE5.2
IsTag=0
fi
if [ "$UEVersion" = "5.3" ]
then
PSInfraTagOrBranch=UE5.3
IsTag=0
fi
fi
# If no arguments select a specific version, fetch the appropriate default
if [ -z "$PSInfraTagOrBranch" ]
then
PSInfraTagOrBranch=UE5.3
IsTag=0
fi
echo "Tag or branch: $PSInfraTagOrBranch"
# Whether the named reference is a tag or a branch affects the Url we fetch it on
if [ "$IsTag" -eq 1 ]
then
RefType=tags
else
RefType=heads
fi
# We have a branch, no user-specified release, then check repo for the presence of a RELEASE_VERSION file in the current branch.
if [ "$IsTag" -eq 0 ] && [ -z "$ReleaseUrl" ] && [ -z "$FlagPassed" ]
then
RelUrl=https://raw.githubusercontent.com/EpicGames/PixelStreamingInfrastructure/$PSInfraTagOrBranch/RELEASE_VERSION
if curl --output /dev/null --silent -r 0-0 --fail "$RelUrl"; then
ReleaseVersion="$PSInfraTagOrBranch-$(curl -L -s $RelUrl)"
ReleaseUrl=https://github.com/EpicGames/PixelStreamingInfrastructure/releases/download/$ReleaseVersion/$ReleaseVersion.tar.gz
echo "Valid RELEASE_VERSION file found in Github repo at $RelUrl"
else
echo "RELEASE_VERSION file does not exist at: $RelUrl"
fi
else
echo "Skipping downloading RELEASE_VERSION file."
fi
#Set our DownloadVersion here as we use this to check the contents of our DOWNLOAD_VERSION file shortly.
DownloadVersion="$PSInfraTagOrBranch"
if [ ! -z "$ReleaseVersion" ]
then
DownloadVersion="$ReleaseVersion"
echo "Release: $ReleaseVersion"
fi
#Rem Check for the existence of a DOWNLOAD_VERSION file and if found, check its contents against our $DownloadVersion
if test -f DOWNLOAD_VERSION;
then
PREVIOUS_DOWNLOAD_VERSION=$(cat DOWNLOAD_VERSION)
if [ "$DownloadVersion" = "$PREVIOUS_DOWNLOAD_VERSION" ]
then
echo "Downloaded version ($DownloadVersion) of PS infra matches release version ($PREVIOUS_DOWNLOAD_VERSION)...skipping install."
exit 0
else
echo "There is a newer released version ($DownloadVersion) - had ($PREVIOUS_DOWNLOAD_VERSION), downloading..."
#Remove old infra
rm -rf Frontend
rm -rf Matchmaker
rm -rf SignallingWebServer
rm -rf SFU
fi
else
echo "DOWNLOAD_VERSION file not found..."
fi
# Pre-download - Set the download url to the .zip of the branch
Url=https://github.com/$PSInfraOrg/$PSInfraRepo/archive/refs/$RefType/$PSInfraTagOrBranch.tar.gz
#Check if ReleaseUrl is valid by CURLing with fail fast and if success then set it to our download url
if [ ! -z "$ReleaseUrl" ]
then
echo "Checking if release url is valid, url: $ReleaseUrl"
if curl --output /dev/null --silent -r 0-0 --fail "$ReleaseUrl"; then
echo "Valid release url at: $ReleaseUrl"
Url=$ReleaseUrl
else
echo "Invalid Github release url: $ReleaseUrl"
exit 1
fi
fi
# Download - download ps-infra and follow redirects.
echo "Beginning ps-infra download from: $Url"
curl -L $Url > ps-infra.tar.gz
# Unarchive the .tar
tar -xmf ps-infra.tar.gz || $(echo "bad archive, contents:" && head --lines=20 ps-infra.tar.gz && exit 0)
# Move the server folders into the current directory (WebServers) and delete the original directory
mv PixelStreamingInfrastructure-*/* .
# Copy any files and folders beginning with dot (ignored by * glob) and discard errors regarding to not being able to move "." and ".."
mv PixelStreamingInfrastructure-*/.* . 2>/dev/null || :
rm -rf PixelStreamingInfrastructure-*
# Delete the downloaded tar
rm ps-infra.tar.gz
#Create a DOWNLOAD_VERSION file, which we use as a comparison file to check if we should auto upgrade when these scripts are run again
echo "$DownloadVersion" >| DOWNLOAD_VERSION
exit 0