diff --git a/Sconstruct b/Sconstruct index fab302c4..3c0d94b1 100644 --- a/Sconstruct +++ b/Sconstruct @@ -44,8 +44,8 @@ def symlink(target, source, env): SConscript(['include/Sconscript']) ocarina = env.Program('bin/ocarina-player', directory(["libsaria", "ocarina"])) oc_link = env.Command("ocarina.bin", "bin/ocarina-player", symlink) -oc_scripts = app_directory("ocarina", ["scripts"]) -Default([ocarina, oc_link, oc_scripts]) +oc_other = app_directory("ocarina", ["scripts", "images"]) +Default([ocarina, oc_link, oc_other]) # Install Ocarina scripts = os.listdir("scripts/") diff --git a/images/Sconscript b/images/Sconscript new file mode 100644 index 00000000..15eb3557 --- /dev/null +++ b/images/Sconscript @@ -0,0 +1,21 @@ +#!/usr/bin/python +import shutil +from config import * + +lib = "../lib/" + application + "/%s" + +def copy_image(target, source, env): + dst = str(target[0].rfile()) + src = str(source[0].rfile()) + shutil.copy(src, dst) + +images = [] +if application == "ocarina": + images = ["ocarina.png", "ocarina512.png"] + +files = [] +for image in images: + dst = lib % image + files.append(env.Command(dst, image, copy_image)) + +Return('files')