From 11053cb1f73d6b7a7791400bc2a34f5090fd649d Mon Sep 17 00:00:00 2001 From: nakeee Date: Thu, 13 Nov 2008 10:04:10 +0000 Subject: [PATCH] basic tar bundle for scons git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@1159 8ced0084-cf51-0410-be5f-012b33b47a6e --- SConstruct | 19 +++++++++++++++++-- SconsTests/utils.py | 2 +- 2 files changed, 18 insertions(+), 3 deletions(-) diff --git a/SConstruct b/SConstruct index d54948553c..98ea60ecd3 100644 --- a/SConstruct +++ b/SConstruct @@ -90,6 +90,7 @@ lib_paths = include_paths vars = Variables('args.cache') vars.AddVariables( BoolVariable('verbose', 'Set for compilation line', False), + BoolVariable('bundle', 'Set to create bundle', False), BoolVariable('debug', 'Set for debug build', False), BoolVariable('lint', 'Set for lint build (extra warnings)', False), BoolVariable('nowx', 'Set For Building with no WX libs (WIP)', False), @@ -229,8 +230,9 @@ env['data_dir'] = env['prefix'] Export('env') -utils.GenerateRevFile(env['flavor'], "Source/Core/Common/Src/svnrev_template.h", - "Source/Core/Common/Src/svnrev.h") +rev = utils.GenerateRevFile(env['flavor'], + "Source/Core/Common/Src/svnrev_template.h", + "Source/Core/Common/Src/svnrev.h") # print a nice progress indication when not compiling Progress(['-\r', '\\\r', '|\r', '/\r'], interval = 5) @@ -256,3 +258,16 @@ env.Install(env['data_dir'], 'Data/User') if sys.platform == 'darwin': env.Install(env['binary_dir'] + 'Dolphin.app/Contents/Resources/', Source/Core/DolphinWX/resources/Dolphin.icns) + +if env['bundle']: + # Make tar ball (TODO put inside normal dir) + tar_env = env.Clone() + tarball = tar_env.Tar('dolphin-'+rev +'.tar.bz2', env['prefix']) + tar_env.Append(TARFLAGS='-j', + TARCOMSTR="Creating release tarball") + + +#TODO clean all bundles +#env.Clean(all, 'dolphin-*'+ '.tar.bz2') + + diff --git a/SconsTests/utils.py b/SconsTests/utils.py index 92f17aae99..27c703c387 100644 --- a/SconsTests/utils.py +++ b/SconsTests/utils.py @@ -50,4 +50,4 @@ def GenerateRevFile(flavour, template, output): outfile.write(tmpstr +"\n") outfile.close() - return + return revstr