better install the setup.ini direcly into $ORIGIN
seems to be the most obvious location to install it
This commit is contained in:
parent
cef1ff3dcc
commit
aef929b3d9
5 changed files with 28 additions and 8 deletions
|
|
@ -348,7 +348,7 @@ def defineBuildTargets(env, artifacts):
|
|||
artifacts['corelib'] = core
|
||||
artifacts['support'] = lLib
|
||||
artifacts['lumiera'] = ( env.Program('lumiera', ['src/lumiera/main.cpp'], LIBS=core, install=True)
|
||||
+ env.ConfigData(env.path.srcConf+'setup.ini')
|
||||
+ env.ConfigData(env.path.srcConf+'setup.ini', targetDir='$ORIGIN')
|
||||
+ env.ConfigData(env.path.srcConf+'dummy_lumiera.ini')
|
||||
)
|
||||
|
||||
|
|
|
|||
|
|
@ -165,10 +165,27 @@ def register_LumieraResourceBuilder(env):
|
|||
env.Install (toInstall, source)
|
||||
return env.Install(toBuild, source)
|
||||
|
||||
def ConfigData(env, source):
|
||||
def ConfigData(env, source, targetDir=None):
|
||||
""" install (copy) configuration- and metadata.
|
||||
target dir is either the install location configured (in SConstruct),
|
||||
or an explicitly given absolute or relative path segment, which might refer
|
||||
to the location of the executable through the $ORIGIN token
|
||||
"""
|
||||
subdir = getDirname(str(source), env.path.srcConf) # removes source location path prefix
|
||||
toBuild = env.path.buildConf+subdir
|
||||
toInstall = env.path.installConf+subdir
|
||||
if targetDir:
|
||||
if path.isabs(targetDir):
|
||||
toBuild = toInstall = path.join(targetDir,subdir)
|
||||
else:
|
||||
if targetDir.startswith('$ORIGIN'):
|
||||
targetDir = targetDir[len('$ORIGIN'):]
|
||||
toBuild = path.join(env.path.buildExe, targetDir, subdir)
|
||||
toInstall = path.join(env.path.installExe, targetDir, subdir)
|
||||
else:
|
||||
toBuild = path.join(env.path.buildConf, targetDir, subdir)
|
||||
toInstall = path.join(env.path.installConf, targetDir, subdir)
|
||||
else:
|
||||
toBuild = path.join(env.path.buildConf,subdir)
|
||||
toInstall = path.join(env.path.installConf,subdir)
|
||||
env.Install (toInstall, source)
|
||||
return env.Install(toBuild, source)
|
||||
|
||||
|
|
|
|||
|
|
@ -10,7 +10,7 @@
|
|||
#
|
||||
gui = gtk_gui.lum
|
||||
modulepath = $ORIGIN/modules
|
||||
configpath = $ORIGIN/../../share/lumiera/config:~/.lumiera
|
||||
configpath = $ORIGIN/../../share/lumiera/config:$ORIGIN/config:~/.lumiera # unused currently (2/2011)
|
||||
title = Lumiera
|
||||
version = 0.pre.01
|
||||
website = http://www.lumiera.org
|
||||
|
|
|
|||
|
|
@ -42,8 +42,6 @@ using util::cStr;
|
|||
using lib::Literal;
|
||||
|
||||
|
||||
#define LOCATION_OF_BOOTSTRAP_INI "$ORIGIN/config/setup.ini"
|
||||
|
||||
|
||||
|
||||
namespace lumiera {
|
||||
|
|
@ -80,7 +78,7 @@ namespace lumiera {
|
|||
* client codes POV it just behaves like intended).
|
||||
*/
|
||||
AppState::AppState()
|
||||
: setup_(LOCATION_OF_BOOTSTRAP_INI)
|
||||
: setup_(LUMIERA_LOCATION_OF_BOOTSTRAP_INI)
|
||||
, subsystems_(0)
|
||||
, emergency_(false)
|
||||
, core_up_ (false)
|
||||
|
|
|
|||
|
|
@ -33,6 +33,11 @@
|
|||
#include <string>
|
||||
|
||||
|
||||
/** "bootstrapIni" : the basic setup configuration to load */
|
||||
#define LUMIERA_LOCATION_OF_BOOTSTRAP_INI "$ORIGIN/setup.ini"
|
||||
|
||||
|
||||
|
||||
namespace lumiera {
|
||||
|
||||
using std::string;
|
||||
|
|
|
|||
Loading…
Reference in a new issue