scoop-games icon indicating copy to clipboard operation
scoop-games copied to clipboard

Discussion: How do we build a manifest for the SEGA Model 3 emulator Supermodel (uses random string for builds)?

Open RavenMacDaddy opened this issue 2 years ago • 6 comments

Here's an example of a download URL: https://supermodel3.com/Files/Git_Snapshots/Supermodel_0.3a-git-a60f998_Win64.zip

So the a60f998 portion is what changes with each release to another random string.

The repository itself has nice dated releases, that part should be easy to figure out - the random string is the issue.

I wonder if what's used in this manifest would work?

RavenMacDaddy avatar Aug 19 '22 18:08 RavenMacDaddy

git-(?'hash'[\da-z]+)_Win64.zip
This should produce a hash capture group for use in the manifest.

BlackPowerade avatar Sep 06 '22 02:09 BlackPowerade

Great start!

Now the question is, how do we specify a regex that covers both the date in the repository - as well as the hash of the download?

RavenMacDaddy avatar Sep 06 '22 09:09 RavenMacDaddy

That's a good question. I'm not sure.
I've tried -(?'hash'[\da-z]+)_Win64\X*?(?'date'[\d\-]{10}) which should work.
But, it comes with multiple matches and scoop doesn't understand the \X.
I don't know how to make it work right now.
Also you will need to use https://supermodel3.com/Files/Git_Snapshots/?C=M;O=D for the checkver URL. I don't know what the default sorting is on the page, but it is not by date.

BlackPowerade avatar Sep 10 '22 23:09 BlackPowerade

Ah, so even if the date is specified, it doesn't matter because it's out of order; Scoop needs everything to fall in place sorted and doesn't “count up the date”?

Or rather, when a regex is used, it's looking for a pattern that changes, and it's not really about Scoop per se.

RavenMacDaddy avatar Sep 11 '22 06:09 RavenMacDaddy

Yes, if I remember correctly checkver.ps1 picks up the first (or it might be last) regex match for determining if an update is available.
I'm also taking a shot at setting up a github actions flow for compiling supermodel, but I can't get the windows builds to work, mingw and make can't find SDL. Maybe the repo owners would be willing to take a look at it? Would definitely be better than the python script right now used to push new builds to the website. https://github.com/trzy/Supermodel/blob/master/Scripts/supermodel_build_bot.py My WIP actions flow https://github.com/BlackPowerade/Supermodel/blob/master/.github/workflows/c-cpp.yml

BlackPowerade avatar Sep 11 '22 23:09 BlackPowerade

Created a post over on their repo.

RavenMacDaddy avatar Sep 12 '22 07:09 RavenMacDaddy