예제 #1
0
 def __compileLua(self, absFilePath, relativepath = ''):
     ret = 0
     if absFilePath.find('LuaScript') != -1 or absFilePath.find('Core') != -1:
         if absFilePath.find('/ui/') == -1 and absFilePath.find('\\ui\\') == -1:
             if absFilePath.find('/Scene/') == -1 and absFilePath.find('\\Scene\\') == -1:
                 ret = PackXXTea.encode(absFilePath)        
     return ret
예제 #2
0
 def __compileLua(self, absFilePath, relativepath=''):
     ret = 0
     if absFilePath.find('LuaScript') != -1 or absFilePath.find(
             'Core') != -1:
         if absFilePath.find('/ui/') == -1 and absFilePath.find(
                 '\\ui\\') == -1:
             if absFilePath.find('/Scene/') == -1 and absFilePath.find(
                     '\\Scene\\') == -1:
                 ret = PackXXTea.encode(absFilePath)
     return ret
예제 #3
0
    def __compileLuac(self, absFilePath, relativepath=''):
        if PackXXTea.Is(absFilePath):
            return 0

        RemoveUtf8Bom.remove(absFilePath, relativepath)

        ret = 0
        ret = execCmd(self.JitCompileCMD.format(filename=absFilePath))

        if os.path.exists(absFilePath + 'c'):
            ret = PackXXTea.encode(absFilePath + 'c')

            if os.path.exists(absFilePath):
                os.remove(absFilePath)

            os.rename(absFilePath + 'c', absFilePath)
        else:
            return 1

        return 0
예제 #4
0
 def __compileLuac(self, absFilePath, relativepath = ''):
     if PackXXTea.Is(absFilePath):
         return 0
         
     RemoveUtf8Bom.remove(absFilePath, relativepath)
     
     ret = 0    
     ret = execCmd(self.JitCompileCMD.format(filename = absFilePath))    
 
     if os.path.exists(absFilePath + 'c'):
         ret = PackXXTea.encode(absFilePath + 'c')  
             
         if os.path.exists(absFilePath):
             os.remove(absFilePath)
             
         os.rename(absFilePath + 'c', absFilePath)         
     else:
         return 1
         
     return 0
예제 #5
0
def task_XXTeaEncode2(tid, taskTotSize, absFilePath, relativepath, taskSize):   
    ret = PackXXTea.encode(absFilePath)
    
    Log.printDetailln("加密[%d/%d]: %s" % (taskSize, taskTotSize, relativepath)) 

    return ret == 0
예제 #6
0
def task_XXTeaEncode2(tid, taskTotSize, absFilePath, relativepath, taskSize):
    ret = PackXXTea.encode(absFilePath)

    Log.printDetailln("加密[%d/%d]: %s" % (taskSize, taskTotSize, relativepath))

    return ret == 0