build: Copy images to lib/%APP/ during build
From here, I can copy the entire directory when I choose to install. Signed-off-by: Bryan Schumaker <bjschuma@gmail.com>
This commit is contained in:
parent
e23ecd4bfb
commit
dcaeb8cbd1
|
@ -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/")
|
||||
|
|
|
@ -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')
|
Loading…
Reference in New Issue