Some fixes for Windows.

Tue, 16 Jan 2018 15:36:57 +0100

author
Detlev Offenbach <detlev@die-offenbachs.de>
date
Tue, 16 Jan 2018 15:36:57 +0100
changeset 2
5109c484bc49
parent 1
f7788bc8c08d
child 3
eb2d30b4d34e

Some fixes for Windows.

PluginPyInstaller.py file | annotate | diff | comparison | revisions
--- a/PluginPyInstaller.py	Tue Jan 16 14:53:10 2018 +0100
+++ b/PluginPyInstaller.py	Tue Jan 16 15:36:57 2018 +0100
@@ -120,33 +120,36 @@
                 pass
             return exes
         
+        versionSuffixes = ["", "-32", "-64"]
         for minorVersion in minorVersions:
-            versionStr = '{0}.{1}'.format(majorVersion, minorVersion)
-            exePath = getExePath(
-                winreg.HKEY_CURRENT_USER,
-                winreg.KEY_WOW64_32KEY | winreg.KEY_READ, versionStr)
-            if exePath is not None:
-                executables.add(exePath)
-            
-            exePath = getExePath(
-                winreg.HKEY_LOCAL_MACHINE,
-                winreg.KEY_WOW64_32KEY | winreg.KEY_READ, versionStr)
-            if exePath is not None:
-                executables.add(exePath)
-            
-            # Even on Intel 64-bit machines it's 'AMD64'
-            if platform.machine() == 'AMD64':
-                exePath = getExePath(
+            for versionSuffix in versionSuffixes:
+                versionStr = '{0}.{1}{2}'.format(majorVersion, minorVersion,
+                                                  versionSuffix)
+                exePaths = getExePath(
                     winreg.HKEY_CURRENT_USER,
-                    winreg.KEY_WOW64_64KEY | winreg.KEY_READ, versionStr)
-                if exePath is not None:
+                    winreg.KEY_WOW64_32KEY | winreg.KEY_READ, versionStr)
+                for exePath in exePaths:
                     executables.add(exePath)
                 
-                exePath = getExePath(
+                exePaths = getExePath(
                     winreg.HKEY_LOCAL_MACHINE,
-                    winreg.KEY_WOW64_64KEY | winreg.KEY_READ, versionStr)
-                if exePath is not None:
+                    winreg.KEY_WOW64_32KEY | winreg.KEY_READ, versionStr)
+                for exePath in exePaths:
                     executables.add(exePath)
+                
+                # Even on Intel 64-bit machines it's 'AMD64'
+                if platform.machine() == 'AMD64':
+                    exePaths = getExePath(
+                        winreg.HKEY_CURRENT_USER,
+                        winreg.KEY_WOW64_64KEY | winreg.KEY_READ, versionStr)
+                    for exePath in exePaths:
+                        executables.add(exePath)
+                    
+                    exePaths = getExePath(
+                        winreg.HKEY_LOCAL_MACHINE,
+                        winreg.KEY_WOW64_64KEY | winreg.KEY_READ, versionStr)
+                    for exePath in exePaths:
+                        executables.add(exePath)
     else:
         #
         # Linux, Unix ...

eric ide

mercurial