Android build file [skip ci]
This commit is contained in:
parent
d02e470355
commit
0192b404d9
1 changed files with 15 additions and 15 deletions
|
|
@ -4,10 +4,10 @@ import subprocess
|
||||||
import sys
|
import sys
|
||||||
import glob
|
import glob
|
||||||
|
|
||||||
APK_NAME = "vulkanTessellation"
|
APK_NAME = "vulkanParticlefire"
|
||||||
SHADER_DIR = "tessellation"
|
SHADER_DIR = "particlefire"
|
||||||
ASSETS_MODELS = ["deer.dae"]
|
ASSETS_MODELS = ["fireplace.obj"]
|
||||||
ASSETS_TEXTURES = ["deer_bc3_unorm.ktx", "deer_astc_8x8_unorm.ktx", "deer_etc2_unorm.ktx"]
|
ASSETS_TEXTURES = ["particle_fire.ktx", "particle_smoke.ktx", "fireplace_normalmap_bc3_unorm.ktx", "fireplace_normalmap_astc_8x8_unorm.ktx", "fireplace_normalmap_etc2_unorm.ktx", "fireplace_colormap_bc3_unorm.ktx", "fireplace_colormap_astc_8x8_unorm.ktx", "fireplace_colormap_etc2_unorm.ktx"]
|
||||||
|
|
||||||
if subprocess.call("ndk-build", shell=True) == 0:
|
if subprocess.call("ndk-build", shell=True) == 0:
|
||||||
print("Build successful")
|
print("Build successful")
|
||||||
|
|
@ -31,14 +31,14 @@ if subprocess.call("ndk-build", shell=True) == 0:
|
||||||
shutil.copy("../../data/textures/%s" % file, "./assets/textures")
|
shutil.copy("../../data/textures/%s" % file, "./assets/textures")
|
||||||
# Models
|
# Models
|
||||||
for file in ASSETS_MODELS:
|
for file in ASSETS_MODELS:
|
||||||
shutil.copy("../../data/models/lowpoly/%s" % file, "./assets/models/lowpoly")
|
shutil.copy("../../data/models/%s" % file, "./assets/models")
|
||||||
|
|
||||||
# Icon
|
# Icon
|
||||||
shutil.copy("../../android/images/icon.png", "./res/drawable")
|
shutil.copy("../../android/images/icon.png", "./res/drawable")
|
||||||
|
|
||||||
if subprocess.call("ant debug -Dout.final.file=%s.apk" % APK_NAME, shell=True) == 0:
|
if subprocess.call("ant debug -Dout.final.file=%s.apk" % APK_NAME, shell=True) == 0:
|
||||||
if len(sys.argv) > 1:
|
for arg in sys.argv[1:]:
|
||||||
if sys.argv[1] == "-deploy":
|
if arg == "-deploy":
|
||||||
if subprocess.call("adb install -r %s.apk" % APK_NAME, shell=True) != 0:
|
if subprocess.call("adb install -r %s.apk" % APK_NAME, shell=True) != 0:
|
||||||
print("Could not deploy to device!")
|
print("Could not deploy to device!")
|
||||||
else:
|
else:
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue