mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-11-09 18:31:04 +00:00
Scons: NSIS support (installer target)
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@16854 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
parent
93f1f8bdac
commit
c9fb2a107e
@ -113,3 +113,8 @@ Creating the Installer
|
||||
Finally, go to development\Win32\packaging\installer
|
||||
(in a normal Windows Explorer), right-click on lyx.nsi and click
|
||||
"Compile NSIS Script".
|
||||
|
||||
You can also use the installer target of scons. Namely, use a command like
|
||||
$ scons -f development\scons\SConscript installer
|
||||
This will create $BUILDDIR\lyx-version-timestamp-Installer.exe for a devel version,
|
||||
and $BUILDDIR\lyx-version-Install.exe for a released version of lyx.
|
||||
|
@ -126,6 +126,11 @@ Installation options:
|
||||
* 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:
|
||||
@ -147,7 +152,7 @@ You can specify one or more of the following targets:
|
||||
Programs:
|
||||
tex2lyx, client, lyx, all = tex2lyx + client + lyx
|
||||
Installation:
|
||||
po, install = all + po
|
||||
po, install = all + po, installer (windows only, need NSIS)
|
||||
Misc:
|
||||
msvs_projects
|
||||
|
||||
|
@ -24,9 +24,14 @@ SetCompressor /SOLID lzma
|
||||
!system '"${NSISDIR}\makensis.exe" "${FILES_PDFVIEW}\pdfview.nsi"'
|
||||
|
||||
;--------------------------------
|
||||
;LyX Installer
|
||||
;LyX Installer, output file can be specified using command line option
|
||||
; /DExeFile=/path/to/installer
|
||||
|
||||
OutFile "${SETUP_EXE}"
|
||||
!ifdef ExeFile
|
||||
OutFile "${ExeFile}"
|
||||
!else
|
||||
Outfile "${SETUP_EXE}"
|
||||
!endif
|
||||
|
||||
;--------------------------------
|
||||
;Components
|
||||
|
@ -189,6 +189,8 @@ opts.AddOptions(
|
||||
comp1,comp2,...: rebuild specified targets''', 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),
|
||||
# build directory, will use $mode if not set
|
||||
('build_dir', 'Build directory', None),
|
||||
# version suffix
|
||||
@ -2015,10 +2017,19 @@ if build_installer:
|
||||
else:
|
||||
print 'No nsis compiler is found. Existing...'
|
||||
Exit(2)
|
||||
installer = env.installer(# 'target.exe',
|
||||
'$TOP_SRCDIR/development/Win32/packaging/installer/lyx.nsi')
|
||||
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)
|
||||
# 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']})
|
||||
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, \
|
||||
env.Depends(installer, [lyx, tex2lyx] + \
|
||||
['$TOP_SRCDIR/development/Win32/packaging/installer/%s' % x for x in win32_packaging_installer_files] + \
|
||||
['$TOP_SRCDIR/development/Win32/packaging/installer/components/%s' % x for x in win32_packaging_installer_components_files] + \
|
||||
['$TOP_SRCDIR/development/Win32/packaging/installer/dialogs/%s' % x for x in win32_packaging_installer_dialogs_files] + \
|
||||
@ -2026,7 +2037,6 @@ if build_installer:
|
||||
['$TOP_SRCDIR/development/Win32/packaging/installer/include/%s' % x for x in win32_packaging_installer_include_files] + \
|
||||
['$TOP_SRCDIR/development/Win32/packaging/installer/lang/%s' % x for x in win32_packaging_installer_lang_files ]
|
||||
)
|
||||
print "installer is", installer
|
||||
frontend_env.Alias('installer', installer)
|
||||
|
||||
|
||||
|
@ -83,7 +83,7 @@ def env_nsis(source, target, env, for_signature):
|
||||
return '"' + str + '"'
|
||||
else:
|
||||
return str
|
||||
ret = env['NSIS'] + " "
|
||||
ret = env['NSIS'] + " /V2 "
|
||||
if env.has_key('NSISFLAGS'):
|
||||
for flag in env['NSISFLAGS']:
|
||||
ret += flag
|
||||
@ -92,12 +92,10 @@ def env_nsis(source, target, env, for_signature):
|
||||
for d in env['NSISDEFINES']:
|
||||
ret += '/D'+d
|
||||
if env['NSISDEFINES'][d]:
|
||||
ret += '=' + quoteIfSpaced(toString(env['NSISDEFINES'][d],env))
|
||||
ret += '=' + quoteIfSpaced(env['NSISDEFINES'][d])
|
||||
ret += ' '
|
||||
for s in source:
|
||||
ret += quoteIfSpaced(str(s))
|
||||
print ret
|
||||
Exit(0)
|
||||
return ret
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user