Exemplo n.º 1
0
def packimgdata(ctx):
    taskQueue = Queue()
    folderPackList = PackHelper.getFolderPackList(ctx.getOutputResPath())
    for folderPack in folderPackList :
        taskQueue.put((_packimgdata, ctx, folderPack))
    errorQueue = queueProcess(taskQueue);
    return errorQueue
Exemplo n.º 2
0
def packimgdata(ctx):
    taskQueue = Queue()
    folderPackList = PackHelper.getFolderPackList(ctx.getOutputResPath())
    for folderPack in folderPackList:
        taskQueue.put((_packimgdata, ctx, folderPack))
    errorQueue = queueProcess(taskQueue)
    return errorQueue
Exemplo n.º 3
0
def removebom(ctx):
    taskQueue = Queue()
    for r, d, fileList in os.walk(ctx.getOutputResPath()):
        for file in fileList:
            absFilePath = os.path.join(r, file)
            if re.match(Config.FILE_REMOVE_BOM_REGEX, absFilePath):
                taskQueue.put((_removebom, ctx, absFilePath))
    errorQueue = queueProcess(taskQueue)
    return errorQueue
Exemplo n.º 4
0
def luac_scriptlua(ctx):
    taskQueue = Queue()
    for r, d, fileList in os.walk(ctx.getOutputResPath()):
        for file in fileList:
            absFilePath = os.path.join(r, file)
            if re.match(Config.FILE_LUAC_SCRIPTLUA_REGEX, absFilePath):
                taskQueue.put((_luac_scriptlua, ctx, absFilePath))
    errorQueue = queueProcess(taskQueue)
    return errorQueue
Exemplo n.º 5
0
def lua_to_byte(ctx):
    taskQueue = Queue()
    for r, d, fileList in os.walk(ctx.getOutputResPath()):
        for file in fileList:
            absFilePath = os.path.join(r, file)
            if re.match(Config.FILE_LUA_TO_BYTE_REGEX, absFilePath):
                taskQueue.put((_lua_to_byte, ctx, absFilePath))
    errorQueue = queueProcess(taskQueue)
    return errorQueue
Exemplo n.º 6
0
def rename_alpha_jpg(ctx):
    taskQueue = Queue()
    for r, d, fileList in os.walk(ctx.getOutputResPath()):
        for file in fileList:
            absFilePath = os.path.join(r, file)
            if re.match(Config.FILE_ALPHA_JPG_REGEX, absFilePath):
                taskQueue.put((_rename_alpha_jpg, ctx, absFilePath))
    errorQueue = queueProcess(taskQueue)
    return errorQueue
Exemplo n.º 7
0
def packimg_rgb_a8(ctx):
    taskQueue = Queue()
    for r, d, fileList in os.walk(ctx.getOutputResPath()) :
        for file in fileList :
            absFilePath = os.path.join(r, file);
            if re.match(Config.FILE_PACKIMG_EFFECT_REGEX, absFilePath) :
                taskQueue.put((_packimg_rgb_a8, ctx, absFilePath))
    errorQueue = queueProcess(taskQueue);
    return errorQueue
Exemplo n.º 8
0
def poweroftwo_mapres_and_battlebg(ctx):
    taskQueue = Queue()
    for r, d, fileList in os.walk(ctx.getOutputResPath()) :
        for file in fileList :
            absFilePath = os.path.join(r, file)
            if re.match(Config.FILE_PACKIMG_SQUARE_REGEX, absFilePath) :
                taskQueue.put((_poweroftwo_mapres_and_battlebg, ctx, absFilePath))
    errorQueue = queueProcess(taskQueue);
    return errorQueue
Exemplo n.º 9
0
def packimg_rgb_a8(ctx):
    taskQueue = Queue()
    for r, d, fileList in os.walk(ctx.getOutputResPath()):
        for file in fileList:
            absFilePath = os.path.join(r, file)
            if re.match(Config.FILE_PACKIMG_EFFECT_REGEX, absFilePath):
                taskQueue.put((_packimg_rgb_a8, ctx, absFilePath))
    errorQueue = queueProcess(taskQueue)
    return errorQueue
Exemplo n.º 10
0
def removebom(ctx):
    taskQueue = Queue()
    for r, d, fileList in os.walk(ctx.getOutputResPath()) :
        for file in fileList :
            absFilePath = os.path.join(r, file);
            if re.match(Config.FILE_REMOVE_BOM_REGEX, absFilePath) :
                taskQueue.put((_removebom, ctx, absFilePath))
    errorQueue = queueProcess(taskQueue);
    return errorQueue
Exemplo n.º 11
0
def luac_scriptlua(ctx):
    taskQueue = Queue()
    for r, d, fileList in os.walk(ctx.getOutputResPath()) :
        for file in fileList :
            absFilePath = os.path.join(r, file);
            if re.match(Config.FILE_LUAC_SCRIPTLUA_REGEX, absFilePath) :
                taskQueue.put((_luac_scriptlua, ctx, absFilePath))
    errorQueue = queueProcess(taskQueue);
    return errorQueue
Exemplo n.º 12
0
def lua_to_byte(ctx):
    taskQueue = Queue()
    for r, d, fileList in os.walk(ctx.getOutputResPath()) :
        for file in fileList :
            absFilePath = os.path.join(r, file);
            if re.match(Config.FILE_LUA_TO_BYTE_REGEX, absFilePath) :
                taskQueue.put((_lua_to_byte, ctx, absFilePath))
    errorQueue = queueProcess(taskQueue);
    return errorQueue
Exemplo n.º 13
0
def rename_alpha_jpg(ctx) :
    taskQueue = Queue()
    for r, d, fileList in os.walk(ctx.getOutputResPath()) :
        for file in fileList :
            absFilePath = os.path.join(r, file);
            if re.match(Config.FILE_ALPHA_JPG_REGEX, absFilePath) :
                taskQueue.put((_rename_alpha_jpg, ctx, absFilePath))
    errorQueue = queueProcess(taskQueue);
    return errorQueue
Exemplo n.º 14
0
def gzip_pvr(ctx):
    taskQueue = Queue()
    for r, d, fileList in os.walk(ctx.getOutputResPath()) :
        for file in fileList :
            absFilePath = os.path.join(r, file);
            if re.match(Config.FILE_GZIP_PVR_REGEX, absFilePath) :
                taskQueue.put((_gzip_pvr, ctx, absFilePath))
    errorQueue = queueProcess(taskQueue);
    return errorQueue
Exemplo n.º 15
0
def gzip_pvr(ctx):
    taskQueue = Queue()
    for r, d, fileList in os.walk(ctx.getOutputResPath()):
        for file in fileList:
            absFilePath = os.path.join(r, file)
            if re.match(Config.FILE_GZIP_PVR_REGEX, absFilePath):
                taskQueue.put((_gzip_pvr, ctx, absFilePath))
    errorQueue = queueProcess(taskQueue)
    return errorQueue
Exemplo n.º 16
0
def poweroftwo_mapres_and_battlebg(ctx):
    taskQueue = Queue()
    for r, d, fileList in os.walk(ctx.getOutputResPath()):
        for file in fileList:
            absFilePath = os.path.join(r, file)
            if re.match(Config.FILE_PACKIMG_SQUARE_REGEX, absFilePath):
                taskQueue.put(
                    (_poweroftwo_mapres_and_battlebg, ctx, absFilePath))
    errorQueue = queueProcess(taskQueue)
    return errorQueue
Exemplo n.º 17
0
def data_encrypt(ctx):
    outCocosPath = ctx.getOutputResPath() + os.sep + 'scriptlua' + os.sep + 'cocos'
    tempCocosPath = ctx.getTempPath() + os.sep + 'cocos'
    if os.path.exists(outCocosPath) :
        shutil.copytree(outCocosPath, tempCocosPath)
    shutil.rmtree(outCocosPath)
    taskQueue = Queue()
    for folder in Config.FILE_DATA_ENCRYPT_INCLUDE :
        taskQueue.put((_data_encrypt, ctx, ctx.getOutputResPath() + os.sep + folder))
    errorQueue = queueProcess(taskQueue)
    if os.path.exists(tempCocosPath) :
        shutil.copytree(tempCocosPath, outCocosPath)
    return errorQueue
Exemplo n.º 18
0
def data_encrypt(ctx):
    outCocosPath = ctx.getOutputResPath(
    ) + os.sep + 'scriptlua' + os.sep + 'cocos'
    tempCocosPath = ctx.getTempPath() + os.sep + 'cocos'
    if os.path.exists(outCocosPath):
        shutil.copytree(outCocosPath, tempCocosPath)
    shutil.rmtree(outCocosPath)
    taskQueue = Queue()
    for folder in Config.FILE_DATA_ENCRYPT_INCLUDE:
        taskQueue.put(
            (_data_encrypt, ctx, ctx.getOutputResPath() + os.sep + folder))
    errorQueue = queueProcess(taskQueue)
    if os.path.exists(tempCocosPath):
        shutil.copytree(tempCocosPath, outCocosPath)
    return errorQueue