From 5951ec0fdd048b0870e30cb5d8e29f6decc1cffc Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Martin=20v=2E=20L=C3=B6wis?= <martin@v.loewis.de>
Date: Fri, 24 Aug 2012 16:06:10 +0200
Subject: Pick up 32-bit launcher from PGO directory on 64-bit PGO build.

---
 Misc/NEWS        |  2 ++
 Tools/msi/msi.py | 11 +++++++----
 2 files changed, 9 insertions(+), 4 deletions(-)

diff --git a/Misc/NEWS b/Misc/NEWS
index f291a4a..9f729aa 100644
--- a/Misc/NEWS
+++ b/Misc/NEWS
@@ -115,6 +115,8 @@ Tests
 Build
 -----
 
+- Pick up 32-bit launcher from PGO directory on 64-bit PGO build.
+
 - Drop PC\python_nt.h as it's not used. Add input dependency on custom
   build step.
 
diff --git a/Tools/msi/msi.py b/Tools/msi/msi.py
index cacf904..d46270c 100644
--- a/Tools/msi/msi.py
+++ b/Tools/msi/msi.py
@@ -974,14 +974,17 @@ def add_files(db):
     # 32-bit installer.
     # XXX does this still allow to install the component on a 32-bit system?
     # Pick up 32-bit binary always
-    launcher = os.path.join(srcdir, "PCBuild", "py.exe")
+    launchersrc = PCBUILD
+    if launchersrc.lower() == 'pcbuild\\x64-pgo':
+        launchersrc = 'PCBuild\\win32-pgo'
+    launcher = os.path.join(srcdir, launchersrc, "py.exe")
     launcherdir.start_component("launcher", flags = 8+256, keyfile="py.exe")
-    launcherdir.add_file("%s/py.exe" % PCBUILD,
+    launcherdir.add_file(launcher,
                          version=installer.FileVersion(launcher, 0),
                          language=installer.FileVersion(launcher, 1))
-    launcherw = os.path.join(srcdir, "PCBuild", "pyw.exe")
+    launcherw = os.path.join(srcdir, launchersrc, "pyw.exe")
     launcherdir.start_component("launcherw", flags = 8+256, keyfile="pyw.exe")
-    launcherdir.add_file("%s/pyw.exe" % PCBUILD,
+    launcherdir.add_file(launcherw,
                          version=installer.FileVersion(launcherw, 0),
                          language=installer.FileVersion(launcherw, 1))
 
-- 
cgit v0.12