2016.7.20 ADT cocos2dx工程导入格外java

来源:互联网 发布:java try是干什么的 编辑:程序博客网 时间:2024/06/10 20:59

ATD android导入平台下java文件:点击工程->右键选择Build Path->Link Source->弹出界面后点击Browse->选择路径通常是"frameworks/cocos2d-x/cocos/platform/android/java/src"->修改"Folder name"因为src会重名


---------------------------------------------------下面为python拷贝assets代码------------------------------------------------------------------------------------------------------

# !/usr/bin/env python# -*- coding: utf-8 -*-# author: 2016 sleaf.yeimport shutilimport osimport syssys.path.append(os.path.split(os.path.realpath(__file__))[0]+"/../")from common import configdef run():    projPath = r"E:/gitworkspace/code/client/FGame"    outputPath = r"E:/gitworkspace/code/client/FGame/frameworks/runtime-src/proj.android/assets"    resPath = projPath + "/res"    outputResPath = outputPath + "/res"    if os.path.exists(outputResPath):        print "clean file " + outputResPath        shutil.rmtree(outputResPath)    else:        os.makedirs(outputResPath)    print("start copy " + resPath + " to " + outputResPath)    for f in os.listdir(resPath):        if f.startswith('.') or f.startswith('$'):            continue        cPath = resPath+"/"+f        if os.path.isdir(cPath):            shutil.copytree(cPath,outputResPath+"/"+f)        elif os.path.isfile(cPath):            shutil.copy(cPath,outputResPath)    srcPath = projPath + "/src"    outputSrcPath = outputPath + "/src"    if os.path.exists(outputSrcPath):        print "clean file " + outputSrcPath        shutil.rmtree(outputSrcPath)    else:        os.makedirs(outputSrcPath)    print("start copy " + srcPath + " to " + outputSrcPath)    for f in os.listdir(srcPath):        if f.startswith('.') or f.startswith('$'):            continue        cPath = srcPath+"/"+f        if os.path.isdir(cPath):            shutil.copytree(cPath,outputSrcPath+"/"+f)        elif os.path.isfile(cPath):            shutil.copy(cPath,outputSrcPath)    shutil.copy(projPath + "/config.json", outputPath)    print("copy success")if __name__== "__main__":    run()    os.system("pause")


0 0
原创粉丝点击