Windows-related ideas for bzr

Alexander Belchenko bialix at ukr.net
Wed Jun 6 10:41:21 BST 2007


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Andrew Voznytsa пишет:
> At some point I'm planning to play with MSI. As learning course I may
> implement MSI installer for bazaar. It shouldn't be too hard.
> http://wix.sourceforge.net looks like good candidate for MSI building.

Actually, support for creating MSI-based installers for python modules
and packages is already built-in in Python 2.5. It needs only small changes
to Bazaar codebase:

=== modified file 'Makefile'
- --- Makefile    2007-06-06 07:57:00 +0000
+++ Makefile    2007-06-06 09:17:24 +0000
@@ -148,6 +148,9 @@
 python-installer: docs
        python setup.py bdist_wininst --install-script="bzr-win32-bdist-postinstall.py" -d .

+python-msi: docs
+       python setup.py bdist_msi --install-script="bzr-win32-bdist-postinstall.py" -d .
+

 # clean on win32 all installer-related files and directories
 clean-win32:

=== modified file 'setup.py'
- --- setup.py    2007-06-06 07:57:00 +0000
+++ setup.py    2007-06-06 09:16:59 +0000
@@ -166,7 +166,7 @@
     #    Extension("bzrlib.modulename", ["bzrlib/foo.pyx"], libraries = []))
 command_classes['build_ext'] = build_ext

- -if 'bdist_wininst' in sys.argv:
+if ('bdist_wininst' in sys.argv) or ('bdist_msi' in sys.argv):
     import glob
     # doc files
     docs = glob.glob('doc/*.htm') + ['doc/default.css']


Unfortunately, MSI or eggs(?) don't like bzr version info:

> make python-msi
...
running install_egg_info
Writing build\bdist.win32\msi\Lib\site-packages\bzr-0.17.0dev0-py2.5.egg-info
Traceback (most recent call last):
  File "setup.py", line 186, in <module>
    setup(**ARGS)
  File "C:\Python25\lib\distutils\core.py", line 151, in setup
  File "C:\Python25\lib\distutils\dist.py", line 974, in run_commands
  File "C:\Python25\lib\distutils\dist.py", line 994, in run_command
  File "G:\Python25\lib\distutils\command\bdist_msi.py", line 215, in run
    sversion = "%d.%d.%d" % StrictVersion(version).version
  File "G:\Python25\lib\distutils\version.py", line 40, in __init__
    self.parse(vstring)
  File "G:\Python25\lib\distutils\version.py", line 107, in parse
    raise ValueError, "invalid version number '%s'" % vstring
ValueError: invalid version number '0.17.0dev0'


Of course for standalone bzr.exe we need to use some third-party tool,
like WiX or similar.

[µ]
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.5 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFGZoFBzYr338mxwCURAjrrAJ9RqHZQ8ltvDXl1f2YiW3MkIZoV6QCeM4oV
4KSTgPS0RzUKanStEAUs2wE=
=aCbu
-----END PGP SIGNATURE-----



More information about the bazaar mailing list