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

[Bug] Resulting DMG has incorrect icon positions and window size #740

Open
roniemartinez opened this issue Mar 19, 2024 · 12 comments
Open

Comments

@roniemartinez
Copy link

roniemartinez commented Mar 19, 2024

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:
image

Workflow build using tauri-action:

  • Larger window size
  • Icons are positioned on the top left (alphabetically?)
    image
@FabianLars
Copy link
Member

Hi, are you using an intel or arm mac locally? Which runner do you use in github?

Asking because i just saw this create-dmg/create-dmg#171

@roniemartinez
Copy link
Author

I am using the macos-latest runner on Github.

Locally, I am using Intel.

@FabianLars
Copy link
Member

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 🤔

@venkr
Copy link

venkr commented Mar 26, 2024

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:

  • I'm using macos-13-xlarge on Github Actions
  • I'm using an Apple Silicon Macbook locally

@venkr
Copy link

venkr commented Mar 28, 2024

Some more investigation, this seems to be a well documented issue w/ people noticing it from 2018 through 2023 (create-dmg/create-dmg#72) - where since you can't give create-dmg access to control Finder, it fails on CI.

@venkr
Copy link

venkr commented Apr 1, 2024

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.

@roniemartinez
Copy link
Author

I can confirm that adding CI: false fixes the DMG layout.

@FabianLars
Copy link
Member

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.

@jLynx
Copy link

jLynx commented Jul 19, 2024

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

@ayangweb
Copy link

@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?

@jLynx
Copy link

jLynx commented Aug 29, 2024

@ayangweb yes it's stable for us, no users have logged any issues

@ayangweb
Copy link

@ayangweb yes it's stable for us, no users have logged any issues

Ok, thanks, I decided to use it!

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

5 participants