From d57708a28a954dd54165627de3a0a48c06faae59 Mon Sep 17 00:00:00 2001 From: Bo Peng Date: Fri, 2 Feb 2007 03:44:14 +0000 Subject: [PATCH] Scons: add deps_dir option for windows installer git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@17023 a592a061-630c-0410-9148-cb99ea01b6c8 --- development/scons/SConstruct | 20 +++++++++++--------- development/scons/scons_utils.py | 2 +- 2 files changed, 12 insertions(+), 10 deletions(-) diff --git a/development/scons/SConstruct b/development/scons/SConstruct index f5ca4eee94..d118cf65e7 100644 --- a/development/scons/SConstruct +++ b/development/scons/SConstruct @@ -191,6 +191,8 @@ opts.AddOptions( ('prefix', 'install architecture-independent files in PREFIX', default_prefix), # replace the default name and location of the windows installer ('win_installer', 'name or full path to the windows installer', None), + # the deps package used to create minimal installer (qt and other libraries) + ('deps_dir', 'path to the development depedency packages with zlib, iconv, zlib and qt libraries', None), # build directory, will use $mode if not set ('build_dir', 'Build directory', None), # version suffix @@ -2159,24 +2161,24 @@ if build_installer: env['win_installer'] = '%s-%s-%s-Installer.exe' % (package_name, package_version, time.strftime('%Y-%m-%d')) else: env['win_installer'] = '%s-%s-Installer.exe' % (package_name, package_version) + # provide default setting + if not env.has_key('deps_dir') or env['deps_dir'] is None: + env['deps_dir'] = os.path.join(env.Dir('TOP_SRCDIR').abspath, 'lyx-windows-deps-msvc-qt4') + if not os.path.isdir(env['deps_dir']): + print 'Development dependency package is not found.' + Exit(1) # if absolute path is given, use it, otherwise, write to current directory if not (':' in env['win_installer'] or '/' in env['win_installer'] or '\\' in env['win_installer']): env['win_installer'] = os.path.join(env.Dir('$BUILDDIR').abspath, env['win_installer']) env.Append(NSISDEFINES={ 'ExeFile':env['win_installer'], - 'FilesLyx':env.Dir(dest_prefix_dir).abspath + 'FilesLyx':env.Dir(dest_prefix_dir).abspath, + 'FilesDeps':env['deps_dir'], }) installer = env.installer(env['win_installer'], '$TOP_SRCDIR/development/Win32/packaging/installer/lyx.nsi') # since I can not use a scanner, explicit dependent is required - env.Depends(installer, [lyx, tex2lyx] + \ - ['$TOP_SRCDIR/development/Win32/packaging/installer/%s' % x for x in win32_packaging_installer_files] + \ - ['$TOP_SRCDIR/development/Win32/packaging/installer/components/%s' % x for x in win32_packaging_installer_components_files] + \ - ['$TOP_SRCDIR/development/Win32/packaging/installer/dialogs/%s' % x for x in win32_packaging_installer_dialogs_files] + \ - ['$TOP_SRCDIR/development/Win32/packaging/installer/graphics/%s' % x for x in win32_packaging_installer_graphics_files] + \ - ['$TOP_SRCDIR/development/Win32/packaging/installer/include/%s' % x for x in win32_packaging_installer_include_files] + \ - ['$TOP_SRCDIR/development/Win32/packaging/installer/lang/%s' % x for x in win32_packaging_installer_lang_files ] - ) + env.Depends(installer, 'install') frontend_env.Alias('installer', installer) diff --git a/development/scons/scons_utils.py b/development/scons/scons_utils.py index 59458a0ba4..9187c5cf12 100644 --- a/development/scons/scons_utils.py +++ b/development/scons/scons_utils.py @@ -83,7 +83,7 @@ def env_nsis(source, target, env, for_signature): return '"' + str + '"' else: return str - ret = env['NSIS'] + " /V2 " + ret = env['NSIS'] + " /V1 " if env.has_key('NSISFLAGS'): for flag in env['NSISFLAGS']: ret += flag -- 2.39.2