Removed old python build scripts, replaced with json example definition files
This commit is contained in:
parent
3064aef33c
commit
b5a733b502
10 changed files with 72 additions and 225 deletions
|
|
@ -1,47 +0,0 @@
|
||||||
import os
|
|
||||||
import shutil
|
|
||||||
import subprocess
|
|
||||||
import sys
|
|
||||||
import glob
|
|
||||||
|
|
||||||
APK_NAME = "vulkanIndirectdraw"
|
|
||||||
SHADER_DIR = "indirectdraw"
|
|
||||||
ASSETS_MODELS = ["plants.dae", "plane_circle.dae", "skysphere.dae"]
|
|
||||||
ASSETS_TEXTURES = ["texturearray_plants_bc3_unorm.ktx", "texturearray_plants_astc_8x8_unorm.ktx", "texturearray_plants_etc2_unorm.ktx", "ground_dry_bc3_unorm.ktx", "ground_dry_astc_8x8_unorm.ktx", "ground_dry_etc2_unorm.ktx"]
|
|
||||||
|
|
||||||
if subprocess.call("ndk-build", shell=True) == 0:
|
|
||||||
print("Build successful")
|
|
||||||
|
|
||||||
# Assets
|
|
||||||
os.makedirs("./assets/shaders/base", exist_ok=True)
|
|
||||||
os.makedirs("./assets/shaders/%s" % SHADER_DIR, exist_ok=True)
|
|
||||||
os.makedirs("./assets/textures", exist_ok=True)
|
|
||||||
os.makedirs("./assets/models", exist_ok=True)
|
|
||||||
os.makedirs("./res/drawable", exist_ok=True)
|
|
||||||
|
|
||||||
# Shaders
|
|
||||||
# Base
|
|
||||||
for file in glob.glob("../../data/shaders/base/*.spv"):
|
|
||||||
shutil.copy(file, "./assets/shaders/base")
|
|
||||||
# Sample
|
|
||||||
for file in glob.glob("../../data/shaders/%s/*.spv" %SHADER_DIR):
|
|
||||||
shutil.copy(file, "./assets/shaders/%s" % SHADER_DIR)
|
|
||||||
# Textures
|
|
||||||
for file in ASSETS_TEXTURES:
|
|
||||||
shutil.copy("../../data/textures/%s" % file, "./assets/textures")
|
|
||||||
# Models
|
|
||||||
for file in ASSETS_MODELS:
|
|
||||||
shutil.copy("../../data/models/%s" % file, "./assets/models")
|
|
||||||
|
|
||||||
# Icon
|
|
||||||
shutil.copy("../../android/images/icon.png", "./res/drawable")
|
|
||||||
|
|
||||||
if subprocess.call("ant debug -Dout.final.file=%s.apk" % APK_NAME, shell=True) == 0:
|
|
||||||
if len(sys.argv) > 1:
|
|
||||||
if sys.argv[1] == "-deploy":
|
|
||||||
if subprocess.call("adb install -r %s.apk" % APK_NAME, shell=True) != 0:
|
|
||||||
print("Could not deploy to device!")
|
|
||||||
else:
|
|
||||||
print("Error during build process!")
|
|
||||||
else:
|
|
||||||
print("Error building project!")
|
|
||||||
21
android/indirectdraw/example.json
Normal file
21
android/indirectdraw/example.json
Normal file
|
|
@ -0,0 +1,21 @@
|
||||||
|
{
|
||||||
|
"apkname": "vulkanIndirectdraw",
|
||||||
|
"directories": {
|
||||||
|
"shaders": "indirectdraw"
|
||||||
|
},
|
||||||
|
"assets": {
|
||||||
|
"models": [
|
||||||
|
"plants.dae",
|
||||||
|
"plane_circle.dae",
|
||||||
|
"skysphere.dae"
|
||||||
|
],
|
||||||
|
"textures": [
|
||||||
|
"texturearray_plants_bc3_unorm.ktx",
|
||||||
|
"texturearray_plants_astc_8x8_unorm.ktx",
|
||||||
|
"texturearray_plants_etc2_unorm.ktx",
|
||||||
|
"ground_dry_bc3_unorm.ktx",
|
||||||
|
"ground_dry_astc_8x8_unorm.ktx",
|
||||||
|
"ground_dry_etc2_unorm.ktx"
|
||||||
|
]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -1,47 +0,0 @@
|
||||||
import os
|
|
||||||
import shutil
|
|
||||||
import subprocess
|
|
||||||
import sys
|
|
||||||
import glob
|
|
||||||
|
|
||||||
APK_NAME = "vulkanInstancing"
|
|
||||||
SHADER_DIR = "instancing"
|
|
||||||
ASSETS_MODELS = ["rock01.dae", "sphere.obj", ]
|
|
||||||
ASSETS_TEXTURES = ["texturearray_rocks_bc3_unorm.ktx", "texturearray_rocks_astc_8x8_unorm.ktx", "texturearray_rocks_etc2_unorm.ktx", "lavaplanet_bc3_unorm.ktx", "lavaplanet_astc_8x8_unorm.ktx", "lavaplanet_etc2_unorm.ktx"]
|
|
||||||
|
|
||||||
if subprocess.call("ndk-build", shell=True) == 0:
|
|
||||||
print("Build successful")
|
|
||||||
|
|
||||||
# Assets
|
|
||||||
os.makedirs("./assets/shaders/base", exist_ok=True)
|
|
||||||
os.makedirs("./assets/shaders/%s" % SHADER_DIR, exist_ok=True)
|
|
||||||
os.makedirs("./assets/textures", exist_ok=True)
|
|
||||||
os.makedirs("./assets/models", exist_ok=True)
|
|
||||||
os.makedirs("./res/drawable", exist_ok=True)
|
|
||||||
|
|
||||||
# Shaders
|
|
||||||
# Base
|
|
||||||
for file in glob.glob("../../data/shaders/base/*.spv"):
|
|
||||||
shutil.copy(file, "./assets/shaders/base")
|
|
||||||
# Sample
|
|
||||||
for file in glob.glob("../../data/shaders/%s/*.spv" %SHADER_DIR):
|
|
||||||
shutil.copy(file, "./assets/shaders/%s" % SHADER_DIR)
|
|
||||||
# Textures
|
|
||||||
for file in ASSETS_TEXTURES:
|
|
||||||
shutil.copy("../../data/textures/%s" % file, "./assets/textures")
|
|
||||||
# Models
|
|
||||||
for file in ASSETS_MODELS:
|
|
||||||
shutil.copy("../../data/models/%s" % file, "./assets/models")
|
|
||||||
|
|
||||||
# Icon
|
|
||||||
shutil.copy("../../android/images/icon.png", "./res/drawable")
|
|
||||||
|
|
||||||
if subprocess.call("ant debug -Dout.final.file=%s.apk" % APK_NAME, shell=True) == 0:
|
|
||||||
if len(sys.argv) > 1:
|
|
||||||
if sys.argv[1] == "-deploy":
|
|
||||||
if subprocess.call("adb install -r %s.apk" % APK_NAME, shell=True) != 0:
|
|
||||||
print("Could not deploy to device!")
|
|
||||||
else:
|
|
||||||
print("Error during build process!")
|
|
||||||
else:
|
|
||||||
print("Error building project!")
|
|
||||||
20
android/instancing/example.json
Normal file
20
android/instancing/example.json
Normal file
|
|
@ -0,0 +1,20 @@
|
||||||
|
{
|
||||||
|
"apkname": "vulkanInstancing",
|
||||||
|
"directories": {
|
||||||
|
"shaders": "instancing"
|
||||||
|
},
|
||||||
|
"assets": {
|
||||||
|
"models": [
|
||||||
|
"rock01.dae",
|
||||||
|
"sphere.obj"
|
||||||
|
],
|
||||||
|
"textures": [
|
||||||
|
"texturearray_rocks_bc3_unorm.ktx",
|
||||||
|
"texturearray_rocks_astc_8x8_unorm.ktx",
|
||||||
|
"texturearray_rocks_etc2_unorm.ktx",
|
||||||
|
"lavaplanet_bc3_unorm.ktx",
|
||||||
|
"lavaplanet_astc_8x8_unorm.ktx",
|
||||||
|
"lavaplanet_etc2_unorm.ktx"
|
||||||
|
]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -1,48 +0,0 @@
|
||||||
import os
|
|
||||||
import shutil
|
|
||||||
import subprocess
|
|
||||||
import sys
|
|
||||||
import glob
|
|
||||||
|
|
||||||
APK_NAME = "vulkanPipelines"
|
|
||||||
SHADER_DIR = "pipelines"
|
|
||||||
ASSETS_MODELS = ["treasure_smooth.dae"]
|
|
||||||
|
|
||||||
if subprocess.call("ndk-build", shell=True) == 0:
|
|
||||||
print("Build successful")
|
|
||||||
|
|
||||||
# Assets
|
|
||||||
if not os.path.exists("./assets"):
|
|
||||||
os.makedirs("./assets")
|
|
||||||
|
|
||||||
# Shaders
|
|
||||||
# Base
|
|
||||||
if not os.path.exists("./assets/shaders/base"):
|
|
||||||
os.makedirs("./assets/shaders/base")
|
|
||||||
for file in glob.glob("../../data/shaders/base/*.spv"):
|
|
||||||
shutil.copy(file, "./assets/shaders/base")
|
|
||||||
# Sample
|
|
||||||
if not os.path.exists("./assets/shaders/%s" % SHADER_DIR):
|
|
||||||
os.makedirs("./assets/shaders/%s" % SHADER_DIR)
|
|
||||||
for file in glob.glob("../../data/shaders/%s/*.spv" %SHADER_DIR):
|
|
||||||
shutil.copy(file, "./assets/shaders/%s" % SHADER_DIR)
|
|
||||||
# Models
|
|
||||||
if not os.path.exists("./assets/models"):
|
|
||||||
os.makedirs("./assets/models")
|
|
||||||
for file in ASSETS_MODELS:
|
|
||||||
shutil.copy("../../data/models/%s" % file, "./assets/models")
|
|
||||||
|
|
||||||
# Icon
|
|
||||||
if not os.path.exists("./res/drawable"):
|
|
||||||
os.makedirs("./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 len(sys.argv) > 1:
|
|
||||||
if sys.argv[1] == "-deploy":
|
|
||||||
if subprocess.call("adb install -r %s.apk" % APK_NAME, shell=True) != 0:
|
|
||||||
print("Could not deploy to device!")
|
|
||||||
else:
|
|
||||||
print("Error during build process!")
|
|
||||||
else:
|
|
||||||
print("Error building project!")
|
|
||||||
11
android/pipelines/example.json
Normal file
11
android/pipelines/example.json
Normal file
|
|
@ -0,0 +1,11 @@
|
||||||
|
{
|
||||||
|
"apkname": "vulkanPipelines",
|
||||||
|
"directories": {
|
||||||
|
"shaders": "pipelines"
|
||||||
|
},
|
||||||
|
"assets": {
|
||||||
|
"models": [
|
||||||
|
"treasure_smooth.dae"
|
||||||
|
]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -1,47 +0,0 @@
|
||||||
import os
|
|
||||||
import shutil
|
|
||||||
import subprocess
|
|
||||||
import sys
|
|
||||||
import glob
|
|
||||||
|
|
||||||
APK_NAME = "vulkanSpecializationconstants"
|
|
||||||
SHADER_DIR = "specializationconstants"
|
|
||||||
ASSETS_MODELS = ["color_teapot_spheres.dae"]
|
|
||||||
ASSETS_TEXTURES = ["metalplate_nomips_rgba.ktx"]
|
|
||||||
|
|
||||||
if subprocess.call("ndk-build", shell=True) == 0:
|
|
||||||
print("Build successful")
|
|
||||||
|
|
||||||
# Assets
|
|
||||||
os.makedirs("./assets/shaders/base", exist_ok=True)
|
|
||||||
os.makedirs("./assets/shaders/%s" % SHADER_DIR, exist_ok=True)
|
|
||||||
os.makedirs("./assets/textures", exist_ok=True)
|
|
||||||
os.makedirs("./assets/models", exist_ok=True)
|
|
||||||
os.makedirs("./res/drawable", exist_ok=True)
|
|
||||||
|
|
||||||
# Shaders
|
|
||||||
# Base
|
|
||||||
for file in glob.glob("../../data/shaders/base/*.spv"):
|
|
||||||
shutil.copy(file, "./assets/shaders/base")
|
|
||||||
# Sample
|
|
||||||
for file in glob.glob("../../data/shaders/%s/*.spv" %SHADER_DIR):
|
|
||||||
shutil.copy(file, "./assets/shaders/%s" % SHADER_DIR)
|
|
||||||
# Textures
|
|
||||||
for file in ASSETS_TEXTURES:
|
|
||||||
shutil.copy("../../data/textures/%s" % file, "./assets/textures")
|
|
||||||
# Models
|
|
||||||
for file in ASSETS_MODELS:
|
|
||||||
shutil.copy("../../data/models/%s" % file, "./assets/models")
|
|
||||||
|
|
||||||
# Icon
|
|
||||||
shutil.copy("../../android/images/icon.png", "./res/drawable")
|
|
||||||
|
|
||||||
if subprocess.call("ant debug -Dout.final.file=%s.apk" % APK_NAME, shell=True) == 0:
|
|
||||||
if len(sys.argv) > 1:
|
|
||||||
if sys.argv[1] == "-deploy":
|
|
||||||
if subprocess.call("adb install -r %s.apk" % APK_NAME, shell=True) != 0:
|
|
||||||
print("Could not deploy to device!")
|
|
||||||
else:
|
|
||||||
print("Error during build process!")
|
|
||||||
else:
|
|
||||||
print("Error building project!")
|
|
||||||
14
android/specializationconstants/example.json
Normal file
14
android/specializationconstants/example.json
Normal file
|
|
@ -0,0 +1,14 @@
|
||||||
|
{
|
||||||
|
"apkname": "vulkanSpecializationconstants",
|
||||||
|
"directories": {
|
||||||
|
"shaders": "specializationconstants"
|
||||||
|
},
|
||||||
|
"assets": {
|
||||||
|
"models": [
|
||||||
|
"color_teapot_spheres.dae"
|
||||||
|
],
|
||||||
|
"textures" : [
|
||||||
|
"metalplate_nomips_rgba.ktx"
|
||||||
|
]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -1,36 +0,0 @@
|
||||||
import os
|
|
||||||
import shutil
|
|
||||||
import subprocess
|
|
||||||
import sys
|
|
||||||
import glob
|
|
||||||
|
|
||||||
APK_NAME = "vulkanTriangle"
|
|
||||||
ASSETS_SHADERS = ["triangle.vert.spv", "triangle.frag.spv"]
|
|
||||||
|
|
||||||
if subprocess.call("ndk-build", shell=True) == 0:
|
|
||||||
print("Build successful")
|
|
||||||
|
|
||||||
os.makedirs("./assets/shaders", exist_ok=True)
|
|
||||||
os.makedirs("./assets/shaders/base", exist_ok=True)
|
|
||||||
os.makedirs("./res/drawable", exist_ok=True)
|
|
||||||
|
|
||||||
# Shaders
|
|
||||||
# Base
|
|
||||||
for file in glob.glob("../../data/shaders/base/*.spv"):
|
|
||||||
shutil.copy(file, "./assets/shaders/base")
|
|
||||||
# Sample
|
|
||||||
for file in ASSETS_SHADERS:
|
|
||||||
shutil.copy("../../data/shaders/%s" % file, "./assets/shaders")
|
|
||||||
|
|
||||||
# Icon
|
|
||||||
shutil.copy("../../android/images/icon.png", "./res/drawable")
|
|
||||||
|
|
||||||
if subprocess.call("ant debug -Dout.final.file=%s.apk" % APK_NAME, shell=True) == 0:
|
|
||||||
if len(sys.argv) > 1:
|
|
||||||
if sys.argv[1] == "-deploy":
|
|
||||||
if subprocess.call("adb install -r %s.apk" % APK_NAME, shell=True) != 0:
|
|
||||||
print("Could not deploy to device!")
|
|
||||||
else:
|
|
||||||
print("Error during build process!")
|
|
||||||
else:
|
|
||||||
print("Error building project!")
|
|
||||||
6
android/triangle/example.json
Normal file
6
android/triangle/example.json
Normal file
|
|
@ -0,0 +1,6 @@
|
||||||
|
{
|
||||||
|
"apkname": "vulkanTriangle",
|
||||||
|
"directories": {
|
||||||
|
"shaders": "triangle"
|
||||||
|
}
|
||||||
|
}
|
||||||
Loading…
Add table
Add a link
Reference in a new issue