Page MenuHome

Bug with macOS .dmg file, Finder does not show background
Confirmed, NormalPublic

Description

Blender Version
Broken: blender-2.83.5-macOS.dmg, blender-2.83.2-macOS.dmg
Worked: blender-2.83.0-macOS.dmg

Short description of error

Finder does not show background for .dmg file. The .DS_Store file is simply missing.
For example the current blender-2.83.5-macOS.dmg is broken.
This also happens for dev. builds, but not every time, as far as I can tell.

Blender-2.83.5-macOS.dmg:

Blender-2.83.0-macOS.dmg:

Event Timeline

The background is stored in release/darwin/background.tif and should be copied to the dMG too. .DS_Store shouldn't affect it. It is created by your system itself.

The .DS_Store file stores the view settings, icon size, and background settings. The background.tif file is present in .dmg.

/release/darwin/blender.applescript

Ankit Meel (ankitm) changed the task status from Needs Triage to Confirmed.Thu, Aug 27, 10:43 AM
-              set icon size of theViewOptions to 128
+              set icon size of theViewOptions to 72

the above change may be worth a try. I don't know how to test it locally.
for reference
https://stackoverflow.com/questions/8068959/why-is-my-applescript-to-add-a-background-image-to-a-dmg-folder-getting-the-siz
https://stackoverflow.com/questions/96882/how-do-i-create-a-nice-looking-dmg-for-mac-os-x-using-command-line-tools/

I think the blender.applescript works correctly, but Buildbot does not run it or not waiting for the end.

https://builder.blender.org/admin/#/builders/18/builds/90/steps/5/logs/stdio

Creating link to /Applications
Adjusting applescript for volume name...
Running applescript...
Waiting for applescript...
Ejecting read-write DMG image...

print('Waiting for applescript...')

# NOTE: This is copied from bundle.sh. The exact reason for sleep is
# still remained a mystery.
time.sleep(5)

It may take some time for the .DS_Store file to be created by the system.
I would check if it exists before packing. (just guesswork)

Or try just copying the pre-created .DS_Store file.

This comment was removed by Yevgeny Makarov (jenkm).

@Ankit Meel (ankitm) I found a way to test it locally, if you're interested:

./release/darwin/bundle.sh --source ../build_darwin/bin/ --dmg test.dmg

Yes thank you! I wanted to know if I could test dmg process locally, for T72605: MacOS user permissions: Blender works only in one user account.

Or try just copying the pre-created .DS_Store file.

That is listed as a drawback of .DS_Store on wikipedia. One can even find GitHub repos like https://github.com/snielsen/DeathToDSStore

I would check if it exists before packing. (just guesswork)

I have several DMGs with perfect backgrounds and no .DS_Store files.