예제 #1
0
def _writeRegistry(registrycontent):
    _initWine()
    regfilename = util.tempname('setregistry-', '.reg')
    with codecs.open(regfilename, 'w', encoding=get_codepage()) as regfile:
        regfile.write(registrycontent)
    #print("Running regedit with no display output")
    process = common.Popen([common.ENV['WINE'], "regedit", regfilename],
                           stdout='null',
                           stderr='null',
                           env=common.ENV_NO_DISPLAY(common.ENV_NO_GECKO()))
    process.communicate()
    return process.returncode
예제 #2
0
def _writeRegistry(registrycontent):
    _initWine()
    regfilename = util.tempname('setregistry-', '.reg')
    with codecs.open(regfilename, 'w', encoding=get_codepage()) as regfile:
        regfile.write(registrycontent)
    #print("Running regedit with no display output")
    process = common.Popen(
        [common.ENV['WINE'], "regedit", regfilename],
        stdout = 'null', stderr = 'null',
        env = common.ENV_NO_DISPLAY(common.ENV_NO_GECKO())
    )
    process.communicate()
    return process.returncode
예제 #3
0
def process_gs(name, sha_ext, build, build_options):
  print
  print 'Processing (gs)', name, sha_ext

  sha, ext = sha_ext.split('.', 1)
  with tempname(ext) as tmp:
    link = 'file://' + tmp
    subprocess.check_call([
        sys.executable, GSUTIL, '--force-version', '4.7', 'cp',
        SOURCE_URL.format(sha_ext), tmp])
    with open(tmp, 'rb') as f:
      assert hashlib.sha1(f.read()).hexdigest() == sha
    if not has_custom_build(name):
      wheel(link, sha, build, build_options)
    else:
      run_custom_build(name, link, sha, build)
예제 #4
0
def process_gs(name, sha_ext, build, build_options):
    print
    print 'Processing (gs)', name, sha_ext

    sha, ext = sha_ext.split('.', 1)
    with tempname(ext) as tmp:
        link = 'file://' + tmp
        subprocess.check_call([
            sys.executable, GSUTIL, '--force-version', '4.7', 'cp',
            SOURCE_URL.format(sha_ext), tmp
        ])
        with open(tmp, 'rb') as f:
            assert hashlib.sha1(f.read()).hexdigest() == sha
        if not has_custom_build(name):
            wheel(link, sha, build, build_options)
        else:
            run_custom_build(name, link, sha, build)