Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
RavenMacDaddy opened this issue Aug 19, 2022 · 6 comments
Labels
new package A package should be added

Comments

@RavenMacDaddy
Copy link
Contributor

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?

@Calinou Calinou added the new package A package should be added label Aug 19, 2022
@BlackPowerade
Copy link
Contributor

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

@RavenMacDaddy
Copy link
Contributor Author

RavenMacDaddy commented Sep 6, 2022

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?

@BlackPowerade
Copy link
Contributor

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.

@RavenMacDaddy
Copy link
Contributor Author

RavenMacDaddy commented Sep 11, 2022

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.

@BlackPowerade
Copy link
Contributor

BlackPowerade commented Sep 11, 2022

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

@RavenMacDaddy
Copy link
Contributor Author

Created a post over on their repo.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
new package A package should be added
Projects
None yet
Development

No branches or pull requests

3 participants