From 360b94ee358ccb857a4cdb8c14aa4aada020f98d Mon Sep 17 00:00:00 2001 From: Georg Baum Date: Sun, 19 Feb 2012 13:13:05 +0000 Subject: [PATCH] Remove outdated, unmaintained build system. Still one to go ;-) git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@40780 a592a061-630c-0410-9148-cb99ea01b6c8 --- INSTALL.scons | 357 -- Makefile.am | 2 +- README.Cygwin | 22 +- development/Makefile.am | 4 - .../packaging/AltInstaller/Build-all.nsi | 2 +- development/scons/SConstruct | 2092 ---------- development/scons/build_msvc.bat | 1 - development/scons/build_msvs_debug.bat | 2 - development/scons/qt4.py | 373 -- development/scons/scons_manifest.py | 3471 ----------------- development/scons/scons_utils.py | 909 ----- 11 files changed, 6 insertions(+), 7229 deletions(-) delete mode 100644 INSTALL.scons delete mode 100644 development/scons/SConstruct delete mode 100644 development/scons/build_msvc.bat delete mode 100644 development/scons/build_msvs_debug.bat delete mode 100644 development/scons/qt4.py delete mode 100644 development/scons/scons_manifest.py delete mode 100644 development/scons/scons_utils.py diff --git a/INSTALL.scons b/INSTALL.scons deleted file mode 100644 index 0969efa7e4..0000000000 --- a/INSTALL.scons +++ /dev/null @@ -1,357 +0,0 @@ -========================= -Building LyX with SCons -========================= - -July, 2006 - - -The GNU Build System (autoconf, automake and make) has been used to build -and distribute lyx. These de facto *nix tools are readily available and -widely supported on the *nix systems, but not so under windows. They are -not necessarily easy to use and maintain (at least to non-m4 experts) -either. Because of these, a scons (http://www.scons.org) build system has -been set up as an alternative way to build lyx. As of writing, this system -only supports the qt4 frontend. - -This file is organized as follows: -1. General usage of scons -2. *nix systems (Linux, Solaris and Mac OSX) -3. Windows/mingw -4. Windows/cygwin -5. Windows/msvc -6. Tips and hints -7. Troubleshooting - - -1. General usage of scons -========================= - -Prerequisites: --------------- - -* Python: - Python >= 2.6.0 is required to run scons, while LyX itself requires - Python >= 2.4.0 for scripts such as configure.py. Python is widely - available on non-windows systems. Windows users can download and - install python from http://www.python.org. - -* SCons: - scons >= 1.1.0 is needed. You can either use a full system-wide scons - distribution or a light-weight one (called scons-local) installed along - with the lyx source tree. Both variants of scons are freely available - from http://www.scons.org. Note that LyX source may ship with scons-base - in the near future. - -* Other libraries: - These include zlib (required), qt4 (required), gettext - (optional), boost (optional), aspell (optional) and Aiksaurus - (optional). Please refer to the system-specific sections regarding the - availability and installation of them. - - -Start scons: ------------- - -The scons system resides under development/scons. You can invoke it from -either development/scons by, for example: - > cd development/scons - > scons frontend=qt4 qt_dir=d:/qt4 -j3 lyx -or from any other directory and use -f option to point to the SConstruct -file: - > mkdir build - > cd build - > scons -f ../development/scons/SConstruct frontend=qt4 all -If you are tired of typing development/scons/SConstruct, you can link -development/scons/SConstruct to the top source directory and use this -SConstruct file. - -There are three types of command line options: - * key=value are user options. They are used to tell scons which - frontend to use, whether or not use included boost libraries etc. - You can use 'scons -h' to list all of the options. - * parameters start with - or -- are scons options. Useful ones include - -j3 (with three threads) and --config=force (force reconfiguration). - * others options are targets, which are lyx objects to build. - - -User Options: -------------- - -Here I only list important options that you will likely use. Full option -list with detailed description and default value can be displayed using -command 'scons -h'. - -Components to use/build: - - * frontend=qt4: qt4 is the only option right now. - * mode=debug/release: lyx will be built under the debug or release - directory, with different default build options. - * boost=included/system/auto: whether or not use included boost, system - boost, or try to detect system boost first. Note that boost=included - is safer if system boost has a different version from the included - one. - * gettext=included/system/auto - * nls=yes/no whether or not enable natural language support. - * spell=aspell/auto: spell engine - - -Paths: Most of them will be probed if not specified. - - * qt_dir: top level directory of qt (with at least subdirectory bin - containing commands uic and moc) - * qt_lib_path: path to the qt library, use only if there is no - $qt_dir/lib - * qt_inc_path: path to qt include directory, use only if there is no - $qt_dir/include - * extra_inc_path, extra_inc_path1, extra_lib_path, extra_lib_path1: - additional paths to other libraries - * extra_bin_path: a convenient way to add an extra path to $PATH - - -Convenience options: - - * load_option=yes/no/opt1,opt2/-opt1,opt2: if true, load previously saved - command line options so you can run 'scons install' directly after a - long 'scons all' building command. You can load selected options using - load_option=opt1,opt2,... or exclude options using the - version of it. - Note that the option 'bundle' is not reloaded. - * rebuild=target1,target2... By default, scons will exam all components - when you build lyx. You can free scons from some hard work and save - yourself some time by telling scons to rebuild only specified - component(s). rebuild=no, none, yes or all can be used as well. - * log_file: a log file of executed commands, default to scons_lyx.log - - -Installation options: - - * prefix: directory where lyx will be installed - * exec_dir: directory where lyx binaries will be installed. - Default to $prefix/bin - * DESTDIR: if specified, install to this directory instead of $prefix. - * version_suffix=yes/no/something : if specified, this suffix will be - appended to the user data directory. - * win_installer: if specified under windows, and if 'installer' target - is given, generate NSIS installer specifed as win_installer which can - be a full path name. The default is lyx-version-timestamp-Installer.exe - for a development version, and lyx-version-Installer.exe for a released - version. - - -Compiler choice and flags: - * use_vc: use msvc instead of mingw g++ under windows - * optimization: optimization flag to use (e.g. -O2) - * CC, LINK, CPP, CXX, CCFLAGS, LINKFLAGS etc: compiler commands and - flags. Setting CCFLAGS etc will replace default flags. These variables - can be set as environment variables as well. - - -Targets: --------- - -You can specify one or more of the following targets: - - Static libraries (names correspond to their directories): - boost, intl, support, mathed, insets, frontends, graphics, - controllers, client, qt4, lyxbase - Programs: - tex2lyx, client, lyx, all = tex2lyx + client + lyx - Installation: - po, install = all + po, installer (windows only, need NSIS) - Misc: - msvs_projects, update_po - -Your built targets are put into $build_dir, which is debug (mode=debug), -release (mode=release) or any name specified via build_dir=name. The -directory structure is: - $build_dir - - common: most of the intermediate files, mostly object files - - libs: all static libraries - - executables: lyxclient, tex2lyx, lyx - -MSVS projects will be put to development/scons (and you should invoke -scons from there for this target). - -update_po is similar to 'cd po; make update-po' but does not generate -.gmo files, which is the task of the install target. Note that this -target is the only target that changes files (po/*.po in this case) -of the lyx source tree. - - -A typical working sequence: ---------------------------- - - > cd development/scons - > scons frontend=qt4 qt_dir=/path/to/qt4 - (build lyx, and all needed libraries...) - > scons all -j3 - (build lyx, client and tex2lyx, options like qt_dir will be carried - over here) - > scons rebuild=lyxbase - (working on LyX.cpp, so only need to rebuild lyxbase) - > scons - (build again, only lyxbase will be rebuilt) - > scons prefix=/usr/site DESTDIR=/install/dir - (lyx is built for /usr/site, but install to /install/dir) - - -2. *nix systems (Linux, Solaris and Mac OSX) -============================================ - -Proper use of extra_inc_path, qt_dir etc should solve most of the -problems. - - -3. Windows/mingw -================ - - * install mingw with the following packages: - binutils-2.16.91-...tar.gz - gcc-core-3.4.5-...tar.gz - gcc-g++-3.4.5-...tar.gz - mingw-runtime-3.9.tar.gz - mingw-utils-0.3.tar.gz - MSYS-1.0.11-...exe - msysDTK-1.0.1.exe - w32api-3.6.tar.gz - - * install the latest Qt official "open source" binary package for - Windows/Mingw (required) - - * install mingw/zlib (required): - Download zlib binaries and developer files (zlib-1.2.3-bin.zip and - zlib-1.2.3-lib.zip) from http://gnuwin32.sourceforge.net/packages/zlib.htm . - - * install iconv (optional): - Download libiconv from http://gnuwin32.sourceforge.net/packages/libiconv.htm - The complete package (without source) is recommended. - - You may also try the windows binary (libiconv-x.x.x.bin.woe32.zip) of - iconv from one of the GNU mirrors listed in http://www.gnu.org/prep/ftp.html. - - * install gettext (optional): - Download gettext from http://gnuwin32.sourceforge.net/packages/gettext.htm - The complete package (without source) is recommended. - - You may also try the windows binary (gettext-runtime-x.x.x.bin.woe32.zip - and gettext-tools-x.x.x.bin.woe32.zip) from one of the GNU mirrors - (e.g. http://mirrors.usc.edu/pub/gnu/gettext/). - - * install aspell (optional): - LyX uses aspell 0.60.4 and there is no, as of now, official windows - version. If you do not want to compile aspell from source by yourself, - your best bet is using Abdel's lyx 1.5.0svn experimental package located - at http://wiki.lyx.org/Windows/LyX150Experimental. The link to his - pre-built aspell package is http://younes.a.free.fr/Lyx-15-experimental - - * install aiksaurus (optional): - Try to build aiksaurus from source (both mingw or msvc should work), - or look for pre-built package from the lyx 1.5.0svn experimental page. - - * Open a mingw xterm, and start scons as usual. - -Note: gettext, iconv and zlib are usually decompressed to c:/mingw so no -extra_inc_path etc is needed. - - -4. Windows/cygwin -================= - -To build lyx for cygwin, you should - - * install (using the cygwin setup program) at least the following - packages and all other packages pulled in by dependencies: - - aspell gzip libiconv libQtGui4 - aspell-dev gettext libpng libQtGui4-devel - gcc gettext-devel libQtCore4 pkg-config - gcc4 libintl8 libQtCore4-devel python - - * install aiksaurus (http://aiksaurus.sourceforge.net/, optional): - There is no cygwin package for aiksaurus, so you should build it from - source. However, aiksaurus builds smoothly on cygwin. - - * run scons as you would do under linux. - -Note: cygwin/qt does not follow the usual $qt_dir/include, $qt_dir/bin, -$qt_dir/lib directory structure. For example, cygwin/qt4 uses directories -/usr/include/qt4, /usr/lib/qt4/bin and /usr/lib/qt4/lib. If these -directories can not be detected automatically, use options, for example, - qt_dir=/usr/lib/qt4 qt_inc_path=/usr/include/qt4 - - -5. Windows/msvc -=============== - -To build lyx with msvc, you should - - * install msvc - It is recommended that you use MSVC2005 Express edition which is - freely available from microsoft. - - * get windows platform SDK - Please follow the link in the MSVC webpage to download and configure. - It is important that you add SDK paths to %INCLUDE% and %LIB% in, e.g., - C:\Program Files\Microsoft Visual Studio 8\Common7\Tools\vsvars32.bat. - If you plan to use the MSVS IDE, you should also update the Visual C++ - directories in VCProjectEngine.dll.express.config, as suggested in - http://msdn.microsoft.com/vstudio/express/visualc/usingpsdk/. - - * build qt4 - - download qt4 source from trolltech (not the binary version, which - only works with mingw) - - get q../free patch for qt4 - - compile qt4 as instructed - - * download and install the official zlib library from www.zlib.org. - - * optionally install iconv, gettext, aspell, aiksaurus following - the mingw instructions. - - * start from msvc command prompt, use the use_vc option to build lyx. - You may need to use extra_inc_path etc to point to zlib paths. - - * you can use the msvs_projects target to obtain msvc project files - for each lyx component. - - go to development/scons (important) - - run - > scons [other options] msvs_projects - Note that - - The resulting project files will use scons to build lyx - - All command line options, including rebuild, can be used as usual - (when msvs invoke scons). - - To use the msvc debugger, you have to use mode=debug (default). - - -6. Tips and hints -================= - - * Using external boost libraries (install boost libraries and use - option boost=system) can speed up scons' starting time a lot, since - the boost headers will then be considered as system headers and will - not be included in the dependency tree. - - -7. Troubleshooting -================== - -When you get an error: - -Q. Some path is not found. -A, Try options such as extra_inc_path, extra_lib_path. - -Q. A test fails (failed to find zlib etc). -A. Have a look at config.log. - -Q. I get a linking error. -A. Get the command sequence from scons_lyx.log and see what could - have gone wrong. You usually only need to tweak the last linking - command. - -Q. Still can not figure it out. -A. Send an email to lyx-devel mailing list. - -Q. Feeling too impatient/adventurous to wait for list response. -A. Read SConstruct and SConscript and see what went wrong. Trust me, they - are much easier to decipher than the autoconf/m4 files. - - diff --git a/Makefile.am b/Makefile.am index ebdfe0e76a..8fb666f401 100644 --- a/Makefile.am +++ b/Makefile.am @@ -20,7 +20,7 @@ SUBDIRS = config development intl po $(BOOST) src sourcedoc lib \ EXTRA_DIST = ANNOUNCE INSTALL.autoconf RELEASE-NOTES UPGRADING \ - INSTALL.Win32 INSTALL.MacOSX INSTALL.scons INSTALL.cmake \ + INSTALL.Win32 INSTALL.MacOSX INSTALL.cmake \ README.Win32 README.Cygwin README.localization lyx.1in \ autogen.sh diff --git a/README.Cygwin b/README.Cygwin index f44bc7b515..99a64e92ff 100644 --- a/README.Cygwin +++ b/README.Cygwin @@ -15,27 +15,13 @@ To build lyx, you will need to install the following cygwin packages gcc gettext-devel libQtCore4 pkg-config gcc4 libintl8 libQtCore4-devel python -Two building systems can be used to build lyx on cygwin: the traditional -autotools (autoconf, automake, make etc), and a scons build system. -The former is the preferred method and it does not differ from building lyx -on any typical posix system, so you are referred to the INSTALL file. +Currently only the traditional autotools (autoconf, automake, make etc) +build system is recommended to build LyX on cygwin. It does not differ +from building lyx on any typical posix system, so you are referred to the +INSTALL file. Note that it is not advisable using the cmake build system on cygwin for the reasons explained here: http://www.cmake.org/Bug/view.php?id=10122 -If you prefer using scons, you will have to install it separately, as it -is not available as a cygwin package, and then build lyx with the command - - > python scons.py -f development/scons/SConstruct mode=release install - -Optionally, you can install to a DESTDIR using a command similar to - - > python scons.py -f development/scons/SConstruct mode=release DESTDIR=./test install - -For more details about the use of scons, please refer to INSTALL.scons. -However, be aware that scons is not fully supported on cygwin and you may -be missing some features (reverse dvi/pdf search, for example) and some -cygwin-specific ancillary programs that you get when building with autotools. - When lyx is built as outlined above, it will be a X-Window application, so you will need a X-server for running it. It is possible to build lyx as a cygwin application but using the native Windows GDI backend instead diff --git a/development/Makefile.am b/development/Makefile.am index acf379d52e..b4caac687d 100644 --- a/development/Makefile.am +++ b/development/Makefile.am @@ -127,10 +127,6 @@ Win32/packaging/AltInstaller/specials/PDFViewWin/PDFViewWin.res \ Win32/packaging/AltInstaller/specials/AspellRepositories.txt \ Win32/packaging/AltInstaller/specials/AspellDictionaryNames.txt \ Win32/pdfview/pdfview.nsi \ -scons/qt4.py \ -scons/scons_manifest.py \ -scons/SConstruct \ -scons/scons_utils.py \ Win32/packaging/installer/lyx.nsi.cmake \ Win32/packaging/installer/settings.nsh.cmake \ Win32/vld/cmake/CMakeLists.txt \ diff --git a/development/Win32/packaging/AltInstaller/Build-all.nsi b/development/Win32/packaging/AltInstaller/Build-all.nsi index 04d8f376ad..ee0cd2d1b0 100644 --- a/development/Win32/packaging/AltInstaller/Build-all.nsi +++ b/development/Win32/packaging/AltInstaller/Build-all.nsi @@ -1,5 +1,5 @@ # this script compiles the three different installer variants at once -# this is necessary when the installer should e.g. be built by SCons or CMake +# this is necessary when the installer should e.g. be built by CMake SetCompressor /SOLID lzma diff --git a/development/scons/SConstruct b/development/scons/SConstruct deleted file mode 100644 index aa7d9a2a23..0000000000 --- a/development/scons/SConstruct +++ /dev/null @@ -1,2092 +0,0 @@ -# vi:filetype=python:expandtab:tabstop=4:shiftwidth=4 -# -# file SConstruct -# -# This file is part of LyX, the document processor. -# Licence details can be found in the file COPYING. -# -# \author Bo Peng -# Full author contact details are available in file CREDITS. -# -# This is a scons based building system for lyx, please refer -# to INSTALL.scons for detailed instructions. -# - -import os, sys, copy, cPickle, glob, time, re - -# determine where I am ... -# -from SCons.Node.FS import default_fs -# default_fs.SConstruct_dir is where SConstruct file is located. -scons_dir = default_fs.SConstruct_dir.path -scons_absdir = default_fs.SConstruct_dir.abspath - -# if SConstruct is copied to the top source directory -if os.path.exists(os.path.join(scons_dir, 'development', 'scons', 'scons_manifest.py')): - scons_dir = os.path.join(scons_dir, 'development', 'scons') - scons_absdir = os.path.join(scons_absdir, 'development', 'scons') -# get the ../.. of scons_dir -top_src_dir = os.path.split(os.path.split(scons_absdir)[0])[0] - -sys.path.extend([scons_absdir, os.path.join(top_src_dir, 'lib', 'doc')]) - -# scons_utils.py defines a few utility function -import scons_utils as utils -# import all file lists -from scons_manifest import * - -# scons asks for 1.5.2, lyx requires 2.3 -EnsurePythonVersion(2, 3) -# Please use at least version 0.97 -EnsureSConsVersion(0, 97) - -#---------------------------------------------------------- -# Global definitions -#---------------------------------------------------------- - -# some global settings -# -# get version number from configure.ac so that JMarc does -# not have to change SConstruct during lyx release -package_version, majmin_ver, lyx_date = utils.getVerFromConfigure(top_src_dir) -try: - lyx_major_version = package_version.split('.')[0] - lyx_minor_version = package_version.split('.')[1] -except IndexError, e: - lyx_major_version = majmin_ver[0] - lyx_minor_version = majmin_ver[1] - -package_cygwin_version = '%s-1' % package_version -boost_version = ['1_34'] - -if 'svn' in package_version: - devel_version = True - default_build_mode = 'debug' -else: - devel_version = False - default_build_mode = 'release' - -package = 'lyx' -package_bugreport = 'lyx-devel@lists.lyx.org' -package_name = 'LyX' -package_tarname = 'lyx' -package_string = '%s %s' % (package_name, package_version) - -# various cache/log files -default_log_file = 'scons_lyx.log' -opt_cache_file = 'opt.cache' - - -#---------------------------------------------------------- -# platform dependent settings -#---------------------------------------------------------- - -if os.name == 'nt': - platform_name = 'win32' - default_prefix = 'c:/program files/lyx' - default_with_x = False - default_packaging_method = 'windows' -elif os.name == 'posix' and sys.platform != 'cygwin': - platform_name = sys.platform - default_prefix = '/usr/local' - default_with_x = True - default_packaging_method = 'posix' -elif os.name == 'posix' and sys.platform == 'cygwin': - platform_name = 'cygwin' - default_prefix = '/usr' - default_with_x = True - default_packaging_method = 'posix' -elif os.name == 'darwin': - platform_name = 'macosx' - # FIXME: macOSX default prefix? - default_prefix = '.' - default_with_x = False - default_packaging_method = 'macosx' -else: # unsupported system, assume posix behavior - platform_name = 'others' - default_prefix = '.' - default_with_x = True - default_packaging_method = 'posix' - -#--------------------------------------------------------- -# Handling options -#---------------------------------------------------------- -# -# You can set perminant default values in config.py -if os.path.isfile('config.py'): - print "Getting options from config.py..." - print open('config.py').read() - -opts = Variables(['config.py']) -opts.AddVariables( - # frontend - EnumVariable('frontend', 'Main GUI', 'qt4', - allowed_values = ('qt4',) ), - # debug or release build - EnumVariable('mode', 'Building method', default_build_mode, - allowed_values = ('debug', 'release') ), - # boost libraries - EnumVariable('boost', - 'Use included, system boost library, or try sytem boost first.', - 'auto', allowed_values = ( - 'auto', # detect boost, if not found, use included - 'included', # always use included boost - 'system', # always use system boost, fail if can not find - ) ), - # - EnumVariable('gettext', - 'Use included, system gettext library, or try sytem gettext first', - 'auto', allowed_values = ( - 'auto', # detect gettext, if not found, use included - 'included', # always use included gettext - 'system', # always use system gettext, fail if can not find - ) ), - # - EnumVariable('spell', 'Choose spell checker to use.', 'auto', - allowed_values = ('aspell', 'enchant', 'hunspell', 'auto', 'no') ), - # packaging method - EnumVariable('packaging', 'Packaging method to use.', default_packaging_method, - allowed_values = ('windows', 'posix', 'macosx')), - # - BoolVariable('fast_start', 'This option is obsolete.', False), - # No precompiled header support (too troublesome to make it work for msvc) - # BoolVariable('pch', 'Whether or not use pch', False), - # enable assertion, (config.h has ENABLE_ASSERTIOS - BoolVariable('assertions', 'Use assertions', True), - # config.h define _GLIBCXX_CONCEPT_CHECKS - # Note: for earlier version of gcc (3.3) define _GLIBCPP_CONCEPT_CHECKS - BoolVariable('concept_checks', 'Enable concept checks', True), - # - BoolVariable('nls', 'Whether or not use native language support', True), - # - BoolVariable('profiling', 'Whether or not enable profiling', False), - # config.h define _GLIBCXX_DEBUG and _GLIBCXX_DEBUG_PEDANTIC - BoolVariable('stdlib_debug', 'Whether or not turn on stdlib debug', False), - # using x11? - BoolVariable('X11', 'Use x11 windows system', default_with_x), - # use MS VC++ to build lyx - BoolVariable('use_vc', 'Use MS VC++ to build lyx (cl.exe will be probed)', None), - # - PathVariable('qt_dir', 'Path to qt directory', None), - # - PathVariable('qt_inc_path', 'Path to qt include directory', None), - # - PathVariable('qt_lib_path', 'Path to qt library directory', None), - # extra include and libpath - PathVariable('extra_inc_path', 'Extra include path', None), - # - PathVariable('extra_lib_path', 'Extra library path', None), - # - PathVariable('extra_bin_path', 'A convenient way to add a path to $PATH', None), - # - PathVariable('extra_inc_path1', 'Extra include path', None), - # - PathVariable('extra_lib_path1', 'Extra library path', None), - # - ('rebuild', 'Obsolete option', None), - # can be set to a non-existing directory - ('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 and qt libraries', None), - # whether or not build bundle installer - BoolVariable('bundle', 'Whether or not build bundle installer', False), - # the bundle directory, containing bundled applications - PathVariable('bundle_dir', 'path to the bundle dependency package with miktex setup.exe etc', None), - # build directory, will use $mode if not set - ('build_dir', 'Build directory', None), - # version suffix - ('version_suffix', 'install lyx as lyx-suffix', None), - # how to load options - ('load_option', '''load option from previous scons run. option can be - yes (default): load all options - no: do not load any option - opt1,opt2: load specified options - -opt1,opt2: load all options other than specified ones''', 'yes'), - # - ('optimization', 'optimization CCFLAGS option.', None), - # - PathVariable('exec_prefix', 'install architecture-independent executable files in PREFIX', None), - # log file - ('logfile', 'save commands (not outputs) to logfile', default_log_file), - # provided for backward compatibility - ('dest_dir', 'install to DESTDIR. (Provided for backward compatibility only)', None), - # environment variable can be set as options. - ('DESTDIR', 'install to DESTDIR', None), - ('CC', 'replace default $CC', None), - ('LINK', 'replace default $LINK', None), - ('CPP', 'replace default $CPP', None), - ('CXX', 'replace default $CXX', None), - ('CXXCPP', 'replace default $CXXCPP', None), - ('CCFLAGS', 'replace default $CCFLAGS', None), - ('CPPFLAGS', 'replace default $CPPFLAGS', None), - ('LINKFLAGS', 'replace default $LINKFLAGS', None), -) - -# allowed options -all_options = [x.key for x in opts.options] - -# copied from SCons/Variables/BoolVariable.py -# We need to use them before a boolean ARGUMENTS option is available -# in env as bool. -true_strings = ('y', 'yes', 'true', 't', '1', 'on' , 'all' ) -false_strings = ('n', 'no', 'false', 'f', '0', 'off', 'none') - -if ARGUMENTS.has_key('fast_start'): - print 'fast_start option is obsolete' - -# if load_option=yes (default), load saved comand line options -# -# This option can take value yes/no/opt1,opt2/-opt1,opt2 -# and tries to be clever in choosing options to load -if (not ARGUMENTS.has_key('load_option') or \ - ARGUMENTS['load_option'] not in false_strings) \ - and os.path.isfile(opt_cache_file): - cache_file = open(opt_cache_file) - opt_cache = cPickle.load(cache_file) - cache_file.close() - # import cached options, but we should ignore qt_dir when frontend changes - if ARGUMENTS.has_key('frontend') and opt_cache.has_key('frontend') \ - and ARGUMENTS['frontend'] != opt_cache['frontend'] \ - and opt_cache.has_key('qt_dir'): - opt_cache.pop('qt_dir') - # and we do not cache some options (dest_dir is obsolete) - for arg in ['load_option', 'dest_dir', 'bundle']: - if opt_cache.has_key(arg): - opt_cache.pop(arg) - # remove obsolete cached keys (well, SConstruct is evolving. :-) - for arg in opt_cache.keys(): - if arg not in all_options: - print 'Option %s is obsolete, do not load it' % arg - opt_cache.pop(arg) - # now, if load_option=opt1,opt2 or -opt1,opt2 - if ARGUMENTS.has_key('load_option') and \ - ARGUMENTS['load_option'] not in true_strings + false_strings: - # if -opt1,opt2 is specified, do not load these options - if ARGUMENTS['load_option'][0] == '-': - for arg in ARGUMENTS['load_option'][1:].split(','): - if opt_cache.has_key(arg): - opt_cache.pop(arg) - # if opt1,opt2 is specified, only load specified options - else: - args = ARGUMENTS['load_option'].split(',') - for arg in opt_cache.keys(): - if arg not in args: - opt_cache.pop(arg) - # now restore options as if entered from command line - for key in opt_cache.keys(): - if not ARGUMENTS.has_key(key): - ARGUMENTS[key] = opt_cache[key] - print "Restoring cached option %s=%s" % (key, ARGUMENTS[key]) - print - -# check if there is unused (or misspelled) argument -for arg in ARGUMENTS.keys(): - if arg not in all_options: - import textwrap - print "Unknown option '%s'... exiting." % arg - print - print "Available options are (check 'scons -help' for details):" - print ' ' + '\n '.join(textwrap.wrap(', '.join(all_options))) - Exit(1) - -# save options used -cache_file = open(opt_cache_file, 'w') -cPickle.dump(ARGUMENTS, cache_file) -cache_file.close() - -#--------------------------------------------------------- -# Setting up environment -#--------------------------------------------------------- - -# I do not really like ENV=os.environ, but you may add it -# here if you experience some environment related problem -env = Environment(options = opts) - -# set individual variables since I do not really like ENV = os.environ -env['ENV']['PATH'] = os.environ.get('PATH') -env['ENV']['HOME'] = os.environ.get('HOME') -# these are defined for MSVC -env['ENV']['LIB'] = os.environ.get('LIB') -env['ENV']['INCLUDE'] = os.environ.get('INCLUDE') - -# for simplicity, use var instead of env[var] -frontend = env['frontend'] -prefix = env['prefix'] -mode = env['mode'] - -if platform_name == 'win32': - if env.has_key('use_vc'): - use_vc = env['use_vc'] - if WhereIs('cl.exe') is None: - print "cl.exe is not found. Are you using the MSVC environment?" - Exit(2) - elif WhereIs('cl.exe') is not None: - use_vc = True - else: - use_vc = False -else: - use_vc = False - -if env.has_key('build_dir') and env['build_dir'] is not None: - env['BUILDDIR'] = env['build_dir'] -else: - # Determine the name of the build $mode - env['BUILDDIR'] = '#' + mode - -# all built libraries will go to build_dir/libs -# (This is different from the make file approach) -env['LOCALLIBPATH'] = '$BUILDDIR/libs' -env.AppendUnique(LIBPATH = ['$LOCALLIBPATH']) - - -# Here is a summary of variables defined in env -# 1. defined options -# 2. undefined options with a non-None default value -# 3. compiler commands and flags like CCFLAGS. -# MSGFMT used to process po files -# 4. Variables that will be used to replace variables in some_file.in -# lib/lyx2lyx/lyx2lyx_version.py.in -# PACKAGE_VERSION - -# full path name is used to build msvs project files -# and to replace TOP_SRCDIR in package.C -env['TOP_SRCDIR'] = Dir(top_src_dir).abspath - -# determine share_dir etc -packaging_method = env.get('packaging') -if packaging_method == 'windows': - share_dir = 'Resources' - man_dir = 'Resources/man/man1' - locale_dir = 'Resources/locale' -else: - share_dir = 'share/lyx' - locale_dir = 'share/locale' - if platform_name == 'cygwin': - man_dir = 'share/man/man1' - else: - man_dir = 'man/man1' - -# program suffix: can be yes, or a string -if env.has_key('version_suffix'): - if env['version_suffix'] in true_strings: - program_suffix = package_version - elif env['version_suffix'] in false_strings: - program_suffix = '' - else: - program_suffix = env['version_suffix'] -else: - program_suffix = '' - - -# whether or not add suffix to file and directory names -add_suffix = packaging_method != 'windows' -# Absolute data directory -if mode == 'release': - if add_suffix: - env['LYX_DATA_DIR'] = Dir(os.path.join(prefix, share_dir + program_suffix)).abspath - else: - env['LYX_DATA_DIR'] = Dir(os.path.join(prefix, share_dir)).abspath -else: - # in the debug mode, use $TOP_SRCDIR/lib to make sure lyx can be started from anyway - # by using this directory as data directory - env['LYX_DATA_DIR'] = os.path.join(env.subst('$TOP_SRCDIR'), 'lib') -# we need absolute path for package.C -env['LOCALEDIR'] = Dir(os.path.join(prefix, locale_dir)).abspath - - -#--------------------------------------------------------- -# Setting building environment (Tools, compiler flags etc) -#--------------------------------------------------------- - -# Since Tool('mingw') will reset CCFLAGS etc, this should be -# done before getEnvVariable -if platform_name == 'win32': - if use_vc: - env.Tool('msvc') - env.Tool('mslink') - else: - env.Tool('mingw') - env.AppendUnique(CPPPATH = ['#c:/MinGW/include']) - # fix a scons winres bug (there is a missing space between ${RCINCPREFIX} and ${SOURCE.dir} - # in version 0.96.93 - env['RCCOM'] = '$RC $_CPPDEFFLAGS $RCINCFLAGS ${RCINCPREFIX} ${SOURCE.dir} $RCFLAGS -i $SOURCE -o $TARGET' - - -# we differentiate between hard-coded options and default options -# hard-coded options are required and will always be there -# default options can be replaced by enviromental variables or command line options -CCFLAGS_required = [] -CXXFLAGS_required = [] -LINKFLAGS_required = [] -CCFLAGS_default = [] - -# if we use ms vc, the commands are fine (cl.exe and link.exe) -if use_vc: - # C4819: The file contains a character that cannot be represented - # in the current code page (number) - # C4996: foo was decleared deprecated - CCFLAGS_required.append('/EHsc') - CXXFLAGS_required.append('/Zc:wchar_t-') - if mode == 'debug': - CCFLAGS_default.extend(['/wd4819', '/wd4996', '/nologo', '/MDd']) - else: - CCFLAGS_default.extend(['/wd4819', '/wd4996', '/nologo', '/MD']) - -# for debug/release mode -if env.has_key('optimization') and env['optimization'] is not None: - # if user supplies optimization flags, use it anyway - CCFLAGS_required.extend(env['optimization'].split()) - # and do not use default - set_default_optimization_flags = False -else: - set_default_optimization_flags = True - -if mode == 'debug': - if use_vc: - CCFLAGS_required.append('/Zi') - LINKFLAGS_required.extend(['/debug', '/map']) - else: - CCFLAGS_required.append('-g') - CCFLAGS_default.append('-O') -elif mode == 'release' and set_default_optimization_flags: - if use_vc: - CCFLAGS_default.append('/O2') - else: - CCFLAGS_default.append('-O2') - -# msvc uses separate tools for profiling -if env.has_key('profiling') and env['profiling']: - if use_vc: - print 'Visual C++ does not use profiling options' - else: - CCFLAGS_required.append('-pg') - LINKFLAGS_required.append('-pg') - -if env.has_key('warnings') and env['warnings']: - if use_vc: - CCFLAGS_default.append('/W2') - else: - # Note: autotools detect gxx version and pass -W for 3.x - # and -Wextra for other versions of gcc - CCFLAGS_default.append('-Wall') - -# Now, set the variables as follows: -# 1. if command line option exists: replace default -# 2. then if s envronment variable exists: replace default -# 3. set variable to required + default -def setEnvVariable(env, name, required = None, default = None, split = True): - ''' env: environment to set variable - name: variable - required: hardcoded options - default: default options that can be replaced by command line or - environment variables - split: whether or not split obtained variable like '-02 -g' - ''' - # 1. ARGUMENTS is already set to env[name], override default. - if ARGUMENTS.has_key(name): - # env[name] may be rewritten when building tools are reloaded - # if that is the case, commandline option will override it. - env[name] = ARGUMENTS[name] - default = None - # then use environment default - elif os.environ.has_key(name): - print "Acquiring variable %s from system environment: %s" % (name, os.environ[name]) - default = os.environ[name] - if split: - default = default.split() - # the real value should be env[name] + default + required - if split: - value = [] - if env.has_key(name): - value = str(env[name]).split() - if required is not None: - value += required - if default is not None: - value += default - else: - value = "" - if env.has_key(name): - value = str(env[name]) - if required is not None: - value += " " + required - if default is not None: - value += " " + default - env[name] = value - # print name, env[name] - -setEnvVariable(env, 'DESTDIR', split=False) -setEnvVariable(env, 'CC') -setEnvVariable(env, 'LINK') -setEnvVariable(env, 'CPP') -setEnvVariable(env, 'CXX') -setEnvVariable(env, 'CXXCPP') -setEnvVariable(env, 'CCFLAGS', CCFLAGS_required, CCFLAGS_default) -setEnvVariable(env, 'CXXFLAGS', CXXFLAGS_required) -setEnvVariable(env, 'CPPFLAGS') -setEnvVariable(env, 'LINKFLAGS', LINKFLAGS_required) - -# if DESTDIR is not set... -if env.has_key('dest_dir'): - print "This option is obsolete. Please use DESTDIR instead." - env['DESTDIR'] = env['dest_dir'] - -# -# extra_inc_path and extra_lib_path -# -extra_inc_paths = [] -if env.has_key('extra_inc_path') and env['extra_inc_path']: - extra_inc_paths.append(env['extra_inc_path']) -if env.has_key('extra_lib_path') and env['extra_lib_path']: - env.AppendUnique(LIBPATH = [env['extra_lib_path']]) -if env.has_key('extra_inc_path1') and env['extra_inc_path1']: - extra_inc_paths.append(env['extra_inc_path1']) -if env.has_key('extra_lib_path1') and env['extra_lib_path1']: - env.AppendUnique(LIBPATH = [env['extra_lib_path1']]) -if env.has_key('extra_bin_path') and env['extra_bin_path']: - # only the first one is needed (a scons bug?) - os.environ['PATH'] += os.pathsep + env['extra_bin_path'] - env.PrependENVPath('PATH', env['extra_bin_path']) -# extra_inc_paths will be used later by intlenv etc -env.AppendUnique(CPPPATH = extra_inc_paths) - - -#---------------------------------------------------------- -# Autoconf business -#---------------------------------------------------------- - -conf = Configure(env, - custom_tests = { - 'CheckPkgConfig' : utils.checkPkgConfig, - 'CheckPackage' : utils.checkPackage, - 'CheckMkdirOneArg' : utils.checkMkdirOneArg, - 'CheckSelectArgType' : utils.checkSelectArgType, - 'CheckBoostLibraries' : utils.checkBoostLibraries, - 'CheckCommand' : utils.checkCommand, - 'CheckNSIS' : utils.checkNSIS, - 'CheckCXXGlobalCstd' : utils.checkCXXGlobalCstd, - 'CheckLC_MESSAGES' : utils.checkLC_MESSAGES, - 'CheckIconvConst' : utils.checkIconvConst, - 'CheckSizeOfWChar' : utils.checkSizeOfWChar, - 'CheckDeclaration' : utils.checkDeclaration, - } -) - -# When using msvc, windows.h is required -if use_vc and not conf.CheckCHeader('windows.h'): - print 'Windows.h is not found. Please install Windows Platform SDK.' - print 'Please check config.log for more information.' - Exit(1) - -# pkg-config? (if not, we use hard-coded options) -if conf.CheckPkgConfig('0.15.0'): - env['HAS_PKG_CONFIG'] = True -else: - print 'pkg-config >= 0.1.50 is not found' - env['HAS_PKG_CONFIG'] = False - -# zlib? zdll is required for MSVC 2005 and 2008, for 2010 only zlib is required -if (not use_vc and not conf.CheckLibWithHeader('z', 'zlib.h', 'C')) \ - or (use_vc and not conf.CheckLibWithHeader('zlib', 'zlib.h', 'C')): - print 'Did not find zlib.lib or zlib.h, exiting!' - print 'Please check config.log for more information.' - Exit(1) -if conf.CheckLib('iconv'): - env['ICONV_LIB'] = 'iconv' -elif conf.CheckLib('libiconv'): - env['ICONV_LIB'] = 'libiconv' -elif conf.CheckFunc('iconv_open'): - env['ICONV_LIB'] = None -else: - print 'Did not find iconv or libiconv, exiting!' - print 'Please check config.log for more information.' - Exit(1) - -# check socket libs -socket_libs = [] -if conf.CheckLib('socket'): - socket_libs.append('socket') -# nsl is the network services library and provides a -# transport-level interface to networking services. -if conf.CheckLib('nsl'): - socket_libs.append('nsl') - -# check available boost libs (since lyx1.4 does not use iostream) -boost_libs = [] -for lib in ['signals', 'regex']: - if os.path.isdir(os.path.join(top_src_dir, 'boost', 'libs', lib)): - boost_libs.append(lib) - -# check boost libraries -boost_opt = ARGUMENTS.get('boost', 'auto') -# check for system boost -lib_paths = env['LIBPATH'] + ['/usr/lib', '/usr/local/lib'] -inc_paths = env['CPPPATH'] + ['/usr/include', '/usr/local/include'] -# default to $BUILDDIR/libs (use None since this path will be added anyway) -boost_libpath = None -# here I assume that all libraries are in the same directory -if boost_opt == 'included': - boost_libraries = ['included_boost_%s' % x for x in boost_libs] - included_boost = True - env['BOOST_INC_PATH'] = '$TOP_SRCDIR/boost' -elif boost_opt == 'auto': - res = conf.CheckBoostLibraries(boost_libs, lib_paths, inc_paths, boost_version, mode == 'debug') - # if not found, use local boost - if res[0] is None: - boost_libraries = ['included_boost_%s' % x for x in boost_libs] - included_boost = True - env['BOOST_INC_PATH'] = '$TOP_SRCDIR/boost' - else: - included_boost = False - (boost_libraries, boost_libpath, env['BOOST_INC_PATH']) = res -elif boost_opt == 'system': - res = conf.CheckBoostLibraries(boost_libs, lib_paths, inc_paths, boost_version, mode == 'debug') - if res[0] is None: - print "Can not find system boost libraries with version %s " % boost_version - print "Please supply a path through extra_lib_path and try again." - print "Or use boost=included to use included boost libraries." - Exit(2) - else: - included_boost = False - (boost_libraries, boost_libpath, env['BOOST_INC_PATH']) = res - - -if boost_libpath is not None: - env.AppendUnique(LIBPATH = [boost_libpath]) - - -env['ENABLE_NLS'] = env['nls'] - -if not env['ENABLE_NLS']: - intl_libs = [] - included_gettext = False -else: - # check gettext libraries - gettext_opt = ARGUMENTS.get('gettext', 'auto') - # check for system gettext - succ = False - if gettext_opt in ['auto', 'system']: - if conf.CheckFunc('gettext'): - included_gettext = False - intl_libs = [] - succ = True - elif conf.CheckLib('intl'): - included_gettext = False - intl_libs = ['intl'] - succ = True - else: # no found - if gettext_opt == 'system': - print "Can not find system gettext library" - print "Please supply a path through extra_lib_path and try again." - print "Or use gettext=included to use included gettext libraries." - Exit(2) - # now, auto and succ = false, or gettext=included - if not succ: - # we do not need to set LIBPATH now. - included_gettext = True - intl_libs = ['included_intl'] - - -# -# check for msgfmt command -env['MSGFMT'] = conf.CheckCommand('msgfmt') -env['MSGMERGE'] = conf.CheckCommand('msgmerge') -env['XGETTEXT'] = conf.CheckCommand('xgettext') -env['MSGUNIQ'] = conf.CheckCommand('msguniq') - -# if under windows, check the nsis compiler -if platform_name == 'win32': - env['NSIS'] = conf.CheckNSIS() - -# cygwin packaging requires the binaries to be stripped -if platform_name == 'cygwin': - env['STRIP'] = conf.CheckCommand('strip') - -# -# Customized builders -# -# install customized builders -env['BUILDERS']['substFile'] = Builder(action = utils.env_subst) -#env['BUILDERS']['installTOC'] = Builder(action = utils.env_toc) -env['BUILDERS']['potfiles'] = Builder(action = utils.env_potfiles) - - -#---------------------------------------------------------- -# Generating config.h -#---------------------------------------------------------- -aspell_lib = 'aspell' -# assume that we use aspell, aspelld compiled for msvc -if platform_name == 'win32' and mode == 'debug' and use_vc: - aspell_lib = 'aspelld' - -hunspell_lib = 'libhunspell' - -# check the existence of config.h -config_h = os.path.join(env.Dir('$BUILDDIR/src').path, 'config.h') -boost_config_h = os.path.join(env.Dir('$BUILDDIR/boost').path, 'config.h') -# -print "Creating %s..." % boost_config_h -# -utils.createConfigFile(conf, - config_file = boost_config_h, - config_pre = r'''/* boost/config.h. Generated by SCons. */ - -/* -*- C++ -*- */ -/* -* \file config.h -* This file is part of LyX, the document processor. -* Licence details can be found in the file COPYING. -* -* This is the compilation configuration file for LyX. -* It was generated by scon. -* You might want to change some of the defaults if something goes wrong -* during the compilation. -*/ - -#ifndef _BOOST_CONFIG_H -#define _BOOST_CONFIG_H -''', - headers = [ - ('ostream', 'HAVE_OSTREAM', 'cxx'), - ('locale', 'HAVE_LOCALE', 'cxx'), - ('sstream', 'HAVE_SSTREAM', 'cxx'), - ], - custom_tests = [ - (env.has_key('assertions') and env['assertions'] and mode == 'debug', - 'ENABLE_ASSERTIONS', - 'Define if you want assertions to be enabled in the code' - ), - ], - types = [ - ('wchar_t', 'HAVE_WCHAR_T', None), - ], - config_post = ''' - -#if defined(HAVE_OSTREAM) && defined(HAVE_LOCALE) && defined(HAVE_SSTREAM) -# define USE_BOOST_FORMAT 1 -#else -# define USE_BOOST_FORMAT 0 -#endif - -#if !defined(ENABLE_ASSERTIONS) -# define BOOST_DISABLE_ASSERTS 1 -#endif -#define BOOST_ENABLE_ASSERT_HANDLER 1 - -#define BOOST_DISABLE_THREADS 1 -#define BOOST_NO_WSTRING 1 - -#ifdef __CYGWIN__ -# define BOOST_POSIX 1 -# define BOOST_POSIX_API 1 -# define BOOST_POSIX_PATH 1 -#endif - -#define BOOST_ALL_NO_LIB 1 - -/* - * the FreeBSD libc uses UCS4, but libstdc++ has no proper wchar_t - * support compiled in: - * http://gcc.gnu.org/onlinedocs/libstdc++/faq/index.html#3_9 - * And we are not interested at all what libc - * does: What we need is a 32bit wide wchar_t, and a libstdc++ that - * has the needed wchar_t support and uses UCS4. Whether it - * implements this with the help of libc, or whether it has own code - * does not matter for us, because we don't use libc directly (Georg) -*/ -#if defined(HAVE_WCHAR_T) && SIZEOF_WCHAR_T == 4 && !defined(__FreeBSD__) && !defined(__FreeBSD_kernel__) -# define USE_WCHAR_T -#endif - -#endif -''' -) -# -print "\nGenerating %s..." % config_h - -# AIKSAURUS_H_LOCATION -if (conf.CheckCXXHeader("Aiksaurus.h")): - aik_location = '' -elif (conf.CheckCXXHeader("Aiksaurus/Aiksaurus.h")): - aik_location = '' -else: - aik_location = '' - -# determine headers to use -spell_opt = ARGUMENTS.get('spell', 'auto') -env['USE_ASPELL'] = False -env['USE_ENCHANT'] = False -env['USE_HUNSPELL'] = False -if spell_opt in ['auto', 'aspell'] and conf.CheckLib(aspell_lib): - spell_engine = 'USE_ASPELL' -elif spell_opt in ['auto', 'enchant'] and conf.CheckLib('enchant'): - spell_engine = 'USE_ENCHANT' -elif spell_opt in ['auto', 'hunspell'] and conf.CheckLib(hunspell_lib): - spell_engine = 'USE_HUNSPELL' -else: - spell_engine = None - -if spell_engine is not None: - env[spell_engine] = True -else: - if spell_opt == 'auto': - print "Warning: Can not locate any spell checker" - elif spell_opt != 'no': - print "Warning: Can not locate specified spell checker:", spell_opt - print 'Please check config.log for more information.' - Exit(1) - -# check arg types of select function -(select_arg1, select_arg234, select_arg5) = conf.CheckSelectArgType() - -# check the size of wchar_t -sizeof_wchar_t = conf.CheckSizeOfWChar() -# something wrong -if sizeof_wchar_t == 0: - print 'Error: Can not determine the size of wchar_t.' - print 'Please check config.log for more information.' - Exit(1) - - -# fill in the version info -env['VERSION_INFO'] = '''Configuration - Host type: %s - Special build flags: %s - C Compiler: %s - C Compiler flags: %s %s - C++ Compiler: %s - C++ Compiler LyX flags: %s - C++ Compiler flags: %s %s - Linker flags: %s - Linker user flags: %s -Build info: - Builing directory: %s - Libraries paths: %s - Boost libraries: %s - include search path: %s -Frontend: - Frontend: %s - Packaging: %s - LyX dir: %s - LyX files dir: %s -''' % (platform_name, - env.subst('$CCFLAGS'), env.subst('$CC'), - env.subst('$CPPFLAGS'), env.subst('$CFLAGS'), - env.subst('$CXX'), env.subst('$CXXFLAGS'), - env.subst('$CPPFLAGS'), env.subst('$CXXFLAGS'), - env.subst('$LINKFLAGS'), env.subst('$LINKFLAGS'), - env.subst('$LOCALLIBPATH'), - env.subst('$LIBPATH'), str(boost_libraries), - env.subst('$CPPPATH'), - frontend, packaging_method, - prefix, env['LYX_DATA_DIR']) - -# -# create config.h -result = utils.createConfigFile(conf, - config_file = config_h, - config_pre = r'''/* config.h. Generated by SCons. */ - -/* -*- C++ -*- */ -/* -* \file config.h -* This file is part of LyX, the document processor. -* Licence details can be found in the file COPYING. -* -* This is the compilation configuration file for LyX. -* It was generated by scon. -* You might want to change some of the defaults if something goes wrong -* during the compilation. -*/ - -#ifndef _CONFIG_H -#define _CONFIG_H -''', - headers = [ - ('io.h', 'HAVE_IO_H', 'c'), - ('limits.h', 'HAVE_LIMITS_H', 'c'), - ('locale.h', 'HAVE_LOCALE_H', 'c'), - ('process.h', 'HAVE_PROCESS_H', 'c'), - ('stdlib.h', 'HAVE_STDLIB_H', 'c'), - ('string.h', 'HAVE_STRING_H', 'c'), - ('sys/stat.h', 'HAVE_SYS_STAT_H', 'c'), - ('sys/time.h', 'HAVE_SYS_TIME_H', 'c'), - ('sys/types.h', 'HAVE_SYS_TYPES_H', 'c'), - ('sys/utime.h', 'HAVE_SYS_UTIME_H', 'c'), - ('sys/socket.h', 'HAVE_SYS_SOCKET_H', 'c'), - ('unistd.h', 'HAVE_UNISTD_H', 'c'), - ('utime.h', 'HAVE_UTIME_H', 'c'), - ('direct.h', 'HAVE_DIRECT_H', 'c'), - ('istream', 'HAVE_ISTREAM', 'cxx'), - ('ios', 'HAVE_IOS', 'cxx'), - ], - functions = [ - ('open', 'HAVE_OPEN', None), - ('chmod', 'HAVE_CHMOD', None), - ('close', 'HAVE_CLOSE', None), - ('popen', 'HAVE_POPEN', None), - ('pclose', 'HAVE_PCLOSE', None), - ('_open', 'HAVE__OPEN', None), - ('_close', 'HAVE__CLOSE', None), - ('_popen', 'HAVE__POPEN', None), - ('_pclose', 'HAVE__PCLOSE', None), - ('getpid', 'HAVE_GETPID', None), - ('_getpid', 'HAVE__GETPID', None), - ('mkdir', 'HAVE_MKDIR', None), - ('_mkdir', 'HAVE__MKDIR', None), - ('mktemp', 'HAVE_MKTEMP', None), - ('mkstemp', 'HAVE_MKSTEMP', None), - ('strerror', 'HAVE_STRERROR', None), - ('getcwd', 'HAVE_GETCWD', None), - ('setenv', 'HAVE_SETENV', None), - ('putenv', 'HAVE_PUTENV', None), - ('fcntl', 'HAVE_FCNTL', None), - ('mkfifo', 'HAVE_MKFIFO', None), - ], - declarations = [ - ('mkstemp', 'HAVE_DECL_MKSTEMP', ['unistd.h', 'stdlib.h']), - ], - types = [ - ('std::istreambuf_iterator', 'HAVE_DECL_ISTREAMBUF_ITERATOR', - '#include \n#include '), - ('wchar_t', 'HAVE_WCHAR_T', None), - ('mode_t', 'HAVE_MODE_T', "#include "), - ], - libs = [ - ('gdi32', 'HAVE_LIBGDI32'), - (('Aiksaurus', 'libAiksaurus'), 'HAVE_LIBAIKSAURUS', 'AIKSAURUS_LIB'), - ], - custom_tests = [ - (conf.CheckType('pid_t', includes='#include '), - 'HAVE_PID_T', - 'Define is sys/types.h does not have pid_t', - '', - '#define pid_t int', - ), - (conf.CheckCXXGlobalCstd(), - 'CXX_GLOBAL_CSTD', - 'Define if your C++ compiler puts C library functions in the global namespace' - ), - (conf.CheckMkdirOneArg(), - 'MKDIR_TAKES_ONE_ARG', - 'Define if mkdir takes only one argument.' - ), - (conf.CheckIconvConst(), - 'ICONV_CONST', - 'Define as const if the declaration of iconv() needs const.', - '#define ICONV_CONST const', - '#define ICONV_CONST', - ), - (conf.CheckLC_MESSAGES(), - 'HAVE_LC_MESSAGES', - 'Define if your file defines LC_MESSAGES.' - ), - (devel_version, 'DEVEL_VERSION', 'Whether or not a development version'), - (env['nls'], - 'ENABLE_NLS', - "Define to 1 if translation of program messages to the user's native anguage is requested.", - ), - (env['nls'] and not included_gettext, - 'HAVE_GETTEXT', - 'Define to 1 if using system gettext library' - ), - (env.has_key('concept_checks') and env['concept_checks'], - '_GLIBCXX_CONCEPT_CHECKS', - 'libstdc++ concept checking' - ), - (env.has_key('stdlib_debug') and env['stdlib_debug'], - '_GLIBCXX_DEBUG', - 'libstdc++ debug mode' - ), - (env.has_key('stdlib_debug') and env['stdlib_debug'], - '_GLIBCXX_DEBUG_PEDANTIC', - 'libstdc++ pedantic debug mode' - ), - (os.name != 'nt', 'BOOST_POSIX', - 'Indicates to boost < 1.34 which API to use (posix or windows).' - ), - (os.name != 'nt', 'BOOST_POSIX_API', - 'Indicates to boost 1.34 which API to use (posix or windows).' - ), - (os.name != 'nt', 'BOOST_POSIX_PATH', - 'Indicates to boost 1.34 which path style to use (posix or windows).' - ), - (spell_engine is not None, spell_engine, - 'Spell engine to use' - ), - # we need to know the byte order for unicode conversions - (sys.byteorder == 'big', 'WORDS_BIGENDIAN', - 'Define to 1 if your processor stores words with the most significant byte first (like Motorola and SPARC, unlike Intel and VAX).' - ), - ], - extra_items = [ - ('#define PACKAGE "%s%s"' % (package, program_suffix), - 'Name of package'), - ('#define PACKAGE_BUGREPORT "%s"' % package_bugreport, - 'Define to the address where bug reports for this package should be sent.'), - ('#define PACKAGE_NAME "%s"' % package_name, - 'Define to the full name of this package.'), - ('#define PACKAGE_STRING "%s"' % package_string, - 'Define to the full name and version of this package.'), - ('#define PACKAGE_TARNAME "%s"' % package_tarname, - 'Define to the one symbol short name of this package.'), - ('#define PACKAGE_VERSION "%s"' % package_version, - 'Define to the version of this package.'), - ('#define LYX_MAJOR_VERSION %d' % int(lyx_major_version), - 'Define to the major version of this package.'), - ('#define LYX_MINOR_VERSION %d' % int(lyx_minor_version), - 'Define to the minor version of this package.'), - ('#define VERSION_INFO "%s"' % env['VERSION_INFO'].replace('\n', '\\n'), - 'Full version info'), - ('#define LYX_DIR_VER "LYX_DIR_%sx"' % majmin_ver, - 'Versioned env var for system dir'), - ('#define LYX_USERDIR_VER "LYX_USERDIR_%sx"' % majmin_ver, - 'Versioned env var for user dir'), - ('#define LYX_DATE "%s"' % lyx_date, - 'Date of release'), - ('#define PROGRAM_SUFFIX "%s"' % program_suffix, - 'Program version suffix'), - ('#define LYX_ABS_INSTALLED_DATADIR "%s"' % env.subst('$LYX_DATA_DIR').replace('\\', '/'), - 'Hard coded system support directory'), - ('#define LYX_ABS_INSTALLED_LOCALEDIR "%s"' % env.subst('$LOCALEDIR').replace('\\', '/'), - 'Hard coded locale directory'), - ('#define LYX_ABS_TOP_SRCDIR "%s"' % env.subst('$TOP_SRCDIR').replace('\\', '/'), - 'Top source directory'), - ('#define BOOST_ALL_NO_LIB 1', - 'disable automatic linking of boost libraries.'), - ('#define LYX_USE_TR1 1', - 'use TR1'), - ('#define USE_%s_PACKAGING 1' % packaging_method.upper(), - 'Packaging method'), - ('#define AIKSAURUS_H_LOCATION ' + aik_location, - 'Aiksaurus include file'), - ('#define SELECT_TYPE_ARG1 %s' % select_arg1, - "Define to the type of arg 1 for `select'."), - ('#define SELECT_TYPE_ARG234 %s' % select_arg234, - "Define to the type of arg 2, 3, 4 for `select'."), - ('#define SELECT_TYPE_ARG5 %s' % select_arg5, - "Define to the type of arg 5 for `select'."), - ('#define SIZEOF_WCHAR_T %d' % sizeof_wchar_t, - 'Define to be the size of type wchar_t'), - ], - config_post = '''/************************************************************ -** You should not need to change anything beyond this point */ - -#ifndef HAVE_STRERROR -#if defined(__cplusplus) -extern "C" -#endif -char * strerror(int n); -#endif - -#include <../boost/config.h> - -#endif -''' -) - -# these keys are needed in env -for key in ['USE_ASPELL', 'USE_ENCHANT', 'USE_HUNSPELL', 'HAVE_FCNTL',\ - 'HAVE_LIBGDI32', 'HAVE_LIBAIKSAURUS', 'AIKSAURUS_LIB']: - # USE_ASPELL etc does not go through result - if result.has_key(key): - env[key] = result[key] - -# -# if nls=yes and gettext=included, create intl/config.h -# intl/libintl.h etc -# -intl_config_h = os.path.join(env.Dir('$BUILDDIR/intl').path, 'config.h') -if env['nls'] and included_gettext: - # - print "Creating %s..." % intl_config_h - # - # create intl/config.h - result = utils.createConfigFile(conf, - config_file = intl_config_h, - config_pre = r'''/* intl/config.h. Generated by SCons. */ - -/* -*- C++ -*- */ -/* -* \file config.h -* This file is part of LyX, the document processor. -* Licence details can be found in the file COPYING. -* -* This is the compilation configuration file for LyX. -* It was generated by scon. -* You might want to change some of the defaults if something goes wrong -* during the compilation. -*/ - -#ifndef _INTL_CONFIG_H -#define _INTL_CONFIG_H -''', - headers = [ - ('unistd.h', 'HAVE_UNISTD_H', 'c'), - ('inttypes.h', 'HAVE_INTTYPES_H', 'c'), - ('string.h', 'HAVE_STRING_H', 'c'), - ('strings.h', 'HAVE_STRINGS_H', 'c'), - ('argz.h', 'HAVE_ARGZ_H', 'c'), - ('limits.h', 'HAVE_LIMITS_H', 'c'), - ('alloca.h', 'HAVE_ALLOCA_H', 'c'), - ('stddef.h', 'HAVE_STDDEF_H', 'c'), - ('stdint.h', 'HAVE_STDINT_H', 'c'), - ('sys/param.h', 'HAVE_SYS_PARAM_H', 'c'), - ], - functions = [ - ('getcwd', 'HAVE_GETCWD', None), - ('stpcpy', 'HAVE_STPCPY', None), - ('strcasecmp', 'HAVE_STRCASECMP', None), - ('strdup', 'HAVE_STRDUP', None), - ('strtoul', 'HAVE_STRTOUL', None), - ('alloca', 'HAVE_ALLOCA', None), - ('__fsetlocking', 'HAVE___FSETLOCKING', None), - ('mempcpy', 'HAVE_MEMPCPY', None), - ('__argz_count', 'HAVE___ARGZ_COUNT', None), - ('__argz_next', 'HAVE___ARGZ_NEXT', None), - ('__argz_stringify', 'HAVE___ARGZ_STRINGIFY', None), - ('setlocale', 'HAVE_SETLOCALE', None), - ('tsearch', 'HAVE_TSEARCH', None), - ('getegid', 'HAVE_GETEGID', None), - ('getgid', 'HAVE_GETGID', None), - ('getuid', 'HAVE_GETUID', None), - ('wcslen', 'HAVE_WCSLEN', None), - ('asprintf', 'HAVE_ASPRINTF', None), - ('wprintf', 'HAVE_WPRINTF', None), - ('snprintf', 'HAVE_SNPRINTF', None), - ('printf', 'HAVE_POSIX_PRINTF', None), - ('fcntl', 'HAVE_FCNTL', None), - ], - types = [ - ('intmax_t', 'HAVE_INTMAX_T', None), - ('long double', 'HAVE_LONG_DOUBLE', None), - ('long long', 'HAVE_LONG_LONG', None), - ('wchar_t', 'HAVE_WCHAR_T', None), - ('wint_t', 'HAVE_WINT_T', None), - ('uintmax_t', 'HAVE_INTTYPES_H_WITH_UINTMAX', '#include '), - ('uintmax_t', 'HAVE_STDINT_H_WITH_UINTMAX', '#include '), - ], - libs = [ - ('c', 'HAVE_LIBC'), - ], - custom_tests = [ - (conf.CheckLC_MESSAGES(), - 'HAVE_LC_MESSAGES', - 'Define if your file defines LC_MESSAGES.' - ), - (conf.CheckIconvConst(), - 'ICONV_CONST', - 'Define as const if the declaration of iconv() needs const.', - '#define ICONV_CONST const', - '#define ICONV_CONST', - ), - (conf.CheckType('intmax_t', includes='#include ') or \ - conf.CheckType('intmax_t', includes='#include '), - 'HAVE_INTMAX_T', - "Define to 1 if you have the `intmax_t' type." - ), - (env.has_key('nls') and env['nls'], - 'ENABLE_NLS', - "Define to 1 if translation of program messages to the user's native anguage is requested.", - ), - ], - extra_items = [ - ('#define HAVE_ICONV 1', 'Define if iconv or libiconv is found'), - ('#define SIZEOF_WCHAR_T %d' % sizeof_wchar_t, - 'Define to be the size of type wchar_t'), - ], - config_post = '#endif' - ) - - # these keys are needed in env - for key in ['HAVE_ASPRINTF', 'HAVE_WPRINTF', 'HAVE_SNPRINTF', \ - 'HAVE_POSIX_PRINTF', 'HAVE_LIBC']: - # USE_ASPELL etc does not go through result - if result.has_key(key): - env[key] = result[key] - - -# this looks misplaced, but intl/libintl.h is needed by src/message.C -if env['nls'] and included_gettext: - # libgnuintl.h.in => libintl.h - env.Depends('$TOP_SRCDIR/intl/libintl.h', '$BUILDDIR/intl/config.h') - env.substFile('$BUILDDIR/intl/libintl.h', '$TOP_SRCDIR/intl/libgnuintl.h.in') - env.Command('$BUILDDIR/intl/libgnuintl.h', '$BUILDDIR/intl/libintl.h', - [Copy('$TARGET', '$SOURCE')]) - -# -# Finish auto-configuration -env = conf.Finish() - -#---------------------------------------------------------- -# Now set up our build process accordingly -#---------------------------------------------------------- - -if env['ICONV_LIB'] is None: - system_libs = [] -else: - system_libs = [env['ICONV_LIB']] -if platform_name in ['win32', 'cygwin']: - # the final link step needs stdc++ to succeed under mingw - # FIXME: shouldn't g++ automatically link to stdc++? - if use_vc: - system_libs += ['ole32', 'shlwapi', 'psapi', 'shell32', 'advapi32'] - else: - system_libs += ['shlwapi', 'psapi', 'stdc++', 'z'] -elif platform_name == 'cygwin' and env['X11']: - system_libs += ['GL', 'Xmu', 'Xi', 'Xrender', 'Xrandr', - 'Xcursor', 'Xft', 'freetype', 'fontconfig', 'Xext', 'X11', 'SM', 'ICE', - 'resolv', 'pthread', 'z'] -else: - system_libs += ['z'] - -libs = [ - ('HAVE_LIBGDI32', 'gdi32'), - ('HAVE_LIBAIKSAURUS', env['AIKSAURUS_LIB']), - ('USE_ASPELL', aspell_lib), - ('USE_ENCHANT', 'enchant'), - ('USE_HUNSPELL', hunspell_lib) -] - -for lib in libs: - if env[lib[0]]: - system_libs.append(lib[1]) - -# -# Build parameters CPPPATH etc -# -if env['X11']: - env.AppendUnique(LIBPATH = ['/usr/X11R6/lib']) - -# -# boost: for boost header files -# BUILDDIR/src: for config.h -# TOP_SRCDIR/src: for support/* etc -# -env['CPPPATH'] += ['$BUILDDIR/src', '$TOP_SRCDIR/src'] -# -# Separating boost directories from CPPPATH stops scons from building -# the dependency tree for boost header files, and effectively reduce -# the null build time of lyx from 29s to 16s. Since lyx may tweak local -# boost headers, the following is not 100% safe. -# env.AppendUnique(CPPPATH = ['$BOOST_INC_PATH']) -env.PrependUnique(CCFLAGS = ['$INCPREFIX$BOOST_INC_PATH']) - -# for intl/config.h, intl/libintl.h and intl/libgnuintl.h -if env['nls'] and included_gettext: - env['CPPPATH'].append('$BUILDDIR/intl') -# - -# -# A Link script for cygwin see -# http://www.cygwin.com/ml/cygwin/2004-09/msg01101.html -# http://www.cygwin.com/ml/cygwin-apps/2004-09/msg00309.html -# for details -# -if platform_name == 'cygwin': - ld_script_path = '/tmp' - ld_script = utils.installCygwinLDScript(ld_script_path) - env.AppendUnique(LINKFLAGS = ['-Wl,--enable-runtime-pseudo-reloc', - '-Wl,--script,%s' % ld_script, '-Wl,-s']) - - -#--------------------------------------------------------- -# Frontend related variables (QTDIR etc) -#--------------------------------------------------------- - -# -# create a separate environment so that other files do not have -# to be built with all the include directories etc -# -if frontend == 'qt4': - env['BUILDERS']['qtResource'] = Builder(action = utils.env_qtResource) - - # handle qt related user specified paths - # set environment so that moc etc can be found even if its path is not set properly - if env.has_key('qt_dir') and env['qt_dir']: - env['QTDIR'] = env['qt_dir'] - if os.path.isdir(os.path.join(env['qt_dir'], 'bin')): - os.environ['PATH'] += os.pathsep + os.path.join(env['qt_dir'], 'bin') - env.PrependENVPath('PATH', os.path.join(env['qt_dir'], 'bin')) - if os.path.isdir(os.path.join(env['qt_dir'], 'lib')): - env.PrependENVPath('PKG_CONFIG_PATH', os.path.join(env['qt_dir'], 'lib')) - - # if separate qt_lib_path is given - if env.has_key('qt_lib_path') and env['qt_lib_path']: - qt_lib_path = env.subst('$qt_lib_path') - env.AppendUnique(LIBPATH = [qt_lib_path]) - env.PrependENVPath('PKG_CONFIG_PATH', qt_lib_path) - else: - qt_lib_path = None - - # if separate qt_inc_path is given - if env.has_key('qt_inc_path') and env['qt_inc_path']: - qt_inc_path = env['qt_inc_path'] - else: - qt_inc_path = None - - # local qt4 toolset from - # http://www.iua.upf.es/~dgarcia/Codders/sconstools.html - # - # NOTE: I have to patch qt4.py since it does not automatically - # process .C file!!! (add to cxx_suffixes ) - # - env.Tool('qt4', [scons_dir]) - env['QT_AUTOSCAN'] = 0 - env['QT4_AUTOSCAN'] = 0 - env['QT4_UICDECLFLAGS'] = '-tr lyx::qt_' - if platform_name == 'win32': - env['QT4_MOCFROMHFLAGS'] = '-D_WIN32' - - if qt_lib_path is None: - qt_lib_path = os.path.join(env.subst('$QTDIR'), 'lib') - if qt_inc_path is None: - qt_inc_path = os.path.join(env.subst('$QTDIR'), 'include') - - - conf = Configure(env, - custom_tests = { - 'CheckPackage' : utils.checkPackage, - 'CheckCommand' : utils.checkCommand, - } - ) - - succ = False - # first: try pkg_config - if env['HAS_PKG_CONFIG']: - succ = conf.CheckPackage('QtCore') or conf.CheckPackage('QtCore4') - # FIXME: use pkg_config information? - #env['QT4_PKG_CONFIG'] = succ - # second: try to link to it - if not succ: - # Under linux, I can test the following perfectly - # Under windows, lib names need to passed as libXXX4.a ... - if platform_name == 'win32': - succ = conf.CheckLibWithHeader('QtCore4', 'QtGui/QApplication', 'c++', 'QApplication qapp();') - else: - succ = conf.CheckLibWithHeader('QtCore', 'QtGui/QApplication', 'c++', 'QApplication qapp();') - # still can not find it - if not succ: - print 'Did not find qt libraries, exiting!' - print 'Please check config.log for more information.' - Exit(1) - # - # Now, determine the correct suffix: - qt_libs = ['QtCore', 'QtGui'] - if platform_name == 'win32': - if mode == 'debug' and use_vc and \ - conf.CheckLibWithHeader('QtCored4', 'QtGui/QApplication', 'c++', 'QApplication qapp();'): - qt_lib_suffix = 'd4' - use_qt_debug_libs = True - else: - qt_lib_suffix = '4' - use_qt_debug_libs = False - else: - if mode == 'debug' and conf.CheckLibWithHeader('QtCore_debug', 'QtGui/QApplication', 'c++', 'QApplication qapp();'): - qt_lib_suffix = '_debug' - use_qt_debug_libs = True - else: - qt_lib_suffix = '' - use_qt_debug_libs = False - env.EnableQt4Modules(qt_libs, debug = (mode == 'debug' and use_qt_debug_libs)) - frontend_libs = [x + qt_lib_suffix for x in qt_libs] - qtcore_lib = ['QtCore' + qt_lib_suffix] - - # check uic and moc commands for qt frontends - if conf.CheckCommand('uic') == None or conf.CheckCommand('moc') == None: - print 'uic or moc command is not found for frontend', frontend - Exit(1) - - # if MSVC 2005 and 2008 is used, we will need to embed lyx.exe.manifest to lyx.exe - # for MSVC 2010 this is not necessary - #if use_vc: - # env['LINKCOM'] = [env['LINKCOM'], \ - # 'mt.exe /MANIFEST %s /outputresource:$TARGET;1' % \ - # env.File('$BUILDDIR/lyx.exe.manifest').path] - - env = conf.Finish() - -# -# Report results -# -print env['VERSION_INFO'] - -# -# Mingw command line may be too short for our link usage, -# Here we use a trick from scons wiki -# http://www.scons.org/cgi-sys/cgiwrap/scons/moin.cgi/LongCmdLinesOnWin32 -# -# I also would like to add logging (commands only) capacity to the -# spawn system. -logfile = env.get('logfile', default_log_file) -if logfile != '' or platform_name == 'win32': - import time - utils.setLoggedSpawn(env, logfile, longarg = (platform_name == 'win32'), - info = '''# This is a log of commands used by scons to build lyx -# Time: %s -# Command: %s -# Info: %s -''' % (time.asctime(), ' '.join(sys.argv), - env['VERSION_INFO'].replace('\n','\n# ')) ) - - -# Cleanup stuff -# -# -h will print out help info -Help(opts.GenerateHelpText(env)) - - -#---------------------------------------------------------- -# Start building -#---------------------------------------------------------- -# this has been the source of problems on some platforms... -# I find that I need to supply it with full path name -env.SConsignFile(os.path.join(Dir(env['BUILDDIR']).abspath, '.sconsign')) -# this usage needs further investigation. -#env.CacheDir('%s/Cache/%s' % (env['BUILDDIR'], frontend)) -env.VariantDir('$BUILDDIR/boost', '$TOP_SRCDIR/boost/libs', duplicate = 0) -env.VariantDir('$BUILDDIR/intl', '$TOP_SRCDIR/intl', duplicate = 0) -env.VariantDir('$BUILDDIR/src', '$TOP_SRCDIR/src', duplicate = 0) -env.VariantDir('$BUILDDIR/src', '$TOP_SRCDIR/src', duplicate = 0) - -print "Building all targets recursively" - -def libExists(libname): - ''' Check whether or not lib $LOCALLIBNAME/libname already exists''' - return os.path.isfile(File(env.subst('$LOCALLIBPATH/${LIBPREFIX}%s$LIBSUFFIX'%libname)).abspath) - - -if (included_boost and not libExists('included_boost_regex')) or 'boost' in BUILD_TARGETS: - # - # boost/libs - # - for lib in boost_libs: - boostlib = env.StaticLibrary( - target = '$LOCALLIBPATH/included_boost_%s' % lib, - source = ['$BUILDDIR/boost/%s/src/%s' % (lib, x) for x in eval('boost_libs_%s_src_files' % lib)], - # do not use global CPPPATH because src/config.h will mess up with boost/config.h - CPPPATH = ['$BUILDDIR/boost'] + extra_inc_paths, - CCFLAGS = ['$CCFLAGS', '$INCPREFIX$TOP_SRCDIR/boost', '-DBOOST_USER_CONFIG=""'] - ) - Alias('boost', boostlib) - - -if (included_gettext and not libExists('included_intl')) or 'intl' in BUILD_TARGETS: - # - # intl - # - INTL_CCFLAGS = [ - r'-DLOCALEDIR=\"' + env['LOCALEDIR'].replace('\\', '\\\\') + r'\"', - r'-DLOCALE_ALIAS_PATH=\"' + env['LOCALEDIR'].replace('\\', '\\\\') + r'\"', - r'-DLIBDIR=\"' + env['TOP_SRCDIR'].replace('\\', '\\\\') + r'/lib\"', - '-DIN_LIBINTL', - '-DENABLE_RELOCATABLE=1', - '-DIN_LIBRARY', - r'-DINSTALLDIR=\"' + prefix.replace('\\', '\\\\') + r'/lib\"', - '-DNO_XMALLOC', - '-Dset_relocation_prefix=libintl_set_relocation_prefix', - '-Drelocate=libintl_relocate', - '-DDEPENDS_ON_LIBICONV=1', - '-DHAVE_CONFIG_H' - ] - if use_vc: - INTL_CCFLAGS.extend(['/Dinline#', '/D__attribute__(x)#', '/Duintmax_t=UINT_MAX']) - - intl = env.StaticLibrary( - target = '$LOCALLIBPATH/included_intl', - LIBS = ['c'], - CCFLAGS = INTL_CCFLAGS, - # do not use global CPPPATH because src/config.h will mess up with intl/config.h - CPPPATH = ['$BUILDDIR/intl'] + extra_inc_paths, - source = ['$BUILDDIR/intl/%s' % x for x in intl_files] - ) - Alias('intl', intl) - -# -# src/support -# -env['QT4_MOCHPREFIX'] = 'moc_' -env['QT4_MOCHSUFFIX'] = '.cpp' - -support_moced_files = [env.Moc4('$BUILDDIR/src/support/%s' % x) - for x in src_support_header_files ] -support = env.StaticLibrary( - target = '$LOCALLIBPATH/support', - source = ['$BUILDDIR/src/support/%s' % x for x in src_support_files], - CCFLAGS = [ - '$CCFLAGS', - '-DHAVE_CONFIG_H', - '-DQT_NO_STL', - '-DQT_NO_KEYWORDS', - ], - CPPPATH = ['$CPPPATH', '$BUILDDIR/src/support'] -) -Alias('support', support) - -# -if env['HAVE_FCNTL']: - client = env.Program( - target = '$BUILDDIR/src/client/lyxclient', - LIBS = ['support'] + intl_libs + system_libs + - socket_libs + boost_libraries + qtcore_lib, - source = ['$BUILDDIR/src/client/%s' % x for x in src_client_files] + \ - utils.createResFromIcon(env, 'lyx.ico', '$LOCALLIBPATH/client.rc') - ) - Alias('client', env.Command(os.path.join('$BUILDDIR', os.path.split(str(client[0]))[1]), - client, [Copy('$TARGET', '$SOURCE')])) -else: - client = None -Alias('client', client) - - -# -# tex2lyx -# -for file in src_tex2lyx_copied_files + src_tex2lyx_copied_header_files: - env.Command('$BUILDDIR/src/tex2lyx/'+file, '$TOP_SRCDIR/src/'+file, - [Copy('$TARGET', '$SOURCE')]) - -tex2lyx = env.Program( - target = '$BUILDDIR/src/tex2lyx/tex2lyx', - LIBS = ['support'] + boost_libraries + intl_libs + system_libs + qtcore_lib, - source = ['$BUILDDIR/src/tex2lyx/%s' % x for x in src_tex2lyx_files + src_tex2lyx_copied_files] + \ - utils.createResFromIcon(env, 'lyx.ico', '$LOCALLIBPATH/tex2lyx.rc'), - CPPPATH = ['$BUILDDIR/src/tex2lyx', '$BUILDDIR/src', '$CPPPATH'], - LIBPATH = ['#$LOCALLIBPATH', '$LIBPATH'], - CCFLAGS = ['$CCFLAGS', '-DTEX2LYX'], -) -Alias('tex2lyx', env.Command(os.path.join('$BUILDDIR', os.path.split(str(tex2lyx[0]))[1]), - tex2lyx, [Copy('$TARGET', '$SOURCE')])) -Alias('tex2lyx', tex2lyx) - - -# -# Build lyx with given frontend -# -if env.has_key('USE_ASPELL') and env['USE_ASPELL']: - src_post_files.append('AspellChecker.cpp') - src_post_files.append('PersonalWordList.cpp') -elif env.has_key('USE_ENCHANT') and env['USE_ENCHANT']: - src_post_files.append('EnchantChecker.cpp') - src_post_files.append('PersonalWordList.cpp') -elif env.has_key('USE_HUNSPELL') and env['USE_HUNSPELL']: - src_post_files.append('HunspellChecker.cpp') - src_post_files.append('PersonalWordList.cpp') - -# tells scons how to get these moced files, although not all moced files are needed -# (or are actually generated). -qt4_moced_files = [env.Moc4('$BUILDDIR/src/frontends/qt4/%s' % x) - for x in src_frontends_qt4_header_files ] -src_moced_files = [env.Moc4('$BUILDDIR/src/%s' % x) - for x in src_header_files ] -ui_files = [env.Uic4('$BUILDDIR/src/frontends/qt4/ui/%s' % x.split('.')[0]) - for x in src_frontends_qt4_ui_files] -resource = env.Qrc(env.qtResource( - '$BUILDDIR/src/frontends/qt4/Resource.qrc', - ['$TOP_SRCDIR/lib/images/%s' % x for x in lib_images_files] + - ['$TOP_SRCDIR/lib/images/math/%s' % x for x in lib_images_math_files] + - ['$TOP_SRCDIR/lib/images/classic/%s' % x for x in lib_images_classic_files] + - ['$TOP_SRCDIR/lib/images/commands/%s' % x for x in lib_images_commands_files] + - ['$TOP_SRCDIR/lib/images/oxygen/%s' % x for x in lib_images_oxygen_files])) - -lyx = env.Program( - target = '$BUILDDIR/lyx', - source = ['$BUILDDIR/src/main.cpp'] + - ['$BUILDDIR/src/frontends/qt4/%s' % x for x in src_frontends_qt4_files] + - resource + - ['$BUILDDIR/src/graphics/%s' % x for x in src_graphics_files] + - ['$BUILDDIR/src/mathed/%s' % x for x in src_mathed_files] + - ['$BUILDDIR/src/insets/%s' % x for x in src_insets_files] + - ['$BUILDDIR/src/frontends/%s' % x for x in src_frontends_files] + - ['$BUILDDIR/src/%s' % x for x in src_pre_files] + - ["$BUILDDIR/src/%s" % x for x in src_post_files] + - utils.createResFromIcon(env, 'lyx.ico', '$LOCALLIBPATH/lyx.rc'), - CPPPATH = [ - '$CPPPATH', - '$BUILDDIR/src', - '$BUILDDIR/src/images', - '$BUILDDIR/src/frontends', - '$BUILDDIR/src/frontends/qt4', - '$BUILDDIR/src/frontends/qt4/ui', - ], - CCFLAGS = [ - '$CCFLAGS', - '-DHAVE_CONFIG_H', - '-DQT_NO_STL', - '-DQT_NO_KEYWORDS', - ], - LIBS = [ - 'support', - ] + - boost_libraries + - frontend_libs + - intl_libs + - socket_libs + - system_libs -) -Alias('lyx', lyx) - - -if use_vc and 'msvs_projects' in BUILD_TARGETS: - def build_project(target, full_target = None, src = [], inc = [], res = []): - ''' build mavs project files - target: alias (correspond to directory name) - full_target: full path/filename of the target - src: source files - inc: include files - res: resource files - - For non-debug-able targets like static libraries, target (alias) is - enough to build the target. For executable targets, msvs need to know - the full path to start debug them. - ''' - # project - proj = env.MSVSProject( - target = target + env['MSVSPROJECTSUFFIX'], - # this allows easy access to header files (along with source) - srcs = [env.subst(x) for x in src + inc], - incs = [env.subst('$TOP_SRCDIR/src/config.h')], - localincs = [env.subst(x) for x in inc], - resources = [env.subst(x) for x in res], - buildtarget = full_target, - variant = 'Debug' - ) - Alias('msvs_projects', proj) - # - build_project('client', src = ['$TOP_SRCDIR/src/client/%s' % x for x in src_client_files], - inc = ['$TOP_SRCDIR/src/client/%s' % x for x in src_client_header_files], - full_target = File(env.subst('$BUILDDIR/src/client/lyxclient$PROGSUFFIX')).abspath) - # - build_project('tex2lyx', src = ['$TOP_SRCDIR/src/tex2lyx/%s' % x for x in src_tex2lyx_files], - inc = ['$TOP_SRCDIR/src/tex2lyx/%s' % x for x in src_tex2lyx_header_files], - full_target = File(env.subst('$BUILDDIR/src/tex2lyx/tex2lyx$PROGSUFFIX')).abspath) - # - build_project('lyx', - src = ['$TOP_SRCDIR/src/%s' % x for x in src_pre_files + src_post_files + ['version.cpp']] + \ - ['$TOP_SRCDIR/src/support/%s' % x for x in src_support_files + ['Package.cpp'] ] + \ - ['$TOP_SRCDIR/src/mathed/%s' % x for x in src_mathed_files] + \ - ['$TOP_SRCDIR/src/insets/%s' % x for x in src_insets_files] + \ - ['$TOP_SRCDIR/src/frontends/%s' % x for x in src_frontends_files] + \ - ['$TOP_SRCDIR/src/graphics/%s' % x for x in src_graphics_files] + \ - ['$TOP_SRCDIR/src/frontends/qt4/%s' % x for x in src_frontends_qt4_files], - inc = ['$TOP_SRCDIR/src/%s' % x for x in src_header_files] + \ - ['$TOP_SRCDIR/src/support/%s' % x for x in src_support_header_files] + \ - ['$TOP_SRCDIR/src/mathed/%s' % x for x in src_mathed_header_files] + \ - ['$TOP_SRCDIR/src/insets/%s' % x for x in src_insets_header_files] + \ - ['$TOP_SRCDIR/src/frontends/%s' % x for x in src_frontends_header_files] + \ - ['$TOP_SRCDIR/src/graphics/%s' % x for x in src_graphics_header_files] + \ - ['$TOP_SRCDIR/src/frontends/qt4/%s' % x for x in src_frontends_qt4_header_files], - res = ['$TOP_SRCDIR/src/frontends/qt4/ui/%s' % x for x in src_frontends_qt4_ui_files], - full_target = File(env.subst('$BUILDDIR/lyx$PROGSUFFIX')).abspath) - - -if 'update_po' in BUILD_TARGETS: - # - # update po files - # - print 'Updating po/*.po files...' - - # whether or not update po files - if not env['XGETTEXT'] or not env['MSGMERGE'] or not env['MSGUNIQ']: - print 'xgettext or msgmerge does not exist. Cannot merge po files' - Exit(1) - # rebuild POTFILES.in - POTFILES_in = env.potfiles('$TOP_SRCDIR/po/POTFILES.in', - ['$TOP_SRCDIR/src/%s' % x for x in src_header_files + src_pre_files + src_post_files + \ - src_extra_src_files] + \ - ['$TOP_SRCDIR/src/support/%s' % x for x in src_support_header_files + src_support_files + \ - src_support_extra_header_files + src_support_extra_src_files] + \ - ['$TOP_SRCDIR/src/mathed/%s' % x for x in src_mathed_header_files + src_mathed_files] + \ - ['$TOP_SRCDIR/src/insets/%s' % x for x in src_insets_header_files + src_insets_files] + \ - ['$TOP_SRCDIR/src/frontends/%s' % x for x in src_frontends_header_files + src_frontends_files] + \ - ['$TOP_SRCDIR/src/graphics/%s' % x for x in src_graphics_header_files + src_graphics_files] + \ - ['$TOP_SRCDIR/src/frontends/qt4/%s' % x for x in src_frontends_qt4_header_files + src_frontends_qt4_files] + \ - ['$TOP_SRCDIR/src/client/%s' % x for x in src_client_header_files + src_client_files ] + \ - ['$TOP_SRCDIR/src/tex2lyx/%s' % x for x in src_tex2lyx_header_files + src_tex2lyx_files ] - ) - Alias('update_po', POTFILES_in) - # build language_l10n.pot, encodings_10n.pot, ui_l10n.pot, layouts_l10n.pot, qt4_l10n.pot, external_l10n, formats_l10n - # and combine them to lyx.po - env['LYX_POT'] = 'python $TOP_SRCDIR/po/lyx_pot.py' - lyx_po = env.Command('$BUILDDIR/po/lyx.po', - env.Command('$BUILDDIR/po/all.po', - [env.Command('$BUILDDIR/po/qt4_l10n.pot', - ['$TOP_SRCDIR/src/frontends/qt4/ui/%s' % x for x in src_frontends_qt4_ui_files], - '$LYX_POT -b $TOP_SRCDIR -t qt4 -o $TARGET $SOURCES'), - env.Command('$BUILDDIR/po/layouts_l10n.pot', - ['$TOP_SRCDIR/lib/layouts/%s' % x for x in lib_layouts_files + lib_layouts_inc_files + lib_layouts_module_files], - '$LYX_POT -b $TOP_SRCDIR -t layouts -o $TARGET $SOURCES'), - env.Command('$BUILDDIR/po/languages_l10n.pot', '$TOP_SRCDIR/lib/languages', - '$LYX_POT -b $TOP_SRCDIR -t languages -o $TARGET $SOURCES'), - env.Command('$BUILDDIR/po/encodings_l10n.pot', '$TOP_SRCDIR/lib/encodings', - '$LYX_POT -b $TOP_SRCDIR -t encodings -o $TARGET $SOURCES'), - env.Command('$BUILDDIR/po/ui_l10n.pot', - ['$TOP_SRCDIR/lib/ui/%s' % x for x in lib_ui_files], - '$LYX_POT -b $TOP_SRCDIR -t ui -o $TARGET $SOURCES'), - env.Command('$BUILDDIR/po/external_l10n.pot', '$TOP_SRCDIR/lib/external_templates', - '$LYX_POT -b $TOP_SRCDIR -t external -o $TARGET $SOURCES'), - env.Command('$BUILDDIR/po/formats_l10n.pot', '$TOP_SRCDIR/lib/configure.py', - '$LYX_POT -b $TOP_SRCDIR -t formats -o $TARGET $SOURCES'), - ], utils.env_cat), - ['$MSGUNIQ -o $TARGET $SOURCE', - '''$XGETTEXT --default-domain=${TARGET.base} \ - --directory=$TOP_SRCDIR --add-comments=TRANSLATORS: \ - --language=C++ --join-existing \ - --keyword=_ --keyword=N_ --keyword=B_ --keyword=qt_ \ - --files-from=$TOP_SRCDIR/po/POTFILES.in \ - --copyright-holder="LyX Developers" \ - --msgid-bugs-address="lyx-devel@lists.lyx.org" '''] - ) - env.Depends(lyx_po, POTFILES_in) - # copy lyx.po to lyx.pot - lyx_pot = env.Command('$BUILDDIR/po/lyx.pot', lyx_po, - Copy('$TARGET', '$SOURCE')) - # - import glob - # files to translate - transfiles = glob.glob(os.path.join(env.Dir('$TOP_SRCDIR/po').abspath, '*.po')) - # possibly *only* handle these languages - languages = None - if env.has_key('languages'): - languages = env.make_list(env['languages']) - # merge. if I use lan.po as $TARGET, it will be removed - # before it is merged. In this builder, - # $BUILDDIR/po/lang.po is merged from po/lang.po and $BUILDDIR/po/lyx.pot - # and is copied to po/lang.po - env['BUILDERS']['msgmerge'] = Builder(action=[ - '$MSGMERGE $TOP_SRCDIR/po/${TARGET.filebase}.po $SOURCE -o $TARGET', - Copy('$TOP_SRCDIR/po/${TARGET.filebase}.po', '$TARGET')] - ) - # for each po file, generate pot - for po_file in transfiles: - # get filename - fname = os.path.split(po_file)[1] - # country code - country = fname.split('.')[0] - # - if not languages or country in languages: - # merge po files, the generated lan.po_new file is copied to lan.po file. - po = env.msgmerge('$BUILDDIR/po/%s.po' % country, lyx_pot) - env.Depends(po, POTFILES_in) - Alias('update_po', po) - - -# if 'install' is not in the target, do not process this -if 'install' in BUILD_TARGETS or 'installer' in BUILD_TARGETS: - # - # this part is a bit messy right now. Since scons will provide - # --DESTDIR option soon, at least the dest_dir handling can be - # removed later. - # - # - # po/ - # - import glob - # handle po files - # - # files to translate - transfiles = glob.glob(os.path.join(env.subst('$TOP_SRCDIR'), 'po', '*.po')) - # possibly *only* handle these languages - languages = None - if env.has_key('languages'): - languages = env.make_list(env['lanauges']) - # use default msgfmt - gmo_files = [] - if not env['MSGFMT']: - print 'msgfmt does not exist. Can not process po files' - else: - # create a builder - env['BUILDERS']['Transfiles'] = Builder(action='$MSGFMT $SOURCE -c --statistics -o $TARGET',suffix='.gmo',src_suffix='.po') - # - for f in transfiles: - # get filename - fname = os.path.split(f)[1] - # country code - country = fname.split('.')[0] - # - if not languages or country in languages: - gmo_files.extend(env.Transfiles(f)) - # how to join dest_dir and prefix - def joinPaths(path1, path2): - ''' join path1 and path2, do not use os.path.join because - under window, c:\destdir\d:\program is invalid ''' - if path1 == '': - return os.path.normpath(path2) - # separate drive letter - (drive, path) = os.path.splitdrive(os.path.normpath(path2)) - # ignore drive letter, so c:\destdir + c:\program = c:\destdir\program - return os.path.join(os.path.normpath(path1), path[1:]) - # - # install to dest_dir/prefix - dest_dir = env.get('DESTDIR', '') - dest_prefix_dir = joinPaths(dest_dir, env.Dir(prefix).abspath) - # create the directory if needed - if not os.path.isdir(dest_prefix_dir): - try: - os.makedirs(dest_prefix_dir) - except: - pass - if not os.path.isdir(dest_prefix_dir): - print 'Can not create directory', dest_prefix_dir - Exit(3) - # - if env.has_key('exec_prefix'): - bin_dest_dir = joinPaths(dest_dir, Dir(env['exec_prefix']).abspath) - else: - bin_dest_dir = os.path.join(dest_prefix_dir, 'bin') - if add_suffix: - share_dest_dir = os.path.join(dest_prefix_dir, share_dir + program_suffix) - else: - share_dest_dir = os.path.join(dest_prefix_dir, share_dir) - man_dest_dir = os.path.join(dest_prefix_dir, man_dir) - locale_dest_dir = os.path.join(dest_prefix_dir, locale_dir) - env['LYX2LYX_DEST'] = os.path.join(share_dest_dir, 'lyx2lyx') - # - import glob - # - # install executables (lyxclient may be None) - # - if add_suffix: - version_suffix = program_suffix - else: - version_suffix = '' - # - # install lyx, if in release mode, try to strip the binary - if env.has_key('STRIP') and env['STRIP'] is not None and mode != 'debug': - # create a builder to strip and install - env['BUILDERS']['StripInstallAs'] = Builder(action='$STRIP $SOURCE -o $TARGET') - - # install executables - for (name, obj) in (('lyx', lyx), ('tex2lyx', tex2lyx), ('client', client)): - if obj is None: - continue - target_name = os.path.split(str(obj[0]))[1].replace(name, '%s%s' % (name, version_suffix)) - target = os.path.join(bin_dest_dir, target_name) - if env['BUILDERS'].has_key('StripInstallAs'): - env.StripInstallAs(target, obj) - else: - env.InstallAs(target, obj) - Alias('install', target) - - # share/lyx - dirs = [] - for (dir,files) in [ - ('.', lib_files), - ('bind', lib_bind_files), - ('bind/de', lib_bind_de_files), - ('commands', lib_commands_files), - ('doc', lib_doc_files), - ('doc/biblio', lib_doc_biblio_files), - ('doc/clipart', lib_doc_clipart_files), - ('doc/ca', lib_doc_ca_files), - ('doc/cs', lib_doc_cs_files), - ('doc/da', lib_doc_da_files), - ('doc/de', lib_doc_de_files), - ('doc/de/clipart', lib_doc_de_clipart_files), - ('doc/el', lib_doc_el_files), - ('doc/es', lib_doc_es_files), - ('doc/es/clipart', lib_doc_es_clipart_files), - ('doc/eu', lib_doc_eu_files), - ('doc/fr', lib_doc_fr_files), - ('doc/fr/clipart', lib_doc_fr_clipart_files), - ('doc/gl', lib_doc_gl_files), - ('doc/he', lib_doc_he_files), - ('doc/hu', lib_doc_hu_files), - ('doc/id', lib_doc_id_files), - ('doc/id/clipart', lib_doc_id_clipart_files), - ('doc/it', lib_doc_it_files), - ('doc/it/clipart', lib_doc_it_clipart_files), - ('doc/ja', lib_doc_ja_files), - ('doc/ja/clipart', lib_doc_ja_clipart_files), - ('doc/nl', lib_doc_nl_files), - ('doc/nb', lib_doc_nb_files), - ('doc/pl', lib_doc_pl_files), - ('doc/pt', lib_doc_pt_files), - ('doc/ro', lib_doc_ro_files), - ('doc/ru', lib_doc_ru_files), - ('doc/sk', lib_doc_sk_files), - ('doc/sl', lib_doc_sl_files), - ('doc/sv', lib_doc_sv_files), - ('doc/uk', lib_doc_uk_files), - ('doc/uk/clipart', lib_doc_uk_clipart_files), - ('doc/zh_CN', lib_doc_zhCN_files), - ('examples', lib_examples_files), - ('examples/ca', lib_examples_ca_files), - ('examples/cs', lib_examples_cs_files), - ('examples/da', lib_examples_da_files), - ('examples/de', lib_examples_de_files), - ('examples/el', lib_examples_el_files), - ('examples/es', lib_examples_es_files), - ('examples/eu', lib_examples_eu_files), - ('examples/fa', lib_examples_fa_files), - ('examples/fr', lib_examples_fr_files), - ('examples/gl', lib_examples_gl_files), - ('examples/he', lib_examples_he_files), - ('examples/hu', lib_examples_hu_files), - ('examples/id', lib_examples_id_files), - ('examples/it', lib_examples_it_files), - ('examples/ja', lib_examples_ja_files), - ('examples/nl', lib_examples_nl_files), - ('examples/pl', lib_examples_pl_files), - ('examples/pt', lib_examples_pt_files), - ('examples/ro', lib_examples_ro_files), - ('examples/ru', lib_examples_ru_files), - ('examples/sk', lib_examples_sk_files), - ('examples/sl', lib_examples_sl_files), - ('examples/sr', lib_examples_sr_files), - ('examples/sv', lib_examples_sv_files), - ('examples/uk', lib_examples_uk_files), - ('fonts', lib_fonts_files), - ('images', lib_images_files), - ('images/math', lib_images_math_files), - ('images/classic', lib_images_classic_files), - ('images/commands', lib_images_commands_files), - ('images/oxygen', lib_images_oxygen_files), - ('kbd', lib_kbd_files), - ('layouts', lib_layouts_files + lib_layouts_inc_files + lib_layouts_module_files), - ('lyx2lyx', lib_lyx2lyx_files), - ('scripts', lib_scripts_files), - ('templates', lib_templates_files), - ('templates/springer', lib_templates_springer_files), - ('templates/thesis', lib_templates_thesis_files), - ('tex', lib_tex_files), - ('ui', lib_ui_files)]: - dirs.append(env.Install(os.path.join(share_dest_dir, dir), - [env.subst('$TOP_SRCDIR/lib/%s/%s' % (dir, file)) for file in files])) - Alias('install', dirs) - - # subst and install lyx2lyx_version.py which is not in scons_manifest.py - env.Depends(share_dest_dir + '/lyx2lyx/lyx2lyx_version.py', '$BUILDDIR/src/config.h') - env.substFile(share_dest_dir + '/lyx2lyx/lyx2lyx_version.py', - '$TOP_SRCDIR/lib/lyx2lyx/lyx2lyx_version.py.in') - Alias('install', share_dest_dir + '/lyx2lyx/lyx2lyx_version.py') - sys.path.append(share_dest_dir + '/lyx2lyx') - - if platform_name == 'cygwin': - # cygwin packaging requires a file /usr/share/doc/Cygwin/foot-vendor-suffix.README - Cygwin_README = os.path.join(dest_prefix_dir, 'share', 'doc', 'Cygwin', - '%s-%s.README' % (package, package_cygwin_version)) - env.InstallAs(Cygwin_README, - os.path.join(env.subst('$TOP_SRCDIR'), 'README.cygwin')) - Alias('install', Cygwin_README) - # also a directory /usr/share/doc/lyx for README etc - Cygwin_Doc = os.path.join(dest_prefix_dir, 'share', 'doc', package) - env.Install(Cygwin_Doc, [os.path.join(env.subst('$TOP_SRCDIR'), x) for x in \ - ['INSTALL', 'README', 'README.Cygwin', 'RELEASE-NOTES', 'COPYING', 'ANNOUNCE']]) - Alias('install', Cygwin_Doc) - # cygwin fonts also need to be installed - Cygwin_fonts = os.path.join(share_dest_dir, 'fonts') - env.Install(Cygwin_fonts, - [env.subst('$TOP_SRCDIR/development/Win32/packaging/bakoma/%s' % file) \ - for file in win32_bakoma_fonts]) - Alias('install', Cygwin_fonts) - # we also need a post installation script - tmp_script = utils.installCygwinPostinstallScript('/tmp') - postinstall_path = os.path.join(dest_dir, 'etc', 'postinstall') - env.Install(postinstall_path, tmp_script) - Alias('install', postinstall_path) - # man - env.InstallAs(os.path.join(man_dest_dir, 'lyx' + version_suffix + '.1'), - env.subst('$TOP_SRCDIR/lyx.1in')) - env.InstallAs(os.path.join(man_dest_dir, 'tex2lyx' + version_suffix + '.1'), - env.subst('$TOP_SRCDIR/src/tex2lyx/tex2lyx.1in')) - env.InstallAs(os.path.join(man_dest_dir, 'lyxclient' + version_suffix + '.1'), - env.subst('$TOP_SRCDIR/src/client/lyxclient.1in')) - Alias('install', [os.path.join(man_dest_dir, x + version_suffix + '.1') for - x in ['lyx', 'tex2lyx', 'lyxclient']]) - # locale files? - # ru.gmo ==> ru/LC_MESSAGES/lyxSUFFIX.mo - for gmo in gmo_files: - lan = os.path.split(str(gmo))[1].split('.')[0] - dest_file = os.path.join(locale_dest_dir, lan, 'LC_MESSAGES', 'lyx' + program_suffix + '.mo') - env.InstallAs(dest_file, gmo) - Alias('install', dest_file) - - -if 'installer' in BUILD_TARGETS: - # - # build windows installer using NSIS - # - # NOTE: - # There is a nsis builder on scons wiki but it does not work with - # our lyx.nsi because it does not dig through all the include directives - # and find the dependencies automatically. Also, it can not parse - # OutFile in lyx.nsi since it is defined as SETUP_EXE which is in turn - # something rely on date. - # Because of this, I am doing a simple nsis builder here. - if platform_name != 'win32': - print 'installer target is only available for windows platform' - Exit(1) - if mode != 'release': - print 'installer has to be built in release mode (use option mode=release)' - Exit(1) - installer_files = ['$TOP_SRCDIR/development/Win32/packaging/installer/%s' \ - % x for x in development_Win32_packaging_installer] + \ - ['$TOP_SRCDIR/development/Win32/packaging/installer/graphics/%s' \ - % x for x in development_Win32_packaging_installer_graphics] + \ - ['$TOP_SRCDIR/development/Win32/packaging/installer/gui/%s' \ - % x for x in development_Win32_packaging_installer_gui] + \ - ['$TOP_SRCDIR/development/Win32/packaging/installer/include/%s' \ - % x for x in development_Win32_packaging_installer_include] + \ - ['$TOP_SRCDIR/development/Win32/packaging/installer/lang/%s' \ - % x for x in development_Win32_packaging_installer_lang] + \ - ['$TOP_SRCDIR/development/Win32/packaging/installer/setup/%s' \ - % x for x in development_Win32_packaging_installer_setup] - if env.has_key('NSIS') and env['NSIS'] is not None: - # create a builder to strip and install - env['BUILDERS']['installer'] = Builder(generator=utils.env_nsis) - else: - print 'No nsis compiler is found. Existing...' - Exit(2) - if not env.has_key('win_installer') or env['win_installer'] is None: - if devel_version: - 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.Dir('$deps_dir').abspath): - print 'Development dependency package is not found.' - Exit(1) - else: - env['deps_dir'] = env.Dir('$deps_dir').abspath - # build bundle? - if env.has_key('bundle_dir') and os.path.isdir(env.Dir('$bundle_dir').abspath): - env['bundle_dir'] = env.Dir('$bundle_dir').abspath - elif os.path.isdir(os.path.join(env.Dir('$TOP_SRCDIR').abspath, 'lyx-windows-bundle-deps')): - env['bundle_dir'] = os.path.join(env.Dir('$TOP_SRCDIR').abspath, 'lyx-windows-bundle-deps') - else: - env['bundle_dir'] = None - # 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'], - 'BundleExeFile':env['win_installer'].replace('.exe', '-bundle.exe'), - 'FilesLyx':env.Dir(dest_prefix_dir).abspath, - 'FilesDeps':env['deps_dir'], - 'FilesBundle':env['bundle_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, 'install') - env.Depends(installer, installer_files) - env.Alias('installer', installer) - # also generate bundle? - if env.has_key('bundle') and env['bundle']: - if env['bundle_dir'] is None or not os.path.isdir(env['bundle_dir']): - print 'Bundle directory does not exist (default to %s\lyx-windows-bundle-deps.' % env.Dir('$TOP_SRCDIR').abspath - print 'Use bundle_dir option to specify' - Exit(1) - # generator of the builder will add bundle stuff depending on output name - bundle_installer = env.installer(env['win_installer'].replace('.exe', '-bundle.exe'), - '$TOP_SRCDIR/development/Win32/packaging/installer/lyx.nsi') - env.Depends(bundle_installer, 'install') - env.Depends(bundle_installer, installer_files) - env.Alias('installer', bundle_installer) - -Default('lyx') -Alias('all', ['lyx', 'client', 'tex2lyx']) diff --git a/development/scons/build_msvc.bat b/development/scons/build_msvc.bat deleted file mode 100644 index 49e4ffbbfe..0000000000 --- a/development/scons/build_msvc.bat +++ /dev/null @@ -1 +0,0 @@ -call scons install prefix=..\..\build-msvc use_vc=yes spell=hunspell frontend=qt4 mode=release version_suffix=21 gettext=system nls=yes extra_inc_path=..\..\lyx-windows-deps-msvc2010\include extra_lib_path=..\..\lyx-windows-deps-msvc2010\lib extra_bin_path=..\..\lyx-windows-deps-msvc2010\bin qt_dir=..\..\..\..\Qt \ No newline at end of file diff --git a/development/scons/build_msvs_debug.bat b/development/scons/build_msvs_debug.bat deleted file mode 100644 index 2c94b27f5a..0000000000 --- a/development/scons/build_msvs_debug.bat +++ /dev/null @@ -1,2 +0,0 @@ -call scons install prefix=..\..\build-msvc use_vc=yes frontend=qt4 mode=debug version_suffix=20 gettext=system nls=yes extra_inc_path=..\..\lyx-windows-deps-msvc2008\include extra_lib_path=..\..\lyx-windows-deps-msvc2008\lib extra_bin_path=..\..\lyx-windows-deps-msvc2008\bin qt_dir=..\..\lyx-windows-deps-msvc2008\qt-4 -call scons msvs_projects \ No newline at end of file diff --git a/development/scons/qt4.py b/development/scons/qt4.py deleted file mode 100644 index c140992f4c..0000000000 --- a/development/scons/qt4.py +++ /dev/null @@ -1,373 +0,0 @@ -import re -import os.path - -import SCons.Defaults -import SCons.Tool -import SCons.Util - - -class ToolQtWarning(SCons.Warnings.Warning): - pass -class GeneratedMocFileNotIncluded(ToolQtWarning): - pass -class QtdirNotFound(ToolQtWarning): - pass -SCons.Warnings.enableWarningClass(ToolQtWarning) - -qrcinclude_re = re.compile(r'([^<]*)', re.M) - - -header_extensions = [".h", ".hxx", ".hpp", ".hh"] -if SCons.Util.case_sensitive_suffixes('.h', '.H'): - header_extensions.append('.H') -#cplusplus = __import__('c++', globals(), locals(), ['Scons.Tools']) -#cxx_suffixes = cplusplus.CXXSuffixes -cxx_suffixes = [".C", ".c", ".cxx", ".cpp", ".cc"] - -def _checkMocIncluded(target, source, env): - moc = target[0] - cpp = source[0] - # looks like cpp.includes is cleared before the build stage :-( - # not really sure about the path transformations (moc.cwd? cpp.cwd?) :-/ - path = SCons.Defaults.CScan.path_function(env, moc.cwd) - includes = SCons.Defaults.CScan(cpp, env, path) - if not moc in includes: - SCons.Warnings.warn( - GeneratedMocFileNotIncluded, - "Generated moc file '%s' is not included by '%s'" % - (str(moc), str(cpp))) - -def _find_file(filename, paths, node_factory): - retval = None - for dir in paths: - node = node_factory(filename, dir) - if node.rexists(): - return node - return None - -class _Automoc: - """ - Callable class, which works as an emitter for Programs, SharedLibraries and - StaticLibraries. - """ - - def __init__(self, objBuilderName): - self.objBuilderName = objBuilderName - - def __call__(self, target, source, env): - """ - Smart autoscan function. Gets the list of objects for the Program - or Lib. Adds objects and builders for the special qt files. - """ - try: - if int(env.subst('$QT_AUTOSCAN')) == 0: - return target, source - except ValueError: - pass - try: - debug = int(env.subst('$QT_DEBUG')) - except ValueError: - debug = 0 - - # some shortcuts used in the scanner - FS = SCons.Node.FS.default_fs - splitext = SCons.Util.splitext - objBuilder = getattr(env, self.objBuilderName) - - # some regular expressions: - # Q_OBJECT detection - q_object_search = re.compile(r'[^A-Za-z0-9]Q_OBJECT[^A-Za-z0-9]') - # cxx and c comment 'eater' - #comment = re.compile(r'(//.*)|(/\*(([^*])|(\*[^/]))*\*/)') - # CW: something must be wrong with the regexp. See also bug #998222 - # CURRENTLY THERE IS NO TEST CASE FOR THAT - - # The following is kind of hacky to get builders working properly (FIXME) - objBuilderEnv = objBuilder.env - objBuilder.env = env - mocBuilderEnv = env.Moc4.env - env.Moc4.env = env - - # make a deep copy for the result; MocH objects will be appended - out_sources = source[:] - - for obj in source: - if not obj.has_builder(): - # binary obj file provided - if debug: - print "scons: qt: '%s' seems to be a binary. Discarded." % str(obj) - continue - cpp = obj.sources[0] - if not splitext(str(cpp))[1] in cxx_suffixes: - if debug: - print "scons: qt: '%s' is no cxx file. Discarded." % str(cpp) - # c or fortran source - continue - #cpp_contents = comment.sub('', cpp.get_contents()) - cpp_contents = cpp.get_contents() - h=None - for h_ext in header_extensions: - # try to find the header file in the corresponding source - # directory - hname = splitext(cpp.name)[0] + h_ext - h = _find_file(hname, - (cpp.get_dir(),), - FS.File) - if h: - if debug: - print "scons: qt: Scanning '%s' (header of '%s')" % (str(h), str(cpp)) - #h_contents = comment.sub('', h.get_contents()) - h_contents = h.get_contents() - break - if not h and debug: - print "scons: qt: no header for '%s'." % (str(cpp)) - if h and q_object_search.search(h_contents): - # h file with the Q_OBJECT macro found -> add moc_cpp - moc_cpp = env.Moc4(h) - moc_o = objBuilder(moc_cpp) - out_sources.append(moc_o) - #moc_cpp.target_scanner = SCons.Defaults.CScan - if debug: - print "scons: qt: found Q_OBJECT macro in '%s', moc'ing to '%s'" % (str(h), str(moc_cpp)) - if cpp and q_object_search.search(cpp_contents): - # cpp file with Q_OBJECT macro found -> add moc - # (to be included in cpp) - moc = env.Moc4(cpp) - env.Ignore(moc, moc) - if debug: - print "scons: qt: found Q_OBJECT macro in '%s', moc'ing to '%s'" % (str(cpp), str(moc)) - #moc.source_scanner = SCons.Defaults.CScan - # restore the original env attributes (FIXME) - objBuilder.env = objBuilderEnv - env.Moc4.env = mocBuilderEnv - - return (target, out_sources) - -AutomocShared = _Automoc('SharedObject') -AutomocStatic = _Automoc('StaticObject') - -def _detect(env): - """Not really safe, but fast method to detect the QT library""" - - QTDIR = env.get('QTDIR',None) - if QTDIR!=None : return QTDIR - - QTDIR = os.environ.get('QTDIR',None) - if QTDIR!=None : return QTDIR - - moc = env.WhereIs('moc-qt4') or env.WhereIs('moc') - if moc: - SCons.Warnings.warn( - QtdirNotFound, - "QTDIR variable is not defined, using moc executable as a hint (QTDIR=%s)" % QTDIR) - return os.path.dirname(os.path.dirname(moc)) - - SCons.Warnings.warn( - QtdirNotFound, - "Could not detect qt, using empty QTDIR") - return None - -def generate(env): - """Add Builders and construction variables for qt to an Environment.""" - - print "Loading qt4 tool..." - - def locateQt4Command(env, command, qtdir) : - fullpath1 = os.path.join(qtdir,'bin',command +'-qt4') - if os.access(fullpath1, os.X_OK) or \ - os.access(fullpath1+".exe", os.X_OK): - return fullpath1 - fullpath2 = os.path.join(qtdir,'bin',command) - if os.access(fullpath2, os.X_OK) or \ - os.access(fullpath2+".exe", os.X_OK): - return fullpath2 - fullpath = env.Detect([command+'-qt4', command]) - if not (fullpath is None) : return fullpath - raise "Qt4 command '" + command + "' not found. Tried: " + fullpath1 + " and "+ fullpath2 - - - CLVar = SCons.Util.CLVar - Action = SCons.Action.Action - Builder = SCons.Builder.Builder - splitext = SCons.Util.splitext - - # the basics - env['QTDIR'] = _detect(env) - env['QT4_MOC'] = locateQt4Command(env,'moc', env['QTDIR']) - env['QT4_UIC'] = locateQt4Command(env,'uic', env['QTDIR']) - env['QT4_RCC'] = locateQt4Command(env,'rcc', env['QTDIR']) - env['QT4_LUPDATE'] = locateQt4Command(env,'lupdate', env['QTDIR']) - env['QT4_LRELEASE'] = locateQt4Command(env,'lrelease', env['QTDIR']) - - # Should the qt tool try to figure out, which sources are to be moc'ed ? - env['QT4_AUTOSCAN'] = 1 - - # Some QT specific flags. I don't expect someone wants to - # manipulate those ... - env['QT4_UICDECLFLAGS'] = CLVar('') - env['QT4_MOCFROMHFLAGS'] = CLVar('') - env['QT4_MOCFROMCXXFLAGS'] = CLVar('-i') - env['QT4_QRCFLAGS'] = '-name Resources' - - # suffixes/prefixes for the headers / sources to generate - env['QT4_MOCHPREFIX'] = '' - env['QT4_MOCHSUFFIX'] = '$CXXFILESUFFIX' - env['QT4_MOCCXXPREFIX'] = 'moc_' - env['QT4_MOCCXXSUFFIX'] = '.moc' - env['QT4_UISUFFIX'] = '.ui' - env['QT4_UICDECLPREFIX'] = 'ui_' - env['QT4_UICDECLSUFFIX'] = '.h' - env['QT4_QRCSUFFIX'] = '.qrc', - env['QT4_QRCCXXSUFFIX'] = '$CXXFILESUFFIX' - env['QT4_QRCCXXPREFIX'] = 'qrc_' - - env['QT4_LIB'] = '' # KLUDGE to avoid linking qt3 library - - # Translation builder - tsbuilder = Builder( - action ='$QT4_LUPDATE $SOURCES -ts $TARGETS', - multi=1 - ) - env.Append( BUILDERS = { 'Ts': tsbuilder } ) - qmbuilder = Builder( - action =[ - '$QT4_LRELEASE $SOURCE', - ], - src_suffix = '.ts', - suffix = '.qm', - single_source = True - ) - env.Append( BUILDERS = { 'Qm': qmbuilder } ) - - # Resource builder - def scanResources(node, env, path, arg): - contents = node.get_contents() - includes = qrcinclude_re.findall(contents) - return includes - qrcscanner = env.Scanner(name = 'qrcfile', - function = scanResources, - argument = None, - skeys = ['.qrc']) - qrcbuilder = Builder( - action ='$QT4_RCC $QT4_QRCFLAGS $SOURCE -o $TARGET', - source_scanner = qrcscanner, - src_suffix = '$QT4_QRCSUFFIX', - suffix = '$QT4_QRCCXXSUFFIX', - prefix = '$QT4_QRCCXXPREFIX', - single_source = True - ) - env.Append( BUILDERS = { 'Qrc': qrcbuilder } ) - - # Interface builder - #env['QT4_UIC4COM'] = [ - # CLVar('$QT4_UIC $QT4_UICDECLFLAGS -o ${TARGETS[0]} $SOURCE'), - # ] - env['QT4_UIC4COM'] = '$QT4_UIC $QT4_UICDECLFLAGS -o $TARGET $SOURCE' - uic4builder = Builder( - action='$QT4_UIC4COM', - src_suffix='$QT4_UISUFFIX', - suffix='$QT4_UICDECLSUFFIX', - prefix='$QT4_UICDECLPREFIX', - single_source = True - ) - env.Append( BUILDERS = { 'Uic4': uic4builder } ) - - # Metaobject builder - env['QT4_MOCFROMHCOM'] = ( - '$QT4_MOC $QT4_MOCFROMHFLAGS -o ${TARGETS[0]} $SOURCE') - env['QT4_MOCFROMCXXCOM'] = [ - CLVar('$QT4_MOC $QT4_MOCFROMCXXFLAGS -o ${TARGETS[0]} $SOURCE'), - Action(_checkMocIncluded,None)] - mocBld = Builder(action={}, prefix={}, suffix={}) - for h in header_extensions: - mocBld.add_action(h, '$QT4_MOCFROMHCOM') - mocBld.prefix[h] = '$QT4_MOCHPREFIX' - mocBld.suffix[h] = '$QT4_MOCHSUFFIX' - for cxx in cxx_suffixes: - mocBld.add_action(cxx, '$QT4_MOCFROMCXXCOM') - mocBld.prefix[cxx] = '$QT4_MOCCXXPREFIX' - mocBld.suffix[cxx] = '$QT4_MOCCXXSUFFIX' - env.Append( BUILDERS = { 'Moc4': mocBld } ) - - # er... no idea what that was for - static_obj, shared_obj = SCons.Tool.createObjBuilders(env) - static_obj.src_builder.append('Uic4') - shared_obj.src_builder.append('Uic4') - - # We use the emitters of Program / StaticLibrary / SharedLibrary - # to scan for moc'able files - # We can't refer to the builders directly, we have to fetch them - # as Environment attributes because that sets them up to be called - # correctly later by our emitter. - env.AppendUnique(PROGEMITTER =[AutomocStatic], - SHLIBEMITTER=[AutomocShared], - LIBEMITTER =[AutomocStatic], - # Of course, we need to link against the qt libraries - CPPPATH=[os.path.join('$QTDIR', 'include')], - LIBPATH=[os.path.join('$QTDIR', 'lib')], - LIBS=['$QT4_LIB']) - - import new - method = new.instancemethod(enable_modules, env, SCons.Environment) - env.EnableQt4Modules=method - -def enable_modules(self, modules, debug=False) : - import sys - - validModules = [ - 'QtCore', - 'QtGui', - 'QtOpenGL', - 'Qt3Support', - # The next modules have not been tested yet so, please - # maybe they require additional work on non Linux platforms - 'QtSql', - 'QtNetwork', - 'QtSvg', - 'QtTest', - 'QtXml', - 'QtUiTools', - ] - pclessModules = [ - 'QtUiTools', - 'QtUiTools_debug', - ] - invalidModules=[] - for module in modules: - if module not in validModules : - invalidModules.append(module) - if invalidModules : - raise "Modules %s are not Qt4 modules. Valid Qt4 modules are: %s"% \ - (str(invalidModules),str(validModules)) - - # TODO: Check whether we should add QT_CORE_LIB, QT_XML_LIB, QT_NETWORK_LIB... - if 'QtGui' in modules: - self.AppendUnique(CPPFLAGS='-DQT_GUI_LIB') - - if sys.platform == "linux2" : - if debug : modules = [module+"_debug" for module in modules] - for module in modules : - if module in pclessModules : - # self.AppendUnique(LIBS=[module]) - self.AppendUnique(LIBPATH=[os.path.join(self["QTDIR"],"lib",module)]) - self.AppendUnique(CPPPATH=[os.path.join(self["QTDIR"],"include","qt4",module)]) - modules.remove(module) - self.ParseConfig('PKG_CONFIG_PATH=%s/lib:%s/lib/pkgconfig pkg-config %s --libs --cflags'% - ( - self['QTDIR'], self['QTDIR'], - ' '.join(modules))) - return - if sys.platform == "win32" : - if debug : debugSuffix = 'd' - else : debugSuffix = '' - self.AppendUnique(LIBS=[lib+'4'+debugSuffix for lib in modules]) - if 'QtOpenGL' in modules: - self.AppendUnique(LIBS=['opengl32']) - self.AppendUnique(CPPPATH=[ '$QTDIR/include/'+module - for module in modules]) - self.AppendUnique(LIBPATH=['$QTDIR/lib']) - - -def exists(env): - return _detect(env) - diff --git a/development/scons/scons_manifest.py b/development/scons/scons_manifest.py deleted file mode 100644 index f393e5aabb..0000000000 --- a/development/scons/scons_manifest.py +++ /dev/null @@ -1,3471 +0,0 @@ -from SCons.Util import Split - -TOP_extra_files = Split(''' - ABOUT-NLS - ANNOUNCE - autogen.sh - config.log - configure.ac - COPYING - INSTALL - INSTALL.MacOSX - INSTALL.Win32 - INSTALL.autoconf - INSTALL.cmake - INSTALL.scons - lyx.1in - Makefile.am - NEWS - README - README.Cygwin - README.Win32 - README.localization - RELEASE-NOTES - rename.sh - scons_lyx.log - UPGRADING -''') - - -src_header_files = Split(''' - AppleSpellChecker.h - AspellChecker.h - Author.h - BiblioInfo.h - Bidi.h - Box.h - BranchList.h - Buffer.h - buffer_funcs.h - BufferList.h - BufferParams.h - BufferView.h - Bullet.h - Changes.h - Chktex.h - Citation.h - CmdDef.h - Color.h - ColorSet.h - ColorCode.h - Compare.h - CompletionList.h - Converter.h - ConverterCache.h - CoordCache.h - Counters.h - Cursor.h - CursorSlice.h - CutAndPaste.h - DepTable.h - Dimension.h - DispatchResult.h - DocIterator.h - EnchantChecker.h - Encoding.h - ErrorList.h - Exporter.h - factory.h - FloatList.h - Floating.h - Font.h - FontEnums.h - FontInfo.h - FontList.h - Format.h - FuncCode.h - FuncRequest.h - FuncStatus.h - Graph.h - HSpace.h - HunspellChecker.h - IndicesList.h - InsetIterator.h - InsetList.h - Intl.h - KeyMap.h - KeySequence.h - LaTeX.h - LaTeXFeatures.h - LaTeXPackages.h - Language.h - Layout.h - LayoutEnums.h - LayoutFile.h - LayoutModuleList.h - Length.h - Lexer.h - LyX.h - LyXAction.h - lyxfind.h - LyXRC.h - LyXVC.h - MetricsInfo.h - ModuleList.h - Mover.h - output.h - output_docbook.h - output_latex.h - output_plaintext.h - output_xhtml.h - OutputEnums.h - OutputParams.h - paper.h - ParIterator.h - Paragraph.h - ParagraphList.h - ParagraphMetrics.h - ParagraphParameters.h - PDFOptions.h - PersonalWordList.h - PrinterParams.h - Row.h - rowpainter.h - Server.h - ServerSocket.h - Session.h - sgml.h - Spacing.h - SpellChecker.h - TexRow.h - Text.h - TextClass.h - TextMetrics.h - Thesaurus.h - TocBackend.h - Trans.h - Undo.h - update_flags.h - VCBackend.h - VSpace.h - version.h - WordLangTuple.h - WordList.h -''') - - -src_pre_files = Split(''' - Author.cpp - Bidi.cpp - BranchList.cpp - Buffer.cpp - BufferList.cpp - BufferParams.cpp - BufferView.cpp - buffer_funcs.cpp - Bullet.cpp - Changes.cpp - Chktex.cpp - CmdDef.cpp - Color.cpp - Compare.cpp - Converter.cpp - ConverterCache.cpp - CoordCache.cpp - Counters.cpp - Cursor.cpp - CursorSlice.cpp - CutAndPaste.cpp - DepTable.cpp - DocIterator.cpp - Encoding.cpp - ErrorList.cpp - Exporter.cpp - factory.cpp - FloatList.cpp - Floating.cpp - Font.cpp - FontInfo.cpp - FontList.cpp - Format.cpp - FuncRequest.cpp - FuncStatus.cpp - Graph.cpp - HSpace.cpp - IndicesList.cpp - InsetIterator.cpp - InsetList.cpp - Intl.cpp - KeyMap.cpp - KeySequence.cpp - LaTeX.cpp - LaTeXFeatures.cpp - LaTeXPackages.cpp - Language.cpp - Layout.cpp - LayoutFile.cpp - LayoutModuleList.cpp - Length.cpp - lengthcommon.cpp - Lexer.cpp - LyX.cpp - LyXAction.cpp - lyxfind.cpp - LyXRC.cpp - LyXVC.cpp - MetricsInfo.cpp - Mover.cpp - output.cpp - OutputParams.cpp - output_docbook.cpp - output_latex.cpp - output_plaintext.cpp - output_xhtml.cpp - PDFOptions.cpp - ParIterator.cpp - Paragraph.cpp - ParagraphMetrics.cpp - ParagraphParameters.cpp - PersonalWordList.cpp - Row.cpp - rowpainter.cpp - Server.cpp - ServerSocket.cpp - Session.cpp - sgml.cpp - Spacing.cpp - TexRow.cpp - Text.cpp - Text2.cpp - Text3.cpp - TextClass.cpp - TextMetrics.cpp - TocBackend.cpp - Trans.cpp - Undo.cpp - VCBackend.cpp - version.cpp - VSpace.cpp - WordList.cpp -''') - - -src_post_files = Split(''' - BiblioInfo.cpp - boost.cpp - Box.cpp - Dimension.cpp - ModuleList.cpp - PrinterParams.cpp - Thesaurus.cpp -''') - - -src_extra_src_files = Split(''' - AppleSpellChecker.cpp - AspellChecker.cpp - EnchantChecker.cpp - HunspellChecker.cpp - main.cpp -''') - - -src_extra_files = Split(''' - Makefile.am - pch.h -''') - - -src_client_header_files = Split(''' - Messages.h -''') - - -src_client_files = Split(''' - boost.cpp - client.cpp - gettext.cpp - Messages.cpp -''') - - -src_client_extra_files = Split(''' - lyxclient.1in - Makefile.am - pch.h -''') - - -src_support_header_files = Split(''' - bind.h - convert.h - copied_ptr.h - debug.h - docstream.h - docstring.h - docstring_list.h - environment.h - ExceptionMessage.h - FileMonitor.h - FileName.h - filetools.h - foreach.h - ForkedCalls.h - functional.h - gettext.h - gzstream.h - lassert.h - limited_stack.h - lstrings.h - lyxalgo.h - lyxlib.h - lyxtime.h - mutex.h - Messages.h - numpunct_lyx_char_type.h - os.h - os_win32.h - Package.h - Path.h - ProgressInterface.h - qstring_helpers.h - RandomAccessList.h - regex.h - shared_ptr.h - socktools.h - Systemcall.h - SystemcallPrivate.h - textutils.h - Timeout.h - Translator.h - types.h - unicode.h - userinfo.h - mythes/mythes.hxx -''') - - -src_support_files = Split(''' - convert.cpp - debug.cpp - docstream.cpp - docstring.cpp - environment.cpp - FileMonitor.cpp - FileName.cpp - filetools.cpp - ForkedCalls.cpp - gettext.cpp - gzstream.cpp - kill.cpp - lassert.cpp - lstrings.cpp - lyxtime.cpp - mutex.cpp - Messages.cpp - os.cpp - Package.cpp - Path.cpp - qstring_helpers.cpp - socktools.cpp - Systemcall.cpp - Timeout.cpp - unicode.cpp - userinfo.cpp - mythes/mythes.cxx -''') - - -src_support_extra_header_files = Split(''' - AppleSpeller.h - AppleSpeller.m -''') - - -src_support_extra_src_files = Split(''' - atexit.c - os_cygwin.cpp - os_unix.cpp - os_win32.cpp - strerror.c -''') - - -src_support_extra_files = Split(''' - Makefile.am - pch.h - mythes/license.readme -''') - - -src_support_tests_extra_files = Split(''' - Makefile.am - boost.cpp - convert.cpp - filetools.cpp - lstrings.cpp - pch.h - test_convert - test_filetools - test_lstrings -''') - - -src_support_tests_regfiles_extra_files = Split(''' - convert - filetools - lstrings -''') - - -src_graphics_header_files = Split(''' - GraphicsCache.h - GraphicsCacheItem.h - GraphicsConverter.h - GraphicsImage.h - GraphicsLoader.h - GraphicsParams.h - GraphicsTypes.h - PreviewImage.h - PreviewLoader.h -''') - - -src_graphics_files = Split(''' - GraphicsCache.cpp - GraphicsCacheItem.cpp - GraphicsConverter.cpp - GraphicsLoader.cpp - GraphicsParams.cpp - PreviewImage.cpp - PreviewLoader.cpp -''') - - -src_graphics_extra_files = Split(''' - Makefile.am - pch.h -''') - - -src_mathed_header_files = Split(''' - CommandInset.h - InsetMath.h - InsetMathAMSArray.h - InsetMathArray.h - InsetMathBig.h - InsetMathBoldSymbol.h - InsetMathBox.h - InsetMathBrace.h - InsetMathCancel.h - InsetMathCancelto.h - InsetMathCases.h - InsetMathChar.h - InsetMathColor.h - InsetMathComment.h - InsetMathDecoration.h - InsetMathDelim.h - InsetMathDiagram.h - InsetMathDiff.h - InsetMathDots.h - InsetMathEnsureMath.h - InsetMathEnv.h - InsetMathExFunc.h - InsetMathExInt.h - InsetMathFont.h - InsetMathFontOld.h - InsetMathFrac.h - InsetMathGrid.h - InsetMathHull.h - InsetMathKern.h - InsetMathLefteqn.h - InsetMathLim.h - InsetMathMatrix.h - InsetMathNest.h - InsetMathNumber.h - InsetMathOverset.h - InsetMathPar.h - InsetMathPhantom.h - InsetMathRef.h - InsetMathRoot.h - InsetMathScript.h - InsetMathSize.h - InsetMathSpace.h - InsetMathSpecialChar.h - InsetMathSplit.h - InsetMathSqrt.h - InsetMathStackrel.h - InsetMathString.h - InsetMathSubstack.h - InsetMathSymbol.h - InsetMathTabular.h - InsetMathUnderset.h - InsetMathUnknown.h - InsetMathXArrow.h - InsetMathXYMatrix.h - MacroTable.h - MathAtom.h - MathAutoCorrect.h - MathCompletionList.h - MathData.h - MathExtern.h - MathFactory.h - MathGridInfo.h - MathMacro.h - MathMacroArgument.h - MathMacroTemplate.h - MathParser.h - MathParser_flags.h - MathStream.h - MathSupport.h - ReplaceData.h - TextPainter.h -''') - - -src_mathed_files = Split(''' - CommandInset.cpp - InsetMath.cpp - InsetMathAMSArray.cpp - InsetMathArray.cpp - InsetMathBig.cpp - InsetMathBoldSymbol.cpp - InsetMathBox.cpp - InsetMathBrace.cpp - InsetMathCancel.cpp - InsetMathCancelto.cpp - InsetMathCases.cpp - InsetMathChar.cpp - InsetMathColor.cpp - InsetMathComment.cpp - InsetMathDecoration.cpp - InsetMathDelim.cpp - InsetMathDiagram.cpp - InsetMathDiff.cpp - InsetMathDots.cpp - InsetMathEnsureMath.cpp - InsetMathEnv.cpp - InsetMathExFunc.cpp - InsetMathExInt.cpp - InsetMathFont.cpp - InsetMathFontOld.cpp - InsetMathFrac.cpp - InsetMathGrid.cpp - InsetMathHull.cpp - InsetMathKern.cpp - InsetMathLefteqn.cpp - InsetMathLim.cpp - InsetMathMatrix.cpp - InsetMathNest.cpp - InsetMathNumber.cpp - InsetMathOverset.cpp - InsetMathPar.cpp - InsetMathPhantom.cpp - InsetMathRef.cpp - InsetMathRoot.cpp - InsetMathScript.cpp - InsetMathSize.cpp - InsetMathSpace.cpp - InsetMathSpecialChar.cpp - InsetMathSplit.cpp - InsetMathSqrt.cpp - InsetMathStackrel.cpp - InsetMathString.cpp - InsetMathSubstack.cpp - InsetMathSymbol.cpp - InsetMathTabular.cpp - InsetMathUnderset.cpp - InsetMathUnknown.cpp - InsetMathXArrow.cpp - InsetMathXYMatrix.cpp - MacroTable.cpp - MathAtom.cpp - MathAutoCorrect.cpp - MathData.cpp - MathExtern.cpp - MathFactory.cpp - MathMacro.cpp - MathMacroArgument.cpp - MathMacroTemplate.cpp - MathParser.cpp - MathStream.cpp - MathSupport.cpp - TextPainter.cpp -''') - - -src_mathed_extra_files = Split(''' - BUGS - InsetFormulaMacro.cpp - InsetFormulaMacro.h - InsetMathMBox.cpp - InsetMathMBox.h - InsetMathXYArrow.cpp - InsetMathXYArrow.h - Makefile.am - README - pch.h - texify -''') - - -src_tex2lyx_header_files = Split(''' - Context.h - Parser.h - tex2lyx.h -''') - - -src_tex2lyx_files = Split(''' - boost.cpp - Context.cpp - math.cpp - Parser.cpp - preamble.cpp - table.cpp - tex2lyx.cpp - text.cpp -''') - - -src_tex2lyx_copied_header_files = Split(''' - TextClass.h - graphics/GraphicsParams.h - graphics/GraphicsTypes.h - insets/ExternalTemplate.h - insets/ExternalTransforms.h - insets/InsetLayout.h -''') - - -src_tex2lyx_copied_files = Split(''' - Author.cpp - Color.cpp - Counters.cpp - Encoding.cpp - FloatList.cpp - Floating.cpp - FontInfo.cpp - LaTeXPackages.cpp - Layout.cpp - LayoutFile.cpp - LayoutModuleList.cpp - Length.cpp - lengthcommon.cpp - Lexer.cpp - ModuleList.cpp - Spacing.cpp - TextClass.cpp - version.cpp - graphics/GraphicsParams.cpp - insets/ExternalTemplate.cpp - insets/ExternalTransforms.cpp - insets/InsetLayout.cpp -''') - - -src_tex2lyx_extra_files = Split(''' - Makefile.am - TODO.txt - pch.h - tex2lyx.1in - test/box-color-size-space-align.tex - test/DummyDocument.tex - test/foo.eps - test/foo.png - test/test-insets.tex - test/test.ltx - test/test-structure.tex -''') - - -src_frontends_header_files = Split(''' - alert.h - Application.h - Clipboard.h - FontLoader.h - FontMetrics.h - KeyModifier.h - KeySymbol.h - mouse_state.h - Painter.h - Selection.h - WorkArea.h - WorkAreaManager.h -''') - - -src_frontends_files = Split(''' - WorkAreaManager.cpp -''') - - -src_frontends_extra_files = Split(''' - Makefile.am - pch.h -''') - - -src_frontends_controllers_extra_files = Split(''' - Makefile.am - pch.h -''') - - -src_frontends_controllers_tests_extra_files = Split(''' - Makefile.am - biblio.cpp - boost.cpp - pch.h - test_biblio -''') - - -src_frontends_controllers_tests_regfiles_extra_files = Split(''' - biblio -''') - - -src_frontends_qt4_header_files = Split(''' - ButtonPolicy.h - Dialog.h - Action.h - BulletsModule.h - ButtonController.h - ColorCache.h - CustomizedWidgets.h - DialogView.h - DockView.h - EmptyTable.h - FancyLineEdit.h - FileDialog.h - FindAndReplace.h - FloatPlacement.h - GuiAbout.h - GuiApplication.h - GuiBibitem.h - GuiBibtex.h - GuiBox.h - GuiBranches.h - GuiBranch.h - GuiChanges.h - GuiCharacter.h - GuiCharacter.h - GuiCitation.h - GuiClipboard.h - GuiCommandBuffer.h - GuiCommandEdit.h - GuiCompare.h - GuiCompareHistory.h - GuiCompleter.h - GuiDelimiter.h - GuiDialog.h - GuiDocument.h - GuiErrorList.h - GuiERT.h - GuiExternal.h - GuiFontExample.h - GuiFontLoader.h - GuiGraphics.h - GuiGraphicsUi.h - GuiHSpace.h - GuiHyperlink.h - GuiIdListModel.h - GuiImage.h - GuiInclude.h - GuiIndex.h - GuiIndices.h - GuiInfo.h - GuiKeySymbol.h - GuiLabel.h - GuiLine.h - GuiListings.h - GuiLog.h - GuiMathMatrix.h - GuiNomenclature.h - GuiNote.h - GuiPainter.h - GuiParagraph.h - GuiPhantom.h - GuiPrefs.h - GuiPrint.h - GuiPrintindex.h - GuiPrintNomencl.h - GuiProgress.h - GuiProgressView.h - GuiRef.h - GuiSearch.h - GuiSelection.h - GuiSelectionManager.h - GuiSendto.h - GuiSetBorder.h - GuiShowFile.h - GuiSpellchecker.h - GuiSymbols.h - GuiTabularCreate.h - GuiTabular.h - GuiTexinfo.h - GuiThesaurus.h - GuiToc.h - GuiToolbar.h - GuiView.h - GuiViewSource.h - GuiVSpace.h - GuiWorkArea.h - GuiWrap.h - IconPalette.h - InGuiThread.h - InsertTableWidget.h - InsetParamsDialog.h - InsetParamsWidget.h - LaTeXHighlighter.h - LayoutBox.h - LengthCombo.h - LyXFileDialog.h - Menus.h - PanelStack.h - qt_helpers.h - qt_i18n.h - TocModel.h - TocWidget.h - Toolbars.h - Validator.h -''') - - -src_frontends_qt4_files = Split(''' - ButtonPolicy.cpp - Dialog.cpp - Action.cpp - BulletsModule.cpp - ButtonController.cpp - ColorCache.cpp - CustomizedWidgets.cpp - EmptyTable.cpp - FancyLineEdit.cpp - FileDialog.cpp - FindAndReplace.cpp - FloatPlacement.cpp - GuiAbout.cpp - GuiAlert.cpp - GuiApplication.cpp - GuiBibitem.cpp - GuiBibtex.cpp - GuiBox.cpp - GuiBranch.cpp - GuiBranches.cpp - GuiChanges.cpp - GuiCharacter.cpp - GuiCitation.cpp - GuiClipboard.cpp - GuiCommandBuffer.cpp - GuiCommandEdit.cpp - GuiCompare.cpp - GuiCompareHistory.cpp - GuiCompleter.cpp - GuiDelimiter.cpp - GuiDialog.cpp - GuiDocument.cpp - GuiErrorList.cpp - GuiERT.cpp - GuiExternal.cpp - GuiFontExample.cpp - GuiFontLoader.cpp - GuiFontMetrics.cpp - GuiGraphics.cpp - GuiHSpace.cpp - GuiHyperlink.cpp - GuiIdListModel.cpp - GuiImage.cpp - GuiInclude.cpp - GuiIndex.cpp - GuiIndices.cpp - GuiInfo.cpp - GuiKeySymbol.cpp - GuiLabel.cpp - GuiLine.cpp - GuiListings.cpp - GuiLog.cpp - GuiMathMatrix.cpp - GuiNomenclature.cpp - GuiNote.cpp - GuiPainter.cpp - GuiParagraph.cpp - GuiPhantom.cpp - GuiPrefs.cpp - GuiPrint.cpp - GuiPrintindex.cpp - GuiPrintNomencl.cpp - GuiProgress.cpp - GuiProgressView.cpp - GuiRef.cpp - GuiSearch.cpp - GuiSelection.cpp - GuiSelectionManager.cpp - GuiSendto.cpp - GuiSetBorder.cpp - GuiShowFile.cpp - GuiSpellchecker.cpp - GuiSymbols.cpp - GuiTabular.cpp - GuiTabularCreate.cpp - GuiTexinfo.cpp - GuiThesaurus.cpp - GuiToc.cpp - GuiToolbar.cpp - GuiView.cpp - GuiViewSource.cpp - GuiVSpace.cpp - GuiWorkArea.cpp - GuiWrap.cpp - IconPalette.cpp - InGuiThread.cpp - InsertTableWidget.cpp - InsetParamsDialog.cpp - InsetParamsWidget.cpp - LengthCombo.cpp - LaTeXHighlighter.cpp - LayoutBox.cpp - LyXFileDialog.cpp - Menus.cpp - PanelStack.cpp - qt_helpers.cpp - TocModel.cpp - TocWidget.cpp - Toolbars.cpp - Validator.cpp -''') - - -src_frontends_qt4_extra_files = Split(''' - GuiFontMetrics.h - Makefile.am - pch.h - README -''') - - -src_frontends_qt4_ui_files = Split(''' - AboutUi.ui - BibitemUi.ui - BiblioUi.ui - BibtexAddUi.ui - BibtexUi.ui - BoxUi.ui - BranchUi.ui - BranchesUi.ui - BranchesUnknownUi.ui - BulletsUi.ui - ChangesUi.ui - CharacterUi.ui - CitationUi.ui - ColorUi.ui - CompareUi.ui - CompareHistoryUi.ui - DelimiterUi.ui - DocumentUi.ui - ERTUi.ui - ErrorListUi.ui - ExternalUi.ui - FindAndReplaceUi.ui - FloatPlacementUi.ui - FontUi.ui - GraphicsUi.ui - HSpaceUi.ui - HyperlinkUi.ui - IncludeUi.ui - IndexUi.ui - IndicesUi.ui - InfoUi.ui - InsetParamsUi.ui - LabelUi.ui - LaTeXUi.ui - LanguageUi.ui - LineUi.ui - ListingsUi.ui - ListingsSettingsUi.ui - LocalLayoutUi.ui - LogUi.ui - MarginsUi.ui - MasterChildUi.ui - MathMatrixUi.ui - MathsUi.ui - ModulesUi.ui - NomenclUi.ui - NoteUi.ui - NumberingUi.ui - OutputUi.ui - PageLayoutUi.ui - ParagraphUi.ui - PDFSupportUi.ui - PhantomUi.ui - PreambleUi.ui - PrefColorsUi.ui - PrefCompletionUi.ui - PrefConvertersUi.ui - PrefDisplayUi.ui - PrefEditUi.ui - PrefFileformatsUi.ui - PrefIdentityUi.ui - PrefInputUi.ui - PrefLanguageUi.ui - PrefLatexUi.ui - PrefOutputUi.ui - PrefPathsUi.ui - PrefPrinterUi.ui - PrefScreenFontsUi.ui - PrefShortcutsUi.ui - PrefSpellcheckerUi.ui - PrefUi.ui - PrefsUi.ui - PrintUi.ui - PrintindexUi.ui - PrintNomenclUi.ui - ProgressViewUi.ui - RefUi.ui - SearchUi.ui - SendtoUi.ui - ShortcutUi.ui - ShowFileUi.ui - SpellcheckerUi.ui - SymbolsUi.ui - TabularCreateUi.ui - TabularUi.ui - TexinfoUi.ui - TextLayoutUi.ui - ThesaurusUi.ui - TocUi.ui - ToggleWarningUi.ui - VSpaceUi.ui - ViewSourceUi.ui - WrapUi.ui -''') - - -src_frontends_qt4_ui_extra_files = Split(''' - Makefile.am -''') - - -src_insets_header_files = Split(''' - ExternalSupport.h - ExternalTemplate.h - ExternalTransforms.h - Inset.h - InsetArgument.h - InsetBibitem.h - InsetBibtex.h - InsetBox.h - InsetBranch.h - InsetCaption.h - InsetCitation.h - InsetCode.h - InsetCollapsable.h - InsetCommand.h - InsetCommandParams.h - InsetERT.h - InsetExternal.h - InsetFlex.h - InsetFloat.h - InsetFloatList.h - InsetFoot.h - InsetFootlike.h - InsetGraphics.h - InsetGraphicsParams.h - InsetHyperlink.h - InsetInclude.h - InsetIndex.h - InsetInfo.h - InsetLabel.h - InsetLayout.h - InsetLine.h - InsetListings.h - InsetListingsParams.h - InsetMarginal.h - InsetNewline.h - InsetNewpage.h - InsetNomencl.h - InsetNote.h - InsetPhantom.h - InsetPreview.h - InsetQuotes.h - InsetRef.h - InsetScript.h - InsetSpace.h - InsetSpecialChar.h - InsetTOC.h - InsetTabular.h - InsetText.h - InsetVSpace.h - InsetWrap.h - RenderBase.h - RenderButton.h - RenderGraphic.h - RenderPreview.h -''') - - -src_insets_files = Split(''' - ExternalSupport.cpp - ExternalTemplate.cpp - ExternalTransforms.cpp - Inset.cpp - InsetArgument.cpp - InsetBibitem.cpp - InsetBibtex.cpp - InsetBox.cpp - InsetBranch.cpp - InsetCaption.cpp - InsetCitation.cpp - InsetCollapsable.cpp - InsetCommand.cpp - InsetCommandParams.cpp - InsetERT.cpp - InsetExternal.cpp - InsetFlex.cpp - InsetFloat.cpp - InsetFloatList.cpp - InsetFoot.cpp - InsetFootlike.cpp - InsetGraphics.cpp - InsetGraphicsParams.cpp - InsetHyperlink.cpp - InsetInclude.cpp - InsetIndex.cpp - InsetInfo.cpp - InsetLabel.cpp - InsetLayout.cpp - InsetLine.cpp - InsetListings.cpp - InsetListingsParams.cpp - InsetMarginal.cpp - InsetNewline.cpp - InsetNewpage.cpp - InsetNomencl.cpp - InsetNote.cpp - InsetPhantom.cpp - InsetPreview.cpp - InsetQuotes.cpp - InsetRef.cpp - InsetScript.cpp - InsetSpace.cpp - InsetSpecialChar.cpp - InsetTOC.cpp - InsetTabular.cpp - InsetText.cpp - InsetVSpace.cpp - InsetWrap.cpp - RenderButton.cpp - RenderGraphic.cpp - RenderPreview.cpp -''') - - -src_insets_extra_files = Split(''' - Makefile.am - pch.h -''') - - -intl_header_files = Split(''' - eval-plural.h - gettextP.h - gmo.h - hash-string.h - loadinfo.h - localcharset.h - os2compat.h - plural-exp.h - printf-args.h - printf-parse.h - relocatable.h - vasnprintf.h - vasnwprintf.h - wprintf-parse.h - xsize.h -''') - - -intl_files = Split(''' - bindtextdom.c - dcgettext.c - dcigettext.c - dcngettext.c - dgettext.c - dngettext.c - explodename.c - finddomain.c - gettext.c - intl-compat.c - l10nflist.c - langprefs.c - loadmsgcat.c - localcharset.c - localealias.c - localename.c - log.c - ngettext.c - osdep.c - plural-exp.c - plural.c - printf.c - relocatable.c - textdomain.c -''') - - -intl_extra_files = Split(''' - config.charset - libgnuintl.h.in - locale.alias - os2compat.c - plural.y - printf-args.c - printf-parse.c - ref-add.sin - ref-del.sin - vasnprintf.c - VERSION -''') - - -config_extra_files = Split(''' - common.am - config.guess - config.rpath - config.sub - depcomp - install-sh - ltmain.sh - lyxinclude.m4 - Makefile.am - missing - mkinstalldirs - pkg.m4 - py-compile - qt4.m4 - spell.m4 -''') - - -sourcedoc_extra_files = Split(''' - Doxyfile.in - Makefile.am -''') - - -po_extra_files = Split(''' - ar.po - bg.po - boldquot.sed - ca.po - cs.po - da.po - de.po - en@boldquot.header - en@quot.header - el.po - en.po - es.po - eu.po - fi.po - fr.po - gl.po - he.po - hu.po - insert-header.sin - id.po - it.po - ja.po - ko.po - LINGUAS - lyx_pot.py - Makefile.in.in - Makevars - nb.po - nl.po - nn.po - pl.po - pocheck.pl - POTFILES.in - postats.sh - pt.po - quot.sed - README - remove-potcdate.sin - ro.po - ru.po - Rules-quot - sk.po - sl.po - sr.po - sv.po - tr.po - uk.po - wa.po - zh_CN.po - zh_TW.po -''') - - -lib_files = Split(''' - autocorrect - chkconfig.ltx - configure.py - CREDITS - encodings - external_templates - languages - layouttranslations - symbols - syntax.default - unicodesymbols -''') - - -lib_extra_files = Split(''' - autocorrect - build-listerrors - generate_contributions.py - Makefile.am -''') - - -lib_kbd_files = Split(''' - american-2.kmap - american.kmap - arabic.kmap - bg-bds-1251.kmap - brazil.kmap - brazil2.kmap - czech-prg.kmap - czech.kmap - espanol.kmap - european.kmap - farsi.kmap - francais.kmap - french.kmap - german-2.kmap - german-3.kmap - german.kmap - greek.kmap - hebrew.kmap - koi8-r.kmap - koi8-u.kmap - latvian.kmap - magyar-2.kmap - magyar-3.kmap - magyar.kmap - null.kmap - polish.kmap - polski.kmap - portuges.kmap - romanian.kmap - serbian.kmap - serbocroatian.kmap - sf.kmap - sg.kmap - slovak.kmap - slovene.kmap - thai-kedmanee.kmap - transilvanian.kmap - turkish-f.kmap - turkish.kmap -''') - - -lib_templates_files = Split(''' - aa.lyx - aastex.lyx - ACM-siggraph.lyx - ACM-sigplan.lyx - AEA.lyx - AGUTeX.lyx - AGU_article.lyx - APA.lyx - beamer-conference-ornate-20min.lyx - ctex.lyx - de_beamer-conference-ornate-20min.lyx - dinbrief.lyx - DocBook_article.lyx - ectaart.lyx - elsarticle.lyx - es_beamer-conference-ornate-20min.lyx - fr_beamer-conference-ornate-20min.lyx - frletter.lyx - g-brief-de.lyx - g-brief-en.lyx - g-brief2.lyx - hollywood.lyx - IEEEtran.lyx - IJMPC.lyx - IJMPD.lyx - IOP-article.lyx - JASA.lyx - JSS-article.lyx - kluwer.lyx - koma-letter2.lyx - letter.lyx - lettre.lyx - README.new_templates - revtex4.lyx - revtex4-1.lyx - slides.lyx -''') - - -lib_templates_springer_files = Split(''' - svjour3.lyx - svmono_acknow.lyx - svmono_acronym.lyx - svmono_appendix.lyx - svmono_book-master.lyx - svmono_chapter.lyx - svmono_dedication.lyx - svmono_foreword.lyx - svmono_glossary.lyx - svmono_part.lyx - svmono_preface.lyx - svmono_referenc.lyx - svmono_solutions.lyx - svmult_acknow.lyx - svmult_acronym.lyx - svmult_appendix.lyx - svmult_author.lyx - svmult_cblist.lyx - svmult_dedication.lyx - svmult_editor-master.lyx - svmult_foreword.lyx - svmult_glossary.lyx - svmult_part.lyx - svmult_preface.lyx - svmult_referenc.lyx -''') - - -lib_templates_thesis_files = Split(''' - Acknowledgments.lyx - Appendix.lyx - alpha.bst - chapter-1.lyx - chapter-2.lyx - Summary.lyx - thesis.lyx - thesisExample.bib -''') - - -lib_ui_files = Split(''' - default.ui - stdcontext.inc - stdmenus.inc - stdtoolbars.inc -''') - - -lib_fonts_files = Split(''' - BaKoMaFontLicense.txt - cmex10.ttf - cmmi10.ttf - cmr10.ttf - cmsy10.ttf - esint10.ttf - eufm10.ttf - msam10.ttf - msbm10.ttf - ReadmeBaKoMa4LyX.txt - rsfs10.ttf - wasy10.ttf -''') - - -lib_images_files = Split(''' - all-changes-accept.png - all-changes-reject.png - amssymb.png - banner.png - bookmark-goto.png - bookmark-goto_0.png - bookmark-save.png - box-insert.png - break-line.png - buffer-close.png - buffer-export.png - buffer-export_dvi.png - buffer-export_dvi3.png - buffer-export_latex.png - buffer-export_pdf.png - buffer-export_pdf2.png - buffer-export_pdf3.png - buffer-export_pdf4.png - buffer-export_pdf5.png - buffer-export_ps.png - buffer-export_text.png - buffer-new.png - buffer-reload.png - buffer-toggle-output-sync.png - buffer-update.png - buffer-update_dvi.png - buffer-update_dvi3.png - buffer-update_pdf.png - buffer-update_pdf2.png - buffer-update_pdf3.png - buffer-update_pdf4.png - buffer-update_pdf5.png - buffer-update_ps.png - buffer-view.png - buffer-view_dvi.png - buffer-view_dvi3.png - buffer-view_pdf.png - buffer-view_pdf2.png - buffer-view_pdf3.png - buffer-view_pdf4.png - buffer-view_pdf5.png - buffer-view_ps.png - buffer-write.png - buffer-write-as.png - build-program.png - busy.gif - change-accept.png - change-next.png - change-reject.png - changes-merge.png - changes-output.png - changes-track.png - closetab.png - close-tab-group.png - copy.png - cut.png - demote.png - depth-decrement.png - depth-increment.png - dialog-preferences.png - dialog-show-new-inset_citation.png - dialog-show-new-inset_graphics.png - dialog-show-new-inset_include.png - dialog-show-new-inset_ref.png - dialog-show_character.png - dialog-show_findreplace.png - dialog-show_mathdelimiter.png - dialog-show_mathmatrix.png - dialog-show_print.png - dialog-show_spellchecker.png - dialog-show_vclog.png - dialog-toggle_findreplaceadv.png - dialog-toggle_toc.png - down.png - editclear.png - ert-insert.png - file-open.png - float-insert_figure.png - float-insert_table.png - font-bold.png - font-emph.png - font-noun.png - font-sans.png - footnote-insert.png - href-insert.png - hidetab.png - index-insert.png - info-insert_buffer_vcs-revision.png - label-insert.png - layout-document.png - layout-paragraph.png - layout.png - layout_Description.png - layout_Enumerate.png - layout_Itemize.png - layout_List.png - layout_LyX-Code.png - layout_Scrap.png - layout_Section.png - lyx-quit.png - lyx.png - marginalnote-insert.png - master-buffer-update.png - master-buffer-view.png - math-display.png - math-macro-add-greedy-optional-param.png - math-macro-add-optional-param.png - math-macro-add-param.png - math-macro-append-greedy-param.png - math-macro-make-nonoptional.png - math-macro-make-optional.png - math-macro-remove-greedy-param.png - math-macro-remove-optional-param.png - math-macro-remove-param.png - math-macro_newmacroname_newcommand.png - math-matrix.png - math-mode.png - math-subscript.png - math-superscript.png - nomencl-insert.png - note-insert.png - note-next.png - paste.png - promote.png - psnfss1.png - psnfss2.png - psnfss3.png - psnfss4.png - redo.png - reload.png - script-insert_subscript.png - script-insert_superscript.png - split-view_horizontal.png - split-view_vertical.png - standard.png - tabular-feature_align-decimal.png - tabular-feature_append-column.png - tabular-feature_append-row.png - tabular-feature_delete-column.png - tabular-feature_delete-row.png - tabular-feature_m-align-center.png - tabular-feature_m-align-left.png - tabular-feature_m-align-right.png - tabular-feature_m-valign-bottom.png - tabular-feature_m-valign-middle.png - tabular-feature_m-valign-top.png - tabular-feature_multicolumn.png - tabular-feature_multirow.png - tabular-feature_set-all-lines.png - tabular-feature_set-border-lines.png - tabular-feature_set-longtabular.png - tabular-feature_set-rotate-cell.png - tabular-feature_set-rotate-tabular.png - tabular-feature_toggle-line-bottom.png - tabular-feature_toggle-line-left.png - tabular-feature_toggle-line-right.png - tabular-feature_toggle-line-top.png - tabular-feature_toggle-rotate-cell.png - tabular-feature_toggle-rotate-tabular.png - tabular-feature_unset-all-lines.png - tabular-insert.png - textstyle-apply.png - thesaurus-entry.png - toolbar-toggle_math.png - toolbar-toggle_math_panels.png - toolbar-toggle_table.png - undo.png - unknown.png - up.png - update-others.png - url-insert.png - vc-compare.png - vc-compare_0.png - vc-check-in.png - vc-check-out.png - vc-locking-toggle.png - vc-register.png - vc-repo-update.png - vc-revert.png - view-others.png -''') - - -lib_images_extra_files = Split(''' - font-smallcaps.png - README -''') - - -lib_images_math_files = Split(''' - acute.png - adots.png - aleph.png - alpha.png - amalg.png - angle.png - approx.png - approxeq.png - asymp.png - backepsilon.png - backprime.png - backsim.png - backsimeq.png - backslash.png - bar.png - bars.png - barwedge.png - Bbbk.png - bcancel.png - because.png - beta.png - beth.png - between.png - bigcap.png - bigcirc.png - bigcup.png - bigodot.png - bigoplus.png - bigotimes.png - bigsqcup.png - bigstar.png - bigtriangledown.png - bigtriangleup.png - biguplus.png - bigvee.png - bigwedge.png - blacklozenge.png - blacksquare.png - blacktriangle.png - blacktriangledown.png - blacktriangleleft.png - blacktriangleright.png - bot.png - bowtie.png - boxdot.png - boxminus.png - boxplus.png - boxtimes.png - breve.png - bullet.png - bumpeq.png - bumpeq2.png - cancel.png - cancelto.png - cap.png - cap2.png - cases.png - cdot.png - cdots.png - centerdot.png - check.png - chi.png - circ.png - circeq.png - circlearrowleft.png - circlearrowright.png - circledS.png - circledast.png - circledcirc.png - circleddash.png - clubsuit.png - complement.png - cong.png - coprod.png - cup.png - cup2.png - curlyeqprec.png - curlyeqsucc.png - curlyvee.png - curlywedge.png - curvearrowleft.png - curvearrowright.png - dagger.png - daleth.png - dashleftarrow.png - dashrightarrow.png - dashv.png - ddagger.png - ddddot.png - dddot.png - ddot.png - ddots.png - delim.png - delta.png - delta2.png - diagdown.png - diagup.png - diamond.png - diamond2.png - diamondsuit.png - digamma.png - div.png - divideontimes.png - dot.png - doteq.png - doteqdot.png - dotplus.png - dotsint.png - dotsintop.png - doublebarwedge.png - downarrow.png - downarrow2.png - downdownarrows.png - downharpoonleft.png - downharpoonright.png - ell.png - empty.png - emptyset.png - epsilon.png - eqcirc.png - eqslantgtr.png - eqslantless.png - equation.png - equiv.png - eta.png - eth.png - exists.png - export-others.png - fallingdotseq.png - fint.png - fintop.png - Finv.png - flat.png - font.png - forall.png - frac-square.png - frac.png - frown.png - functions.png - Game.png - gamma.png - gamma2.png - geq.png - geqq.png - geqslant.png - gg.png - ggg.png - gimel.png - gnapprox.png - gneq.png - gneqq.png - gnsim.png - grave.png - gtrapprox.png - gtrdot.png - gtreqless.png - gtreqqless.png - gtrless.png - gtrsim.png - gvertneqq.png - hat.png - hbar.png - heartsuit.png - hookleftarrow.png - hookrightarrow.png - hphantom.png - hslash.png - iddots.png - iiiint.png - iiiintop.png - iiint.png - iiintop.png - iint.png - iintop.png - Im.png - imath.png - in.png - infty.png - int.png - intercal.png - intop.png - iota.png - jmath.png - kappa.png - lambda.png - lambda2.png - landdownint.png - landdownintop.png - landupint.png - landupintop.png - langle.png - lbrace.png - lbrace_rbrace.png - lbracket.png - lbracket_rbracket.png - lceil.png - lceil_rceil.png - ldots.png - leftarrow.png - leftarrow2.png - leftarrowtail.png - leftharpoondown.png - leftharpoonup.png - leftleftarrows.png - leftrightarrow.png - leftrightarrow2.png - leftrightarrows.png - leftrightharpoons.png - leftrightsquigarrow.png - leftthreetimes.png - leq.png - leqq.png - leqslant.png - lessapprox.png - lessdot.png - lesseqgtr.png - lesseqqgtr.png - lessgtr.png - lesssim.png - lfloor.png - lfloor_rfloor.png - ll.png - llcorner.png - Lleftarrow.png - lll.png - lnapprox.png - lneq.png - lneqq.png - lnsim.png - longleftarrow.png - longleftarrow2.png - longleftrightarrow.png - longleftrightarrow2.png - longmapsto.png - longrightarrow.png - longrightarrow2.png - looparrowleft.png - looparrowright.png - lozenge.png - lparen.png - lparen_rparen.png - lrcorner.png - Lsh.png - ltimes.png - lvertneqq.png - mapsto.png - mathbb_C.png - mathbb_H.png - mathbb_N.png - mathbb_Q.png - mathbb_R.png - mathbb_Z.png - mathcal_F.png - mathcal_H.png - mathcal_L.png - mathcal_O.png - mathcircumflex.png - mathrm_T.png - matrix.png - measuredangle.png - mho.png - mid.png - models.png - mp.png - mu.png - multimap.png - nabla.png - natural.png - ncong.png - nearrow.png - neg.png - neq.png - nexists.png - ngeq.png - ngeqq.png - ngeqslant.png - ngtr.png - ni.png - nleftarrow.png - nleftarrow2.png - nleftrightarrow.png - nleftrightarrow2.png - nleq.png - nleqq.png - nleqslant.png - nless.png - nmid.png - notin.png - nparallel.png - nprec.png - npreceq.png - nrightarrow.png - nrightarrow2.png - nshortmid.png - nshortparallel.png - nsim.png - nsubseteq.png - nsucc.png - nsucceq.png - nsupseteq.png - nsupseteqq.png - ntriangleleft.png - ntrianglelefteq.png - ntriangleright.png - ntrianglerighteq.png - nu.png - nvdash.png - nvdash2.png - nvdash3.png - nwarrow.png - odot.png - oiint.png - oiintop.png - oint.png - ointclockwise.png - ointclockwiseop.png - ointctrclockwise.png - ointctrclockwiseop.png - ointop.png - omega.png - omega2.png - ominus.png - oplus.png - oslash.png - otimes.png - overbrace.png - overleftarrow.png - overleftrightarrow.png - overline.png - overrightarrow.png - overset.png - parallel.png - partial.png - perp.png - phantom.png - phi.png - phi2.png - pi.png - pi2.png - pitchfork.png - pm.png - prec.png - precapprox.png - preccurlyeq.png - preceq.png - precnapprox.png - precnsim.png - precsim.png - prime.png - prod.png - propto.png - psi.png - psi2.png - rangle.png - rbrace.png - rbracket.png - rceil.png - Re.png - rfloor.png - rho.png - rightarrow.png - rightarrow2.png - rightarrowtail.png - rightharpoondown.png - rightharpoonup.png - rightleftarrows.png - rightleftharpoons.png - rightrightarrows.png - rightsquigarrow.png - rightthreetimes.png - risingdotseq.png - root.png - rparen.png - Rrightarrow.png - Rsh.png - rtimes.png - searrow.png - setminus.png - sharp.png - shortmid.png - shortparallel.png - sigma.png - sigma2.png - sim.png - simeq.png - slash.png - smallfrown.png - smallsetminus.png - smallsmile.png - smile.png - space.png - spadesuit.png - sphericalangle.png - sqcap.png - sqcup.png - sqiint.png - sqiintop.png - sqint.png - sqintop.png - sqrt-square.png - sqrt.png - sqsubset.png - sqsubseteq.png - sqsupset.png - sqsupseteq.png - square.png - star.png - style.png - sub.png - subset.png - subset2.png - subseteq.png - subseteqq.png - subsetneq.png - subsetneqq.png - succ.png - succapprox.png - succcurlyeq.png - succeq.png - succnapprox.png - succnsim.png - succsim.png - sum.png - super.png - supset.png - supset2.png - supseteq.png - supseteqq.png - supsetneq.png - supsetneqq.png - surd.png - swarrow.png - tau.png - textrm_AA.png - textrm_O.png - therefore.png - theta.png - theta2.png - thickapprox.png - thicksim.png - tilde.png - times.png - top.png - triangle.png - triangledown.png - triangleleft.png - trianglelefteq.png - triangleq.png - triangleright.png - trianglerighteq.png - twoheadleftarrow.png - twoheadrightarrow.png - ulcorner.png - underbrace.png - underleftarrow.png - underleftrightarrow.png - underline.png - underrightarrow.png - underscore.png - underset.png - undertilde.png - uparrow.png - uparrow2.png - updownarrow.png - updownarrow2.png - upharpoonleft.png - upharpoonright.png - uplus.png - upsilon.png - upsilon2.png - upuparrows.png - urcorner.png - utilde.png - varepsilon.png - varkappa.png - varnothing.png - varphi.png - varpi.png - varpropto.png - varrho.png - varsigma.png - varsubsetneq.png - varsubsetneqq.png - varsupsetneq.png - varsupsetneqq.png - vartheta.png - vartriangle.png - vartriangleleft.png - vartriangleright.png - vdash.png - vdash2.png - vdash3.png - vdots.png - vec.png - vee.png - veebar.png - vert.png - vert2.png - vphantom.png - Vvdash.png - wedge.png - widehat.png - widetilde.png - wp.png - wr.png - xcancel.png - xi.png - xi2.png - zeta.png -''') - - -lib_images_math_extra_files = Split(''' - ams_arrows.png - ams_misc.png - ams_nrel.png - ams_ops.png - ams_rel.png - arrows.png - bop.png - brel.png - deco.png - deco.png - delim.png - delim0.png - delim1.png - dots.png - font.png - functions.png - greek.png - misc.png - varsz.png -''') - - -lib_images_commands_files = Split(''' -''') - - -lib_images_classic_files = Split(''' - all-changes-accept.png - all-changes-reject.png - bookmark-goto.png - bookmark-goto_0.png - bookmark-save.png - box-insert.png - break-line.png - buffer-close.png - buffer-export.png - buffer-export_dvi.png - buffer-export_dvi3.png - buffer-export_latex.png - buffer-export_pdf.png - buffer-export_pdf2.png - buffer-export_pdf3.png - buffer-export_pdf4.png - buffer-export_pdf5.png - buffer-export_ps.png - buffer-export_text.png - buffer-new.png - buffer-reload.png - buffer-toggle-output-sync.png - buffer-update.png - buffer-update_dvi.png - buffer-update_dvi3.png - buffer-update_pdf.png - buffer-update_pdf2.png - buffer-update_pdf3.png - buffer-update_pdf4.png - buffer-update_pdf5.png - buffer-update_ps.png - buffer-view.png - buffer-view_dvi.png - buffer-view_dvi3.png - buffer-view_pdf.png - buffer-view_pdf2.png - buffer-view_pdf3.png - buffer-view_pdf4.png - buffer-view_pdf5.png - buffer-view_ps.png - buffer-write.png - buffer-write-as.png - build-program.png - change-accept.png - change-next.png - change-reject.png - changes-merge.png - changes-output.png - changes-track.png - close-tab-group.png - copy.png - cut.png - demote.png - depth-decrement.png - depth-increment.png - dialog-preferences.png - dialog-show_character.png - dialog-show_findreplace.png - dialog-show_mathdelimiter.png - dialog-show_mathmatrix.png - dialog-show_print.png - dialog-show_spellchecker.png - dialog-show_vclog.png - dialog-show-new-inset_citation.png - dialog-show-new-inset_graphics.png - dialog-show-new-inset_include.png - dialog-show-new-inset_ref.png - dialog-toggle_findreplaceadv.png - dialog-toggle_toc.png - down.png - ert-insert.png - file-open.png - float-insert_figure.png - float-insert_table.png - font-bold.png - font-emph.png - font-noun.png - font-sans.png - footnote-insert.png - href-insert.png - iconsize.png - index-insert.png - info-insert_buffer_vcs-revision.png - label-insert.png - layout-document.png - layout-paragraph.png - layout.png - layout_Description.png - layout_Enumerate.png - layout_Itemize.png - layout_List.png - layout_LyX-Code.png - layout_Scrap.png - layout_Section.png - marginalnote-insert.png - master-buffer-update.png - master-buffer-view.png - math-display.png - math-macro-add-greedy-optional-param.png - math-macro-add-optional-param.png - math-macro-add-param.png - math-macro-append-greedy-param.png - math-macro-make-nonoptional.png - math-macro-make-optional.png - math-macro-remove-greedy-param.png - math-macro-remove-optional-param.png - math-macro-remove-param.png - math-macro_newmacroname_newcommand.png - math-matrix.png - math-mode.png - math-subscript.png - math-superscript.png - nomencl-insert.png - note-insert.png - note-next.png - paste.png - promote.png - redo.png - reload.png - script-insert_subscript.png - script-insert_superscript.png - split-view_horizontal.png - split-view_vertical.png - tabular-feature_align-decimal.png - tabular-feature_append-column.png - tabular-feature_append-row.png - tabular-feature_delete-column.png - tabular-feature_delete-row.png - tabular-feature_m-align-center.png - tabular-feature_m-align-left.png - tabular-feature_m-align-right.png - tabular-feature_m-valign-bottom.png - tabular-feature_m-valign-middle.png - tabular-feature_m-valign-top.png - tabular-feature_multicolumn.png - tabular-feature_multirow.png - tabular-feature_set-all-lines.png - tabular-feature_set-border-lines.png - tabular-feature_set-longtabular.png - tabular-feature_set-rotate-cell.png - tabular-feature_set-rotate-tabular.png - tabular-feature_toggle-line-bottom.png - tabular-feature_toggle-line-left.png - tabular-feature_toggle-line-right.png - tabular-feature_toggle-line-top.png - tabular-feature_toggle-rotate-cell.png - tabular-feature_toggle-rotate-tabular.png - tabular-feature_unset-all-lines.png - tabular-insert.png - textstyle-apply.png - thesaurus-entry.png - toolbar-toggle_math.png - toolbar-toggle_math_panels.png - toolbar-toggle_table.png - undo.png - unknown.png - up.png - update-others.png - url-insert.png - vc-compare.png - vc-compare_0.png - vc-check-in.png - vc-check-out.png - vc-locking-toggle.png - vc-register.png - vc-repo-update.png - vc-revert.png - view-others.png -''') - - -lib_images_oxygen_files = Split(''' - all-changes-accept.png - all-changes-reject.png - bookmark-goto.png - bookmark-goto_0.png - bookmark-save.png - box-insert.png - buffer-new.png - buffer-reload.png - buffer-toggle-output-sync.png - buffer-update.png - buffer-update_dvi.png - buffer-update_dvi3.png - buffer-update_pdf.png - buffer-update_pdf2.png - buffer-update_pdf3.png - buffer-update_pdf4.png - buffer-update_pdf5.png - buffer-update_ps.png - buffer-view.png - buffer-view_dvi.png - buffer-view_dvi3.png - buffer-view_pdf.png - buffer-view_pdf2.png - buffer-view_pdf3.png - buffer-view_pdf4.png - buffer-view_pdf5.png - buffer-view_ps.png - buffer-write.png - buffer-write-as.png - change-accept.png - change-next.png - change-reject.png - changes-output.png - changes-track.png - closetab.png - close-tab-group.png - copy.png - cut.png - depth-decrement.png - depth-increment.png - dialog-show_character.png - dialog-show_findreplace.png - dialog-show_print.png - dialog-show_spellchecker.png - dialog-show-new-inset_citation.png - dialog-show-new-inset_graphics.png - dialog-show-new-inset_include.png - dialog-show-new-inset_ref.png - dialog-toggle_findreplaceadv.png - dialog-toggle_toc.png - ert-insert.png - file-open.png - float-insert_figure.png - float-insert_table.png - font-bold.png - font-emph.png - font-noun.png - footnote-insert.png - href-insert.png - iconsize.png - index-insert.png - label-insert.png - layout.png - layout-document.png - layout-paragraph.png - layout_Description.png - layout_Enumerate.png - layout_Itemize.png - layout_List.png - lyx-quit.png - marginalnote-insert.png - master-buffer-update.png - master-buffer-view.png - math-macro_newmacroname_newcommand.png - math-mode.png - nomencl-insert.png - note-insert.png - note-next.png - paste.png - redo.png - reload.png - split-view_horizontal.png - split-view_vertical.png - tabular-insert.png - textstyle-apply.png - thesaurus-entry.png - toolbar-toggle_math.png - toolbar-toggle_table.png - undo.png - update-others.png - url-insert.png - vc-revert.png - view-others.png -''') - - -lib_images_attic_extra_files = Split(''' - dialog-show_mathpanel.png -''') - - -# Do not add subscript.sty to lib_tex_files since we don't want to install it -# (it is part of TeXLive). We include it in our source package only so that -# packagers may decide to install it (e.g. for MikTeX). -lib_tex_files = Split(''' - broadway.cls - hollywood.cls - lyxchess.sty - lyxskak.sty - revtex.cls -''') - - -lib_doc_files = Split(''' - Customization.lyx - DummyDocument1.lyx - DummyDocument2.lyx - DummyTextDocument.txt - EmbeddedObjects.lyx - Additional.lyx - Formula-numbering.lyx - Intro.lyx - LaTeXConfig.lyx - LFUNs.lyx - Math.lyx - Shortcuts.lyx - Tutorial.lyx - UserGuide.lyx -''') - - -lib_doc_biblio_files = Split(''' - alphadin.bst - LyXDocs.bib -''') - - -lib_doc_clipart_files = Split(''' - Abstract.pdf - BoxInsetDefaultQt4.png - ChangesToolbar.png - ChildDocumentQt4.png - CommentNoteImageQt4.png - endnotes.pdf - ERT.png - escher-lsd.eps - ExternalMaterialQt4.png - ExtraToolbar.png - floatQt4.png - footnoteQt4.png - GreyedOutNoteImageQt4.png - labelQt4.png - LaTeX.png - LyXNoteImageQt4.png - macrobox.png - MacroToolbar.png - macrouse.png - mobius.eps - platypus.eps - referenceQt4.png - SpaceMarker.png - StandardToolbar.png - ToolbarEnvBox.png - ViewToolbar.png - with_fntright.pdf - without_fntright.pdf -''') - - -lib_doc_extra_files = Split(''' - Makefile.am - README.Documentation -''') - - -lib_doc_ca_files = Split(''' - Intro.lyx -''') - - -lib_doc_cs_files = Split(''' - Tutorial.lyx -''') - - -lib_doc_de_files = Split(''' - Customization.lyx - DummyDocument1.lyx - DummyDocument2.lyx - DummyTextDocument.txt - EmbeddedObjects.lyx - Additional.lyx - Formelnummerierung.lyx - Intro.lyx - Math.lyx - Shortcuts.lyx - Tutorial.lyx - UserGuide.lyx -''') - - -lib_doc_de_clipart_files = Split(''' - ERT.png - ExternesMaterialQt4.png - FussnoteQt4.png - GleitobjektQt4.png - GrauschriftNotizQt4.png - KommentarQt4.png - LyXNotizQt4.png - Marke.png - Querverweis.png - StandardBoxQt4.png - UnterdokumentQt4.png -''') - - -lib_doc_da_files = Split(''' - Intro.lyx -''') - - -lib_doc_el_files = Split(''' - Intro.lyx -''') - - -lib_doc_es_files = Split(''' - Customization.lyx - DocumentoPostizo1.lyx - DocumentoPostizo2.lyx - DocumentoTextoPostizo.txt - EmbeddedObjects.lyx - Additional.lyx - Formula-numbering.lyx - Intro.lyx - Math.lyx - Shortcuts.lyx - Tutorial.lyx - UserGuide.lyx -''') - - -lib_doc_es_clipart_files = Split(''' - ComentNotaImagenQt4.png - CuadroMinipagQt4.png - DocumentoHijoQt4.png - es_ERT.png - es_ToolbarEnvBox.png - etiquetaQt4.png - flotanteQt4.png - GrisNotaImagenQt4.png - MaterialExternoQt4.png - NotaLyXImagenQt4.png - notapieQt4.png - referenciaQt4.png - Resumen.pdf -''') - - -lib_doc_eu_files = Split(''' - Customization.lyx - Additional.lyx - Intro.lyx - Tutorial.lyx - UserGuide.lyx -''') - - -lib_doc_fr_files = Split(''' - Customization.lyx - DocumentBidon1.lyx - DocumentBidon2.lyx - DocumentTexteBidon.txt - EmbeddedObjects.lyx - Additional.lyx - Formula-numbering.lyx - Intro.lyx - Math.lyx - Shortcuts.lyx - Tutorial.lyx - UserGuide.lyx -''') - - -lib_doc_fr_clipart_files = Split(''' - BoxInsetDefaultQt4.png - ChildDocumentQt4.png - CommentNoteImageQt4.png - ERT.png - floatQt4.png - footnoteQt4.png - GreyedOutNoteImageQt4.png - labelQt4.png - LyXNoteImageQt4.png -''') - - -lib_doc_gl_files = Split(''' - Intro.lyx - Tutorial.lyx -''') - - -lib_doc_he_files = Split(''' - Intro.lyx - Tutorial.lyx -''') - - -lib_doc_hu_files = Split(''' - Intro.lyx - Tutorial.lyx -''') - - -lib_doc_id_files = Split(''' - Intro.lyx - Shortcuts.lyx - Tutorial.lyx - UserGuide.lyx -''') - - -lib_doc_id_clipart_files = Split(''' - id-contrib.png - id-footnote.png - id-lingkungan.png -''') - - -lib_doc_it_files = Split(''' - Customization.lyx - Intro.lyx - Tutorial.lyx - UserGuide.lyx -''') - - -lib_doc_it_clipart_files = Split(''' - it_footnoteQt4.png - it_referenceQt4.png -''') - - -lib_doc_ja_files = Split(''' - Additional.lyx - Customization.lyx - DummyDocument1.lyx - DummyDocument2.lyx - EmbeddedObjects.lyx - Formula-numbering.lyx - Intro.lyx - LaTeXConfig.lyx - Math.lyx - Shortcuts.lyx - Tutorial.lyx - UserGuide.lyx -''') - - -lib_doc_ja_clipart_files = Split(''' - ChildDocumentQt4.png - ERT.png - ExternalMaterialQt4.png - floatQt4.png - footnoteQt4.png - referenceQt4.png - ToolbarEnvBox.png -''') - - -lib_doc_nb_files = Split(''' - Intro.lyx -''') - - -lib_doc_nl_files = Split(''' - Intro.lyx - Tutorial.lyx -''') - - -lib_doc_pl_files = Split(''' - Additional.lyx - Intro.lyx - Tutorial.lyx -''') - - -lib_doc_pt_files = Split(''' - Intro.lyx - Tutorial.lyx -''') - - -lib_doc_ro_files = Split(''' - Intro.lyx -''') - - -lib_doc_ru_files = Split(''' - Intro.lyx - Tutorial.lyx -''') - - -lib_doc_sl_files = Split(''' - Intro.lyx - Tutorial.lyx -''') - - -lib_doc_sk_files = Split(''' - Intro.lyx - Tutorial.lyx - UserGuide.lyx -''') - - -lib_doc_sv_files = Split(''' - Intro.lyx - Shortcuts.lyx - Tutorial.lyx -''') - - -lib_doc_uk_files = Split(''' - Intro.lyx -''') - - -lib_doc_uk_clipart_files = Split(''' - FootnoteQT4.png -''') - - -lib_doc_zhCN_files = Split(''' - Intro.lyx - Tutorial.lyx -''') - - -lib_examples_files = Split(''' - aa_sample.lyx - aas_sample.lyx - achemso.lyx - addressExample.adr - amsart-test.lyx - amsbook-test.lyx - armenian-article.lyx - beamer-g4-mask.jpg - beamer-g4.jpg - beamer-icsi-logo.pdf - beamer-knight1-mask.png - beamer-knight1.png - beamer-knight2-mask.png - beamer-knight2.png - beamer-knight3-mask.png - beamer-knight3.png - beamer-knight4-mask.png - beamer-knight4.png - beamerlyxexample1.lyx - biblioExample.bib - Braille.lyx - chess-article.lyx - chessgame.lyx - CV-image.eps - CV-image.png - docbook_article.lyx - europeCV.lyx - example_lyxified.lyx - example_raw.lyx - FeynmanDiagrams.lyx - Foils.lyx - iecc05.fen - iecc07.fen - iecc12.fen - ItemizeBullets.lyx - knitr.lyx - landslide.lyx - lilypond.lyx - linguistics.lyx - listerrors.lyx - Literate.lyx - localization_test.lyx - longsheet.gnumeric - modernCV.lyx - MultilingualCaptions.lyx - noweb2lyx.lyx - powerdot-example.lyx - recipebook.lyx - R-S-statements.lyx - script_form.lyx - seminar.lyx - serial_letter1.lyx - serial_letter2.lyx - serial_letter3.lyx - sheet1.gnumeric - sheet2.ods - sheet3.xls - simplecv.lyx - splash.lyx - spreadsheet.lyx - sweave.lyx - tufte-book.lyx - tufte-handout.lyx - xyfigure.png - xypic.lyx -''') - - -lib_examples_ca_files = Split(''' - ItemizeBullets.lyx - mathed.lyx - splash.lyx -''') - - -lib_examples_cs_files = Split(''' - splash.lyx - priklad_zLyXovany.lyx - priklad_syrovy.lyx -''') - - -lib_examples_da_files = Split(''' - splash.lyx -''') - - -lib_examples_de_files = Split(''' - beispiel_gelyxt.lyx - beispiel_roh.lyx - Braille.lyx - Dezimal.lyx - ItemizeBullets.lyx - Lebenslauf.lyx - linguistics.lyx - serienbrief1.lyx - serienbrief2.lyx - serienbrief3.lyx - splash.lyx - tufte-handout.lyx -''') - - -lib_examples_el_files = Split(''' - splash.lyx -''') - - -lib_examples_es_files = Split(''' - Braille.lyx - ejemplo_con_lyx.lyx - ejemplo_sin_lyx.lyx - ItemizeBullets.lyx - linguistics.lyx - splash.lyx - tufte-book.lyx - tufte-handout.lyx -''') - - -lib_examples_fa_files = Split(''' - splash.lyx -''') - - -lib_examples_fr_files = Split(''' - AlignementDecimal.lyx - Braille.lyx - exemple_brut.lyx - exemple_lyxifie.lyx - exemple-powerdot.lyx - FeynmanDiagrams.lyx - Foils.lyx - linguistics.lyx - ListesPuces.lyx - seminar.lyx - simplecv.lyx - splash.lyx - xyfigure.png - xypic.lyx -''') - - -lib_examples_eu_files = Split(''' - adibide_gordina.lyx - adibide_lyx-atua.lyx - splash.lyx -''') - - -lib_examples_gl_files = Split(''' - exemplo_bruto.lyx - exemplo_lyxificado.lyx - splash.lyx -''') - - -lib_examples_he_files = Split(''' - example_lyxified.lyx - example_raw.lyx - splash.lyx -''') - - -lib_examples_hu_files = Split(''' - example_lyxified.lyx - example_raw.lyx - splash.lyx -''') - - -lib_examples_id_files = Split(''' - splash.lyx -''') - - -lib_examples_it_files = Split(''' - ItemizeBullets.lyx - splash.lyx -''') - - -lib_examples_ja_files = Split(''' - Braille.lyx - FeynmanDiagrams.lyx - linguistics.lyx - splash.lyx - xyfigure.png - xypic.lyx -''') - - -lib_examples_nl_files = Split(''' - opsommingstekens.lyx - splash.lyx - voorbeeld_ruw.lyx - voorbeeld_verlyxt.lyx -''') - - -lib_examples_pl_files = Split(''' - splash.lyx -''') - - -lib_examples_pt_files = Split(''' - splash.lyx -''') - - -lib_examples_ro_files = Split(''' - splash.lyx -''') - - -lib_examples_ru_files = Split(''' - splash.lyx -''') - - -lib_examples_sk_files = Split(''' - splash.lyx -''') - - -lib_examples_sl_files = Split(''' - primer_lyxan.lyx - primer_surov.lyx - splash.lyx -''') - - -lib_examples_sr_files = Split(''' - Braille.lyx - splash.lyx -''') - - -lib_examples_sv_files = Split(''' - splash.lyx -''') - - -lib_examples_uk_files = Split(''' - splash.lyx -''') - - -lib_lyx2lyx_files = Split(''' - generate_encoding_info.py - LyX.py - lyx2lyx - lyx2lyx_lang.py - lyx_0_06.py - lyx_0_08.py - lyx_0_10.py - lyx_0_12.py - lyx_1_0.py - lyx_1_1.py - lyx_1_1_5.py - lyx_1_1_6_0.py - lyx_1_1_6_3.py - lyx_1_2.py - lyx_1_3.py - lyx_1_4.py - lyx_1_5.py - lyx_1_6.py - lyx_2_0.py - lyx_2_1.py - lyx2lyx_tools.py - parser_tools.py - profiling.py - test_parser_tools.py - unicode_symbols.py -''') - - -lib_lyx2lyx_extra_files = Split(''' - lyx2lyx_version.py.in - Makefile.am -''') - - -lib_layouts_files = Split(''' - aa.layout - aapaper.layout - aastex.layout - achemso.layout - acmsiggraph.layout - AEA.layout - agutex.layout - agu-dtd.layout - agums.layout - amsart.layout - amsbook.layout - apa.layout - arab-article.layout - armenian-article.layout - article.layout - article-beamer.layout - beamer.layout - bicaption.module - book.layout - broadway.layout - chess.layout - cl2emult.layout - ctex-article.layout - ctex-book.layout - ctex-report.layout - customHeadersFooters.module - dinbrief.layout - docbook-book.layout - docbook-chapter.layout - docbook-section.layout - docbook.layout - doublecol-new.layout - dtk.layout - ectaart.layout - egs.layout - elsart.layout - elsarticle.layout - entcs.layout - enumitem.module - europecv.layout - extarticle.layout - extbook.layout - extletter.layout - extreport.layout - foils.layout - frletter.layout - g-brief.layout - g-brief2.layout - heb-article.layout - heb-letter.layout - hollywood.layout - IEEEtran.layout - ijmpc.layout - ijmpd.layout - iopart.layout - isprs.layout - jarticle.layout - jasatex.layout - jbook.layout - jgrga.layout - jreport.layout - jsarticle.layout - jsbook.layout - jss.layout - kluwer.layout - latex8.layout - letter.layout - lettre.layout - literate-article.layout - literate-book.layout - literate-report.layout - llncs.layout - ltugboat.layout - memoir.layout - moderncv.layout - mwart.layout - mwbk.layout - mwrep.layout - paper.layout - powerdot.layout - recipebook.layout - report.layout - revtex.layout - revtex4.layout - revtex4-1.layout - scrartcl.layout - scrarticle-beamer.layout - scrbook.layout - scrlettr.layout - scrlttr2.layout - scrreprt.layout - seminar.layout - siamltex.layout - sigplanconf.layout - simplecv.layout - singlecol.layout - singlecol-new.layout - slides.layout - spie.layout - svglobal.layout - svglobal3.layout - svjog.layout - svmono.layout - svmult.layout - svprobth.layout - tarticle.layout - tbook.layout - treport.layout - tufte-book.layout - tufte-handout.layout -''') - - -lib_layouts_inc_files = Split(''' - aapaper.inc - agu_stdclass.inc - agu_stdcounters.inc - agu_stdlists.inc - agu_stdsections.inc - agu_stdtitle.inc - aguplus.inc - amsdefs.inc - db_lyxmacros.inc - db_stdcharstyles.inc - db_stdclass.inc - db_stdcounters.inc - db_stdlayouts.inc - db_stdlists.inc - db_stdsections.inc - db_stdstarsections.inc - db_stdstruct.inc - db_stdtitle.inc - literate-scrap.inc - lyxmacros.inc - numarticle.inc - numreport.inc - numrevtex.inc - scrclass.inc - stdcharstyles.inc - stdciteformats.inc - stdclass.inc - stdcounters.inc - stdcustom.inc - stdfloats.inc - stdinsets.inc - stdlayouts.inc - stdletter.inc - stdlists.inc - stdlyxlist.inc - stdrefprefix.inc - stdsections.inc - stdstarsections.inc - stdstruct.inc - stdtitle.inc - svcommon.inc - theorems.inc - theorems-ams.inc - theorems-ams-bytype.inc - theorems-bytype.inc - theorems-case.inc - theorems-order.inc - theorems-proof.inc - theorems-proof-std.inc - theorems-refprefix.inc - theorems-starred.inc - theorems-starred-equivalents.inc - theorems-without-preamble.inc -''') - - -lib_layouts_module_files = Split(''' - braille.module - endnotes.module - eqs-within-sections.module - figs-within-sections.module - fixltx2e.module - fix-cm.module - foottoend.module - hanging.module - initials.module - knitr.module - lilypond.module - linguistics.module - logicalmkup.module - minimalistic.module - multicol.module - noweb.module - rsphrase.module - sweave.module - tabs-within-sections.module - theorems-ams-bytype.module - theorems-ams-extended.module - theorems-ams-extended-bytype.module - theorems-ams.module - theorems-bytype.module - theorems-chap-bytype.module - theorems-chap.module - theorems-named.module - theorems-sec-bytype.module - theorems-sec.module - theorems-starred.module - theorems-std.module -''') - -lib_scripts_files = Split(''' - bash_completion - clean_dvi.py - convertDefault.py - csv2lyx.py - date.py - ext_copy.py - fen2ascii.py - fig2pdftex.py - fig2pstex.py - fig_copy.py - include_bib.py - layout2layout.py - legacy_lyxpreview2ppm.py - listerrors - lyxknitr.R - lyxpak.py - lyxpreview2bitmap.py - lyxpreview_tools.py - lyxstangle.R - lyxsweave.R - prefs2prefs.py - prefs2prefs_lfuns.py - prefs2prefs_prefs.py - TeXFiles.py - tex_copy.py -''') - - -lib_bind_files = Split(''' - aqua.bind - broadway.bind - cua.bind - cyrkeys.bind - emacs.bind - greekkeys.bind - hollywood.bind - latinkeys.bind - mac.bind - math.bind - menus.bind - sciword.bind - site.bind - xemacs.bind -''') - - -lib_bind_de_files = Split(''' - menus.bind -''') - - -lib_commands_files = Split(''' - default.def -''') - - -boost_extra_files = Split(''' - LICENSE_1_0.txt - Makefile.am -''') - - -boost_libs_extra_files = Split(''' - Makefile.am - README -''') - - -boost_libs_signals_extra_files = Split(''' - Makefile.am - signals.vcproj -''') - - -boost_libs_signals_src_files = Split(''' - connection.cpp - named_slot_map.cpp - signal_base.cpp - slot.cpp - trackable.cpp -''') - - -boost_libs_signals_src_extra_files = Split(''' - Makefile.am - pch.h -''') - - -boost_libs_regex_extra_files = Split(''' - Makefile.am - regex.vcproj -''') - - -boost_libs_regex_src_files = Split(''' - c_regex_traits.cpp - cpp_regex_traits.cpp - cregex.cpp - fileiter.cpp - instances.cpp - posix_api.cpp - regex.cpp - regex_debug.cpp - regex_raw_buffer.cpp - regex_traits_defaults.cpp - w32_regex_traits.cpp - wide_posix_api.cpp - winstances.cpp -''') - - -boost_libs_regex_src_extra_files = Split(''' - Makefile.am - pch.h -''') - - - -development_Win32_packaging_installer = Split(''' - license.rtf - lyx.nsi - settings.nsh -''') - - -development_Win32_packaging_installer_graphics = Split(''' - header.bmp - wizard.bmp -''') - - -development_Win32_packaging_installer_gui = Split(''' - external.nsh - langselect.nsh - reinstall.nsh -''') - - -development_Win32_packaging_installer_include = Split(''' - declarations.nsh - detection.nsh - dictlist.nsh - filelist.nsh - gui.nsh - init.nsh - langlist.nsh - nsis.nsh - variables.nsh -''') - - -development_Win32_packaging_installer_lang = Split(''' - english.nsh - french.nsh - german.nsh - italian.nsh -''') - - -development_Win32_packaging_installer_setup = Split(''' - configure.nsh - install.nsh - reinstall.nsh -''') diff --git a/development/scons/scons_utils.py b/development/scons/scons_utils.py deleted file mode 100644 index 47450a1fbc..0000000000 --- a/development/scons/scons_utils.py +++ /dev/null @@ -1,909 +0,0 @@ -# vi:filetype=python:expandtab:tabstop=4:shiftwidth=4 -# -# file scons_utils.py -# -# This file is part of LyX, the document processor. -# Licence details can be found in the file COPYING. -# -# \author Bo Peng -# Full author contact details are available in file CREDITS. -# -# This file defines all the utility functions for the -# scons-based build system of lyx -# - -import os, sys, re, shutil, glob -from SCons.Util import * - - -def getVerFromConfigure(path): - ''' get lyx version from the AC_INIT line of configure.ac, - packed major and minor version numbers from the lyx version, - and LYX_DATE from an AC_SUBST line. - ''' - try: - config = open(os.path.join(path, 'configure.ac')) - except: - print "Can not open configure.ac. " - return 'x.x.x' - # find a line like follows - # AC_INIT(LyX,1.4.4svn,[lyx-devel@lists.lyx.org],[lyx]) - ver_pat = re.compile('AC_INIT\([^,]+,([^,]+),') - date_pat = re.compile('AC_SUBST\(LYX_DATE, \["(.*)"\]\)') - majmin_pat = re.compile('(\d+)\.(\d+)\..*') - version = 'x.x.x' - majmin = 'xx' - date = 'Not released' - for line in config.readlines(): - if ver_pat.match(line): - (version,) = ver_pat.match(line).groups() - majmin_match = majmin_pat.match(version) - majmin = majmin_match.group(1) + majmin_match.group(2) - if date_pat.match(line): - (date,) = date_pat.match(line).groups() - if version != 'x.x.x' and date != 'Not released': - break - return version.strip(), majmin.strip(), date.strip() - - -def relativePath(path, base): - '''return relative path from base, which is usually top source dir''' - # full pathname of path - path1 = os.path.normpath(os.path.realpath(path)).split(os.sep) - path2 = os.path.normpath(os.path.realpath(base)).split(os.sep) - if path1[:len(path2)] != path2: - print "Path %s is not under top source directory" % path - if len(path2) == len(path1): - return '' - path3 = os.path.join(*path1[len(path2):]); - # replace all \ by / such that we get the same comments on Windows and *nix - path3 = path3.replace('\\', '/') - return path3 - - -def isSubDir(path, base): - '''Whether or not path is a subdirectory of base''' - path1 = os.path.normpath(os.path.realpath(path)).split(os.sep) - path2 = os.path.normpath(os.path.realpath(base)).split(os.sep) - return len(path2) <= len(path1) and path1[:len(path2)] == path2 - - -def writeToFile(filename, lines, append = False): - " utility function: write or append lines to filename " - # create directory if needed - dir = os.path.split(filename)[0] - if dir != '' and not os.path.isdir(dir): - os.makedirs(dir) - if append: - file = open(filename, 'a') - else: - file = open(filename, 'w') - file.write(lines) - file.close() - - -def env_subst(target, source, env): - ''' subst variables in source by those in env, and output to target - source and target are scons File() objects - - %key% (not key itself) is an indication of substitution - ''' - assert len(target) == 1 - assert len(source) == 1 - target_file = file(str(target[0]), "w") - source_file = file(str(source[0]), "r") - - contents = source_file.read() - for k, v in env.items(): - try: - val = env.subst('$'+k) - # temporary fix for the \Resource backslash problem - val = val.replace('\\', '/') - # multi-line replacement - val = val.replace('\n',r'\\n\\\n') - contents = re.sub('@'+k+'@', val, contents) - except: - pass - target_file.write(contents + "\n") - target_file.close() - #st = os.stat(str(source[0])) - #os.chmod(str(target[0]), stat.S_IMODE(st[stat.ST_MODE]) | stat.S_IWRITE) - - -def env_nsis(source, target, env, for_signature): - ''' Get nsis command line ''' - def quoteIfSpaced(str): - if ' ' in str: - return '"' + str + '"' - else: - return str - ret = env['NSIS'] + " /V1 " - if env.has_key('NSISFLAGS'): - for flag in env['NSISFLAGS']: - ret += flag - ret += ' ' - if env.has_key('NSISDEFINES'): - for d in env['NSISDEFINES']: - ret += '/D'+d - if env['NSISDEFINES'][d]: - ret += '=' + quoteIfSpaced(env['NSISDEFINES'][d]) - ret += ' ' - # bundled? - if '-bundle.exe' in str(target[0]): - ret += '/DSETUPTYPE=BUNDLE ' - for s in source: - ret += quoteIfSpaced(str(s)) - return ret - - -def env_toc(target, source, env): - '''Generate target from source files''' - # this is very tricky because we need to use installed lyx2lyx with - # correct lyx2lyx_version.py - sys.path.append(env['LYX2LYX_DEST']) - sys.path.append(env.Dir('$TOP_SRCDIR/lib/doc').abspath) - import doc_toc - # build toc - doc_toc.build_toc(str(target[0]), [file.abspath for file in source]) - - -def env_cat(target, source, env): - '''Cat source > target. Avoid pipe to increase portability''' - output = open(env.File(target[0]).abspath, 'w') - for src in source: - input = open(env.File(src).abspath) - output.write(input.read()) - input.close() - output.close() - - -def env_potfiles(target, source, env): - '''Build po/POTFILES.in''' - # command - # grep -l '_(\".*\")' `find src \( -name '*.h' -o -name '*.cpp' -o -name '*.cpp.in' \) -print` | grep -v -e "src/support/Package.cpp$$" | sort | uniq - # is used under *nix but windows users have to do these all in python - target_file = open(str(target[0]), "w") - potfiles = [] - trans = re.compile('_\(".*"\)', re.M) - for file in source: - rel_file = relativePath(str(file), env.subst('$TOP_SRCDIR')) - if rel_file not in potfiles and trans.search(open(str(file)).read()): - potfiles.append(rel_file) - potfiles.sort() - print >> target_file, '\n'.join(potfiles) - target_file.close() - - -def createResFromIcon(env, icon_file, rc_file): - ''' create a rc file with icon, and return res file (windows only) ''' - if os.name == 'nt': - rc_name = env.File(rc_file).abspath - dir = os.path.split(rc_name)[0] - if not os.path.isdir(dir): - os.makedirs(dir) - rc = open(rc_name, 'w') - print >> rc, 'IDI_ICON1 ICON DISCARDABLE "%s"' % \ - os.path.join(env.Dir('$TOP_SRCDIR').abspath, 'development', 'win32', - 'packaging', 'icons', icon_file).replace('\\', '\\\\') - rc.close() - return env.RES(rc_name) - else: - return [] - - -def env_qtResource(target, source, env): - '''Create resource.qrc''' - qrc = open(str(target[0]), 'w') - print >> qrc, "" - for file in source: - rel_file = relativePath(str(file), env.subst('$TOP_SRCDIR/lib')) - abs_file = str(file.abspath) - print >> qrc, '%s' % (rel_file, abs_file) - print >> qrc, '' - qrc.close() - -# -# autoconf tests -# - -def checkPkgConfig(conf, version): - ''' Return false if pkg_config does not exist, or is too old ''' - conf.Message('Checking for pkg-config...') - ret = conf.TryAction('pkg-config --atleast-pkgconfig-version=%s' % version)[0] - conf.Result(ret) - return ret - - -def checkPackage(conf, pkg): - ''' check if pkg is under the control of conf ''' - conf.Message('Checking for package %s...' % pkg) - ret = conf.TryAction("pkg-config --print-errors --exists %s" % pkg)[0] - conf.Result(ret) - return ret - - -def checkMkdirOneArg(conf): - check_mkdir_one_arg_source = """ -#include -int main() -{ - mkdir("somedir"); -} -""" - conf.Message('Checking for the number of args for mkdir... ') - ret = conf.TryLink(check_mkdir_one_arg_source, '.c') or \ - conf.TryLink('#include ' + check_mkdir_one_arg_source, '.c') or \ - conf.TryLink('#include ' + check_mkdir_one_arg_source, '.c') - if ret: - conf.Result('one') - else: - conf.Result('two') - return ret - - -def checkCXXGlobalCstd(conf): - ''' Checking the use of std::tolower or tolower ''' - check_global_cstd_source = ''' -#include -using std::tolower; -int main() -{ - return 0; -} -''' - conf.Message('Checking for the use of global cstd... ') - # if can not compile, define CXX_GLOBAL_CSTD - ret = conf.TryLink(check_global_cstd_source, '.cpp') - conf.Result(ret) - return ret - - -def checkSelectArgType(conf): - ''' Adapted from autoconf ''' - conf.Message('Checking for arg types for select... ') - for arg234 in ['fd_set *', 'int *', 'void *']: - for arg1 in ['int', 'size_t', 'unsigned long', 'unsigned']: - for arg5 in ['struct timeval *', 'const struct timeval *']: - check_select_source = ''' -#if HAVE_SYS_SELECT_H -# include -#endif -#if HAVE_SYS_SOCKET_H -# include -#endif -extern int select (%s, %s, %s, %s, %s); -int main() -{ - return(0); -} -''' % (arg1, arg234, arg234, arg234, arg5) - ret = conf.TryLink(check_select_source, '.c') - if ret: - conf.Result(ret) - return (arg1, arg234, arg5) - conf.Result('no (use default)') - return ('int', 'int *', 'struct timeval *') - - -def checkBoostLibraries(conf, libs, lib_paths, inc_paths, versions, isDebug): - ''' look for boost libraries - libs: library names - lib_paths: try these paths for boost libraries - inc_paths: try these paths for boost headers - versions: supported boost versions - isDebug: if true, use debug libraries - ''' - conf.Message('Checking for boost library %s... ' % ', '.join(libs)) - libprefix = conf.env['LIBPREFIX'] - libsuffix = '(%s|%s)' % (conf.env['LIBSUFFIX'], conf.env['SHLIBSUFFIX']) - found_lib = False - found_inc = False - lib_names = [] - lib_path = None - inc_path = None - for path in lib_paths: - conf.Log("Looking into %s\n" % path) - for lib in libs: - # get all the libs, then filter for the right library - files = glob.glob(os.path.join(path, '%sboost_%s-*.*' % (libprefix, lib))) - # check things like libboost_iostreams-gcc-mt-d-1_33_1.a - if len(files) > 0: - conf.Log("Find boost libraries: %s\n" % files) - # runtime code includes s,g,y,d,p,n, where we should look for - # d,g,y for debug, s,p,n for release - lib_files = [] - if isDebug: - for ver in versions: - lib_files += filter(lambda x: re.search('%sboost_%s-\w+-mt-[^spn]+-%s%s' % (libprefix, lib, ver, libsuffix), x), files) - else: - for ver in versions: - lib_files += filter(lambda x: re.search('%sboost_%s-\w+-mt-([^dgy]+-)*%s%s' % (libprefix, lib, ver, libsuffix), x), files) - if len(lib_files) == 0: - # use alternative libraries - for ver in versions: - lib_files += filter(lambda x: re.search('%sboost_%s-[\w-]+%s%s' % (libprefix, lib, ver, libsuffix), x), files) - if len(lib_files) > 0: - # get xxx-gcc-1_33_1 from /usr/local/lib/libboost_xxx-gcc-1_33_1.a - name = lib_files[0].split(os.sep)[-1][len(libprefix):] - lib_names.append(name.split('.')[0]) - conf.Log("Qualified libraries: %s\n" % lib_names) - else: - conf.Log("No qualified library is found.\n") - break - if len(lib_names) == len(libs): - found_lib = True - lib_path = path - break - if not found_lib: - if len(lib_names) == 0: - conf.Log("No boost library is found\n") - else: - conf.Log("Found boost libraries: %s\n" % lib_names) - conf.Result('no') - return (None, None, None) - # check version number in boost/version.hpp - def isValidBoostDir(dir): - version_file = os.path.join(dir, 'boost', 'version.hpp') - if not os.path.isfile(version_file): - return False - version_file_content = open(version_file).read() - version_strings = ['#define BOOST_LIB_VERSION "%s"' % ver for ver in versions] - return True in [x in version_file_content for x in version_strings] - # check for boost header file - for path in inc_paths: - conf.Log("Checking for inc path: %s\n" % path) - if isValidBoostDir(path): - inc_path = path - found_inc = True - else: # check path/boost_1_xx_x/boost - dirs = glob.glob(os.path.join(path, 'boost-*')) - if len(dirs) > 0 and isValidBoostDir(dirs[0]): - conf.Log("Checing for sub directory: %s\n" % dirs[0]) - inc_path = dirs[0] - found_inc = True - # return result - if found_inc: - conf.Result('yes') - conf.Log('Using boost libraries %s\n' % (', '.join(lib_names))) - return (lib_names, lib_path, inc_path) - else: - conf.Result('no') - return (None, None, None) - - -def checkCommand(conf, cmd): - ''' check the existence of a command - return full path to the command, or none - ''' - conf.Message('Checking for command %s...' % cmd) - res = WhereIs(cmd) - conf.Result(res is not None) - return res - - -def checkNSIS(conf): - ''' check the existence of nsis compiler, return the fullpath ''' - conf.Message('Checking for nsis compiler...') - res = None - if can_read_reg: - # If we can read the registry, get the NSIS command from it - try: - k = RegOpenKeyEx(hkey_mod.HKEY_LOCAL_MACHINE, - 'SOFTWARE\\NSIS') - val, tok = RegQueryValueEx(k,None) - ret = val + os.path.sep + 'makensis.exe' - if os.path.isfile(ret): - res = '"' + ret + '"' - else: - res = None - except: - pass # Couldn't find the key, just act like we can't read the registry - # Hope it's on the path - if res is None: - res = WhereIs('makensis.exe') - conf.Result(res is not None) - return res - - -def checkLC_MESSAGES(conf): - ''' check the definition of LC_MESSAGES ''' - check_LC_MESSAGES = ''' -#include -int main() -{ - return LC_MESSAGES; -} -''' - conf.Message('Checking for LC_MESSAGES in locale.h... ') - ret = conf.TryLink(check_LC_MESSAGES, '.c') - conf.Result(ret) - return ret - - -def checkIconvConst(conf): - ''' check the declaration of iconv ''' - check_iconv_const = ''' -#include -// this declaration will fail when there already exists a non const char** -// version which returns size_t -double iconv(iconv_t cd, char **inbuf, size_t *inbytesleft, char **outbuf, size_t *outbytesleft); -int main() { - return 0; -} -''' - conf.Message('Checking if the declaration of iconv needs const... ') - ret = conf.TryLink(check_iconv_const, '.cpp') - conf.Result(ret) - return ret - - -def checkSizeOfWChar(conf): - ''' check the size of wchar ''' - check_sizeof_wchar = ''' -#include -int i[ ( sizeof(wchar_t)==%d ? 1 : -1 ) ]; -int main() -{ - return 0; -} -''' - conf.Message('Checking the size of wchar_t... ') - if conf.TryLink(check_sizeof_wchar % 2, '.cpp'): - ret = 2 - elif conf.TryLink(check_sizeof_wchar % 4, '.cpp'): - ret = 4 - else: - ret = 0 - conf.Result(str(ret)) - return ret - - -def checkDeclaration(conf, func, headers): - ''' check if a function is declared in given headers ''' - check_decl = ''' -#include <%%s> -int main() -{ -#ifndef %s - char *p = (char *) %s; -#endif -} -''' % (func, func) - conf.Message('Checking for the declaration of function %s... ' % func) - ret = True in [conf.TryLink(check_decl % header, '.c') for header in headers] - conf.Result(ret) - return ret - - -def createConfigFile(conf, config_file, - config_pre = '', config_post = '', - headers = [], functions = [], declarations = [], types = [], libs = [], - custom_tests = [], extra_items = []): - ''' create a configuration file, with options - config_file: which file to create - config_pre: first part of the config file - config_post: last part of the config file - headers: header files to check, in the form of a list of - ('file', 'HAVE_FILE', 'c'/'c++') - functions: functions to check, in the form of a list of - ('func', 'HAVE_func', 'include lines'/None) - declarations: function declarations to check, in the form of a list of - ('func', 'HAVE_DECL_func', header_files) - types: types to check, in the form of a list of - ('type', 'HAVE_TYPE', 'includelines'/None) - libs: libraries to check, in the form of a list of - ('lib', 'HAVE_LIB', 'LIB_NAME'). HAVE_LIB will be set if 'lib' exists, - or any of the libs exists if 'lib' is a list of libs. - Optionally, user can provide another key LIB_NAME, that will - be set to the detected lib (or None otherwise). - custom_tests: extra tests to perform, in the form of a list of - (test (True/False), 'key', 'desc', 'true config line', 'false config line') - If the last two are ignored, '#define key 1' '/*#undef key */' - will be used. - extra_items: extra configuration lines, in the form of a list of - ('config', 'description') - Return: - The result of each test, as a dictioanry of - res['XXX'] = True/False - XXX are keys defined in each argument. - ''' - cont = config_pre + '\n' - result = {} - # add to this string, in appropriate format - def configString(lines, desc=''): - text = '' - if lines.strip() != '': - if desc != '': - text += '/* ' + desc + ' */\n' - text += lines + '\n\n' - return text - # - # headers - for header in headers: - description = "Define to 1 if you have the <%s> header file." % header[0] - if (header[2] == 'c' and conf.CheckCHeader(header[0])) or \ - (header[2] == 'cxx' and conf.CheckCXXHeader(header[0])): - result[header[1]] = 1 - cont += configString('#define %s 1' % header[1], desc = description) - else: - result[header[1]] = 0 - cont += configString('/* #undef %s */' % header[1], desc = description) - # functions - for func in functions: - description = "Define to 1 if you have the `%s' function." % func[0] - if conf.CheckFunc(func[0], header=func[2]): - result[func[1]] = 1 - cont += configString('#define %s 1' % func[1], desc = description) - else: - result[func[1]] = 0 - cont += configString('/* #undef %s */' % func[1], desc = description) - for decl in declarations: - description = "Define to 1 if you have the declaration of `%s', and to 0 if you don't." % decl[0] - if conf.CheckDeclaration(decl[0], decl[2]): - result[decl[1]] = 1 - cont += configString('#define %s 1' % decl[1], desc = description) - else: - result[decl[1]] = 0 - cont += configString('/* #undef %s */' % decl[1], desc = description) - # types - for t in types: - description = "Define to 1 if you have the `%s' type." % t[0] - if conf.CheckType(t[0], includes=t[2]): - result[t[1]] = 1 - cont += configString('#define %s 1' % t[1], desc = description) - else: - result[t[1]] = 0 - cont += configString('/* #undef %s */' % t[1], desc = description) - # libraries - for lib in libs: - description = "Define to 1 if you have the `%s' library (-l%s)." % (lib[0], lib[0]) - if type(lib[0]) is type(''): - lib_list = [lib[0]] - else: - lib_list = lib[0] - # check if any of the lib exists - result[lib[1]] = 0 - # if user want the name of the lib detected - if len(lib) == 3: - result[lib[2]] = None - for ll in lib_list: - if conf.CheckLib(ll): - result[lib[1]] = 1 - if len(lib) == 3: - result[lib[2]] = ll - cont += configString('#define %s 1' % lib[1], desc = description) - break - # if not found - if not result[lib[1]]: - cont += configString('/* #undef %s */' % lib[1], desc = description) - # custom tests - for test in custom_tests: - if test[0]: - result[test[1]] = 1 - if len(test) == 3: - cont += configString('#define %s 1' % test[1], desc = test[2]) - else: - cont += configString(test[3], desc = test[2]) - else: - result[test[1]] = 0 - if len(test) == 3: - cont += configString('/* #undef %s */' % test[1], desc = test[2]) - else: - cont += configString(test[4], desc = test[2]) - # extra items (no key is returned) - for item in extra_items: - cont += configString(item[0], desc = item[1]) - # add the last part - cont += '\n' + config_post + '\n' - # write to file - writeToFile(config_file, cont) - return result - - -def installCygwinLDScript(path): - ''' Install i386pe.x-no-rdata ''' - ld_script = os.path.join(path, 'i386pe.x-no-rdata') - script = open(ld_script, 'w') - script.write('''/* specific linker script avoiding .rdata sections, for normal executables -for a reference see -http://www.cygwin.com/ml/cygwin/2004-09/msg01101.html -http://www.cygwin.com/ml/cygwin-apps/2004-09/msg00309.html -*/ -OUTPUT_FORMAT(pei-i386) -SEARCH_DIR("/usr/i686-pc-cygwin/lib"); SEARCH_DIR("/usr/lib"); SEARCH_DIR("/usr/lib/w32api"); -ENTRY(_mainCRTStartup) -SECTIONS -{ - .text __image_base__ + __section_alignment__ : - { - *(.init) - *(.text) - *(SORT(.text$*)) - *(.glue_7t) - *(.glue_7) - ___CTOR_LIST__ = .; __CTOR_LIST__ = . ; - LONG (-1);*(.ctors); *(.ctor); *(SORT(.ctors.*)); LONG (0); - ___DTOR_LIST__ = .; __DTOR_LIST__ = . ; - LONG (-1); *(.dtors); *(.dtor); *(SORT(.dtors.*)); LONG (0); - *(.fini) - /* ??? Why is .gcc_exc here? */ - *(.gcc_exc) - PROVIDE (etext = .); - *(.gcc_except_table) - } - /* The Cygwin32 library uses a section to avoid copying certain data - on fork. This used to be named ".data". The linker used - to include this between __data_start__ and __data_end__, but that - breaks building the cygwin32 dll. Instead, we name the section - ".data_cygwin_nocopy" and explictly include it after __data_end__. */ - .data BLOCK(__section_alignment__) : - { - __data_start__ = . ; - *(.data) - *(.data2) - *(SORT(.data$*)) - *(.rdata) - *(SORT(.rdata$*)) - *(.eh_frame) - ___RUNTIME_PSEUDO_RELOC_LIST__ = .; - __RUNTIME_PSEUDO_RELOC_LIST__ = .; - *(.rdata_runtime_pseudo_reloc) - ___RUNTIME_PSEUDO_RELOC_LIST_END__ = .; - __RUNTIME_PSEUDO_RELOC_LIST_END__ = .; - __data_end__ = . ; - *(.data_cygwin_nocopy) - } - .rdata BLOCK(__section_alignment__) : - { - } - .pdata BLOCK(__section_alignment__) : - { - *(.pdata) - } - .bss BLOCK(__section_alignment__) : - { - __bss_start__ = . ; - *(.bss) - *(COMMON) - __bss_end__ = . ; - } - .edata BLOCK(__section_alignment__) : - { - *(.edata) - } - /DISCARD/ : - { - *(.debug$S) - *(.debug$T) - *(.debug$F) - *(.drectve) - } - .idata BLOCK(__section_alignment__) : - { - /* This cannot currently be handled with grouped sections. - See pe.em:sort_sections. */ - SORT(*)(.idata$2) - SORT(*)(.idata$3) - /* These zeroes mark the end of the import list. */ - LONG (0); LONG (0); LONG (0); LONG (0); LONG (0); - SORT(*)(.idata$4) - SORT(*)(.idata$5) - SORT(*)(.idata$6) - SORT(*)(.idata$7) - } - .CRT BLOCK(__section_alignment__) : - { - ___crt_xc_start__ = . ; - *(SORT(.CRT$XC*)) /* C initialization */ - ___crt_xc_end__ = . ; - ___crt_xi_start__ = . ; - *(SORT(.CRT$XI*)) /* C++ initialization */ - ___crt_xi_end__ = . ; - ___crt_xl_start__ = . ; - *(SORT(.CRT$XL*)) /* TLS callbacks */ - /* ___crt_xl_end__ is defined in the TLS Directory support code */ - ___crt_xp_start__ = . ; - *(SORT(.CRT$XP*)) /* Pre-termination */ - ___crt_xp_end__ = . ; - ___crt_xt_start__ = . ; - *(SORT(.CRT$XT*)) /* Termination */ - ___crt_xt_end__ = . ; - } - .tls BLOCK(__section_alignment__) : - { - ___tls_start__ = . ; - *(.tls) - *(.tls$) - *(SORT(.tls$*)) - ___tls_end__ = . ; - } - .endjunk BLOCK(__section_alignment__) : - { - /* end is deprecated, don't use it */ - PROVIDE (end = .); - PROVIDE ( _end = .); - __end__ = .; - } - .rsrc BLOCK(__section_alignment__) : - { - *(.rsrc) - *(SORT(.rsrc$*)) - } - .reloc BLOCK(__section_alignment__) : - { - *(.reloc) - } - .stab BLOCK(__section_alignment__) (NOLOAD) : - { - *(.stab) - } - .stabstr BLOCK(__section_alignment__) (NOLOAD) : - { - *(.stabstr) - } - /* DWARF debug sections. - Symbols in the DWARF debugging sections are relative to the beginning - of the section. Unlike other targets that fake this by putting the - section VMA at 0, the PE format will not allow it. */ - /* DWARF 1.1 and DWARF 2. */ - .debug_aranges BLOCK(__section_alignment__) (NOLOAD) : - { - *(.debug_aranges) - } - .debug_pubnames BLOCK(__section_alignment__) (NOLOAD) : - { - *(.debug_pubnames) - } - /* DWARF 2. */ - .debug_info BLOCK(__section_alignment__) (NOLOAD) : - { - *(.debug_info) *(.gnu.linkonce.wi.*) - } - .debug_abbrev BLOCK(__section_alignment__) (NOLOAD) : - { - *(.debug_abbrev) - } - .debug_line BLOCK(__section_alignment__) (NOLOAD) : - { - *(.debug_line) - } - .debug_frame BLOCK(__section_alignment__) (NOLOAD) : - { - *(.debug_frame) - } - .debug_str BLOCK(__section_alignment__) (NOLOAD) : - { - *(.debug_str) - } - .debug_loc BLOCK(__section_alignment__) (NOLOAD) : - { - *(.debug_loc) - } - .debug_macinfo BLOCK(__section_alignment__) (NOLOAD) : - { - *(.debug_macinfo) - } - /* SGI/MIPS DWARF 2 extensions. */ - .debug_weaknames BLOCK(__section_alignment__) (NOLOAD) : - { - *(.debug_weaknames) - } - .debug_funcnames BLOCK(__section_alignment__) (NOLOAD) : - { - *(.debug_funcnames) - } - .debug_typenames BLOCK(__section_alignment__) (NOLOAD) : - { - *(.debug_typenames) - } - .debug_varnames BLOCK(__section_alignment__) (NOLOAD) : - { - *(.debug_varnames) - } - /* DWARF 3. */ - .debug_ranges BLOCK(__section_alignment__) (NOLOAD) : - { - *(.debug_ranges) - } -} -''') - script.close() - return(ld_script) - - -def installCygwinPostinstallScript(path): - ''' Install lyx.sh ''' - postinstall_script = os.path.join(path, 'lyx.sh') - script = open(postinstall_script, 'w') - script.write(r'''#!/bin/sh - -# Add /usr/share/lyx/fonts to /etc/fonts/local.conf -# if it is not already there. -if [ -f /etc/fonts/local.conf ]; then - grep -q /usr/share/lyx/fonts /etc/fonts/local.conf - if [ $? -ne 0 ]; then - sed 's/^<\/fontconfig>/\/usr\/share\/lyx\/fonts<\/dir>\n<\/fontconfig>/' /etc/fonts/local.conf > /etc/fonts/local.conf.tmp - mv -f /etc/fonts/local.conf.tmp /etc/fonts/local.conf - fc-cache /usr/share/lyx/fonts - fi -fi - ''') - script.close() - return(postinstall_script) - - -try: - # these will be used under win32 - import win32file - import win32event - import win32process - import win32security -except: - # does not matter if it fails on other systems - pass - - -class loggedSpawn: - def __init__(self, env, logfile, longarg, info): - # save the spawn system - self.env = env - self.logfile = logfile - # clear the logfile (it may not exist) - if logfile != '': - # this will overwrite existing content. - writeToFile(logfile, info, append=False) - # - self.longarg = longarg - # get hold of the old spawn? (necessary?) - self._spawn = env['SPAWN'] - - # define new SPAWN - def spawn(self, sh, escape, cmd, args, spawnenv): - # get command line - newargs = ' '.join(map(escape, args[1:])) - cmdline = cmd + " " + newargs - # - # if log is not empty, write to it - if self.logfile != '': - # this tend to be slow (?) but ensure correct output - # Note that cmdline may be long so I do not escape it - try: - # since this is not an essential operation, proceed if things go wrong here. - writeToFile(self.logfile, cmd + " " + ' '.join(args[1:]) + '\n', append=True) - except: - print "Warning: can not write to log file ", self.logfile - # - # if the command is not too long, use the old - if not self.longarg or len(cmdline) < 8000: - exit_code = self._spawn(sh, escape, cmd, args, spawnenv) - else: - sAttrs = win32security.SECURITY_ATTRIBUTES() - StartupInfo = win32process.STARTUPINFO() - for var in spawnenv: - spawnenv[var] = spawnenv[var].encode('ascii', 'replace') - # check for any special operating system commands - if cmd == 'del': - for arg in args[1:]: - win32file.DeleteFile(arg) - exit_code = 0 - else: - # otherwise execute the command. - hProcess, hThread, dwPid, dwTid = win32process.CreateProcess(None, cmdline, None, None, 1, 0, spawnenv, None, StartupInfo) - win32event.WaitForSingleObject(hProcess, win32event.INFINITE) - exit_code = win32process.GetExitCodeProcess(hProcess) - win32file.CloseHandle(hProcess); - win32file.CloseHandle(hThread); - return exit_code - - -def setLoggedSpawn(env, logfile = '', longarg=False, info=''): - ''' This function modify env and allow logging of - commands to a logfile. If the argument is too long - a win32 spawn will be used instead of the system one - ''' - # - # create a new spwn object - ls = loggedSpawn(env, logfile, longarg, info) - # replace the old SPAWN by the new function - env['SPAWN'] = ls.spawn -