I know third-party apps can't presently auto-update, but I still want to use
pdxinfo to track versions of my app (in my own way—not automated) and to allow sideloaded updates.
But the docs warn: "Please do not maintain this value by hand as a mistake may lead to a game update not being recognized. If in doubt, leave it out."
How big a no-no are we talking? Is that warning really aimed at Season 1 devs making apps for first-party distribution? Can I safely disregard that and make use of
buildNumber manually with my itchi.io release?
It seems like omitting it would be worse than maintaining it by hand: at least by hand people MIGHT be able to sideload an update if I remember to increment it. (Which I will!) But if I omit it, sideloaded updates will ALWAYS fail (requiring delete-and-start-fresh), won't they?
My intent is to let people re-sideload the same app, without first deleting the old one—and have it properly update without losing their game progress data.
It's fine. We recommend incrementing it using a script of some sort when doing a release build to ensure it goes up every release. If you happen to do a release with the same build number it will not be updated automatically via the Games app on users devices.
Thanks. "Automatically" meaning, once they upload the new version to their account on play.date, right?
Yup, that is right. Now I have to write another sentence to get my post greater than 20 characters.
I made a shell script that automatically backs up the pdxinfo file and increments the buildNumber entry by 1. It can be used in a Nova task or also VSCode etc.
# Path to pdx info to be updated
# Path to folder for pdxinfo backup. Also add this folder to you .gitignore file
echo "> Backing up pdxinfo\n"
cp $FILE $BAK
echo "> BACKED UP:"
BUILD=$(cat $FILE | grep buildNumber | tr -dc '0-9')
echo "> CURRENT BUILD: $BUILD"
echo "> NEW BUILD: $BUILD"
echo "> WRITING NEW BUILD NUMBER: $BUILD"
# Make sure you already have a buildNumber=0 (or any number) in your pdxinfo
sed -i '' "s/buildNumber=[0-9]*/buildNumber=$BUILD/g" $FILE
echo "> UPDATED pdxinfo:"
I hope this is useful.
Would there be a way to make that work for the Vscode Lua Template? Someway in Powershell preferably.
I don’t know the VSCode template but I’ll have a look.