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

fix: Change msi naming scheme for recent Tauri upgrades #227

Merged
merged 7 commits into from
Feb 20, 2022

Conversation

jdukewich
Copy link
Contributor

This action does not work with Windows bundles on the latest version of Tauri (see #225). I'm not sure when, but Tauri bundling changed the naming scheme of the output .msi installer.

This file in Tauri determines the outpath path name, and you can see it adds in the Wix Language.

Wix Language defaults to "en-US" as seen here.

Docs showing the config path for Wix Language are here.

If you want to test the action, test with jdukewich/tauri-action@fix-windows-bundling.

Copy link
Member

@FabianLars FabianLars left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hey! Thanks so much for taking a stab at this ❤️
Unfortunately this is not quite correct as it isn't as easy as it seems at first glance.
wix.language isn't necessarily a string. It can be an array or an object too: https://tauri.studio/docs/distribution/windows.
The bundler will create one MSI for each language.

Personally i'd prefer to get it correct&complete before merging it. But i guess i'd also agree to merging this and add support for array/object later, just so it's working for the more common configs.
cc @lucasfernog

@jdukewich
Copy link
Contributor Author

I can look more into that and work in support for all types of Wix Language. I wasn't too familiar with the full scope of config values originally. Is the general idea of the fix good as long as the types are correct and it supports multiple .msi for each language?

@FabianLars
Copy link
Member

Yeah i think the idea is fine.
You just need to be careful with the updater zip&sig as these are only generated once (for the first language specified). I mentioned that in our team chat because something about it feels weird (one zip is fine as it would just be too complicated otherwise, but still, something feels off 😅)

@jdukewich
Copy link
Contributor Author

Okay sounds good. And thanks for clarifying! Tauri is a large (but great!) project so it's tough to know all the specifics.

@FabianLars
Copy link
Member

Yeah i'm with you there. Started with tauri pre-beta and joined the team half a year ago and i still don't know everything :D (especially after the huge audit changes lol)

@lucasfernog
Copy link
Member

You're so close :) thanks for investigating this, I wanted to PR it but I didn't have the change yet. Now you just need to make it handle language: string | string[] | { [language: string]: unknown }

@jdukewich
Copy link
Contributor Author

Any guidance on how the zip & sigs are generated? When I run builds locally I am only getting the .msi. I've also followed https://tauri.studio/docs/distribution/sign-windows/.

@FabianLars
Copy link
Member

You need to enable the updater to get them, which is kinda annoying here because we force you to create singer keys for it.

@jdukewich
Copy link
Contributor Author

I was able to test out my latest changes, they seemed to work with configs that look like

"wix": {         
  "language": "en-US"
}

or

"wix": {         
  "language": ["en-US", "pt-BR"]
}

or

"wix": {         
  "language": {
    "en-US": {
      "localePath": null
    },
    "pt-BR": {
      "localePath": null
    }
  }
}

Also, because of the paths.filter(p => existsSync(p)) in core/index.ts, I don't think we need to worry about which language was "first" and gets the sig and zip.

@FabianLars
Copy link
Member

Also, because of the paths.filter(p => existsSync(p)) in core/index.ts, I don't think we need to worry about which language was "first" and gets the sig and zip.

Ah true, forgot about that.

LGTM, thanks again!

@qqpann qqpann mentioned this pull request Feb 17, 2022
@FabianLars
Copy link
Member

FabianLars commented Feb 17, 2022

Can you add a changefile like this one https://github.com/tauri-apps/tauri-action/blob/dev/.changes/workspace-support.md, as it breaks support with the beta versions?
I think patch is fine as it's more of a fix than a feature even if it's breaking. We can still change that later but i want to get this PR merged.

Thanks 🙏

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

Successfully merging this pull request may close these issues.

3 participants