Revision: 798 http://geany-plugins.svn.sourceforge.net/geany-plugins/?rev=798&view=rev Author: eht16 Date: 2009-06-30 21:05:21 +0000 (Tue, 30 Jun 2009)
Log Message: ----------- Adjust plugins's docdir on Windows. Add option '--write-installer' to create the Windows installer.
Modified Paths: -------------- trunk/geany-plugins/wscript
Modified: trunk/geany-plugins/wscript =================================================================== --- trunk/geany-plugins/wscript 2009-06-30 20:56:42 UTC (rev 797) +++ trunk/geany-plugins/wscript 2009-06-30 21:05:21 UTC (rev 798) @@ -37,7 +37,7 @@
import Build, Options, Utils, preproc -import os, sys, tempfile +import glob, os, sys, tempfile
APPNAME = 'geany-plugins' @@ -321,6 +321,8 @@ help='update the message catalogs for translation', dest='update_po') opt.add_option('--list-plugins', action='store_true', default=False, help='list plugins which can be built', dest='list_plugins') + opt.add_option('--write-installer', action='store_true', default=False, + help='create Windows installer (maintainer and Win32 only)', dest='write_installer')
opt.add_option('--enable-plugins', action='store', default='', help='plugins to be built [plugins in CSV format, e.g. "%(1)s,%(2)s"]' % \ @@ -349,7 +351,7 @@ )
# install docs - docdir = '${G_PREFIX}/doc/geanylua' if is_win32 else '${DOCDIR}/geanylua' + docdir = '${G_PREFIX}/doc/plugins/geanylua' if is_win32 else '${DOCDIR}/geanylua' bld.install_files(docdir, 'geanylua/docs/*.html') # install examples (Waf doesn't support installing files recursively, yet) datadir = '${G_PREFIX}/share/' if is_win32 else '${DATADIR}' @@ -372,7 +374,7 @@
def install_docs(bld, pname, files): ext = '.txt' if is_win32 else '' - docdir = '${G_PREFIX}/doc/%s' % pname if is_win32 else '${DOCDIR}/%s' % pname + docdir = '${G_PREFIX}/doc/plugins/%s' % pname if is_win32 else '${DOCDIR}/%s' % pname for file in files: if os.path.exists(os.path.join(p.name, file)): bld.install_as( @@ -434,6 +436,23 @@
def shutdown(): + if Options.options.write_installer: + do_sign = os.path.exists("sign.bat") # private file to sign the binary files, not needed + def sign_binary(file): + if do_sign: + Utils.exec_command('sign.bat %s' % file) + + # strip all binaries + Utils.pprint('CYAN', 'Stripping %sfiles' % ('and signing binary ' if do_sign else '')) + files = glob.glob(os.path.join(Build.bld.env['G_PREFIX'], 'lib', '*.dll')) + files.append(Build.bld.env['G_PREFIX'] + '\lib\geany-plugins\geanylua\libgeanylua.dll') + for f in files: # sign the DLL files + Utils.exec_command('strip %s' % f) + sign_binary(f) + # create the installer + launch('makensis /V2 /NOCD build/geany-plugins.nsi', 'Creating the installer', 'CYAN') + sign_binary('geany-plugins-%s_setup.exe' % VERSION) + if Options.options.update_po: # the following code was taken from midori's WAF script, thanks potfile = '%s.pot' % (APPNAME)
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.