CVSROOT:        /cvsroot/lilypond
Module name:    installers
Branch:         
Changes by:     Han-Wen Nienhuys <[EMAIL PROTECTED]>    05/06/14 20:59:32

Modified files:
        macos          : buildmac.py 

Log message:
        * Welcome-to-LilyPond-MacOS.ly: new file MacOS specific Welcome to
        LilyPond.
        
        * lilycall.py: move from ../

CVSWeb URLs:
http://savannah.gnu.org/cgi-bin/viewcvs/lilypond/installers/macos/buildmac.py.diff?tr1=1.30&tr2=1.31&r1=text&r2=text

Patches:
Index: installers/macos/buildmac.py
diff -u installers/macos/buildmac.py:1.30 installers/macos/buildmac.py:1.31
--- installers/macos/buildmac.py:1.30   Tue Jun 14 18:14:50 2005
+++ installers/macos/buildmac.py        Tue Jun 14 20:59:32 2005
@@ -31,7 +31,7 @@
 lilypond_cvs_dir = lp_builddir
 bundle_name = 'LilyPond'
 
-image_dir =  '%s/image/' % (builddir)
+image_dir =  '%s/image/Applications/' % (builddir)
 wrapdest = '%s/%s' % (image_dir, bundle_name)
 wrapdir = wrapdest + '.app'
 
@@ -57,6 +57,17 @@
        # .%(MY_PATCH_LEVEL)s
        return '%(MAJOR_VERSION)s.%(MINOR_VERSION)s.%(PATCH_LEVEL)s' % dict
 
+def mkdir (dir):
+       while dir[-1]== '/':
+               dir = dir[:-1]
+               
+       if os.path.exists (dir):
+               return
+
+       (pref, suf) = os.path.split (dir)
+       mkdir (pref)
+       os.mkdir (pref + '/' + suf)
+
 def system (cmd):
        sys.stderr.write ('invoking %s' % cmd)
        sys.stderr.flush()
@@ -221,6 +232,9 @@
 
 
 def strip_lp_dir (pref):
+       system ('cd %s && strip bin/*' % pref)
+       
+def strip_framework_dir (pref):
        "Remove unnecessary cruft."
        
        for a in ['share/info', 'share/gtk-doc', 'man',
@@ -245,20 +259,40 @@
        system ('cd %s && rm lib/*.a' % pref)
        system ('cd %s && cp etc/pango/pango.modules  
etc/pango/pango.modules.in ' % pref)
 
+
+##
+# ugh: package is broken:
+# Cannot set permission / access times on /Applications
+
 def make_package ():
-       pm = 
('/Developer/Applications/Utilities/PackageMaker.app/Contents/MacOS/PackageMaker
 '
-             + ('-build -f %s/LilyPond.app -p %s/lilypond.pkg ' %
-                (builddir, builddir)))
+       strip_lp_dir (wrapdir + '/Contents/Resources/')
+       udir = builddir + '/upgrade'
+       mkdir (udir)
+       os.chmod (udir, 0775)
+       pkg = '%s/lilypond-%s.pkg' % (udir, lilypond_version)
+       pm = (('/Developer/Applications/Utilities/PackageMaker.app/'
+              + 'Contents/MacOS/PackageMaker '
+              + '-build -f %s/../ -p %s ')
+             % (image_dir, pkg))
        
        system (pm)
+       zipname = distdir + '/lilypond-upgrade-%s.dmg' % lilypond_version
+       if os.path.exists (zipname):
+               os.unlink (zipname)
+       system  (("hdiutil create -uid 99 -gid 99 "
+                 + " -volname 'LilyPond-upgrade' "
+                 + " -imagekey zlib-level=9 -srcdir %s %s ")
+                % (udir, zipname))
+
+#      system ('rm -rf  %s' % udir)
 
 def copy_framework ():
        system ('cp -R %s %s' %  (builddir + '/' + finished_build_base_name + 
'/', wrapdir))
-       strip_lp_dir (wrapdir + '/Contents/Resources/')
+       strip_framework_dir (wrapdir + '/Contents/Resources/')
        
 def build_lilypad ():
        system ('rm -rf %s ' % image_dir)   
-       os.mkdir (image_dir)
+       mkdir (image_dir)
        os.chdir (topdir + '/LilyPad')
        system ('/usr/bin/python setup.py py2app -b %s -d %s --iconfile %s ' %
                (builddir + '/lilypad-build',
@@ -267,15 +301,12 @@
                 ))
        
        # ugh.
-       system ('cp /sw/lib/python2.4/subprocess.py %s' 
-               % (wrapdir + '/Contents/Resources/'))
-
        system ('cp -R %s/LilyPond.app/* %s'
                % (builddir, wrapdir))
 
 def zip_bundle ():
        files = ['lilypond.sh', 'lilypond-book.sh',
-                'README', 'test.ly' ]
+                'README']
        for f in files:
                global_vars['f'] = f
                system ("cp %(topdir)s/%(f)s %(image_dir)s" % global_vars)
@@ -299,8 +330,9 @@
        
        build_lilypond ()
        build_lilypad ()
+
        
-       make_package ()
+#      make_package ()
        copy_framework ()
        zip_bundle ()
 


_______________________________________________
Lilypond-cvs mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/lilypond-cvs

Reply via email to