Open roniemartinez opened 6 months ago
Hi, are you using an intel or arm mac locally? Which runner do you use in github?
Asking because i just saw this https://github.com/create-dmg/create-dmg/issues/171
I am using the macos-latest
runner on Github.
Locally, I am using Intel.
hmm, afaik macos-latest still uses intel until next month or so, so it's probably not that. I also found some old-ish releases from my action test repos and see the same issue. I also know that the create-dmg script indeed works differently in CI because it relies on Finder though i can't remember this being a general problem, i could swear it used to work 🤔
I've also just run into the same issue - it looks like running tauri build
locally works perfectly (ie: respects DmgConfig
) but the tauri-action
doesn't do that and seems to result in something that looks like the default .dmg
To confirm platform info:
macos-13-xlarge
on Github ActionsSome more investigation, this seems to be a well documented issue w/ people noticing it from 2018 through 2023 (https://github.com/create-dmg/create-dmg/issues/72) - where since you can't give create-dmg
access to control Finder, it fails on CI.
Turns out this is expected behavior, a skip-jenkins flag is passed to the dmg script in CI
if let Some(value) = env::var_os("CI") {
if value == "true" {
bundle_dmg_cmd.arg("--skip-jenkins");
}
}
For us - setting CI: false in the env for this step solved it and it seems to work great!
But be warned it looks like modifying the dmg aesthetics in CI can cause issues, so it's still unclear to us if it's working but flakily or whether its just that this issue has been fixed, eg, in current macOS or newer runners.
I can confirm that adding CI: false
fixes the DMG layout.
Thanks for the research :) I'd appreciate it if a few more people could test this.
If there are no problems reported I will add it to the docs/examples with a comment to change it to true if build issues are encountered.
Can confirm this also fixed our problem for adding a background image for the DMG. Note that now macos-latest
now uses M1 apple silicon.
Fix:
Add CI: false
to the env on your build pipeline fixed the issue.
Discord issue: https://discord.com/channels/616186924390023171/1263642177439928441
@roniemartinez @jLynx Hey 👋, excuse me. This solution does work! But if you do this, is the app running stable? There won't be any potential risks, right?
@ayangweb yes it's stable for us, no users have logged any issues
@ayangweb yes it's stable for us, no users have logged any issues
Ok, thanks, I decided to use it!
Tested only on v2 beta.
Building for MacOS with code signing and notarization creates a DMG with incorrect icon positions and window size as compared to a one built locally. There are no configuration change between environments.
Local build:
Workflow build using tauri-action: