def GetRootDirProjectOutPut(self): # project = common.GetProjectName() # dir = "F:\\sourcecode\\unity\\product\\"+project+"\\ProjectOutPut" dir = common.getLastDirofDir(self.dirRoot) dir = common.getLastDirofDir(dir) dir = common.getLastDirofDir(dir) dir = dir + "\\ProjectOutPut" print("GetRootDirProjectOutPut = ", dir) return dir
return data # 复制从unity打包输出的assets目录 #主函数的实现 if __name__ == "__main__": #入口参数:http://blog.csdn.net/intel80586/article/details/8545572 cmdPath = common.cur_file_dir() count = len(sys.argv) for i in range(1, count): print("参数", i, sys.argv[i]) if i == 1: cmdPath = sys.argv[i] cmdPath = common.getLastDirofDir(cmdPath) common.SetCmdPath(cmdPath) gameName = common.getGameName() gameType = common.getGameType() print(gameName) print(gameType) rootAndroidStudio = common.GetRootDirAndroidStudio() # android asset dir_asset = "/src/main/assets/bin" dir1 = common.GetRootDirAndroidOutput() + dir_asset dir2 = rootAndroidStudio + dir_asset flag = os.path.exists(dir2) if flag: shutil.rmtree(dir2)
def SetCmdPath(self, str): dir = common.getLastDirofDir(str) dir = common.getLastDirofDir(dir) dir = common.getLastDirofDir(dir) self.dirRoot = dir print("dir = ", dir)