Skip to content

Commit 386ad91

Browse files
authored
RAGE:MP: add .NET SDK download for C# bridge plugin (#1875)
1 parent 569373a commit 386ad91

2 files changed

Lines changed: 25 additions & 2 deletions

File tree

ragemp.kvp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ Meta.Prerequisites=[]
2121
Meta.ExtraContainerPackages=[]
2222
Meta.ConfigReleaseState=NotSpecified
2323
Meta.NoCommercialUsage=True
24-
Meta.ConfigVersion=4
24+
Meta.ConfigVersion=5
2525
Meta.ReleaseNotes=
2626
Meta.BreakingReleaseNotes=
2727
Meta.AppConfigId=bb8773de-7ce7-42fc-a5be-3871e467b2cf
@@ -39,7 +39,7 @@ App.WindowsCommandLineArgs=
3939
App.CommandLineArgs={{$PlatformArgs}} {{$FormattedArgs}}
4040
App.UseLinuxIOREDIR=False
4141
App.AppSettings={}
42-
App.EnvironmentVariables={"LD_LIBRARY_PATH":"{{$FullBaseDir}}linux64:%LD_LIBRARY_PATH%","SteamAppId":"271590","DOTNET_SYSTEM_GLOBALIZATION_INVARIANT":"1"}
42+
App.EnvironmentVariables={"LD_LIBRARY_PATH":"{{$FullBaseDir}}linux64:%LD_LIBRARY_PATH%","SteamAppId":"271590","PATH":"{{$FullBaseDir}}dotnet-sdk:%PATH%","DOTNET_SYSTEM_GLOBALIZATION_INVARIANT":"1"}
4343
App.CommandLineParameterFormat=-{0} "{1}"
4444
App.CommandLineParameterDelimiter=
4545
App.ExitMethod=OS_CLOSE

ragempupdates.json

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,5 +31,28 @@
3131
"UpdateSourceArgs": "conf.json",
3232
"OverwriteExistingFiles": false,
3333
"SkipOnFailure": false
34+
},
35+
{
36+
"UpdateStageName": "Create .NET SDK Directory",
37+
"UpdateSourcePlatform": "All",
38+
"UpdateSource": "CreateDirectory",
39+
"UpdateSourceArgs": "{{$FullBaseDir}}dotnet-sdk",
40+
"SkipOnFailure": false
41+
},
42+
{
43+
"UpdateStageName": ".NET SDK Download",
44+
"UpdateSourcePlatform": "Linux",
45+
"UpdateSource": "Executable",
46+
"UpdateSourceData": "/bin/bash",
47+
"UpdateSourceArgs": "-c \"cd \\\"{{$FullBaseDir}}\\\" && if [[ -x dotnet-sdk/dotnet ]]; then echo \\\".NET SDK 3.1.201 already installed. Skipping\\\" && exit 0; else [[ -f dotnet.tar.gz ]] && rm -f dotnet.tar.gz >/dev/null 2>&1; wget -qO dotnet.tar.gz https://builds.dotnet.microsoft.com/dotnet/Sdk/3.1.201/dotnet-sdk-3.1.201-linux-x64.tar.gz || { echo \\\"Download failed from the Microsoft CDN. This is a fault with the CDN, not AMP. Aborting\\\"; exit 1; }; rm -rf dotnet-sdk/* >/dev/null 2>&1 && tar -xzf dotnet.tar.gz -C dotnet-sdk >/dev/null 2>&1 && rm -f dotnet.tar.gz >/dev/null 2>&1 && echo \\\".NET SDK 3.1.201 (for .NET Runtime 3.1.3) downloaded\\\"; fi\"",
48+
"SkipOnFailure": false
49+
},
50+
{
51+
"UpdateStageName": ".NET SDK Download",
52+
"UpdateSourcePlatform": "Windows",
53+
"UpdateSource": "Executable",
54+
"UpdateSourceData": "powershell.exe",
55+
"UpdateSourceArgs": "-NoProfile -Command \"$ProgressPreference='SilentlyContinue'; [Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12; Set-Location -Path '{{$FullBaseDir}}'; if (Test-Path 'dotnet-sdk/dotnet.exe') { Write-Output \\\".NET SDK 3.1.201 already installed. Skipping\\\"; exit 0 } else { if ( Test-Path dotnet.zip ) { Remove-Item dotnet.zip -Force -ErrorAction SilentlyContinue *> $null }; try { Invoke-WebRequest -UseBasicParsing -Uri https://builds.dotnet.microsoft.com/dotnet/Sdk/3.1.201/dotnet-sdk-3.1.201-win-x64.zip -OutFile dotnet.zip -ErrorAction Stop } catch { Write-Output \\\"Download failed from the Microsoft CDN. This is a fault with the CDN, not AMP. Aborting\\\"; exit 1; }; Remove-Item -Path 'dotnet-sdk/*' -Recurse -Force -ErrorAction SilentlyContinue; Expand-Archive -Path \\\"dotnet.zip\\\" -DestinationPath \\\"dotnet-sdk\\\" -Force *> $null; if ( Test-Path dotnet.zip ) { Remove-Item dotnet.zip -Force -ErrorAction SilentlyContinue *> $null }; Write-Output \\\".NET SDK 3.1.201 (for .NET Runtime 3.1.3) downloaded\\\" }\"",
56+
"SkipOnFailure": false
3457
}
3558
]

0 commit comments

Comments
 (0)