FreeCAD / FreeCAD-Bundle

Stand-alone repo to Build and Deploy installable FreeCAD images
https://freecad.org
GNU Lesser General Public License v2.1
222 stars 57 forks source link

[Packaging] DMG is missing applications symlink and background #242

Open cbenhagen opened 1 month ago

cbenhagen commented 1 month ago

Is there an existing issue for this?

Problem description

The current DMG for macOS is missing a symlink to the /Applications folder. Adding a nice background would also improve the first impression.

This is what it currently looks like:

Screenshot 2024-06-06 at 08 16 29

This is how it could look like:

Screenshot 2024-06-06 at 08 10 05 Screenshot 2024-06-06 at 08 10 08

Full version info

OS: macOS 14.5
Word size of FreeCAD: 64-bit
Version: 0.22.0dev.37645 (Git)
Build type: Release
Branch: main
Hash: fc714933a7e2423d5fa4db640af549814061c42e
Python 3.11.9, Qt 5.15.13, Coin 4.0.2, Vtk 9.2.6, OCC 7.7.2
Locale: C/Default (C)
Installed mods: 
  * OpenDark 2024.3.13
  * Assembly4.backup1711882906.675722 0.50.1 (Disabled)
  * lattice2 1.0.0
  * fasteners.backup1711882906.7502148 0.4.56 (Disabled)
  * sheetmetal.backup1711882906.820294 0.2.63 (Disabled)

Subproject(s) affected?

None

Anything else?

No response

Code of Conduct

maxwxyz commented 1 month ago

@adrianinsaval what do you need to implement this?

cbenhagen commented 3 weeks ago

I evaluated different methods to create a nice DMG. The python package dmgbuild seems to be the most appropriate to use here.

  1. Install with pip install "dmgbuild[badge_icons]"
  2. Create a settings.py with this content:
    background = "builtin-arrow"
    files = ["/Applications/FreeCAD.app"]
    symlinks = {"Applications": "/Applications"}
    badge_icon = "/Applications/FreeCAD.app/Contents/Resources/freecad.icns"
    window_rect = ((100, 100), (670, 250))
    icon_locations = {"FreeCAD.app": (100, 100), "Applications": (530, 100)}
  3. dmgbuild -s settings.py "FreeCAD" FreeCAD.dmg; open FreeCAD.dmg
Screenshot 2024-06-09 at 12 17 56

This example uses the built-in default arrow of the tool but I am sure someone will come up with a nicer background.

It looks like there are currently different scripts being used to create the stable release and the weekly builds. Are there plans to unify them?

cbenhagen commented 3 weeks ago

Background discussion topic on Discord: https://discord.com/channels/870877411049357352/1249312427624108032

adrianinsaval commented 22 hours ago

do we have an image for this yet? since we are already using dmgbuild now adding the image should be trivial