コード例 #1
0
	def run(projPath,curPath, args):
		this = BuildApk()
		res_dirs = ["src","res"]
		
		tempPath = curPath + "/output_buildRes"
		Helper.delFolder(tempPath)

		b64 = False
		for arg in args:
			if arg == "-64":
				b64 = true
				break
		
		
		for dir in res_dirs:
			src = projPath + "/" + dir
			dis = tempPath + "/" + dir
			
			Helper.copy(src,dis)
			
			this.compileSource(dis,b64)
			
			this.removeLuaFile(dis)
			
			this.encryptoDir(dis)
コード例 #2
0
ファイル: DecryptRes.py プロジェクト: qwe811077wr/-H5-
    def run(projPath, curPath, args):
        this = DecryptRes()
        res_dirs = ["src", "res"]

        tempPath = curPath + "/output_buildRes"
        outputPath = curPath + "/output_buildRes_decrypt"
        Helper.delFolder(outputPath)

        b64 = False
        for arg in args:
            if arg == "-64":
                b64 = true
                break

        for dir in res_dirs:
            src = tempPath + "/" + dir
            dis = outputPath + "/" + dir

            Helper.copy(src, dis)
            this.decryptoDir(dis)
コード例 #3
0
#coding:utf-8
import os, sys, shutil
from Helper import Helper
# sys.setdefaultencoding('utf-8')
curDir = os.path.dirname(__file__)
generate_pb_path = os.path.join(curDir, "pb")
Helper.delFolder(generate_pb_path)
Helper.createFolder(generate_pb_path)
dirFiles = os.listdir(curDir)
clientRootPath = os.path.join(curDir, "..", "..", "client")
pb_src_targetpath = os.path.join(clientRootPath, "new_client\\common\\pb")
pb_bit_targetPath = os.path.join(clientRootPath,
                                 "new_client\\res\hall\\res\\pb_files")
Helper.delFolder(pb_src_targetpath)
Helper.createFolder(pb_src_targetpath)
for file in dirFiles:
    if file.startswith("common_"):
        if file.endswith(".proto"):
            fileFullPath = os.path.join(curDir, file)
            targetFullPath = os.path.join(pb_src_targetpath, file)
            #generate pb files
            # client_create.bat
            # for /r %%s in (common_*.proto) do (
            # 	protoc.exe -I . --descriptor_set_out ./pb/%%~ns.proto %%~ns.proto
            # )
            systemStr = "protoc.exe -I . --descriptor_set_out ./pb/" + file + " " + file
            os.system(systemStr)
            shutil.copyfile(fileFullPath, targetFullPath)

pb_bite_files = os.listdir(generate_pb_path)
Helper.delFolder(pb_bit_targetPath)
コード例 #4
0
ファイル: update_info_gen.py プロジェクト: qwe811077wr/-H5-
def delete_dir(delete_dir):
    Helper.delFolder(delete_dir)
コード例 #5
0
ファイル: win_auto_build.py プロジェクト: snailwork/gc_client
	global tryTimes
	if os.system(command) != 0:
		tryTimes = tryTimes + 1
		if (tryTimes < RETRY_TIMES):
			srcAndResHandle()
		else:
			print("%s fail !" % (command))
	tryTimes = 0

srcAndResHandle();
curDir = os.path.dirname(__file__)
resDir = os.path.join(curDir,"output_buildRes","res")
srcDir = os.path.join(curDir,"output_buildRes","src")

winTargetDir = os.path.join(curDir,"..","..","..","gamingcity_common","win")
Helper.delFolder(winTargetDir)
os.mkdir(winTargetDir)

targetSrcDir = os.path.join(winTargetDir,"src")
Helper.delFolder(targetSrcDir)
os.mkdir(targetSrcDir);
Helper.copy(srcDir,targetSrcDir)
targetResDir = os.path.join(winTargetDir,"res")
Helper.delFolder(targetResDir)
os.mkdir(targetResDir);
Helper.copy(resDir,targetResDir)

#
simulatorDir = os.path.join(curDir,"..","simulator")
targetSimulatorDir = os.path.join(winTargetDir,"simulator")
Helper.delFolder(targetSimulatorDir)