From: Thomas Frohwein Subject: Re: update games/recoil-rts To: Fabien Romano Cc: ports@openbsd.org, thfr@openbsd.org Date: Sat, 13 Jul 2024 17:29:01 -0400 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...? A few concerns about the script below though... > 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 9 Jul 2024 20:23:20 -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,8 @@ SUBST_VARS += IN_ENGINE_V > > pre-configure: > ${SUBST_CMD} ${WRKSRC}/rts/build/cmake/ConfigureVersion.cmake > + > +post-install: > + ${SUBST_PROGRAM} ${FILESDIR}/byar-chobby ${PREFIX}/bin/byar-chobby Maybe we should rather name it beyond-all-reason? That's what the script launches. byar-chobby as the lobby interface is quite obscure. > > .include > Index: files/byar-chobby > =================================================================== > RCS file: files/byar-chobby > diff -N files/byar-chobby > --- /dev/null 1 Jan 1970 00:00:00 -0000 > +++ files/byar-chobby 9 Jul 2024 20:23:20 -0000 > @@ -0,0 +1,48 @@ > +#!/bin/sh > + > +GAME_DIR=~/.local/state/BAR Maybe add: CONF_FILE=${GAME_DIR}/chobby_config.json and then below... > +DATASIZE="8388608" # 8g > + > +xm_log() { > + echo -n "$@\nDo you want to run BAR 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} > +cat > ${GAME_DIR}/chobby_config.json < ${CONF_FILE} < +{ > + "server": { > + "address": "server4.beyondallreason.info", > + "port": 8200, > + "protocol": "spring", > + "serverName": "BAR" > + }, > + "game": "byar" > +} > +EOF > +cat >> ${GAME_DIR}/springsettings.cfg < +RapidTagResolutionOrder = repos-cdn.beyondallreason.dev;repos.beyondallreason.dev > +EOF > + > +# update > +PRD_HTTP_SEARCH_URL=https://files-cdn.beyondallreason.dev/find > +PRD_RAPID_USE_STREAMER=false > +PRD_RAPID_REPO_MASTER=https://repos-cdn.beyondallreason.dev/repos.gz > +export PRD_HTTP_SEARCH_URL PRD_RAPID_USE_STREAMER PRD_RAPID_REPO_MASTER > +${TRUEPREFIX}/bin/pr-downloader \ > + --filesystem-writepath ${GAME_DIR} \ > + --download-game byar:test \ > + --download-game byar-chobby:test > + > +# start > +${TRUEPREFIX}/bin/spring --write-dir ${GAME_DIR} \ > + --isolation --isolation-dir ${TRUEPREFIX}/share/games/spring/ \ > + --menu rapid://byar-chobby:test > Index: pkg/PLIST > =================================================================== > RCS file: /cvs/ports/games/recoil-rts/pkg/PLIST,v > diff -u -p -r1.1.1.1 PLIST > --- pkg/PLIST 5 May 2024 17:18:13 -0000 1.1.1.1 > +++ pkg/PLIST 9 Jul 2024 20:23:20 -0000 > @@ -1,3 +1,4 @@ > +bin/byar-chobby > @bin bin/mapcompile > @bin bin/mapdecompile > @bin bin/pr-downloader