Merge lp://staging/~gz/bzr-windows-installers/include_manifest_in_installer_632465 into lp://staging/bzr-windows-installers

Proposed by Martin Packman
Status: Superseded
Proposed branch: lp://staging/~gz/bzr-windows-installers/include_manifest_in_installer_632465
Merge into: lp://staging/bzr-windows-installers
Diff against target: 41 lines (+15/-2)
2 files modified
build.py (+14/-2)
templates/inno/bzr.iss (+1/-0)
To merge this branch: bzr merge lp://staging/~gz/bzr-windows-installers/include_manifest_in_installer_632465
Reviewer Review Type Date Requested Status
Bazaar Developers Pending
Review via email: mp+37201@code.staging.launchpad.net

This proposal has been superseded by a proposal from 2010-10-16.

Description of the change

Makes sure people without the VC 9 runtime libraries installed can still use the all-in-one installer by bundling the manifest. Also puts it and the library in a suitabily named subdirectory as suggested by the py2exe tutorial on this stuff.

As I'm not sure if we're still building installers with this code for Python 2.5 I made sure that'd still work by adding the old msvcr71.dll if it's available. Ideally these would be templated sections and we'd pass in the actual Python version used, but this should do for now.

Note, the SxS libraries seem to take precedence over the bundled libraries anyway, so to test this you either need to mess around in your Windows directory or use a non-development machine without the runtime libraries installed.

To post a comment you must log in.
Revision history for this message
Martin Pool (mbp) wrote :

I don't know if it's right, but it doesn't look wrong.

Revision history for this message
Gary van der Merwe (garyvdm) wrote :
Revision history for this message
Martin Packman (gz) wrote :

So, this branch gets the installer to complete and then basic bzr commands work, but qbzr and bzr-explorer are still broken for people without the runtimes already installed globally. There are two issues remaining.

Firstly, the Qt libraries do actually depend on the cpp runtime, but only for:

    MSVCP90.dll

                 BE4 ?uncaught_exception@std@@YA_NXZ

That could easily be fixed by copying that lib as well.

The second problem I'm not sure how we should resolve though. With this branch the directory layout is like:

  bzr.exe
  bzr_postinstall.exe
  python26.dll
  Microsoft.VC90.CRT/
    Microsoft.VC90.CRT.manifest
    msvcr90.dll
  lib/
    library.zip
    QtCore4.dll
    pywintypes26.dll

This means bzr.exe works because though it and python26.dll need msvcr90.dll to run, XP looks in the sibling directory for it and the manifest:
<http://msdn.microsoft.com/library/aa374224>
However, when it tries to load a library from the lib folder, those libraries with bundled manifests do not use the loaded copy but instead try to find a manifest in their own directory. We could try and prevent bundling any manifests to stop this behaviour as per an upstream change:
<http://bugs.python.org/issue4120>
But I think Qt would still be broken if it needs the cpp runtime because it wouldn't be preloaded.

One option would be to flatten the lib dir back down to the root, and possibly put some more things in library.zip to clear up the resultant cruft.

Revision history for this message
Gary van der Merwe (garyvdm) wrote :

Maybe it would be easier to include the vcredist installer, and run it from our installer?

Revision history for this message
Martin Packman (gz) wrote :

Maybe, but the fact no one else does it suggests it's not really the right thing to do. Most people clearly have the redist files already, what does that installer do in that case? Does MS even allow redisting their redist installer?

I've got a hack that works even for our current messed up case, which uses an extra manifest but at least only bundles the libraries once. But this is also something I've not seen any other application do, so am wary of suggesting it.

139. By Martin Packman

Duplicate manifest in lib subdir which should work as a more comprehensive fix

Unmerged revisions

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
The diff is not available at this time. You can reload the page or download it.

Subscribers

People subscribed via source and target branches