ocarina/config
Anna Schumaker 114c22bb12 playlist: Implement reachitecting of playlists
I changed the two playlists that are supported, added in exception
handling, and removed the list() function since I will always know the
names of playlists.  I also rename everything to "playlist" from
"group".

Signed-off-by: Anna Schumaker <schumaker.anna@gmail.com>
2014-04-06 19:56:57 -04:00

57 lines
1.3 KiB
Python

#!/usr/bin/python
import os
# Configuration variables
CONFIG_VERSION = 6.0
CONFIG_DEBUG = True
# Set up default environment
CONFIG_ENV = [ "-O2" ]
if CONFIG_DEBUG == True:
CONFIG_ENV = [ "-Wall", "-Werror", "-g", "-DCONFIG_DEBUG" ]
env = Environment( CCFLAGS = CONFIG_ENV )
env.Append(CPPPATH = os.path.abspath("include"))
env.Append(CXXCOMSTR = "C++ $TARGET")
env.Append(LINKCOMSTR = "Linking $TARGET")
# Class to store configuration data
class Config:
# Set up reasonable defaults
def __init__(self):
self.VERSION = CONFIG_VERSION
self.DEBUG = CONFIG_DEBUG
self.ENV = CONFIG_ENV
self.reset();
def package(self, name):
env.ParseConfig("pkg-config --cflags --libs %s" % name)
def reconfigure(self):
env.Replace( CCFLAGS = self.ENV )
if self.TEST: env.Append( CCFLAGS = [ "-DCONFIG_TEST" ])
def reset(self, TEST = False):
self.AUDIO = False
self.DATABASE = False
self.DECK = False
self.FILE = False
self.FILTER = False
self.IDLE = False
self.LIBRARY = False
self.PLAYLIST = False
self.PLAYQUEUE = False
self.TEST = TEST
self.reconfigure()
CONFIG = Config()
Export("env", "CONFIG")
# Import SConscript files
include = SConscript("include/Sconscript")
design = SConscript("design/Sconscript")
tests = SConscript("tests/Sconscript")