mirror of https://github.com/axmolengine/axmol.git
fix incomplete copy resource
This commit is contained in:
parent
e2224d5316
commit
e182328d51
|
@ -109,6 +109,7 @@ def copy_files(src, dst):
|
|||
if os.path.isdir(path):
|
||||
new_dst = os.path.join(dst, item)
|
||||
os.mkdir(new_dst)
|
||||
print new_dst
|
||||
copy_files(path, new_dst)
|
||||
|
||||
def copy_resources(target, app_android_root):
|
||||
|
@ -133,13 +134,26 @@ def copy_resources(target, app_android_root):
|
|||
resources_dir = os.path.join(app_android_root, "../../Shared/games/CocosDragonJS/Published files Android")
|
||||
if target == "crystalcraze":
|
||||
resources_dir = os.path.join(app_android_root, "../../Shared/games/CrystalCraze/Published-Android")
|
||||
if target == "moonwarriors":
|
||||
resources_dir = os.path.join(app_android_root, "../../Shared/games/MoonWarriors/res")
|
||||
if target == "testjavascript":
|
||||
resources_dir = os.path.join(app_android_root, "../../Shared/tests/")
|
||||
if target == "watermelonwithme":
|
||||
resources_dir = os.path.join(app_android_root, "../../Shared/games/WatermelonWithMe")
|
||||
copy_files(resources_dir, assets_dir)
|
||||
if target != "moonwarriors":
|
||||
copy_files(resources_dir, assets_dir)
|
||||
else:
|
||||
resources_dir = os.path.join(app_android_root, "../../Shared/games/MoonWarriors/res")
|
||||
dst_dir = os.path.join(assets_dir, "res")
|
||||
os.mkdir(dst_dir)
|
||||
copy_files(resources_dir, dst_dir)
|
||||
resources_dir = os.path.join(app_android_root, "../../Shared/games/MoonWarriors/src")
|
||||
dst_dir = os.path.join(assets_dir, "src")
|
||||
os.mkdir(dst_dir)
|
||||
copy_files(resources_dir, dst_dir)
|
||||
resources_dir = os.path.join(app_android_root, "../../Shared/games/MoonWarriors")
|
||||
for item in os.listdir(resources_dir):
|
||||
path = os.path.join(resources_dir, item)
|
||||
if item.endswith('.js') and os.path.isfile(path):
|
||||
shutil.copy(path, assets_dir)
|
||||
|
||||
# AssetsManager test should also copy javascript files
|
||||
if target == "assetsmanager":
|
||||
|
|
Loading…
Reference in New Issue