#20119: More typical dmg for Mac distribution
-------------------------------+-----------------------------
       Reporter:  mgoerner     |        Owner:
           Type:  enhancement  |       Status:  new
       Priority:  major        |    Milestone:  sage-wishlist
      Component:  porting      |   Resolution:
       Keywords:               |    Merged in:
        Authors:               |    Reviewers:
Report Upstream:  N/A          |  Work issues:
         Branch:               |       Commit:
   Dependencies:               |     Stopgaps:
-------------------------------+-----------------------------

Comment (by mgoerner):

 I left out some fine print when I said "all the is necessary". It is not
 quiet as easy, but solvable!

 The problem is that the volume name in the dmg we are creating is changing
 since it contains the sage version number. And the .DT_store doesn't save
 a relative path to the background image but a pair (volume name, absolute
 path within volume), so we need to update the .DT_store for every release.

 Luckily, there are pure python tools to update the .DT_store file such as
 [https://pypi.python.org/pypi/ds_store ds_store] and
 [https://pypi.python.org/pypi/mac_alias mac_alias] so that we can create a
 .DT_store file by hand once in finder and then do the update
 programmatically for subsequent releases or flavors.

 dmg-builder for example does that
 
[https://bitbucket.org/al45tair/dmgbuild/src/b08746ed79385ccc512cc23342cf698c5ba0bd3e/dmgbuild/core.py?at=default&fileviewer
 =file-view-default#core.py-355 here]

 We can write a little python script invoked by local/bin/sage-bdist to use
 the above libraries to:
 - ds_store.DSStore.open the file
 - get the value at the key [ '.' ][ 'icvp' ][ 'backgroundImageAlias' ]
 - deserialize to a mac_alias.Alias object
 - change the volume name in that object's volume info
 - write it all back

 mac_alias seems to use Mac OS X specific API, so we might need to use the
 system's python for that.

 One question I have if I were to implement it: this would mean that the
 dmg build process becomes dependent on the above packages ds_store and
 mac_alias, where should these be installed?

--
Ticket URL: <http://trac.sagemath.org/ticket/20119#comment:1>
Sage <http://www.sagemath.org>
Sage: Creating a Viable Open Source Alternative to Magma, Maple, Mathematica, 
and MATLAB

-- 
You received this message because you are subscribed to the Google Groups 
"sage-trac" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/sage-trac.
For more options, visit https://groups.google.com/d/optout.

Reply via email to