Changeset 1500

Show
Ignore:
Timestamp:
10/14/08 13:34:27 (3 months ago)
Author:
astormont
Message:

Winver detection supports build version

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • wine-doors/trunk/src/ui.py

    r1499 r1500  
    400400        win_versions_model = gtk.ListStore( gobject.TYPE_STRING, # Display name 
    401401                                            gobject.TYPE_STRING, # CurrentVersion 
     402                                            gobject.TYPE_STRING, # Build 
    402403                                            gobject.TYPE_INT,    # Platform 
    403404                                            gobject.TYPE_STRING )# Service Pack 
     
    409410            if set_win_version == win_versions[i]: 
    410411                wn_prefs['cb_winver'].set_active( i ) 
     412        print set_win_version 
    411413 
    412414        # Detect wineversion and leave it at that 
  • wine-doors/trunk/src/wine.py

    r1499 r1500  
    5151        win32_windows = self.getRegistry( "HKLM\\\\Software\\\\Microsoft\\\\Windows\\\\CurrentVersion", "VersionNumber" ) 
    5252        if win32_windows != "": 
    53             output = [ win32_windows,  
     53            output = [ win32_windows, 
     54                       "0", 
    5455                       self.WIN32_WINDOWS_PLATFORM, 
    5556                       self.getRegistry( "HKLM\\\\Software\\\\Microsoft\\\\Windows\\\\CurrentVersion", "SubVersionNumber" ) ] 
    5657        else: 
    5758            output = [ self.getRegistry( "HKLM\\\\Software\\\\Microsoft\\\\Windows NT\\\\CurrentVersion", "CurrentVersion" ),  
     59                       self.getRegistry( "HKLM\\\\Software\\\\Microsoft\\\\Windows NT\\\\CurrentVersion", "CurrentBuildNumber" ),  
    5860                       self.WIN32_NT_PLATFORM, 
    5961                       self.getRegistry( "HKLM\\\\Software\\\\Microsoft\\\\Windows NT\\\\CurrentVersion", "CSDVersion" ) ] 
    6062 
     63        print "Raw output: ", output 
     64 
    6165        for win_version in self.GetWindowsVersions(): 
    62             if [ win_version[1], win_version[2], win_version[3] ] == output: 
     66            if [ win_version[1], win_version[2], win_version[3], win_version[4] ] == output: 
    6367                return [ win_version[0] ] + output 
    6468 
     
    8286    def GetWindowsVersions( self ): 
    8387        """ Returns list of windows names and versions """ 
    84         # Display Name, CurrentVersion, Platform, Service Pack 
    85         return [ [ "Windows 2008", "6.0", self.WIN32_NT_PLATFORM, "Service Pack 1" ], 
    86                  [ "Windows Vista", "6.0", self.WIN32_NT_PLATFORM, " " ], 
    87                  [ "Windows 2003", "5.2", self.WIN32_NT_PLATFORM, "Service Pack 1" ], 
    88                  [ "Windows XP", "5.1", self.WIN32_NT_PLATFORM, "Service Pack 2" ], 
    89                  [ "Windows 2000", "5.0", self.WIN32_NT_PLATFORM, "Service Pack 4" ], 
    90                  [ "Windows ME", "4.90.3000", self.WIN32_WINDOWS_PLATFORM, " " ], 
    91                  [ "Windows 98", "4.10.2222", self.WIN32_WINDOWS_PLATFORM, " A " ], 
    92                  [ "Windows 95", "4.0.950", self.WIN32_WINDOWS_PLATFORM, "" ], 
    93                  [ "Windows NT 4.0", "4.0", self.WIN32_NT_PLATFORM, "Service Pack 6a" ], 
    94                  [ "Windows NT 3.5", "3.51", self.WIN32_NT_PLATFORM, "Service Pack 2" ], 
    95                  #[ "Windows 3.1", "win31", self.WIN32S_PLATFORM, "Win32s 1.3" ], 
    96                  #[ "Windows 3.0", "win30", self.WIN32S_PLATFORM, "Win32s 1.3" ], 
    97                  #[ "Windows 2.0", "win20", self.WIN32S_PLATFORM, "Win32s 1.3" ] 
     88        #          Display Name,  CurrentVersion, Build,  Platform,                    Service Pack 
     89        return [ [ "Windows 2008",   "6.0",       "6001", self.WIN32_NT_PLATFORM,      "Service Pack 1" ], 
     90                 [ "Windows Vista", "6.0",       "6000", self.WIN32_NT_PLATFORM,      " " ], 
     91                 [ "Windows 2003",   "5.2",       "3790",  self.WIN32_NT_PLATFORM,      "Service Pack 1" ], 
     92                 [ "Windows XP",     "5.1",       "2600",  self.WIN32_NT_PLATFORM,      "Service Pack 2" ], 
     93                 [ "Windows 2000",   "5.0",       "2195",  self.WIN32_NT_PLATFORM,      "Service Pack 4" ], 
     94                 [ "Windows ME",     "4.90.3000", "0",      self.WIN32_WINDOWS_PLATFORM, " " ], 
     95                 [ "Windows 98",     "4.10.2222", "0",      self.WIN32_WINDOWS_PLATFORM, " A " ], 
     96                 [ "Windows 95",     "4.0.950",   "0",      self.WIN32_WINDOWS_PLATFORM, "" ], 
     97                 [ "Windows NT 4.0", "4.0",       "1381",  self.WIN32_NT_PLATFORM,      "Service Pack 6a" ], 
     98                 [ "Windows NT 3.5", "3.51",      "1057",  self.WIN32_NT_PLATFORM,      "Service Pack 2" ], 
     99                 #[ "Windows 3.1",    "win31",     0,      self.WIN32S_PLATFORM,        "Win32s 1.3" ], 
     100                 #[ "Windows 3.0",    "win30",     0,      self.WIN32S_PLATFORM,        "Win32s 1.3" ], 
     101                 #[ "Windows 2.0",    "win20",     0,      self.WIN32S_PLATFORM,        "Win32s 1.3" ] 
    98102               ] 
    99103