def packimgdata(ctx): taskQueue = Queue() folderPackList = PackHelper.getFolderPackList(ctx.getOutputResPath()) for folderPack in folderPackList : taskQueue.put((_packimgdata, ctx, folderPack)) errorQueue = queueProcess(taskQueue); return errorQueue
def packimgdata(ctx): taskQueue = Queue() folderPackList = PackHelper.getFolderPackList(ctx.getOutputResPath()) for folderPack in folderPackList: taskQueue.put((_packimgdata, ctx, folderPack)) errorQueue = queueProcess(taskQueue) return errorQueue
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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