Subversion Repositories configs

Rev

Rev 175 | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 175 Rev 186
Line 1... Line 1...
1
"""
1
"""
2
Copyright 2007-2019 VMware, Inc.  All rights reserved. -- VMware Confidential
2
Copyright 2007-2020 VMware, Inc.  All rights reserved. -- VMware Confidential
3
 
3
 
4
VMware Installer
4
VMware Installer
5
"""
5
"""
6
from vmis import PRODUCT_NAME, PRODUCT_SUFFIX
6
from vmis import PRODUCT_NAME, PRODUCT_SUFFIX
-
 
7
from vmis.ui import TYPE
7
 
8
 
8
DEST = LIBDIR/'vmware-installer/3.0.0'
9
DEST = LIBDIR/'vmware-installer/3.0.0'
9
CLEANUP = CONFDIR/'.cleanup'
10
CLEANUP = CONFDIR/'.cleanup'
10
 
11
 
11
# The 1.0 Installer looks in very specific locations for existing installs
12
# The 1.0 Installer looks in very specific locations for existing installs
Line 82... Line 83...
82
            Version(currentVersion) == Version('3.0.0') and \
83
            Version(currentVersion) == Version('3.0.0') and \
83
            not upgrade:
84
            not upgrade:
84
            # If this is the last installer, it's being uninstalled,
85
            # If this is the last installer, it's being uninstalled,
85
            # and we are not upgrading, then query the user if they
86
            # and we are not upgrading, then query the user if they
86
            # would like to keep their configuration files.
87
            # would like to keep their configuration files.
-
 
88
            if TYPE == "gtk":
-
 
89
                text='All configuration information is about to be removed. ' \
-
 
90
                     'Do you wish to keep your configuration files?'
-
 
91
            else:
-
 
92
                text='All configuration information is about to be removed. ' \
-
 
93
                     'Do you wish to keep your configuration files? You can ' \
-
 
94
                     'also input \'quit\' or \'q\' to cancel uninstallation.'
-
 
95
 
87
            self.AddQuestion('YesNo',
96
            self.AddQuestion('YesNo',
88
                             key='keepConfigOnUninstall',
97
                             key='keepConfigOnUninstall',
89
                             text='All configuration information is about to be removed. ' \
98
                             text=text,
90
                                  'Do you wish to keep your configuration files? You can ' \
-
 
91
                                  'also input \'quit\' or \'q\' to cancel uninstallation.',
-
 
92
                             required=False,
99
                             required=False,
93
                             default=keepConfigStored,
100
                             default=keepConfigStored,
94
                             level='REGULAR',
101
                             level='REGULAR',
95
                             secondaryText='Uninstall')
102
                             secondaryText='Uninstall')
96
 
103
 
Line 191... Line 198...
191
 
198
 
192
      bootstrap = CONFDIR/'bootstrap'
199
      bootstrap = CONFDIR/'bootstrap'
193
      bootstrap.write_text('VMWARE_INSTALLER="%s"\n\n' % DEST, append=False)
200
      bootstrap.write_text('VMWARE_INSTALLER="%s"\n\n' % DEST, append=False)
194
      bootstrap.write_text('VERSION="%s" # For backwards compatibility\n' % legacyVersionStamp, append=True)
201
      bootstrap.write_text('VERSION="%s" # For backwards compatibility\n' % legacyVersionStamp, append=True)
195
      bootstrap.write_text('VMISVERSION="%s"\n' % '3.0.0', append=True)
202
      bootstrap.write_text('VMISVERSION="%s"\n' % '3.0.0', append=True)
196
      bootstrap.write_text('VMISBUILDNUM="%s"\n' % '15018445', append=True)
203
      bootstrap.write_text('VMISBUILDNUM="%s"\n' % '16341506', append=True)
197
      bootstrap.write_text('VMISPYVERSION="%s"\n' % PYTHON_VERSION, append=True)
204
      bootstrap.write_text('VMISPYVERSION="%s"\n' % PYTHON_VERSION, append=True)
198
 
205
 
199
 
206
 
200
   def PostTransactionInstall(self, old, new, upgrade):
207
   def PostTransactionInstall(self, old, new, upgrade):
201
      # The .cleanup file is originally created when loading the
208
      # The .cleanup file is originally created when loading the