コード例 #1
0
def main(argv):
    modules = ['scannermain','annotationmain','docmain']
    funcs = ['scanner_main','annotation_main','doc_main']
    tools = ['g-ir-scanner','g-ir-annotation-tool','g-ir-doc-tool']

    srcroot = parent_dir(parent_dir(__file__))
    preset_tools_path = os.path.join(srcroot, 'tools')
    src = os.path.join(preset_tools_path, 'g-ir-tool-template.in')

    for i in range(3):
        dest = os.path.join(preset_tools_path, tools[i])
        setup_vars_tools(modules[i], funcs[i], src, dest)
コード例 #2
0
def main(argv):
    parser = argparse.ArgumentParser(description="Generate the complete cairo-1.0.gir")
    parser.add_argument(
        "--dllname", required=True, help="Full file name of the Cairo-GObject DLL for the Cairo Introspection File"
    )
    args = parser.parse_args()

    # Get the srcroot and the path where the bundled .gir files reside in the package
    srcroot = parent_dir(parent_dir(__file__))
    preset_gir_path = os.path.join(srcroot, "gir")

    # Set up variables in cairo-1.0.gir.in to produce cairo-1.0.gir
    cairo_replace_items = {"%CAIRO_GIR_PACKAGE%": "cairo-gobject", "%CAIRO_SHARED_LIBRARY%": args.dllname}
    replace.replace_multi(os.path.join(preset_gir_path, "cairo-1.0.gir.in"), "cairo-1.0.gir", cairo_replace_items)
コード例 #3
0
def main(argv):
    parser = argparse.ArgumentParser(
        description='Generate the complete cairo-1.0.gir')
    parser.add_argument(
        '--dllname',
        required=True,
        help=
        'Full file name of the Cairo-GObject DLL for the Cairo Introspection File'
    )
    args = parser.parse_args()

    # Get the srcroot and the path where the bundled .gir files reside in the package
    srcroot = parent_dir(parent_dir(__file__))
    preset_gir_path = os.path.join(srcroot, 'gir')

    # Set up variables in cairo-1.0.gir.in to produce cairo-1.0.gir
    cairo_replace_items = {
        '%CAIRO_GIR_PACKAGE%': 'cairo-gobject',
        '%CAIRO_SHARED_LIBRARY%': args.dllname
    }
    replace.replace_multi(os.path.join(preset_gir_path, 'cairo-1.0.gir.in'),
                          'cairo-1.0.gir', cairo_replace_items)
コード例 #4
0
def main(argv):
    parser = argparse.ArgumentParser(description='Generate the complete cairo-1.0.gir')
    parser.add_argument('--dllname',
                        required=True,
                        help='Full file name of the Cairo-GObject DLL for the Cairo Introspection File')
    args = parser.parse_args()

    # Get the srcroot and the path where the bundled .gir files reside in the package
    srcroot = parent_dir(parent_dir(__file__))
    preset_gir_path = os.path.join(srcroot, 'gir')

    # Set up variables in cairo-1.0.gir.in to produce cairo-1.0.gir
    replace.replace(os.path.join(preset_gir_path, 'cairo-1.0.gir.in'),
                    'cairo-1.0.gir.tmp',
                    '%CAIRO_GIR_PACKAGE%',
                    'cairo-gobject')

    replace.replace('cairo-1.0.gir.tmp',
                    'cairo-1.0.gir',
                    '%CAIRO_SHARED_LIBRARY%',
                    args.dllname)
    os.unlink('cairo-1.0.gir.tmp')
コード例 #5
0
def main(argv):
    parser = optparse.OptionParser()
    parser.add_option('--dllname', dest='dllname', action='store', help='Full file name of the Cairo-GObject DLL for the Cairo Introspection File')
    opt, args = parser.parse_args(argv)
    if opt.dllname is None:
        print ('dllname must be specified.  Please refer to %s -h for more information' % os.path.basename(__file__))
        sys.exit()

    # Get the srcroot and the path where the bundled .gir files reside in the package
    srcroot = parent_dir(__file__)
    preset_gir_path = os.path.join(srcroot, 'gir')

    # Set up variables in cairo-1.0.gir.in to produce cairo-1.0.gir
    setup_vars_cairo(os.path.join(preset_gir_path, 'cairo-1.0.gir.in'),
                     'cairo-1.0.gir',
                     opt.dllname)
コード例 #6
0
def main(argv):
    parser = optparse.OptionParser()
    parser.add_option(
        '--dllname',
        dest='dllname',
        action='store',
        help=
        'Full file name of the Cairo-GObject DLL for the Cairo Introspection File'
    )
    opt, args = parser.parse_args(argv)
    if opt.dllname is None:
        print(
            'dllname must be specified.  Please refer to %s -h for more information'
            % os.path.basename(__file__))
        sys.exit()

    # Get the srcroot and the path where the bundled .gir files reside in the package
    srcroot = parent_dir(__file__)
    preset_gir_path = os.path.join(srcroot, 'gir')

    # Set up variables in cairo-1.0.gir.in to produce cairo-1.0.gir
    setup_vars_cairo(os.path.join(preset_gir_path, 'cairo-1.0.gir.in'),
                     'cairo-1.0.gir', opt.dllname)