~tsabi/bzr-windows-installers/bzr-windows-installers_bzr-2.6

« back to all changes in this revision

Viewing changes to build.py

  • Committer: Martin Packman
  • Date: 2011-12-08 13:11:11 UTC
  • Revision ID: martin.packman@canonical.com-20111208131111-jodyx82g0vvd3lut
Tags: bzr-win32-2.5b4-1
Revert changes to runtime library locations which break loading Qt

Show diffs side-by-side

added added

removed removed

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