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

custom distributions #25

Open
furudean opened this issue Nov 6, 2024 · 8 comments
Open

custom distributions #25

furudean opened this issue Nov 6, 2024 · 8 comments
Assignees

Comments

@furudean
Copy link

furudean commented Nov 6, 2024

renpy allows you to specify custom distributions that can be built with the launcher command. i don't think there currently is a way of declaring these for use with the renconstruct.toml file. this is a feature request to add something like that.

@kobaltcore kobaltcore self-assigned this Nov 7, 2024
@kobaltcore
Copy link
Owner

Yeah, I can see that being useful. I'll take a look to see whether I can implement support for this.

kobaltcore added a commit that referenced this issue Nov 8, 2024
Related to #25
Needs testing
@kobaltcore
Copy link
Owner

I believe I've found a way to add this feature without breaking the current config format, but it likely requires a bit more testing. In my initial local tests it seems to work, but I'd like to get your opinion on it as well, whenever you have a bit of time. I'm releasing 4.5.0-alpha.1 as a pre-release that includes this functionality as well as the things relevant for #24. Please give it a try when you're able.
If it works out, I'll promote to a full release.

@furudean
Copy link
Author

furudean commented Nov 8, 2024

i'll have a go with this. i'll report back

@furudean
Copy link
Author

furudean commented Nov 8, 2024

Good news is builds seem to trigger successfully. I tried a few different combinations and I couldn't find anything broken.

Somewhat expectedly the notarization task does not function for the app-directory format as it expects a zip file to be present in the output directory. Try: build.package("steam_mac", format="app-directory", file_lists="mac renpy all", update=False). The task could maybe be adjusted to handle a few of these available formats. The reason I'm using directory is because it makes the upload process to Steam easier. (You might've noticed in my older PR I used an unzip post task to get this behavior.)

@furudean
Copy link
Author

furudean commented Nov 9, 2024

Oh, and I'm not sure if this was intentional but [build] is no longer valid as a key. Changing it to [builds] fixed it but this seems like a breaking change since the last version

→ renconstruct build hellogirl/ out/
Error: TOML parse error at line 1, column 1
  |
1 | [tasks.notarize]
  | ^
missing field `builds`

@kobaltcore
Copy link
Owner

Ah yes, good catch indeed, thanks for noticing :)
I've adjusted the representation to keep compatibility, as it should. Now both build and builds are valid.
As far as notarizing the directory output format goes, I'll have to look into it as I'm not too familiar with that one. I'll investigate to see what's possible.

@furudean
Copy link
Author

furudean commented Nov 9, 2024

Not sure if it's helpful or not, but app-directory simply outputs a directory with the app bundle like this
Screenshot 2024-11-09 at 3 04 36 PM

@kobaltcore
Copy link
Owner

Yeah, that does make it easier for some cases, but of course the solution in renconstruct should be generic over all possible (and valid) output formats, so I'll have to deal with the other stuff, anyway.
I've investigated this and to support custom distributions with tasks properly (especially notarization) I will need to rework the entire task system in a backwards-incompatible way. Specifically, I'll need to separate task runs out to run per build specified in their on_builds list, instead of running if any of them are active (the current behavior).
This in turn will allow me to target the notarization action at the appropriate build (with the logic adapting depending on whether it's a ZIP or .app bundle, and where in the path it may appear) and will also make tasks in general more flexible and perhaps a bit more intuitive, but will cause a bump to v5 for renkit as a whole.
I'll chip away at this in the coming weeks but it's a larger project and will take me a while, especially with all the testing required for this large of a change.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants