Windows-related ideas for bzr
Andrew Voznytsa
andrew.voznytsa at gmail.com
Thu Jun 7 14:57:03 BST 2007
> -----Original Message-----
> From: Alexander Belchenko [mailto:bialix at ukr.net]
> Sent: Wednesday, June 06, 2007 3:40 PM
> To: Andrew Voznytsa
> Cc: bazaar at lists.canonical.com
> Subject: Re: Windows-related ideas for bzr
>
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> Andrew Voznytsa пишет:
> >> -----Original Message-----
> >> From: Alexander Belchenko [mailto:bialix at ukr.net]
> >> Sent: Wednesday, June 06, 2007 12:41 PM
> >> To: Andrew Voznytsa
> >> Cc: bazaar at lists.canonical.com
> >> Subject: Re: Windows-related ideas for bzr
> >>
> >> -----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:
> >
> > Please read http://doc.astro-wise.org/distutils.version.html
> >
> > It seems that 'right' version should looks like 0.17.0a0
> >
> > I guess 'a'/'b' suffix in StrictVersion stands for Alpha/Beta.
> >
> > So 0.17.0a0 should be read as 0.17.0 Alpha 0.
>
> It means that our convention about versioning should be adjusted
> for MSI installer:
>
> dev -> a (alpha)
> rc -> b (beta)
>
> > To make it clear (for me) - does this patch allows to generate MSI
> package
> > for bzr.exe?
>
> Nope. This patch only about python-based installer (installing python
> sources
> for existing Python installation).
>
OK, attached is patch which enables basic MSI package generation for
bzr.exe.
Patch requires WiX to be installed.
Patch requires WIX_DIR environment; it shall point to WiX installation
directory.
Current issues:
a) Documentation was not included into MSI because WiX tool chain does not
support importing files by wildcard. Each file has to be specified manually
and all of them should be uniquely identified by UUID. IMO there are two
solutions - generate doc in CHM/PDF/other self-contained format (preferable,
is it possible with current doc tools you use?) or generate part of WiX XML
using COG.
b) Patch Bazaar.wxs using COG to update version number, generate component
and feature for certificate installation.
Any comments and suggestions welcome.
Administrator/non-privileged user installation handling: it is easy to
detect privileges and install Bazaar for all users or just for current user.
Current MSI, if run with administrator privileges, register PATH for all
users, in other cases - for current user only.
Best regards,
Andrew Voznytsa
-------------- next part --------------
A non-text attachment was scrubbed...
Name: msi.patch
Type: application/octet-stream
Size: 7049 bytes
Desc: not available
Url : https://lists.ubuntu.com/archives/bazaar/attachments/20070607/94c1a780/attachment.obj
More information about the bazaar
mailing list