当前位置: 首页 > news >正文

做网站什么主题比较好深圳创业补贴2024

做网站什么主题比较好,深圳创业补贴2024,济南市住房和城乡建设局网站,chatgpt 网址创建cocos工程.bat在多人合作的cocos项目中#xff0c;大家公用一个ccs文件#xff0c;存在的问题是如果大家都提交ccs文件比较容易出现冲突#xff0c;解决冲突麻烦要耗费时间#xff0c;不提交的话就拉不到其他人更新的csd文件。 方案一 解决冲突#xff0c;更新提交c…创建cocos工程.bat在多人合作的cocos项目中大家公用一个ccs文件存在的问题是如果大家都提交ccs文件比较容易出现冲突解决冲突麻烦要耗费时间不提交的话就拉不到其他人更新的csd文件。 方案一  解决冲突更新提交ccs文件 这种方案也可以说没有方案容易造成开发人员不愿意提交自己的ccs文件 方案二 每个人拷贝一个ccs文件自己用 这种方案比较简单粗暴缺点是要看别人的csd文件需要打开别人的工程 方案三 ccs文件不进行维护由脚本生成 先说工作流当需要看别人的csd的时候 1.更新svn(假如版控用svn) 2.执行脚本 CreateCocosProject.py注意读者需要根据脚本存放位置适当修改文件 #!/usr/bin/python # -*- coding: utf-8 -*-import os, shutil, re, sys import xml.etree.ElementTree as ET from xml.dom import minidomSCRIPT_PATH os.path.dirname(os.path.realpath(__file__))COCOS_PATH os.path.realpath(os.path.join(SCRIPT_PATH, .., cocosstudio)) PROJECT_NAME sys.argv[1]# COCOS_INCLUDE_DIRS {res:True, csb:True, preview:True} # COCOS_UNINCLUDE_DIRS {res/csb:True, res/spine:True, res/chatEmoji:True} OUT_PATH os.path.realpath(os.path.join(COCOS_PATH, ..,PROJECT_NAME))# 获取csd文件类型 def GetCsdFileType(csdPath):print(csdPath)tree ET.parse(csdPath)propertyGroupNode tree.getroot().find(./PropertyGroup)attrib propertyGroupNode.attribreturn attrib[Type]#创建一个工程节点 def CreateProjectNode(csdPath):e ET.Element(Project)csdType GetCsdFileType(csdPath)csdName os.path.basename(csdPath)e.set(Type, csdType)e.set(Name, csdName)return e#获取plsit文件frames def GetPlistFrames(plistPath):tree ET.parse(plistPath)rootDict tree.getroot().find(dict)frames []dictList list(rootDict)sizeStr for i in range(0, len(dictList), 2):node1 dictList[i]node2 dictList[i1]if node1.text frames:framesNodes node2.findall(./key)for frameNameNode in framesNodes:frames.append(frameNameNode.text)return framesdef CreatePListNode(plistPath):e ET.Element(PlistImageFolder)plistName os.path.basename(plistPath)plistBaseName os.path.splitext(plistName)[0]e.set(PListFile, plistName)e.set(Name, .%s_PList.Dir % plistBaseName)# 添加子节点frames GetPlistFrames(plistPath)for frame in frames:childE ET.Element(PlistImageFile)childE.set(Name, frame)childE.set(Key, frame)e.append(childE)return edef CreateFolderNode(folderName):e ET.Element(Folder)e.set(Name, folderName)return edef CreateNode(tag, filePath):e ET.Element(tag)eBaseName os.path.basename(filePath)e.set(Name, eBaseName)return e def CreateCsiNode(csiName):eBaseName os.path.basename(csiName)e ET.Element(PlistInfo)eBaseName os.path.basename(csiName)e.set(Name, eBaseName)e.set(Type, Plist)return ezh_pattern re.compile(u[\u4e00-\u9fa5]) def contain_zh(word):if word.find( ) ! -1:print(uError:发现空格)print(word)return Truetry:word word.encode(utf-8)global zh_patternmatch zh_pattern.search(word)return matchexcept UnicodeError:print(uError:发现中文)print(word)return Truereturn matchdef CreateHead():Solution ET.Element(Solution)PropertyGroup ET.Element(PropertyGroup, {Name:CocosProject, Type:CocosStudio, Version:3.10.0.0})SolutionFolder ET.Element(SolutionFolder)Group ET.Element(Group, {ctype:ResourceGroup})RootFolder ET.Element(RootFolder, {Name:.})Solution.append(PropertyGroup)Solution.append(SolutionFolder)SolutionFolder.append(Group)Group.append(RootFolder)return Solution, RootFolderdef checkCanAdd(dirName):# if dirName.find(.svn) ! -1:# return False# p dirName[len(COCOS_PATH) 1:]# p p.replace(os.path.sep, /)# for k in COCOS_INCLUDE_DIRS:# if re.match(r^%s.*%k, p):# for j in COCOS_UNINCLUDE_DIRS:# if re.match(r^%s.*%j, p):# return False# return Truereturn Truedef TraversalDir(dirPath):rootNode, rootFolderNode CreateHead()nodeDict {}nodeDict[] rootNodeindex 0for root, dirs, files in os.walk(dirPath):if not checkCanAdd(root):continueif re.match(r.*_PList.Dir.*, root):continueif contain_zh(root):exit(-1)tempFolderPath root[len(COCOS_PATH) 1:]rIndex tempFolderPath.rfind(os.path.sep)folderNode NonedirName NonedirKey Noneif -1 ! rIndex:dirName tempFolderPath[rIndex1:]dirKey tempFolderPath[0:rIndex]parentNode nodeDict[dirKey]folderNode CreateFolderNode(dirName)parentNode.append(folderNode)nodeDict[tempFolderPath] folderNodeelif tempFolderPath :folderNode rootFolderNodeelse:folderNode CreateFolderNode(tempFolderPath)nodeDict[tempFolderPath] folderNoderootFolderNode.append(folderNode)for file in files:if contain_zh(os.path.join(root, file)):exit(-1)childNode Noneext os.path.splitext(file)if len(ext) 2 :extName ext[1].lower()if extName .png or extName .jpg:if not os.path.exists(os.path.join(root, ext[0].plist)):childNode CreateNode(Image, file)elif extName .mp3:childNode CreateNode(Audio, file)elif extName .ttf:childNode CreateNode(TTF, file)elif extName .fnt:childNode CreateNode(Fnt, file)elif extName .csd:fullCsdPath os.path.join(root, file)childNode CreateProjectNode(fullCsdPath)elif extName .csi:childNode CreateCsiNode(file)elif extName .plist:if root.find(particle) ! -1:childNode CreateNode(PlistParticleFile, file) else:if os.path.exists(os.path.join(root, ext[0].png)):fullPlistPath os.path.join(root, file)childNode CreatePListNode(fullPlistPath)if childNode is not None:folderNode.append(childNode)# tree.write(OUT_PATH)# strArr PrettyDumpXml(rootNode, 0)# rootNode.write(OUT_PATH)# print(list(rootFolderNode))# for node in list(rootFolderNode):# print(node.attrib)pFile open(OUT_PATH, w)pFile.write(ET.tostring(rootNode))pFile.close()def rewriteXml():doc_xml minidom.parse(OUT_PATH)pFile open(OUT_PATH, w)doc_xml.writexml(pFile, \t, \t, \n, utf-8)pFile.close()TraversalDir(COCOS_PATH) rewriteXml() 创建cocos工程.bat echo off set dir%~dp0 cd %dir%scripts echo %dir%scripts python CreateCocosProject.py game_ui_edit.ccs pause
http://www.dnsts.com.cn/news/86664.html

相关文章:

  • php网站开发软件语言现在去成都安全吗
  • 做企业网站找谁企业网站留言板
  • 网站推广seo设置网站开发的业内人士
  • 怎么做游戏自动充值的网站用html做家谱网站代码
  • 建设通官方网站下载e航wordpress屏蔽蜘蛛爬虫
  • 北京免费做网站国际新闻界官网
  • 公司网站设计主页部分怎么做wordpress部署篇
  • 做画册的网站网站制作程序下载
  • 中国建设银行云浮分行网站免费建站软件哪个好
  • 自学做网站可以嘛品牌建设助力乡村振兴
  • 镇江网站建设制作wordpress和seo权重
  • 五年级信息做网站的软件网页设计与制作模版
  • 网站建设费用长沙哪家网站设计好
  • 做网站要那些工具重庆市工程建设交易中心网站
  • 端游网络游戏排行榜2023东莞市seo网络推广品牌
  • 淄博建网站游戏开发需要学多久
  • 河南省内 在哪个网站做商检表常用的网站建设程序有哪些
  • 怒火一刀代理平台神马排名seo
  • 婚庆 网站模板中国著名的做网站渗透
  • 阿凡达网站设计开发游戏软件公司
  • 做网站申请个体户爱站网使用体验
  • 网科创想网站管理wordpress安装2个网站吗
  • 法律电商如何做网站推广营销学了dw 就可以做网站了吗
  • 米粒网站建设游戏网站开发推广计划书
  • 手机网站页面文字做多大淘宝客导购网站源码
  • 兄弟连php网站开发影视网站建设源码
  • 保定建行网站首页登录个人备案的网站内容
  • 做网站可以用什么软件设计师导航网址
  • 搜索网站入口来宾北京网站建设
  • 綦江集团网站建设西城富阳网站建设