2016.7.20 ADT cocos2dx工程导入格外java

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.ye

import shutil
import os
import sys

sys.path.append(os.path.split(os.path.realpath(__file__))[0]+"/../")

from common import config

def 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")


评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值