# required options: cppheader, cef1 or cef3
if options.cppheaderdir is None or options.schema is None or options.cefgluedir is None:
    parser.print_help(sys.stdout)
    sys.exit()

# make sure the header exists
if not path_exists(options.cppheaderdir):
    sys.stderr.write('File '+options.cppheaderdir+' does not exist.')
    sys.exit()

# create the header object
if not options.quiet:
    sys.stdout.write('Parsing C++ headers from '+options.cppheaderdir+'...\n')
header = obj_header()
excluded_files = ['cef_application_mac.h', 'cef_version.h']
header.add_directory(options.cppheaderdir, excluded_files)

writect = 0

if not options.cefgluedir is None:
    # output cefglue interop
    if not options.quiet:
        sys.stdout.write('Generating CefGlue interop files...\n')
    writect += write_interop(header, options.cefgluedir, not options.nobackup, options.schema, options.cppheaderdir)

if not options.quiet:
    sys.stdout.write('Done - Wrote '+str(writect)+' files.\n')


Exemplo n.º 2
0
(options, args) = parser.parse_args()

# required options: cppheader, cef1 or cef3
if options.cppheaderdir is None or options.schema is None or options.cefgluedir is None:
    parser.print_help(sys.stdout)
    sys.exit()

# make sure the header exists
if not path_exists(options.cppheaderdir):
    sys.stderr.write('File ' + options.cppheaderdir + ' does not exist.')
    sys.exit()

# create the header object
if not options.quiet:
    sys.stdout.write('Parsing C++ headers from ' + options.cppheaderdir +
                     '...\n')
header = obj_header()
header.add_directory(options.cppheaderdir)

writect = 0

if not options.cefgluedir is None:
    # output cefglue interop
    if not options.quiet:
        sys.stdout.write('Generating CefGlue interop files...\n')
    writect += write_interop(header, options.cefgluedir, not options.nobackup,
                             options.schema, options.cppheaderdir)

if not options.quiet:
    sys.stdout.write('Done - Wrote ' + str(writect) + ' files.\n')