From: Fabien Romano Subject: Re: update games/recoil-rts To: Thomas Frohwein Cc: ports@openbsd.org, thfr@openbsd.org Date: Sun, 14 Jul 2024 12:14:22 +0100 On 13/07/2024 22:29, Thomas Frohwein wrote: > On Tue, Jul 09, 2024 at 09:56:45PM +0100, Fabien Romano wrote: >> >>> >>> I'm still getting this error after deleting all those files. Seems to >>> me that there is a missing step, but I find pr-downloader stuff very >>> opaque... do you have any ideas?: >>> >>> Dependent archive "byar chobby test-2934-d9c546c" (resolved to "BYAR Chobby test-2934-d9c546c") not found >> >> I also find pr-downloader stuff very opaque. Maybe you also have ~/.spring ? >> >> Isolation mode could help to reduce the scope. After spending some time reading >> I finally understand we could just set --isolation-dir to >> /usr/local/share/games/spring/ and avoid going crazy with >> rts/System/FileSystem/DataDirLocater.cpp. >> >> There is actualy one setting missing from the official launcher. >> Not sure what RapidTag is (pr-downloader stuff I guess) but this could be >> related to your issue. >> >>> RapidTagResolutionOrder = repos-cdn.beyondallreason.dev;repos.beyondallreason.dev >> >> I raise limits to 8g. >> >> I replaced ~/.local/state/Beyond\ All\ Reason with ~/.local/state/BAR, mainly to >> compare with the official launcher. Both are ok with me. >> >> If someone asking, the official launcher is electron based. The two could be >> compatible to start the game so I choosed ~/.local/state/Beyond\ All\ Reason in >> first place. >> >> The script now append RapidTagResolutionOrder to springsettings.cfg. >> >> I also set REVISION so if this works this could go in. >> >> Cross fingers. Please send me byar-chobby output if there is an issue. > > I can confirm this works to launch Beyond All Reason on the first run. I can > log in and spectate an online multiplayer. It downloads maps and engine > versions as needed which is how the game lobby is designed. (Haven't tested > singleplayer or active multiplayer yet.) > > One thing I notice is "sync error" showing up regularly while spectating. > Have you also observed this? According to compilation this could be related > to the compiler flags being different from the standard Linux build...? I don't remember any "sync error" but now I see those. No idea yet, maybe I wasn't carefull enough to notice before. > A few concerns about the script below though... Thanks, better. > This way it doesn't needlessly rewrite the same file every time. Sure, I don't think they are going to change this any time soon. If that happens we have to update the script anyway so this is not an issue atm. > Doesn't this mean that the file will grow with the same line appended with > every launch? Spring will read and rewrite springsettings.cfg on each run. It will reorder all settings and remove duplicates. I wrote both files this way to ensure settings are updated whatever happens, in case we want to update them or if the user messes up with those. I don't think the lobby allows to reset RapidTagResolutionOrder so writing it only once should be ok. Same for chobby_config.json. Let me know what you think about the updated README. Using ":stable" doesn't work anymore so I kept only ":test" examples but I have done only limited testing. Index: Makefile =================================================================== RCS file: /cvs/ports/games/recoil-rts/Makefile,v diff -u -p -r1.7 Makefile --- Makefile 7 Jul 2024 21:27:10 -0000 1.7 +++ Makefile 14 Jul 2024 11:03:00 -0000 @@ -13,8 +13,9 @@ MN = 1.1 BLD = 2511 HASH = g747f18b V = ${MJ}.${MN}pl${BLD} +REVISION = 0 # ${IN_ENGINE_V} is what recoil uses/displays internally -IN_ENGINE_V = "${MJ}.${MN}-${BLD}-${HASH} BAR${MJ}" +IN_ENGINE_V = "${MJ}.${MN}-${BLD}-${HASH} BAR${MJ}" # Prefix '0.' to avoid future EPOCH. Upstream has indicated future versioning # with YY.MM; once that has happened, remove '0.' @@ -110,5 +111,9 @@ SUBST_VARS += IN_ENGINE_V pre-configure: ${SUBST_CMD} ${WRKSRC}/rts/build/cmake/ConfigureVersion.cmake + +post-install: + ${SUBST_PROGRAM} ${FILESDIR}/beyond-all-reason \ + ${PREFIX}/bin/beyond-all-reason .include Index: files/beyond-all-reason =================================================================== RCS file: files/beyond-all-reason diff -N files/beyond-all-reason --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ files/beyond-all-reason 14 Jul 2024 11:03:00 -0000 @@ -0,0 +1,50 @@ +#!/bin/sh + +GAME_DIR=~/.local/state/BAR +CONFIG_FILE=${GAME_DIR}/chobby_config.json +SETTINGS_FILE=${GAME_DIR}/springsettings.cfg +DATASIZE="8388608" # 8G + +xm_log() { + echo -n "$@\nDo you want to run Beyond All Reason anyway?\n\ +(If you don't increase these limits, spring might fail to work properly.)" | \ + ${X11BASE}/bin/xmessage -file - -center -buttons yes:0,no:1 -default no +} + +if [ $(ulimit -Sd) -lt ${DATASIZE} ]; then + ulimit -Sd ${DATASIZE} || \ + xm_log "Cannot increase datasize-cur to at least ${DATASIZE}" + [ $? -eq 0 ] || exit +fi + +# setup +[[ -d ${GAME_DIR} ]] || mkdir -p ${GAME_DIR} +[[ -f ${CONFIG_FILE} ]] || cat > ${CONFIG_FILE} < ${SETTINGS_FILE} <' argument to spring, or - Installing Lobbies ------------------ +Running ${PKGSTEM} without a lobby set up will allow testing of maps, engines, +and settings. + To install Chobby lobby, run the following: - $ pr-downloader chobby:stable # latest stable version - or $ pr-downloader chobby:test # latest test version Then launch it for example with: @@ -49,7 +75,7 @@ Or set it as the default by adding `Defa ~/.config/spring/springsettings.cfg. Installing Maps -=============== +--------------- Maps can be installed in one of three ways: via the lobby interface, with pr-downloader, or by manually downloading the map and placing it in