Skip to content

Commit

Permalink
Initial implementation of SCons installable setup.
Browse files Browse the repository at this point in the history
  • Loading branch information
Michael Kessler committed Oct 17, 2014
1 parent 9ccc419 commit d77595e
Show file tree
Hide file tree
Showing 2 changed files with 49 additions and 0 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
*.pyc
*.sw?
*.qrc
*.sconsign.dblite
48 changes: 48 additions & 0 deletions SConstruct
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
import glob
import os

import IEEnv

import VersionControl
VersionControl.setVersion('IEBuild', '6.15.1')
import IEBuild

majorVersion = '0'
minorVersion = '0'
patchVersion = '1'

versionParts = {'major':majorVersion, 'minor':minorVersion, 'patch':patchVersion}
version = '{major}.{minor}.{patch}'.format(**versionParts)

application = 'xcorder'

if "INSTALLPREFIX" not in ARGUMENTS:
if ARGUMENTS.get("RELEASE", "0") == "1" :
ARGUMENTS["INSTALLPREFIX"] = "{root}/apps/{application}/{version}/".format(
root=IEEnv.Environment.rootPath(),
application=application,
version=version,
)
else:
ARGUMENTS["INSTALLPREFIX"] = "{home}/apps/{application}/{version}/".format(
home=os.path.expanduser("~"),
application=application,
version=version,
)
else:
ARGUMENTS["INSTALLPREFIX"] = "{prefix}/apps/{application}/{version}/".format(
prefix=ARGUMENTS["INSTALLPREFIX"],
application=application,
version=version,
)

program = IEBuild.Buildable(
ARGUMENTS,
)
env = program.finalize()

source = []
for pattern in ['*.py', '*.svg', '*.qss', 'README.*', '*LICENSE*', 'xcorder']:
env.Install(ARGUMENTS['INSTALLPREFIX'], glob.glob(pattern))

env.Alias('install', ARGUMENTS['INSTALLPREFIX'])

0 comments on commit d77595e

Please sign in to comment.