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

[feat] v2 - Move bundle configs into respective platform objects. #8055

Closed
FabianLars opened this issue Oct 19, 2023 · 1 comment · Fixed by #8723
Closed

[feat] v2 - Move bundle configs into respective platform objects. #8055

FabianLars opened this issue Oct 19, 2023 · 1 comment · Fixed by #8723

Comments

@FabianLars
Copy link
Member

Describe the problem

Currently the config is a bit of a mess, we have deb and appimage configs at the root but also a windows config that contains the nsis and wix configs.

Describe the solution you'd like

Move appimage and deb into a linux config. Something similar will probably need to happen on macos with the open dmg PR and potentially upcoming formats (pkg?).

I can work on this myself (unless a community member wants to work on this :) ) but wanted to discuss this here first, so don't take this issue as a "Please fix this for me" thing 😅

P.S. i am aware that cargo-package doesn't have OS configs but tauri's config covers way more stuff (other than bundler related things) so imo a bit more structure would be valuable, especially since not every user may know each bundle name so maybeee this clears it up a bit for a few people 🤷

Alternatives considered

pulling out wix, nsis, etc into the root or just leaving it as is. The first one is too messy and the second one looks too much like an "accident" (for the lack of a better word)

Additional context

imo this should happen after the rpm and dmg prs so that the community members don't have to deal with it, unless we think we can't get those PR in tauri in time for the audit, then we should change it asap and let the PRs deal with the change.

PRs that would be affected:
rpm #5202 (adds new configs but at the root like deb)
dmg #7964 (adds new configs but at the root like deb)
snap #6532 (this one doesn't have configs yet)
pacman #4301 (this one doesn't have configs yet)

@olivierlemasle
Copy link
Contributor

A big yes to this proposal!

When writing #5202 (rpm support), this inconsistency between configuration for OSes (Windows, Mac) and package types (Deb, AppImage) also struck me.

Furthermore, AppImage packaging uses Debian files, and depends as such of Deb configuration:

// generate deb_folder structure
let (_, icons) = debian::generate_data(settings, &package_dir)?;
let icons: Vec<debian::DebIcon> = icons.into_iter().collect();

E.g. desktopTemplate in DebConfig is actually used by Deb and AppImage. For RPM, in my PR, I duplicated it in RpmConfig. But I think having it in a LinuxConfig would be better.

For RpmConfig, I also duplicated files and depends from DebConfig, and these settings could be set at the OS platform level (in a new LinuxConfig). However, it might be necessary to differentiate the dependencies for each OS. But it's a difference by Linux Distribution (e.g. libjson-c-dev for Debian, libjson-c-devel for Fedora), not really by packaging type (deb vs rpm).

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

Successfully merging a pull request may close this issue.

2 participants