Merge lp:~gz/bzr-windows-installers/runtime_libraries_in_subdir_881203 into lp:bzr-windows-installers

Proposed by Martin Packman
Status: Rejected
Rejected by: Martin Packman
Proposed branch: lp:~gz/bzr-windows-installers/runtime_libraries_in_subdir_881203
Merge into: lp:bzr-windows-installers
Diff against target: 34 lines (+7/-7)
1 file modified
build.py (+7/-7)
To merge this branch: bzr merge lp:~gz/bzr-windows-installers/runtime_libraries_in_subdir_881203
Reviewer Review Type Date Requested Status
Martin Packman (community) Disapprove
Review via email: mp+84414@code.launchpad.net

Description of the change

Attempt #2 at fixing the linked bug, this one at least shouldn't break on systems without the runtime libraries installed. Basically, it moves the dlls into a specially named subfolder that is also checked on exe startup.

I'm not certain it resolves the underlying issue, really we need the installer to handle the SxS stuff for us, which MSI tools will do. However, it is at least neater to have the dlls in a 'Microsoft.VC90.CRT' folder, and is what the py2exe tutorial suggests. Loading msvcp90 after the fact does still work, provided a manifest is provided in 'lib' which can just be a dumb copy of the one from the parent dir.

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

As this has passed the basic testing, I'll include it in the 2.5b4 release so it can get wider feedback.

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

So, this is back to the old problem of not being able to load Qt, so I backed it out of the installers. Will follow up in the bug.

review: Disapprove

Unmerged revisions

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'build.py'
2--- build.py 2011-07-05 10:12:36 +0000
3+++ build.py 2011-12-05 00:53:23 +0000
4@@ -409,23 +409,23 @@
5 # This isn't required for Python 2.5 or earlier because
6 # py2exe handles it then.
7 if self.python.find("26") >= 0:
8- copy_files(self.msvc_redist_dir, exe_dir, [
9+ redist_name = os.path.basename(self.msvc_redist_dir)
10+ redist_dir = os.path.join(exe_dir, redist_name)
11+ makedir(redist_dir)
12+ copy_files(self.msvc_redist_dir, redist_dir, [
13 "msvcr90.dll",
14 "msvcp90.dll",
15 ])
16 # Mess around with manifests, see bug and related mp for reasons:
17 # <https://bugs.launchpad.net/bzr-windows-installers/+bug/632465>
18- m_name = "%s.manifest" % os.path.basename(self.msvc_redist_dir)
19+ m_name = "%s.manifest" % redist_name
20 # Remove the file element for the dll bzr doesn't need
21 m_contents = file(os.path.join(self.msvc_redist_dir, m_name)
22 ).read().replace(' <file name="msvcm90.dll" />', "")
23 # Write the manifest to the root dir so the python dll finds it
24- file(os.path.join(exe_dir, m_name), "w").write(
25- m_contents)
26+ file(os.path.join(redist_dir, m_name), "w").write(m_contents)
27 # Write another copy to the lib folder for the extension modules
28- # that need it, modifying the dll names to look in the parent dir
29- file(os.path.join(exe_dir, "lib", m_name), "w").write(
30- m_contents.replace('<file name="', '<file name="..\\'))
31+ file(os.path.join(exe_dir, "lib", m_name), "w").write(m_contents)
32
33 # Generate the Installer spec file and compile it
34 iss_file = issgen.generate_iss(self.distro,

Subscribers

People subscribed via source and target branches