コード例 #1
0
ファイル: complie.py プロジェクト: Geshishouhu/YDWE
def copy_crt_dll(configuration):
    if configuration == 'Release':
        crt_dll_dir = fs.path(util.msvc.vc_install_dir) / 'redist' / 'x86' / 'Microsoft.VC100.CRT'
    else:
        return
    if fs.exists(crt_dll_dir):
        fs.copy_directory(crt_dll_dir, path['ResultCore'], ['.dll'])
コード例 #2
0
def copy_crt_dll(msvc_version, configuration):
    if configuration == 'Release':
        crt_dll_dir = fs.path(util.msvc.vc_install_dir) / 'redist' / 'x86' / ('Microsoft.VC' + str(msvc_version) + '.CRT')
    else:
        return
    if fs.exists(crt_dll_dir):
        fs.copy_directory(crt_dll_dir, path['ResultCore'], ['.dll'])
コード例 #3
0
ファイル: path.py プロジェクト: BattleNWar/YDWE
def GetDirectoryNameOfFileAbove(p, f):
    p = fs.path(p)
    while True:
        if fs.exists(p / f):
            return p
        p.remove_filename()
        if p.filename() == '':
            break
    return None
コード例 #4
0
ファイル: path.py プロジェクト: yatyricky/XYWE
def GetDirectoryNameOfFileAbove(p, f):
    p = fs.path(p)
    while True:
        if fs.exists(p / f):
            return p
        p.remove_filename()
        if p.filename() == '':
            break
    return None
コード例 #5
0
ファイル: pack_ui.py プロジェクト: h82258652/YDWE
def convert_file(from_ptah, to_path, file_name):
    in_file = open(str(from_ptah / file_name), 'rb')
    out_file = open(str(to_path / fs.path(file_name).replace_extension('.txt')), 'wb')
    reobj = re.compile(br'([\s\S]*?)(\/\/[\s\S]*)')
    try:
        for line in in_file.readlines():
            m = reobj.search(line)
            if m:
                line = m.group(1).decode('cp936').encode('utf-8') + m.group(2)
            else:
                line = line.decode('cp936').encode('utf-8')
            out_file.write(line)
    finally:
        in_file.close()
        out_file.close()
コード例 #6
0
def convert_file(from_ptah, to_path, file_name):
    in_file = open(str(from_ptah / file_name), 'rb')
    out_file = open(
        str(to_path / fs.path(file_name).replace_extension('.txt')), 'wb')
    reobj = re.compile(br'([\s\S]*?)(\/\/[\s\S]*)')
    try:
        for line in in_file.readlines():
            m = reobj.search(line)
            if m:
                line = m.group(1).decode('cp936').encode('utf-8') + m.group(2)
            else:
                line = line.decode('cp936').encode('utf-8')
            out_file.write(line)
    finally:
        in_file.close()
        out_file.close()