From 9d4074ddbe13b29f91fa5838da551e3edeaa6eb1 Mon Sep 17 00:00:00 2001 From: Hacksawfred3232 Date: Sun, 11 May 2025 13:35:12 +0100 Subject: [PATCH 1/2] Added Ringracers --- ringracers.kvp | 86 ++++++++++++++++++++++++++++++++++++++ ringracers_Dockerfile | 43 +++++++++++++++++++ ringracers_config.json | 1 + ringracers_metaconfig.json | 1 + ringracers_ports.json | 9 ++++ ringracers_updates.json | 36 ++++++++++++++++ 6 files changed, 176 insertions(+) create mode 100644 ringracers.kvp create mode 100644 ringracers_Dockerfile create mode 100644 ringracers_config.json create mode 100644 ringracers_metaconfig.json create mode 100644 ringracers_ports.json create mode 100644 ringracers_updates.json diff --git a/ringracers.kvp b/ringracers.kvp new file mode 100644 index 000000000..b93e37629 --- /dev/null +++ b/ringracers.kvp @@ -0,0 +1,86 @@ +Meta.DisplayName=Ring Racers +Meta.Description=Dr. Robotnik’s Ring Racers Dedicated Server (v2.3) +Meta.Arch=x86_64 +Meta.Author=Hacksawfred3232 +Meta.URL=https://www.kartkrew.org/ +Meta.MinAMPVersion=2.4.6.6 +Meta.SpecificDockerImage=cubecoders/ampbase:deb12-ringracers +Meta.DockerRequired=True +Meta.ContainerPolicy=RequiredOnLinux +Meta.ContainerPolicyReason=Kart Krew does not supply native Linux binaries. As such, the game needs to be compiled. +Meta.ExtraSetupStepsURI=https://github.com/Hacksawfred3232/CustAMPTemplates/issues/1 +Meta.Prerequsites=[] +Meta.EndpointURIFormat=steam://connect/{ip}:{GenericModule.App.Ports.$SteamQueryPort} +Meta.ExtraContainerPackages=[] +Meta.AppConfigId=b2a092a9-7875-4b91-9c29-a677b2f049e7 +App.AdminMethod=STDIO +App.HasReadableConsole=true +App.HasWritableConsole=true +App.DisplayName=Ring Racers +App.CommandLineArgs={{$PlatformArgs}} {{$FormattedArgs}} -dedicated -nofork -serverport {{$MainGamePort}} +App.WindowsCommandLineArgs= +App.CommandLineParameterFormat=-{0} "{1}" +App.CommandLineParameterDelimiter= +App.RapidStartup=false +App.ApplicationReadyMode=RegexMatch +App.ExitMethod=OS_CLOSE +App.ExitString=stop +App.ExitTimeout=30 +App.ExitFile=app_exit.lck +App.SupportsLiveSettingsChanges=False +App.LiveSettingChangeCommandFormat=set {0} "{1}" +App.ApplicationIPBinding=0.0.0.0 +App.AdminPortRef=RemoteAdminPort +App.UniversalSleepApplicationUDPPortRef=GamePort1 +App.PrimaryApplicationPortRef=GamePort1 +App.UniversalSleepSteamQueryPortRef=SteamQueryPort +App.MaxUsers=8 +App.UseRandomAdminPassword=True +App.RemoteAdminPassword= +App.AdminLoginTransform=None +App.RCONConnectDelaySeconds=30 +App.RCONConnectRetrySeconds=15 +App.RCONHeartbeatCommand=ping +App.RCONHeartbeatMinutes=0 +App.TelnetLoginFormat={0} +App.SteamUpdateAnonymousLogin=True +App.SteamForceLoginPrompt=False +App.SupportsUniversalSleep=False +App.WakeupMode=Any +App.TemplateMatchRegex={{(\$?[\w]+)}} +App.MonitorChildProcess=False +App.MonitorChildProcessWaitMs=1000 +App.MonitorChildProcessName= +App.Compatibility=1 +App.SteamWorkshopDownloadLocation={{$FullBaseDir}}undefined +Console.FilterMatchRegex= +Console.FilterMatchReplacement= +Console.ThrowawayMessageRegex=(WARNING|ERROR): Shader.+ +Console.UpdateAvailableRegex=^\[\d\d:\d\d:\d\d\] \[INFO\] A new server update is available! v[\d\.]+.$ +Console.SuppressLogAtStart=False +Console.ActivateLogRegex= +Console.UserActions={} +Console.SleepMode=False +Console.SleepOnStart=False +Console.SleepDelayMinutes=5 +Console.DozeDelay=2 +Console.AutoRetryCount=5 +Console.SleepStartThresholdSeconds=25 +Console.AppReadyRegex=^Entering\smain\sgame\sloop\.\.\.$ +Console.UserJoinRegex=^\*(?.+)\shas\s(?:rejoined|joined)\sthe\sgame\s\(player\s(?.+)\)$ +Console.UserLeaveRegex=^\*(?.+)\sleft\sthe\sgame$ +Console.UserChatRegex=^(?:|\[PM\])\<(?.+)\>\s(?.+)$ +Meta.OS=Linux +Meta.ConfigManifest=ringracers_config.json +Meta.MetaConfigManifest=ringracers_metaconfig.json +Meta.ConfigRoot=ringracers.kvp +App.RootDir=./ringracers/ +Meta.DisplayImageSource=url:https://cdn2.steamgriddb.com/grid/7de662f7fd181d4cf14247c37b171a72-fakepng.png +App.BaseDirectory=./ringracers/ +App.WorkingDir= +App.ExecutableWin= +App.ExecutableLinux=ringracerslinux.exe +App.LinuxCommandLineArgs= +App.Ports=@IncludeJson[ringracers_ports.json] +App.UpdateSources=@IncludeJson[ringracers_updates.json] +App.EnvironmentVariables={"LD_LIBRARY_PATH": "{{$FullBaseDir}}linux64:{{$FullRootDir}}linux64:%LD_LIBRARY_PATH%", "WINEPREFIX": "{{$FullRootDir}}.wine", "WINEARCH": "win64", "WINEDEBUG": "-all"} diff --git a/ringracers_Dockerfile b/ringracers_Dockerfile new file mode 100644 index 000000000..c03092a66 --- /dev/null +++ b/ringracers_Dockerfile @@ -0,0 +1,43 @@ +FROM debian:bookworm-20250407 AS build + +# Running upgrade command. +RUN DEBIAN_FRONTEND=noninteractive apt-get update && apt-get -y upgrade + +# Apt-get install all required dependencies to compile this release. +RUN DEBIAN_FRONTEND=noninteractive apt-get -y install build-essential libcurl4-openssl-dev zlib1g-dev libpng++-dev libpng-dev libogg-dev libvorbis-dev libvpx-dev libyuv-dev libupnp-dev libupnp13 libsdl2-dev libsdl2-mixer-dev nasm git wget unzip cmake ninja-build +# Go to root +WORKDIR /root/ +RUN git clone -b "v2.3" https://github.com/KartKrewDev/RingRacers +#ENV LIBGME_CFLAGS="" +#ENV LIBGME_LDFLAGS="-lgme" +# Need to get data. +RUN wget https://github.com/KartKrewDev/RingRacers/releases/download/v2.3/Dr.Robotnik.s-Ring-Racers-v2.3-Assets.zip -O /root/Data.zip +# Unzip and copy needed files. +RUN unzip Data.zip +RUN mkdir /root/RingRacers/assets/installer +RUN unzip Data.zip -d /root/RingRacers/assets/installer/ +WORKDIR /root/RingRacers/ +RUN mkdir build +WORKDIR /root/RingRacers/build +# Compile files. +RUN cmake -B ./ --preset ninja-release ../ +RUN cmake --build ./ +# Bin is in /root/RingRacers/build/bin +# There are still debug symbols on this file. Strip them. +RUN strip --strip-debug bin/ringracers_v2.3 +# Copy the binary file. +RUN cp bin/ringracers_v2.3 /root/ringracers +# This is where the build ends here. + +FROM cubecoders/ampbase:deb12 +# Retarget the above to cubecoders/ampbase:deb12-ringracers +# Copy from our builder the main file. updates.json will copy this to our working directory. +COPY --from=build /root/ringracers /ringracerslinux.exe +# Running upgrade command. +RUN DEBIAN_FRONTEND=noninteractive apt-get update && apt-get -y upgrade +# Shortened version of the list above. +RUN DEBIAN_FRONTEND=noninteractive apt-get -y install libcurl4-openssl-dev zlib1g-dev libpng++-dev libpng-dev libogg-dev libvorbis-dev libvpx-dev libyuv-dev libupnp-dev libupnp13 libsdl2-dev libsdl2-mixer-dev wget unzip +# Running clean up. +RUN apt-get clean && rm -rf /var/lib/apt/lists/* +# Ensure that WORKDIR is / +WORKDIR / diff --git a/ringracers_config.json b/ringracers_config.json new file mode 100644 index 000000000..fe51488c7 --- /dev/null +++ b/ringracers_config.json @@ -0,0 +1 @@ +[] diff --git a/ringracers_metaconfig.json b/ringracers_metaconfig.json new file mode 100644 index 000000000..0637a088a --- /dev/null +++ b/ringracers_metaconfig.json @@ -0,0 +1 @@ +[] \ No newline at end of file diff --git a/ringracers_ports.json b/ringracers_ports.json new file mode 100644 index 000000000..2f07313fa --- /dev/null +++ b/ringracers_ports.json @@ -0,0 +1,9 @@ +[ + { + "Protocol": "UDP", + "Port": "5029", + "Name": "Main Game Port", + "Description": "Port used for main game traffic", + "Ref": "MainGamePort" + } +] \ No newline at end of file diff --git a/ringracers_updates.json b/ringracers_updates.json new file mode 100644 index 000000000..212f3e2af --- /dev/null +++ b/ringracers_updates.json @@ -0,0 +1,36 @@ +[ + { + "UpdateStageName": "Fetching Assets", + "UpdateSourcePlatform": "All", + "UpdateSource": "FetchURL", + "UpdateSourceData": "https://github.com/KartKrewDev/RingRacers/releases/download/v2.3/Dr.Robotnik.s-Ring-Racers-v2.3-Assets.zip", + "UpdateSourceArgs": "", + "UpdateSourceTarget": "", + "UnzipUpdateSource": true, + "OverwriteExistingFiles": true, + "DeleteAfterExtract": true, + "OneShot": true + }, + { + "UpdateStageName": "Copy linux binary", + "UpdateSourcePlatform": "Linux", + "UpdateSource": "CopyFilePath", + "UpdateSourceData": "./ringracers/ringracerslinux.exe", + "UpdateSourceArgs": "/ringracerslinux.exe", + "UnzipUpdateSource": false, + "OverwriteExistingFiles": false, + "DeleteAfterExtract": true, + "OneShot": true + }, + { + "UpdateStageName": "Make game executable", + "UpdateSourcePlatform": "Linux", + "UpdateSource": "Executable", + "UpdateSourceData": "/usr/bin/chmod", + "UpdateSourceArgs": "+x ringracers/ringracerslinux.exe", + "UnzipUpdateSource": false, + "OverwriteExistingFiles": false, + "DeleteAfterExtract": true, + "OneShot": true + } +] From c10e076dd021e162aaba57807480af2fdc23dba1 Mon Sep 17 00:00:00 2001 From: Hacksawfred3232 Date: Fri, 30 May 2025 11:44:15 +0100 Subject: [PATCH 2/2] Updated RingRacers --- ringracers.kvp | 2 +- ringracers_Dockerfile | 43 ------------------------------------------- 2 files changed, 1 insertion(+), 44 deletions(-) delete mode 100644 ringracers_Dockerfile diff --git a/ringracers.kvp b/ringracers.kvp index b93e37629..0b2f2cba3 100644 --- a/ringracers.kvp +++ b/ringracers.kvp @@ -4,7 +4,7 @@ Meta.Arch=x86_64 Meta.Author=Hacksawfred3232 Meta.URL=https://www.kartkrew.org/ Meta.MinAMPVersion=2.4.6.6 -Meta.SpecificDockerImage=cubecoders/ampbase:deb12-ringracers +Meta.SpecificDockerImage=ghcr.io/hacksawfred3232/custampimages/ampcust:ringracers Meta.DockerRequired=True Meta.ContainerPolicy=RequiredOnLinux Meta.ContainerPolicyReason=Kart Krew does not supply native Linux binaries. As such, the game needs to be compiled. diff --git a/ringracers_Dockerfile b/ringracers_Dockerfile deleted file mode 100644 index c03092a66..000000000 --- a/ringracers_Dockerfile +++ /dev/null @@ -1,43 +0,0 @@ -FROM debian:bookworm-20250407 AS build - -# Running upgrade command. -RUN DEBIAN_FRONTEND=noninteractive apt-get update && apt-get -y upgrade - -# Apt-get install all required dependencies to compile this release. -RUN DEBIAN_FRONTEND=noninteractive apt-get -y install build-essential libcurl4-openssl-dev zlib1g-dev libpng++-dev libpng-dev libogg-dev libvorbis-dev libvpx-dev libyuv-dev libupnp-dev libupnp13 libsdl2-dev libsdl2-mixer-dev nasm git wget unzip cmake ninja-build -# Go to root -WORKDIR /root/ -RUN git clone -b "v2.3" https://github.com/KartKrewDev/RingRacers -#ENV LIBGME_CFLAGS="" -#ENV LIBGME_LDFLAGS="-lgme" -# Need to get data. -RUN wget https://github.com/KartKrewDev/RingRacers/releases/download/v2.3/Dr.Robotnik.s-Ring-Racers-v2.3-Assets.zip -O /root/Data.zip -# Unzip and copy needed files. -RUN unzip Data.zip -RUN mkdir /root/RingRacers/assets/installer -RUN unzip Data.zip -d /root/RingRacers/assets/installer/ -WORKDIR /root/RingRacers/ -RUN mkdir build -WORKDIR /root/RingRacers/build -# Compile files. -RUN cmake -B ./ --preset ninja-release ../ -RUN cmake --build ./ -# Bin is in /root/RingRacers/build/bin -# There are still debug symbols on this file. Strip them. -RUN strip --strip-debug bin/ringracers_v2.3 -# Copy the binary file. -RUN cp bin/ringracers_v2.3 /root/ringracers -# This is where the build ends here. - -FROM cubecoders/ampbase:deb12 -# Retarget the above to cubecoders/ampbase:deb12-ringracers -# Copy from our builder the main file. updates.json will copy this to our working directory. -COPY --from=build /root/ringracers /ringracerslinux.exe -# Running upgrade command. -RUN DEBIAN_FRONTEND=noninteractive apt-get update && apt-get -y upgrade -# Shortened version of the list above. -RUN DEBIAN_FRONTEND=noninteractive apt-get -y install libcurl4-openssl-dev zlib1g-dev libpng++-dev libpng-dev libogg-dev libvorbis-dev libvpx-dev libyuv-dev libupnp-dev libupnp13 libsdl2-dev libsdl2-mixer-dev wget unzip -# Running clean up. -RUN apt-get clean && rm -rf /var/lib/apt/lists/* -# Ensure that WORKDIR is / -WORKDIR /