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
=== modified file 'build.py'
--- build.py 2011-07-05 10:12:36 +0000
+++ build.py 2011-12-05 00:53:23 +0000
@@ -409,23 +409,23 @@
409 # This isn't required for Python 2.5 or earlier because409 # This isn't required for Python 2.5 or earlier because
410 # py2exe handles it then.410 # py2exe handles it then.
411 if self.python.find("26") >= 0:411 if self.python.find("26") >= 0:
412 copy_files(self.msvc_redist_dir, exe_dir, [412 redist_name = os.path.basename(self.msvc_redist_dir)
413 redist_dir = os.path.join(exe_dir, redist_name)
414 makedir(redist_dir)
415 copy_files(self.msvc_redist_dir, redist_dir, [
413 "msvcr90.dll",416 "msvcr90.dll",
414 "msvcp90.dll",417 "msvcp90.dll",
415 ])418 ])
416 # Mess around with manifests, see bug and related mp for reasons:419 # Mess around with manifests, see bug and related mp for reasons:
417 # <https://bugs.launchpad.net/bzr-windows-installers/+bug/632465>420 # <https://bugs.launchpad.net/bzr-windows-installers/+bug/632465>
418 m_name = "%s.manifest" % os.path.basename(self.msvc_redist_dir)421 m_name = "%s.manifest" % redist_name
419 # Remove the file element for the dll bzr doesn't need422 # Remove the file element for the dll bzr doesn't need
420 m_contents = file(os.path.join(self.msvc_redist_dir, m_name)423 m_contents = file(os.path.join(self.msvc_redist_dir, m_name)
421 ).read().replace(' <file name="msvcm90.dll" />', "")424 ).read().replace(' <file name="msvcm90.dll" />', "")
422 # Write the manifest to the root dir so the python dll finds it425 # Write the manifest to the root dir so the python dll finds it
423 file(os.path.join(exe_dir, m_name), "w").write(426 file(os.path.join(redist_dir, m_name), "w").write(m_contents)
424 m_contents)
425 # Write another copy to the lib folder for the extension modules427 # Write another copy to the lib folder for the extension modules
426 # that need it, modifying the dll names to look in the parent dir428 file(os.path.join(exe_dir, "lib", m_name), "w").write(m_contents)
427 file(os.path.join(exe_dir, "lib", m_name), "w").write(
428 m_contents.replace('<file name="', '<file name="..\\'))
429429
430 # Generate the Installer spec file and compile it430 # Generate the Installer spec file and compile it
431 iss_file = issgen.generate_iss(self.distro,431 iss_file = issgen.generate_iss(self.distro,

Subscribers

People subscribed via source and target branches