Esempio n. 1
0
    args.repo_x = os.path.normpath(
        os.path.join(cur_dir, os.pardir, os.pardir, os.pardir))

    if not args.win and not args.mac and not args.android:
        args.all = True

    beginSecond = time.time()
    print(">>> Bgein Compile at %s" %
          time.strftime('%Y-%m-%d %H:%M:%S', time.localtime(beginSecond)))

    try:
        compiler = CocosLibsCompiler(args)
        compiler.compile()
    except Exception as e:
        if isinstance(e, CustomError):
            Logging.error(' '.join(e.args))
            err_no = e.get_error_no()
            sys.exit(err_no)
        else:
            raise
    finally:
        endSecond = time.time()
        print(">>> Bgein Compile at %s" %
              time.strftime('%Y-%m-%d %H:%M:%S', time.localtime(beginSecond)))
        print(">>> End Compile at %s" %
              time.strftime('%Y-%m-%d %H:%M:%S', time.localtime(endSecond)))
        interSecond = endSecond - beginSecond
        interSecond = int(interSecond)
        print(">>> Use Second %d" % interSecond)
        houre = interSecond / (60 * 60)
        interSecond = interSecond % (60 * 60)
Esempio n. 2
0
    # Get the engine path
    cur_dir = os.path.realpath(os.path.dirname(__file__))
    args.repo_x = os.path.normpath(os.path.join(cur_dir, os.pardir, os.pardir, os.pardir))

    if not args.win and not args.mac and not args.android:
        args.all = True

    beginSecond = time.time()
    print(">>> Bgein Compile at %s" % time.strftime('%Y-%m-%d %H:%M:%S',time.localtime(beginSecond)))

    try:
        compiler = CocosLibsCompiler(args)
        compiler.compile()
    except Exception as e:
        if isinstance(e, CustomError):
            Logging.error(' '.join(e.args))
            err_no = e.get_error_no()
            sys.exit(err_no)
        else:
            raise
    finally:
        endSecond = time.time()
        print(">>> Bgein Compile at %s" % time.strftime('%Y-%m-%d %H:%M:%S',time.localtime(beginSecond)))
        print(">>> End Compile at %s" % time.strftime('%Y-%m-%d %H:%M:%S',time.localtime(endSecond)))
        interSecond = endSecond - beginSecond
        interSecond = int(interSecond)
        print(">>> Use Second %d" % interSecond)
        houre = interSecond/(60*60)
        interSecond = interSecond%(60*60)
        minute = interSecond/60
        second = interSecond%60