tauri-action icon indicating copy to clipboard operation
tauri-action copied to clipboard

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

Open roniemartinez opened this issue 1 year ago • 12 comments

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

roniemartinez avatar Mar 19 '24 23:03 roniemartinez

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

FabianLars avatar Mar 20 '24 11:03 FabianLars

I am using the macos-latest runner on Github.

Locally, I am using Intel.

roniemartinez avatar Mar 20 '24 11:03 roniemartinez

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 🤔

FabianLars avatar Mar 20 '24 12:03 FabianLars

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 avatar Mar 26 '24 02:03 venkr

Some 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.

venkr avatar Mar 28 '24 15:03 venkr

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.

venkr avatar Apr 01 '24 06:04 venkr

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

roniemartinez avatar Apr 01 '24 14:04 roniemartinez

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.

FabianLars avatar Apr 01 '24 14:04 FabianLars