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.
* 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:
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
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
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] + \
['$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)
return '"' + str + '"'
else:
return str
- ret = env['NSIS'] + " "
+ ret = env['NSIS'] + " /V2 "
if env.has_key('NSISFLAGS'):
for flag in env['NSISFLAGS']:
ret += flag
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