Ticket #51449: patch-0.7.4-to-24Feb2016.diff

File patch-0.7.4-to-24Feb2016.diff, 27.5 KB (added by fredowski, 8 years ago)
  • Changelog

    diff --git Changelog Changelog
    index 07dfe16..47bbfef 100644
     
    11Changes in version 0.7.4:
    22
     3 - Release gtk-mac-bundler 0.7.4 (John Ralls)
     4 - Make sure to check for .symbolic icon extension (Jesse van den Kieboom)
     5 - Fix pixbuf loader cache path (Jesse van den Kieboom)
     6 - Make sure that libraries are writeable before using otool. (Julien Woillez)
     7 - Update doap to reflect correct bug tracker. (John Ralls)
     8 - Bug 698196: Fix typo (John Ralls)
     9 - Bug #698916: Update versions, fix pixbuf (John Ralls)
     10 - Update all launchers to reflect new pango environment variables (John Ralls)
     11 - launcher: Update for pango changes (Dave Vasilevsky)
     12 - Correct gdk-pixbuf path in the pygtk example (John Ralls)
     13 - Bring example bundle files and launchers up to date (John Ralls)
     14 - The *correct* fix for pango modules. (John Ralls)
     15 - Fix another typo in pango module path (John Ralls)
     16
     17Changes in version 0.7.4:
     18
    319 - Make sure to check for .symbolic icon extension (Jesse van den Kieboom)
    420 - Fix pixbuf loader cache path (Jesse van den Kieboom)
    521 - Make sure that libraries are writeable before using otool. (Julien Woillez)
  • bundler/bundler.py

    diff --git bundler/bundler.py bundler/bundler.py
    index 8061ac1..65b8cc0 100644
     
    11import sys
    22import os, errno, glob
    3 import dircache, shutil
     3import shutil
    44import re
    55from plistlib import Plist
    66from distutils import dir_util, file_util
    77
    8 from project import *
    9 import utils
     8from .project import *
     9from . import utils
    1010
    1111class Bundler:
    1212    def __init__(self, project):
    class Bundler: 
    3232    def recursive_rm(self, dirname):
    3333        # Extra safety ;)
    3434        if dirname in [ "/", os.getenv("HOME"), os.path.join(os.getenv("HOME"), "Desktop"), self.meta.dest ]:
    35             print "Eek, trying to remove a bit much, eh? (%s)" % (dirname)
     35            print("Eek, trying to remove a bit much, eh? (%s)" % (dirname))
    3636            sys.exit(1)
    3737
    3838        if not os.path.exists(dirname):
    3939            return
    4040       
    41         files = dircache.listdir(dirname)
     41        files = os.listdir(dirname)
    4242        for file in files:
    4343            path = os.path.join (dirname, file)
    4444            if os.path.isdir(path):
    class Bundler: 
    6868        self.copy_path(path)
    6969
    7070    def create_pango_setup(self):
     71        if utils.has_pkgconfig_module("pango") and \
     72                not utils.has_pkgconfig_variable("pango", "pango_module_version"):
     73            # Newer pango (>= 1.38) no longer has modules, skip this
     74            # step in that case.
     75            return
     76
    7177        # Create a temporary pangorc file just for creating the
    7278        # modules file with the right modules.
    7379        module_version = utils.evaluate_pkgconfig_variables("${pkg:pango:pango_module_version}")
    class Bundler: 
    227233            # Clean out any libtool (*.la) files and static libraries
    228234            if os.path.isdir(dest):
    229235                for root, dirs, files in os.walk(dest):
    230                     for name in filter(lambda l: l.endswith(".la") or l.endswith(".a"), files):
     236                    for name in [l for l in files if l.endswith(".la") or l.endswith(".a")]:
    231237                        os.remove(os.path.join(root, name))
    232238
    233239    # Copies from Path.source to Path.dest, evaluating any variables
    class Bundler: 
    247253                relative_dest = self.project.evaluate_path(Path.source[m.end():])
    248254                dest = self.project.get_bundle_path("Contents/Resources", relative_dest)
    249255            else:
    250                 print "Invalid bundle file, missing or invalid 'dest' property: " + Path.dest
     256                print("Invalid bundle file, missing or invalid 'dest' property: " + Path.dest)
    251257                sys.exit(1)
    252258
    253259        (dest_parent, dest_tail) = os.path.split(dest)
    class Bundler: 
    257263        p = re.compile("[\*\?]")
    258264        (source_parent, source_tail) = os.path.split(source)
    259265        if p.search(source_parent):
    260             print "Can't have wildcards except in the last path component: " + source
     266            print("Can't have wildcards except in the last path component: " + source)
    261267            sys.exit(1)
    262268
    263269        if p.search(source_tail):
    class Bundler: 
    267273        else:
    268274            source_check = source
    269275        if not os.path.exists(source_check):
    270             print "Cannot find source to copy: " + source
     276            print("Cannot find source to copy: " + source)
    271277            sys.exit(1)
    272278
    273279        # If the destination has a wildcard as last component (copied
    class Bundler: 
    285291                    try:
    286292#                        print "Copying %s to %s" % (globbed_source, destdir)
    287293                        shutil.copy(globbed_source, destdir)
    288                     except EnvironmentError, e:
     294                    except EnvironmentError as e:
    289295                        if e.errno == errno.ENOENT:
    290                             print "Warning, source file missing: " + globbed_source
     296                            print("Warning, source file missing: " + globbed_source)
    291297                        elif e.errno == errno.EEXIST:
    292                             print "Warning, path already exits: " + dest
     298                            print("Warning, path already exits: " + dest)
    293299                        else:
    294                             print "Error %s when copying file: %s" % ( str(e), globbed_source )
     300                            print("Error %s when copying file: %s" % ( str(e), globbed_source ))
    295301                            sys.exit(1)
    296302
    297303        else:
    class Bundler: 
    315321                                            link=None,
    316322                                            verbose=1,
    317323                                            dry_run=0)
    318                 except EnvironmentError, e:
     324                except EnvironmentError as e:
    319325                    if e.errno == errno.ENOENT:
    320                         print "Warning, source file missing: " + globbed_source
     326                        print("Warning, source file missing: " + globbed_source)
    321327                    elif e.errno == errno.EEXIST:
    322                         print "Warning, path already exits: " + dest
     328                        print("Warning, path already exits: " + dest)
    323329                    else:
    324                         print "Error %s when copying file: %s" %( str(e), globbed_source )
     330                        print("Error %s when copying file: %s" %( str(e), globbed_source ))
    325331                        sys.exit(1)
    326332        return dest
    327333
    class Bundler: 
    338344        for path in self.binary_paths:
    339345            if os.path.isdir(path):
    340346                for root, dirs, files in os.walk(path):
    341                     paths.extend(map(lambda l: os.path.join(root, l), files))
     347                    paths.extend([os.path.join(root, l) for l in files])
    342348            else:
    343349                paths.append(path)
    344350
    345         paths = filter(filter_path, paths)
     351        paths = list(filter(filter_path, paths))
    346352        return list(set(paths))
    347353
    348354    def resolve_library_dependencies(self):
    class Bundler: 
    366372
    367373            def relative_path_map(line):
    368374                if not os.path.isabs(line):
    369                     for prefix in prefixes.values():
     375                    for prefix in list(prefixes.values()):
    370376                        path = os.path.join(prefix, "lib", line)
    371377                        if os.path.exists(path):
    372378                            return path
    373                     print "Cannot find a matching prefix for %s" % (line)
     379                    print("Cannot find a matching prefix for %s" % (line))
    374380                return line
    375381
    376382            def prefix_filter(line):
    class Bundler: 
    378384                    return False
    379385
    380386                if line.startswith("/usr/X11"):
    381                     print "Warning, found X11 library dependency, you most likely don't want that:", line.strip().split()[0]
     387                    print("Warning, found X11 library dependency, you most likely don't want that:", line.strip().split()[0])
    382388
    383389                if os.path.isabs(line):
    384                     for prefix in prefixes.values():
     390                    for prefix in list(prefixes.values()):
    385391                        if prefix in line:
    386392                            return True
    387393                   
    388394                    if not line.startswith("/usr/lib") and not line.startswith("/System/Library"):
    389                         print "Warning, library not available in any prefix:", line.strip().split()[0]
     395                        print("Warning, library not available in any prefix:", line.strip().split()[0])
    390396
    391397                    return False
    392398
    393399                return True
    394400
    395             lines = filter(prefix_filter, [line.strip() for line in f])
     401            lines = list(filter(prefix_filter, [line.strip() for line in f]))
    396402            p = re.compile("(.*\.dylib\.?.*)\s\(compatibility.*$")
    397403            lines = utils.filterlines(p, lines)
    398             lines = map(relative_path_map, lines)
     404            lines = list(map(relative_path_map, lines))
    399405#When you need to track down errors, uncomment this blocK
    400406#            for path in paths:
    401407#                cmd = "otool -L %s" % path
    class Bundler: 
    407413            for library in set(lines):
    408414                # Replace the real path with the right prefix so we can
    409415                # create a Path object.
    410                 for (key, value) in prefixes.items():
     416                for (key, value) in list(prefixes.items()):
    411417                    if library.startswith(value):
    412418                        path = Path("${prefix:" + key + "}" + library[len(value):])
    413419                        new_libraries.append(path)
    class Bundler: 
    415421            n_paths = len(paths)
    416422            n_iterations += 1
    417423            if n_iterations > 10:
    418                 print "Too many tries to resolve library dependencies"
     424                print("Too many tries to resolve library dependencies")
    419425                sys.exit(1)
    420426           
    421427            self.copy_binaries(new_libraries)
    422428            paths = self.list_copied_binaries()
    423429
    424430    def run_install_name_tool(self):
    425         print "Running install name tool"
     431        print("Running install name tool")
    426432
    427433        paths = self.list_copied_binaries()
    428434        prefixes = self.meta.prefixes
    class Bundler: 
    430436        # First change all references in libraries.
    431437        for prefix in prefixes:
    432438            prefix_path = self.project.get_prefix(prefix)
    433             print "Going through prefix: " + prefix_path
     439            print("Going through prefix: " + prefix_path)
    434440            for path in paths:
    435441                cmd = os.path.join(os.path.dirname(__file__), "run-install-name-tool-change.sh") + " " + path + " " + prefix_path + " Resources" + " change"
    436442                f = os.popen(cmd)
    437443                for line in f:
    438                     print line
     444                    print(line)
    439445
    440446        # Then change the id of all libraries. Skipping this part for now
    441447        #for path in paths:
    class Bundler: 
    448454        for framework in self.frameworks:
    449455            fw_name, ext = os.path.splitext(os.path.basename(framework))
    450456            fwl = os.path.join(framework, fw_name)
    451             print "Importing Framework: " + fwl
     457            print("Importing Framework: " + fwl)
    452458# Fix the framework IDs
    453459            cmd = os.path.join(os.path.dirname(__file__), "run-install-name-tool-change.sh") + " " + fwl + " " + fw_name + " Frameworks" + " id"
    454460            f = os.popen(cmd)
    455461            for line in f:
    456                 print line
     462                print(line)
    457463# Fix the dependencies in other libraries
    458464            for path in paths:
    459465                cmd = os.path.join(os.path.dirname(__file__), "run-install-name-tool-change.sh") + " " + path + " " + fw_name + " Frameworks/" + fw_name + " change"
    460466                f = os.popen(cmd)
    461467                for line in f:
    462                     print line
     468                    print(line)
    463469#fix the dependencies in frameworks
    464470            for ufw in self.frameworks:
    465471                ufw_name, ext = os.path.splitext(os.path.basename(ufw))
    class Bundler: 
    469475                cmd = os.path.join(os.path.dirname(__file__), "run-install-name-tool-change.sh") + " " + ufwl + " " + fw_name + " Frameworks/" + fw_name + " change"
    470476                f = os.popen(cmd)
    471477                for line in f:
    472                     print line
     478                    print(line)
    473479
    474480
    475481    def strip_debugging(self):
    476482        paths = self.list_copied_binaries()
    477483        for path in paths:
    478484            if path.endswith(".dylib") or path.endswith(".so"):
    479                 os.chmod(path, 0644)
     485                os.chmod(path, 0o644)
    480486                os.system("strip -x " + path + " 2>/dev/null")
    481                 os.chmod(path, 0444)
     487                os.chmod(path, 0o444)
    482488            else:
    483                 os.chmod(path, 0755)
     489                os.chmod(path, 0o755)
    484490                os.system("strip -ur " + path + " 2>/dev/null")
    485                 os.chmod(path, 0555)
     491                os.chmod(path, 0o555)
    486492
    487493#
    488494# If you want to sign your application, set $APPLICATION_CERT with the
    class Bundler: 
    491497# bundle's id string.
    492498#
    493499    def sign_binaries(self):
    494         if not os.environ.has_key("APPLICATION_CERT"):
     500        if "APPLICATION_CERT" not in os.environ:
    495501            return
    496502        cert = os.getenv("APPLICATION_CERT")
    497503        paths = self.list_copied_binaries()
    class Bundler: 
    501507            result = os.spawnvp(os.P_WAIT, 'codesign', cmdargs)
    502508
    503509            if result:
    504                 raise OSError, '"' + " ".join(cmdargs) + '" failed %d' % result
     510                raise OSError('"' + " ".join(cmdargs) + '" failed %d' % result)
    505511
    506512    def copy_icon_themes(self):
    507513        all_icons = set()
    class Bundler: 
    604610        final_path = self.project.evaluate_path(final_path)
    605611
    606612        if not self.meta.overwrite and os.path.exists(final_path):
    607             print "Bundle already exists: " + final_path
     613            print("Bundle already exists: " + final_path)
    608614            sys.exit(1)
    609615
    610616        self.create_skeleton()
    class Bundler: 
    618624        path = self.project.get_main_binary()
    619625        source = self.project.evaluate_path(path.source)
    620626        if not os.path.exists(source):
    621             print "Cannot find main binary: " + source
     627            print("Cannot find main binary: " + source)
    622628            sys.exit(1)
    623629
    624630        dest = self.copy_path(path)
    class Bundler: 
    658664        launcher_script = self.project.get_launcher_script()
    659665        if launcher_script:
    660666            path = self.copy_path(launcher_script)
    661             if os.environ.has_key("APPLICATION_CERT"):
     667            if "APPLICATION_CERT" in os.environ:
    662668                cert = os.environ["APPLICATION_CERT"]
    663669                ident = self.project.get_bundle_id()
    664670                cmdargs = ['codesign', '-s', cert, '-i', ident, "-f", path]
    665671                result = os.spawnvp(os.P_WAIT, 'codesign', cmdargs)
    666672                if result:
    667                     raise OSError, '"'+ " ".join(cmdargs) + '" failed %d' % result
     673                    raise OSError('"'+ " ".join(cmdargs) + '" failed %d' % result)
    668674        if self.meta.overwrite:
    669675            self.recursive_rm(final_path)
    670676        shutil.move(self.project.get_bundle_path(), final_path)
    671677
    672678if __name__ == '__main__':
    673679    if len(sys.argv) != 2:
    674         print "Usage: %s <bundle descriptopn file>" % (sys.argv[0])
     680        print("Usage: %s <bundle descriptopn file>" % (sys.argv[0]))
    675681        sys.exit(2)
    676682
    677683    if not os.path.exists(sys.argv[1]):
    678         print "File %s does not exist" % (sys.argv[1])
     684        print("File %s does not exist" % (sys.argv[1]))
    679685        sys.exit(2)
    680686
    681687    project = Project(sys.argv[1])
  • bundler/main.py

    diff --git bundler/main.py bundler/main.py
    index bcd7dda..b9b2fc5 100644
     
    11import sys, os
    22
    3 from project import *
    4 from bundler import *
     3from .project import *
     4from .bundler import *
    55
    66def main(argv):
    77    if len(argv) != 1:
    8         print "Usage: %s <bundle descriptopn file>" % (sys.argv[0])
     8        print("Usage: %s <bundle descriptopn file>" % (sys.argv[0]))
    99        sys.exit(2)
    1010
    1111    if not os.path.exists(argv[0]):
    12         print "File %s does not exist" % (argv[0])
     12        print("File %s does not exist" % (argv[0]))
    1313        sys.exit(2)
    1414
    1515    project = Project(argv[0])
    1616    bundler = Bundler(project)
    17 
    18     bundler.run()
     17    try:
     18        bundler.run()
     19    except Exception as err:
     20        print("Bundler encountered an error %s" % str(err))
  • bundler/project.py

    diff --git bundler/project.py bundler/project.py
    index c98b65a..60f0541 100644
    import os 
    55import xml.dom.minidom
    66from xml.dom.minidom import Node
    77from plistlib import Plist
    8 import utils
     8from . import utils
    99
    1010# Base class for anything that can be copied into a bundle with a
    1111# source and dest.
    class Data(Path): 
    184184    pass
    185185
    186186class IconTheme:
    187     ICONS_NONE, ICONS_ALL, ICONS_AUTO = range(3)
     187    ICONS_NONE, ICONS_ALL, ICONS_AUTO = list(range(3))
    188188   
    189189    def __init__(self, name, icons=ICONS_AUTO):
    190190        self.name = name
    class Project: 
    221221                # Get the first app-bundle tag and ignore any others.
    222222                self.root = utils.node_get_element_by_tag_name(doc, "app-bundle")
    223223            except:
    224                 print "Could not load project %s:" % (project_path)
     224                print("Could not load project %s:" % (project_path))
    225225                raise
    226226
    227227        # The directory the project file is in (as opposed to
    class Project: 
    232232        plist_path = self.get_plist_path()
    233233        try:
    234234            plist = Plist.fromFile(plist_path)
    235         except EnvironmentError, e:
     235        except EnvironmentError as e:
    236236            if e.errno == errno.ENOENT:
    237                 print "Info.plist file not found: " + plist_path
     237                print("Info.plist file not found: " + plist_path)
    238238                sys.exit(1)
    239239            else:
    240240                raise
    241241        self.name = plist.CFBundleExecutable
    242         if plist.has_key("CFBundleName"):
     242        if "CFBundleName" in plist:
    243243            self.bundle_name = plist.CFBundleName
    244244        else:
    245245            self.bundle_name = plist.CFBundleExecutable
    class Project: 
    340340            themes.append(IconTheme.from_node(node))
    341341
    342342        # The hicolor theme is mandatory.
    343         if not filter(lambda l: l.name == "hicolor", themes):
     343        if not [l for l in themes if l.name == "hicolor"]:
    344344            themes.append(IconTheme("hicolor"))
    345345
    346346        return themes
    class Project: 
    412412if __name__ == '__main__':
    413413    project = Project(os.path.join(os.getcwd(), 'giggle.bundle'))
    414414
    415     print "General:"
    416     print "  Project path: %s" % (project.get_project_path())
    417     print "  Plist path: %s" % (project.get_plist_path())
    418     print "  App name: %s" % (project.name)
    419     print "  Destination: %s" % (project.get_meta().dest)
    420     print "  Overwrite: %s" % (str(project.get_meta().overwrite))
     415    print("General:")
     416    print("  Project path: %s" % (project.get_project_path()))
     417    print("  Plist path: %s" % (project.get_plist_path()))
     418    print("  App name: %s" % (project.name))
     419    print("  Destination: %s" % (project.get_meta().dest))
     420    print("  Overwrite: %s" % (str(project.get_meta().overwrite)))
    421421
    422422    environment = project.get_environment()
    423     print "Environment:"
     423    print("Environment:")
    424424    for variable in environment.runtime_variables:
    425         print "  %s=%s" % (variable.name, variable.value)
     425        print("  %s=%s" % (variable.name, variable.value))
    426426    for script in environment.scripts:
    427         print "  %s => %s" % (script.source, script.dest)
     427        print("  %s => %s" % (script.source, script.dest))
    428428
    429     print "Frameworks:"
     429    print("Frameworks:")
    430430    for framework in project.get_frameworks():
    431         print " ", framework
     431        print(" ", framework)
    432432
    433     print "Main binary:"
     433    print("Main binary:")
    434434    binary = project.get_main_binary()
    435     print "  %s => %s" % (binary.source, binary.dest)
     435    print("  %s => %s" % (binary.source, binary.dest))
    436436
    437     print "Launcher:"
     437    print("Launcher:")
    438438    launcher_script = project.get_launcher_script()
    439     print "  %s => %s" % (launcher_script.source, launcher_script.dest)
     439    print("  %s => %s" % (launcher_script.source, launcher_script.dest))
    440440
    441     print "Binaries:"
     441    print("Binaries:")
    442442    for binary in project.get_binaries():
    443         print "  %s => %s" % (binary.source, binary.dest)
     443        print("  %s => %s" % (binary.source, binary.dest))
    444444
  • bundler/project_test.py

    diff --git bundler/project_test.py bundler/project_test.py
    index 4c3d583..0ff9179 100644
    import unittest 
    55import xml.dom.minidom
    66from xml.dom.minidom import Node
    77from plistlib import Plist
    8 from project import Project
    9 import utils
     8from .project import Project
     9from . import utils
    1010
    1111class Mock_Project(Project):
    1212
    class Mock_Project(Project): 
    2020        try:
    2121            plist_path = os.path.join(self.project_dir, "test.plist")
    2222            plist = Plist.fromFile(plist_path)
    23         except EnvironmentError, e:
     23        except EnvironmentError as e:
    2424            if e.errno == errno.ENOENT:
    25                 print "Info.plist file not found: " + plist_path
     25                print("Info.plist file not found: " + plist_path)
    2626                sys.exit(1)
    2727            else:
    2828                raise
  • bundler/runtest.py

    diff --git bundler/runtest.py bundler/runtest.py
    index 309643a..2450f2d 100755
     
    11#!/usr/bin/python
    22import unittest
    33import os
    4 from project_test import Project_Test
     4from .project_test import Project_Test
    55
    66def setProjects( goodpath, badpath):
    77    if not os.path.isabs(goodpath):
  • bundler/utils.py

    diff --git bundler/utils.py bundler/utils.py
    index 78d4c47..76c83d1 100644
    def evaluate_environment_variables(string): 
    1515
    1616    return string
    1717
     18def has_pkgconfig_module(module):
     19    """Returns True if the pkg-config module exists"""
     20    f = os.popen("pkg-config --exists " + module)
     21    f.read().strip()
     22    return f.close() is None
     23
     24def has_pkgconfig_variable(module, key):
     25    """Returns True if the pkg-config variable exists for the given
     26    module
     27    """
     28    f = os.popen("pkg-config --variable=" + key + " " + module)
     29    status = bool(f.read().strip())
     30    f.close()
     31    return status
     32
    1833def evaluate_pkgconfig_variables(string):
    1934    p = re.compile("\${pkg:(.*?):(.*?)}")
    2035    m = p.search(string)
    def evaluate_pkgconfig_variables(string): 
    2439        f = os.popen("pkg-config --variable=" + key + " " + module)
    2540        value = f.read().strip()
    2641        if not value:
     42            # pango 1.38 removed modules, try to give a helpful
     43            # message in case something tries to reference the no
     44            # longer existing variable (most likely from old bundle
     45            # xml files) when using a newer pango build.
     46            if module == "pango" and key == "pango_module_version":
     47                if has_pkgconfig_module("pango"):
     48                    raise Exception(
     49                        "'%s' got removed in '%s' "
     50                        "1.38. Remove any reference to pango "
     51                        "modules in your bundle xml." % (
     52                            key, module))
    2753            raise Exception("pkg-config variable '%s %s' is undefined" % (key, module))
    2854        string = p.sub(value, string, 1)
    2955        m = p.search(string)
    def evaluate_pkgconfig_variables(string): 
    3359def makedirs(path):
    3460    try:
    3561        os.makedirs(path)
    36     except EnvironmentError, e:
     62    except EnvironmentError as e:
    3763        if e.errno != errno.EEXIST:
    3864            raise
    3965
  • examples/gtk-demo.bundle

    diff --git examples/gtk-demo.bundle examples/gtk-demo.bundle
    index 4b32d6b..422126e 100644
     
    7979    ${prefix}/lib/gdk-pixbuf-2.0/${pkg:${gtk}:gtk_binary_version}/loaders/*.so
    8080  </binary>
    8181
     82<!-- No longer needed for pango >= 1.38
    8283   <binary>
    8384    ${prefix}/lib/pango/${pkg:pango:pango_module_version}/modules/
    8485  </binary>
     86-->
    8587
    8688  <data>
    8789    ${prefix}/etc/pango/
  • examples/gtk3-demo.bundle

    diff --git examples/gtk3-demo.bundle examples/gtk3-demo.bundle
    index ba15cd3..ec0eb4c 100644
     
    6969    ${prefix}/lib/gdk-pixbuf-2.0/${pkg:gdk-pixbuf-2.0:gdk_pixbuf_binary_version}/loaders/*.so
    7070  </binary>
    7171
     72<!-- No longer needed for pango >= 1.38
    7273  <binary>
    7374    ${prefix}/lib/pango/${pkg:pango:pango_module_version}/modules/
    7475  </binary>
    75 
    76   <data>
    77     ${prefix}/etc/pango/
    78   </data>
     76-->
    7977
    8078  <!-- Translation filenames, one for each program or library that you
    8179       want to copy in to the bundle. The "dest" attribute is
     
    102100    ${prefix}/share/themes
    103101  </data>
    104102
     103  <data>
     104    ${prefix}/share/icons
     105  </data>
     106
    105107  <!-- Copy icons. Note that the .icns file is an Apple format which
    106108       contains up to 4 sizes of icon. You can use
    107109       /Developer/Applications/Utilities/Icon Composer.app to import
     
    110112    ${project}/Giggle.icns
    111113  </data -->
    112114
    113   <!-- This is where theme commands go. You can copy them in from your
    114        theme of choice if they provide and example, or you can just
    115        change the source path. -->
    116 
    117   <data dest="${bundle}/Contents/Resources/etc/${gtk}/gtkrc">
    118     ${project}/gtkrc
    119   </data>
    120 
    121   <!-- Icon themes to copy. The "icons" property can be either of
    122        "auto", "all", or "none". All or none should be
    123        self-explanatory, while auto means that the script will try to
    124        figure out which icons are needed. This is done by getting all
    125        the strings from all copied binaries, and matching them against
    126        icon names. To be safe, you should use "all". "none" is useful
    127        if you want just the index.theme file but no icons, mostly
    128        needed for the "hicolor" base theme.
    129   >
    130   <icon-theme icons="auto">
    131     Tango
    132   </icon-theme -->
    133 
    134 </app-bundle>
     115  </app-bundle>
  • examples/gtk3-launcher.sh

    diff --git examples/gtk3-launcher.sh examples/gtk3-launcher.sh
    index 4aed833..9137ccb 100755
    export GTK_DATA_PREFIX="$bundle_res" 
    2929export GTK_EXE_PREFIX="$bundle_res"
    3030export GTK_PATH="$bundle_res"
    3131
    32 export GTK2_RC_FILES="$bundle_etc/gtk-3.0/gtkrc"
    33 export GTK_IM_MODULE_FILE="$bundle_etc/gtk-3.0/gtk.immodules"
    34 export GDK_PIXBUF_MODULE_FILE="$bundle_etc/gtk-3.0/gdk-pixbuf.loaders"
    35 export PANGO_LIBDIR="$bundle_lib"
     32# PANGO_* is no longer needed for pango >= 1.38
     33export PANGO_RC_FILE="$bundle_etc/pango/pangorc"
    3634export PANGO_SYSCONFDIR="$bundle_etc"
     35export PANGO_LIBDIR="$bundle_lib"
     36
     37export GDK_PIXBUF_MODULE_FILE="$bundle_lib/gdk-pixbuf-2.0/2.10.0/loaders.cache"
     38if [ `uname -r | cut -d . -f 1` -ge 10 ]; then
     39    export GTK_IM_MODULE_FILE="$bundle_etc/gtk-3.0/gtk.immodules"
     40fi
    3741
    3842
    3943APP=name
  • examples/launcher.sh

    diff --git examples/launcher.sh examples/launcher.sh
    index a1dfd1b..11cd019 100755
    export GTK_PATH="$bundle_res" 
    3131
    3232export GTK2_RC_FILES="$bundle_etc/gtk-2.0/gtkrc"
    3333export GTK_IM_MODULE_FILE="$bundle_etc/gtk-2.0/gtk.immodules"
    34 export GDK_PIXBUF_MODULE_FILE="$bundle_etc/gtk-2.0/gdk-pixbuf.loaders"
     34#N.B. When gdk-pixbuf was separated from Gtk+ the location of the
     35#loaders cache changed as well. Depending on the version of Gtk+ that
     36#you built with you may still need to use the old location:
     37#export GDK_PIXBUF_MODULE_FILE="$bundle_etc/gtk-2.0/gdk-pixbuf.loaders"
     38export GDK_PIXBUF_MODULE_FILE="$bundle_lib/gdk-pixbuf-2.0/2.10.0/loaders.cache"
    3539export PANGO_LIBDIR="$bundle_lib"
    3640export PANGO_SYSCONFDIR="$bundle_etc"
    3741