From 5fdf58c90df78ced3a48cbf61987615915fc0e9a Mon Sep 17 00:00:00 2001 From: Alex Date: Tue, 7 Dec 2021 18:25:32 +0200 Subject: [PATCH] fix(assetto): Specify Windows platform for update (#1447) --- .../assetto_corsa/egg-assetto-corsa.json | 23 +++++++++++++------ 1 file changed, 16 insertions(+), 7 deletions(-) diff --git a/game_eggs/steamcmd_servers/assetto_corsa/egg-assetto-corsa.json b/game_eggs/steamcmd_servers/assetto_corsa/egg-assetto-corsa.json index 131c140c..5046c263 100644 --- a/game_eggs/steamcmd_servers/assetto_corsa/egg-assetto-corsa.json +++ b/game_eggs/steamcmd_servers/assetto_corsa/egg-assetto-corsa.json @@ -4,7 +4,7 @@ "version": "PTDL_v1", "update_url": null }, - "exported_at": "2021-11-26T13:56:27+01:00", + "exported_at": "2021-12-07T16:03:51+00:00", "name": "Assetto Corsa", "author": "admin@softwarenoob.com", "description": "Assetto Corsa (Italian for \"Race Setup\") is a sim racing video game developed by the Italian video game developer Kunos Simulazioni. It is designed with an emphasis on a realistic racing experience with support for extensive customization and moddability", @@ -17,12 +17,12 @@ "config": { "files": "{\r\n \"cfg\/server_cfg.ini\": {\r\n \"parser\": \"file\",\r\n \"find\": {\r\n \"NAME\": \"NAME={{server.build.env.HOSTNAME}}\",\r\n \"PASSWORD\": \"PASSWORD={{server.build.env.PASSWORD}}\",\r\n \"ADMIN_PASSWORD\": \"ADMIN_PASSWORD={{server.build.env.ADM_PASSWORD}}\",\r\n \"UDP_PORT\": \"UDP_PORT={{server.build.default.port}}\",\r\n \"TCP_PORT\": \"TCP_PORT={{server.build.default.port}}\",\r\n \"HTTP_PORT\": \"HTTP_PORT={{server.build.env.HTTP_PORT}}\"\r\n }\r\n }\r\n}", "startup": "{\r\n \"done\": \"Server started\"\r\n}", - "logs": "{\r\n \"custom\": true,\r\n \"location\": \"logs\/latest.log\"\r\n}", - "stop": "^C" + "logs": "{}", + "stop": "^^C" }, "scripts": { "installation": { - "script": "#!\/bin\/bash\r\napt -y update\r\napt -y --no-install-recommends install curl lib32gcc-s1 ca-certificates\r\n\r\n## just in case someone removed the defaults.\r\nif [[ \"${STEAM_USER}\" == \"\" ]] || [[ \"${STEAM_PASS}\" == \"\" ]]; then\r\n echo -e \"steam user is not set.\\n\"\r\n echo -e \"Using anonymous user.\\n\"\r\n STEAM_USER=anonymous\r\n STEAM_PASS=\"\"\r\n STEAM_AUTH=\"\"\r\nelse\r\n echo -e \"user set to ${STEAM_USER}\"\r\nfi\r\n\r\n## download and install steamcmd\r\ncd \/tmp\r\nmkdir -p \/mnt\/server\/steamcmd\r\ncurl -sSL -o steamcmd.tar.gz https:\/\/steamcdn-a.akamaihd.net\/client\/installer\/steamcmd_linux.tar.gz\r\ntar -xzvf steamcmd.tar.gz -C \/mnt\/server\/steamcmd\r\nmkdir -p \/mnt\/server\/steamapps # Fix steamcmd disk write error when this folder is missing\r\ncd \/mnt\/server\/steamcmd\r\n\r\n# SteamCMD fails otherwise for some reason, even running as root.\r\n# This is changed at the end of the install process anyways.\r\nchown -R root:root \/mnt\r\nexport HOME=\/mnt\/server\r\n\r\n## install game using steamcmd\r\n.\/steamcmd.sh +login ${STEAM_USER} ${STEAM_PASS} ${STEAM_AUTH} $( [[ \"${WINDOWS_INSTALL}\" == \"1\" ]] && printf %s '+@sSteamCmdForcePlatformType windows' ) +force_install_dir \/mnt\/server +app_update ${SRCDS_APPID} ${INSTALL_FLAGS} validate +quit ## other flags may be needed depending on install. looking at you cs 1.6\r\n\r\n## set up 32 bit libraries\r\nmkdir -p \/mnt\/server\/.steam\/sdk32\r\ncp -v linux32\/steamclient.so ..\/.steam\/sdk32\/steamclient.so\r\n\r\n## set up 64 bit libraries\r\nmkdir -p \/mnt\/server\/.steam\/sdk64\r\ncp -v linux64\/steamclient.so ..\/.steam\/sdk64\/steamclient.so\r\n\r\nif [ \"${STEAM_USER}\" == \"anonymous\" ]; then\r\n echo -e \"ERROR - STEAM USER NOT SET\\n\"\r\n echo -e \"Steam account must have the dedicated server in his library in order to install and host the game\\n\"\r\n echo -e \"You must configure Steam account in the server startup variables, after that reinstall the server\\n\"\r\nfi", + "script": "#!\/bin\/bash\r\n\r\n## just in case someone removed the defaults.\r\nif [[ \"${STEAM_USER}\" == \"\" ]] || [[ \"${STEAM_PASS}\" == \"\" ]]; then\r\n echo -e \"steam user is not set.\\n\"\r\n echo -e \"Using anonymous user.\\n\"\r\n STEAM_USER=anonymous\r\n STEAM_PASS=\"\"\r\n STEAM_AUTH=\"\"\r\nelse\r\n echo -e \"user set to ${STEAM_USER}\"\r\nfi\r\n\r\n## download and install steamcmd\r\ncd \/tmp\r\nmkdir -p \/mnt\/server\/steamcmd\r\ncurl -sSL -o steamcmd.tar.gz https:\/\/steamcdn-a.akamaihd.net\/client\/installer\/steamcmd_linux.tar.gz\r\ntar -xzvf steamcmd.tar.gz -C \/mnt\/server\/steamcmd\r\nmkdir -p \/mnt\/server\/steamapps # Fix steamcmd disk write error when this folder is missing\r\ncd \/mnt\/server\/steamcmd\r\n\r\n# SteamCMD fails otherwise for some reason, even running as root.\r\n# This is changed at the end of the install process anyways.\r\nchown -R root:root \/mnt\r\nexport HOME=\/mnt\/server\r\n\r\n## install game using steamcmd\r\n.\/steamcmd.sh +force_install_dir \/mnt\/server +login ${STEAM_USER} ${STEAM_PASS} ${STEAM_AUTH} $( [[ \"${WINDOWS_INSTALL}\" == \"1\" ]] && printf %s '+@sSteamCmdForcePlatformType windows' ) +app_update ${SRCDS_APPID} ${INSTALL_FLAGS} validate +quit ## other flags may be needed depending on install. looking at you cs 1.6\r\n\r\n## set up 32 bit libraries\r\nmkdir -p \/mnt\/server\/.steam\/sdk32\r\ncp -v linux32\/steamclient.so ..\/.steam\/sdk32\/steamclient.so\r\n\r\n## set up 64 bit libraries\r\nmkdir -p \/mnt\/server\/.steam\/sdk64\r\ncp -v linux64\/steamclient.so ..\/.steam\/sdk64\/steamclient.so\r\n\r\nif [ \"${STEAM_USER}\" == \"anonymous\" ]; then\r\n echo -e \"ERROR - STEAM USER NOT SET\\n\"\r\n echo -e \"Steam account must have the dedicated server in library to install and host the game\\n\"\r\n echo -e \"You must configure Steam account in the server startup variables, after that reinstall the server\\n\"\r\nfi", "container": "ghcr.io\/parkervcp\/installers:debian", "entrypoint": "bash" } @@ -35,7 +35,7 @@ "default_value": "", "user_viewable": true, "user_editable": true, - "rules": "nullable|string" + "rules": "required|string" }, { "name": "Steam Password", @@ -44,11 +44,11 @@ "default_value": "", "user_viewable": true, "user_editable": true, - "rules": "nullable|string" + "rules": "required|string" }, { "name": "Steam Auth Code", - "description": "Steam Auth Code required if the Steam Account is using Steam Auth", + "description": "Steam Auth Code required if the Steam Account is using Steam Auth. Slow installs will cause the code to expire before it can be used.", "env_variable": "STEAM_AUTH", "default_value": "", "user_viewable": true, @@ -108,6 +108,15 @@ "user_viewable": true, "user_editable": true, "rules": "required|string|max:1" + }, + { + "name": "Windows param", + "description": "Required to always install and update the correct version of the game.", + "env_variable": "WINDOWS_INSTALL", + "default_value": "1", + "user_viewable": false, + "user_editable": false, + "rules": "required|string|max:20" } ] } \ No newline at end of file