Remove scons build files
Signed-off-by: Anna Schumaker <Anna@OcarinaProject.net>
This commit is contained in:
parent
19ca9d932b
commit
a8abbdfdcc
59
Sconstruct
59
Sconstruct
|
@ -1,59 +0,0 @@
|
|||
#!/usr/bin/python
|
||||
import os
|
||||
|
||||
CONFIG_VERSION = "6.4.20"
|
||||
|
||||
|
||||
# Set up default environment
|
||||
CONFIG_DEBUG = os.path.exists(".debug")
|
||||
CONFIG_CCFLAGS = [ "-O2" ]
|
||||
if CONFIG_DEBUG == True:
|
||||
CONFIG_CCFLAGS = [ "-Wall", "-Werror", "-g", "-DCONFIG_DEBUG" ]
|
||||
|
||||
class OEnvironment(Environment):
|
||||
def __init__(self, CCFLAGS = CONFIG_CCFLAGS):
|
||||
Environment.__init__(self, CCFLAGS = CCFLAGS)
|
||||
self.Append(CXXFLAGS = "-std=c++11");
|
||||
self.Append(CPPPATH = os.path.abspath("include"))
|
||||
self.Append(CXXCOMSTR = "C++ $TARGET")
|
||||
self.Append(CCCOMSTR = "CC $TARGET")
|
||||
self.Append(LINKCOMSTR = "Linking $TARGET")
|
||||
if "DISPLAY" in os.environ.keys():
|
||||
self.Append(ENV = { "DISPLAY" : os.environ["DISPLAY"] })
|
||||
self.Debug = CONFIG_DEBUG
|
||||
self.Version = CONFIG_VERSION
|
||||
|
||||
def UsePackage(self, name):
|
||||
self.ParseConfig("pkg-config --cflags --libs %s" % name)
|
||||
|
||||
env = OEnvironment()
|
||||
Export("env")
|
||||
|
||||
|
||||
include = SConscript("include/Sconscript")
|
||||
core = SConscript("core/Sconscript")
|
||||
gui = SConscript("gui/Sconscript")
|
||||
|
||||
if os.path.isdir("tests"):
|
||||
tests = SConscript("tests/Sconscript")
|
||||
|
||||
|
||||
ocarina = env.Program("bin/ocarina", core + gui)
|
||||
Default(ocarina)
|
||||
Clean(ocarina, "bin/")
|
||||
|
||||
|
||||
def ocarina_release(target, source, env):
|
||||
o_vers = "ocarina-%s" % CONFIG_VERSION
|
||||
os.popen("git archive --prefix=%s/ -o %s.tar.gz HEAD" % (o_vers, o_vers))
|
||||
print os.popen("sha1sum %s.tar.gz" % o_vers).read()
|
||||
Command("release", None, ocarina_release)
|
||||
|
||||
|
||||
env.Install("/usr/bin", "bin/ocarina")
|
||||
env.Install("/usr/share", "share/ocarina/")
|
||||
env.Install("/usr/share/applications", "share/applications/ocarina.desktop")
|
||||
|
||||
install = Alias("install", [ "/usr/bin", "/usr/share", "/usr/share/applications" ])
|
||||
Depends(install, ocarina)
|
||||
Clean(install, "/usr/share/ocarina")
|
|
@ -1,11 +0,0 @@
|
|||
#!/usr/bin/python
|
||||
Import("env")
|
||||
|
||||
res = Glob("*.c")
|
||||
res += SConscript("tags/Sconscript")
|
||||
res += SConscript("playlists/Sconscript")
|
||||
|
||||
env.UsePackage("gstreamer-1.0")
|
||||
env.UsePackage("libmusicbrainz5");
|
||||
env.UsePackage("libcoverart");
|
||||
Return("res")
|
|
@ -1,4 +0,0 @@
|
|||
#!/usr/bin/python
|
||||
|
||||
res = Glob("*.c")
|
||||
Return("res")
|
|
@ -1,6 +0,0 @@
|
|||
#!/usr/bin/python
|
||||
Import("env")
|
||||
|
||||
env.UsePackage("taglib_c")
|
||||
res = Glob("*.c")
|
||||
Return("res")
|
|
@ -1,8 +0,0 @@
|
|||
#!/usr/bin/python
|
||||
Import("env")
|
||||
|
||||
env.UsePackage("gtk+-3.0")
|
||||
env.UsePackage("gmodule-export-2.0");
|
||||
|
||||
res = Glob("*.c")
|
||||
Return("res")
|
|
@ -1,18 +0,0 @@
|
|||
#!/usr/bin/python
|
||||
import subprocess
|
||||
Import("env")
|
||||
|
||||
version = str(env.Version)
|
||||
if env.Debug == True:
|
||||
version += "-debug"
|
||||
|
||||
try:
|
||||
devnull = open("/dev/null", "w")
|
||||
diff = subprocess.check_output("git diff $(git describe --abbrev=0)",
|
||||
stderr=devnull, shell=True)
|
||||
if diff != "":
|
||||
version += "+"
|
||||
except:
|
||||
pass
|
||||
|
||||
env.Append( CCFLAGS = [ "-DCONFIG_VERSION='\"%s\"'" % version ] )
|
|
@ -1,11 +0,0 @@
|
|||
#!/usr/bin/python
|
||||
import subprocess
|
||||
import sys
|
||||
|
||||
albums = [ "Hyrule_Symphony.album" ]
|
||||
albums += [ "Ocarina_of_Time.album" ]
|
||||
|
||||
for album in albums:
|
||||
ret = subprocess.call(["sh", "gen_tracks.sh", album])
|
||||
if ret != 0:
|
||||
sys.exit(ret)
|
|
@ -1,48 +0,0 @@
|
|||
#!/usr/bin/python
|
||||
import sys, os
|
||||
Import("env")
|
||||
|
||||
tests = []
|
||||
|
||||
for arg in sys.argv[1:]:
|
||||
if arg.find("tests") == 0:
|
||||
tests += [ arg ]
|
||||
|
||||
if len(tests) == 0:
|
||||
Return()
|
||||
|
||||
def testing_group(group):
|
||||
group = [ "tests" ] + group
|
||||
for arg in tests:
|
||||
if arg in set(group + [ g + "/" for g in group]):
|
||||
return True
|
||||
return False
|
||||
check_sanity = testing_group([])
|
||||
|
||||
env.Append(CCFLAGS = [ "-DCONFIG_TESTING", "-DCONFIG_TESTING_DIR=\"\"" ])
|
||||
env.UsePackage("glib-2.0")
|
||||
test_o = env.Object("test", "test.c")
|
||||
|
||||
def UnitTest(test, sources):
|
||||
name = os.path.basename(test)
|
||||
make = env.Program(name, sources + [ test_o ])
|
||||
run = Command("%s.fake" % name, [], "tests/%s" % test, ENV = os.environ)
|
||||
Depends(run, make)
|
||||
Alias("tests/%s" % test, run)
|
||||
return run
|
||||
Export("UnitTest", "testing_group")
|
||||
|
||||
#Generate empty audio files
|
||||
SConscript("Music/Sconscript")
|
||||
|
||||
res = UnitTest("sanity", [ "sanity.c" ])
|
||||
res += SConscript("core/Sconscript")
|
||||
|
||||
if "DISPLAY" in os.environ.keys():
|
||||
res += SConscript("gui/Sconscript")
|
||||
|
||||
if check_sanity == True:
|
||||
for t in res[1:]:
|
||||
Depends(t, res[0])
|
||||
|
||||
Return("res")
|
|
@ -1,43 +0,0 @@
|
|||
#!/usr/bin/python
|
||||
import os
|
||||
Import("env", "UnitTest", "testing_group")
|
||||
|
||||
res = []
|
||||
core_objs = []
|
||||
ignore = open(".gitignore", "w")
|
||||
|
||||
def CoreTest(name):
|
||||
global core_objs
|
||||
|
||||
ignore.write("%s\n" % name)
|
||||
source = "%s.c" % name.split("/")[-1]
|
||||
test = os.path.abspath(source)
|
||||
core = os.path.sep.join([x for x in test.split("/") if x != "tests"])
|
||||
if os.path.exists(core):
|
||||
core_objs += [ env.Object(core) ]
|
||||
|
||||
run = UnitTest("core/%s" % name, [ test ] + core_objs)
|
||||
Alias("tests/core", run)
|
||||
if len(res) > 0 and testing_group(["tests/core"]):
|
||||
Depends(run, res[-1])
|
||||
return run
|
||||
Export("core_objs", "CoreTest")
|
||||
|
||||
|
||||
core_objs += [ env.Object("../../core/string.c") ]
|
||||
core_objs += [ env.Object("../../core/file.c") ]
|
||||
core_objs += [ env.Object("../../core/date.c") ]
|
||||
core_objs += [ env.Object("../../core/idle.c") ]
|
||||
core_objs += [ env.Object("../../core/database.c") ]
|
||||
|
||||
res += SConscript("tags/Sconscript")
|
||||
core_objs += [ env.Object("../../core/queue.c") ]
|
||||
|
||||
res += SConscript("playlists/Sconscript")
|
||||
core_objs += [ env.Object("../../core/playlist.c") ]
|
||||
core_objs += [ env.Object("../../core/tempq.c") ]
|
||||
core_objs += [ env.Object("../../core/core.c") ]
|
||||
core_objs += [ env.Object("../../core/audio.c") ]
|
||||
|
||||
ignore.close()
|
||||
Return("res")
|
|
@ -1,21 +0,0 @@
|
|||
#!/usr/bin/python
|
||||
Import("env", "CoreTest", "core_objs", "testing_group")
|
||||
|
||||
res = []
|
||||
|
||||
def TagTest(name):
|
||||
run = CoreTest("tags/%s" % name)
|
||||
Alias("tests/core/tags", run)
|
||||
if len(res) > 0 and testing_group([ "tests/core/tags" ]):
|
||||
Depends(run, res[-1])
|
||||
return run
|
||||
|
||||
env.UsePackage("taglib_c")
|
||||
core_objs += [ env.Object("../../../core/tags/artist.c") ]
|
||||
core_objs += [ env.Object("../../../core/tags/album.c") ]
|
||||
core_objs += [ env.Object("../../../core/tags/genre.c") ]
|
||||
core_objs += [ env.Object("../../../core/tags/library.c") ]
|
||||
core_objs += [ env.Object("../../../core/tags/tags.c") ]
|
||||
core_objs += [ env.Object("../../../core/tags/track.c") ]
|
||||
|
||||
Return("res")
|
|
@ -1,41 +0,0 @@
|
|||
#!/usr/bin/python
|
||||
import os
|
||||
Import("env", "UnitTest", "testing_group", "core_objs")
|
||||
|
||||
res = []
|
||||
gui_objs = []
|
||||
ignore = open(".gitignore", "w")
|
||||
|
||||
def GuiTest(name):
|
||||
global gui_objs
|
||||
|
||||
ignore.write("%s\n" % name)
|
||||
source = "%s.c" % name
|
||||
test = os.path.abspath(source)
|
||||
gui = os.path.sep.join([x for x in test.split("/") if x != "tests"])
|
||||
if os.path.exists(gui):
|
||||
gui_objs += [ env.Object(gui) ]
|
||||
|
||||
run = UnitTest("gui/%s" % name, [ test ] + gui_objs + core_objs)
|
||||
Alias("tests/gui", run)
|
||||
if len(res) > 0 and testing_group(["tests/gui"]):
|
||||
Depends(run, res[-1])
|
||||
return run
|
||||
|
||||
|
||||
env.UsePackage("gmodule-export-2.0")
|
||||
gui_objs += [ env.Object("../../gui/builder.c") ]
|
||||
gui_objs += [ env.Object("../../gui/settings.c") ]
|
||||
gui_objs += [ env.Object("../../gui/model.c") ]
|
||||
gui_objs += [ env.Object("../../gui/view.c") ]
|
||||
gui_objs += [ env.Object("../../gui/queue.c") ]
|
||||
gui_objs += [ env.Object("../../gui/window.c") ]
|
||||
gui_objs += [ env.Object("../../gui/idle.c") ]
|
||||
gui_objs += [ env.Object("../../gui/sidebar.c") ]
|
||||
gui_objs += [ env.Object("../../gui/playlist.c") ]
|
||||
gui_objs += [ env.Object("../../gui/collection.c") ]
|
||||
gui_objs += [ env.Object("../../gui/artwork.c") ]
|
||||
gui_objs += [ env.Object("../../gui/auido.c") ]
|
||||
|
||||
ignore.close()
|
||||
Return("res")
|
Loading…
Reference in New Issue