Esempio n. 1
0
def doSilentInstall(startAfterInstall=True):
    prevInstall = installer.comparePreviousInstall() is not None
    doInstall(installer.isDesktopShortcutInstalled() if prevInstall else True,
              config.getStartOnLogonScreen() if prevInstall else True,
              False,
              prevInstall,
              silent=True,
              startAfterInstall=startAfterInstall)
Esempio n. 2
0
	def __init__(self, parent, isUpdate):
		self.isUpdate=isUpdate
		# Translators: The title of the Install NVDA dialog.
		super(InstallerDialog, self).__init__(parent, title=_("Install NVDA"))
		mainSizer = self.mainSizer = wx.BoxSizer(wx.VERTICAL)
		sHelper = gui.guiHelper.BoxSizerHelper(self, orientation=wx.VERTICAL)

		# Translators: An informational message in the Install NVDA dialog.
		msg=_("To install NVDA to your hard drive, please press the Continue button.")
		if self.isUpdate:
			# Translators: An informational message in the Install NVDA dialog.
			msg+=" "+_("A previous copy of NVDA has been found on your system. This copy will be updated.") 
			if not os.path.isdir(installer.defaultInstallPath):
				# Translators: a message in the installer telling the user NVDA is now located in a different place.
				msg+=" "+_("The installation path for NVDA has changed. it will now  be installed in {path}").format(path=installer.defaultInstallPath)
		sHelper.addItem(wx.StaticText(self,label=msg))

		# Translators: The label of a checkbox option in the Install NVDA dialog.
		startOnLogonText = _("Use NVDA on the Windows &logon screen")
		self.startOnLogonCheckbox = sHelper.addItem(wx.CheckBox(self, label=startOnLogonText))
		self.startOnLogonCheckbox.Value = config.getStartOnLogonScreen() if self.isUpdate else True
		
		shortcutIsPrevInstalled=installer.isDesktopShortcutInstalled()
		if self.isUpdate and shortcutIsPrevInstalled:
			# Translators: The label of a checkbox option in the Install NVDA dialog.
			keepShortCutText = _("&Keep existing desktop shortcut")
			self.createDesktopShortcutCheckbox = sHelper.addItem(wx.CheckBox(self, label=keepShortCutText))
		else:
			# Translators: The label of the option to create a desktop shortcut in the Install NVDA dialog.
			# If the shortcut key has been changed for this locale,
			# this change must also be reflected here.
			createShortcutText = _("Create &desktop icon and shortcut key (control+alt+n)")
			self.createDesktopShortcutCheckbox = sHelper.addItem(wx.CheckBox(self, label=createShortcutText))
		self.createDesktopShortcutCheckbox.Value = shortcutIsPrevInstalled if self.isUpdate else True 
		
		# Translators: The label of a checkbox option in the Install NVDA dialog.
		createPortableText = _("Copy &portable configuration to current user account")
		self.copyPortableConfigCheckbox = sHelper.addItem(wx.CheckBox(self, label=createPortableText))
		self.copyPortableConfigCheckbox.Value = False
		if globalVars.appArgs.launcher:
			self.copyPortableConfigCheckbox.Disable()

		bHelper = sHelper.addDialogDismissButtons(guiHelper.ButtonHelper(wx.HORIZONTAL))
		# Translators: The label of a button to continue with the operation.
		continueButton = bHelper.addButton(self, label=_("&Continue"), id=wx.ID_OK)
		continueButton.SetDefault()
		continueButton.Bind(wx.EVT_BUTTON, self.onInstall)
		
		bHelper.addButton(self, id=wx.ID_CANCEL)
		# If we bind this using button.Bind, it fails to trigger when the dialog is closed.
		self.Bind(wx.EVT_BUTTON, self.onCancel, id=wx.ID_CANCEL)
		
		mainSizer.Add(sHelper.sizer, border=guiHelper.BORDER_FOR_DIALOGS, flag=wx.ALL)
		self.Sizer = mainSizer
		mainSizer.Fit(self)
		self.CentreOnScreen()
Esempio n. 3
0
def doSilentInstall(startAfterInstall=True):
    prevInstall = installer.comparePreviousInstall() is not None
    startOnLogon = globalVars.appArgs.enableStartOnLogon
    if startOnLogon is None:
        startOnLogon = config.getStartOnLogonScreen() if prevInstall else True
    doInstall(installer.isDesktopShortcutInstalled() if prevInstall else True,
              startOnLogon,
              False,
              prevInstall,
              silent=True,
              startAfterInstall=startAfterInstall)
Esempio n. 4
0
def doSilentInstall(copyPortableConfig=False, startAfterInstall=True):
    prevInstall = installer.comparePreviousInstall() is not None
    startOnLogon = globalVars.appArgs.enableStartOnLogon
    if startOnLogon is None:
        startOnLogon = config.getStartOnLogonScreen() if prevInstall else True
    doInstall(createDesktopShortcut=installer.isDesktopShortcutInstalled()
              if prevInstall else True,
              startOnLogon=startOnLogon,
              isUpdate=prevInstall,
              copyPortableConfig=copyPortableConfig,
              silent=True,
              startAfterInstall=startAfterInstall)
Esempio n. 5
0
def doSilentInstall(startAfterInstall=True):
	prevInstall=installer.comparePreviousInstall() is not None
	startOnLogon=globalVars.appArgs.enableStartOnLogon
	if startOnLogon is None:
		startOnLogon=config.getStartOnLogonScreen() if prevInstall else True
	doInstall(
		installer.isDesktopShortcutInstalled() if prevInstall else True,
		startOnLogon,
		False,
		prevInstall,
		silent=True,
		startAfterInstall=startAfterInstall
	)
Esempio n. 6
0
	def __init__(self, parent):
		self.isUpdate=installer.isPreviousInstall()
		# Translators: The title of the Install NVDA dialog.
		super(InstallerDialog, self).__init__(parent, title=_("Install NVDA"))
		mainSizer = self.mainSizer = wx.BoxSizer(wx.VERTICAL)
		# Translators: An informational message in the Install NVDA dialog.
		msg=_("To install NVDA to your hard drive, please press the Continue button.")
		if self.isUpdate:
			# Translators: An informational message in the Install NVDA dialog.
			msg+=" "+_("A previous copy of NVDA has been found on your system. This copy will be updated.") 
			if not os.path.isdir(installer.defaultInstallPath):
				# Translators: a message in the installer telling the user NVDA is now located in a different place.
				msg+=" "+_("The installation path for NVDA has changed. it will now  be installed in {path}").format(path=installer.defaultInstallPath)
		dialogCaption=wx.StaticText(self,label=msg) 
		mainSizer.Add(dialogCaption)
		optionsSizer = wx.BoxSizer(wx.VERTICAL)
		# Translators: The label of a checkbox option in the Install NVDA dialog.
		ctrl = self.startOnLogonCheckbox = wx.CheckBox(self, label=_("Use NVDA on the Windows &logon screen"))
		ctrl.Value = config.getStartOnLogonScreen() if self.isUpdate else True
		optionsSizer.Add(ctrl)
		shortcutIsPrevInstalled=installer.isDesktopShortcutInstalled()
		if self.isUpdate and shortcutIsPrevInstalled:
			# Translators: The label of a checkbox option in the Install NVDA dialog.
			ctrl = self.createDesktopShortcutCheckbox = wx.CheckBox(self, label=_("&Keep existing desktop shortcut"))
		else:
			# Translators: The label of a checkbox option in the Install NVDA dialog.
			ctrl = self.createDesktopShortcutCheckbox = wx.CheckBox(self, label=_("Create &desktop icon and shortcut key (control+alt+n)"))
		ctrl.Value = shortcutIsPrevInstalled if self.isUpdate else True 
		optionsSizer.Add(ctrl)
		# Translators: The label of a checkbox option in the Install NVDA dialog.
		ctrl = self.copyPortableConfigCheckbox = wx.CheckBox(self, label=_("Copy &portable configuration to current user account"))
		ctrl.Value = False
		if globalVars.appArgs.launcher:
			ctrl.Disable()
		optionsSizer.Add(ctrl)
		mainSizer.Add(optionsSizer)

		sizer = wx.BoxSizer(wx.HORIZONTAL)
		# Translators: The label of a button to continue with the operation.
		ctrl = wx.Button(self, label=_("&Continue"), id=wx.ID_OK)
		ctrl.SetDefault()
		ctrl.Bind(wx.EVT_BUTTON, self.onInstall)
		sizer.Add(ctrl)
		sizer.Add(wx.Button(self, id=wx.ID_CANCEL))
		# If we bind this using button.Bind, it fails to trigger when the dialog is closed.
		self.Bind(wx.EVT_BUTTON, self.onCancel, id=wx.ID_CANCEL)
		mainSizer.Add(sizer)

		self.Sizer = mainSizer
		mainSizer.Fit(self)
	def __init__(self, parent, isUpdate):
		self.isUpdate=isUpdate
		self.textWrapWidth = 600
		# Translators: The title of the Install NVDA dialog.
		wx.Dialog.__init__(self, parent, title=_("Install NVDA"))
		DpiScalingHelperMixin.__init__(self, self.GetHandle())

		import addonHandler
		shouldAskAboutAddons = any(addonHandler.getIncompatibleAddons(
			# the defaults from the installer are ok. We are testing against the running version.
		))

		mainSizer = self.mainSizer = wx.BoxSizer(wx.VERTICAL)
		sHelper = gui.guiHelper.BoxSizerHelper(self, orientation=wx.VERTICAL)

		# Translators: An informational message in the Install NVDA dialog.
		msg=_("To install NVDA to your hard drive, please press the Continue button.")
		if self.isUpdate:
			# Translators: An informational message in the Install NVDA dialog.
			msg+=" "+_("A previous copy of NVDA has been found on your system. This copy will be updated.") 
			if not os.path.isdir(installer.defaultInstallPath):
				# Translators: a message in the installer telling the user NVDA is now located in a different place.
				msg+=" "+_("The installation path for NVDA has changed. it will now  be installed in {path}").format(path=installer.defaultInstallPath)
		if shouldAskAboutAddons:
			# Translators: A message in the installer to let the user know that some addons are not compatible.
			msg+=_(
				"\n\n"
				"However, your NVDA configuration contains add-ons that are incompatible with this version of NVDA. "
				"These add-ons will be disabled after installation. If you rely on these add-ons, "
				"please review the list to decide whether to continue with the installation"
			)

		text = sHelper.addItem(wx.StaticText(self, label=msg))
		text.Wrap(self.scaleSize(self.textWrapWidth))
		if shouldAskAboutAddons:
			self.confirmationCheckbox = sHelper.addItem(wx.CheckBox(
					self,
					# Translators: A message to confirm that the user understands that addons that have not been reviewed and made
					# available, will be disabled after installation.
					label=_("I understand that these incompatible add-ons will be disabled")
				))
			self.confirmationCheckbox.SetFocus()

		optionsSizer = guiHelper.BoxSizerHelper(self, sizer=sHelper.addItem(wx.StaticBoxSizer(
			wx.StaticBox(
				self,
				# Translators: The label for a group box containing the NVDA installation dialog options.
				label=_("Options")
			),
			wx.VERTICAL
		)))

		# Translators: The label of a checkbox option in the Install NVDA dialog.
		startOnLogonText = _("Use NVDA on the Windows &logon screen")
		self.startOnLogonCheckbox = optionsSizer.addItem(wx.CheckBox(self, label=startOnLogonText))
		if globalVars.appArgs.enableStartOnLogon is not None:
			self.startOnLogonCheckbox.Value = globalVars.appArgs.enableStartOnLogon
		else:
			self.startOnLogonCheckbox.Value = config.getStartOnLogonScreen() if self.isUpdate else True

		shortcutIsPrevInstalled=installer.isDesktopShortcutInstalled()
		if self.isUpdate and shortcutIsPrevInstalled:
			# Translators: The label of a checkbox option in the Install NVDA dialog.
			keepShortCutText = _("&Keep existing desktop shortcut")
			self.createDesktopShortcutCheckbox = optionsSizer.addItem(wx.CheckBox(self, label=keepShortCutText))
		else:
			# Translators: The label of the option to create a desktop shortcut in the Install NVDA dialog.
			# If the shortcut key has been changed for this locale,
			# this change must also be reflected here.
			createShortcutText = _("Create &desktop icon and shortcut key (control+alt+n)")
			self.createDesktopShortcutCheckbox = optionsSizer.addItem(wx.CheckBox(self, label=createShortcutText))
		self.createDesktopShortcutCheckbox.Value = shortcutIsPrevInstalled if self.isUpdate else True 
		
		# Translators: The label of a checkbox option in the Install NVDA dialog.
		createPortableText = _("Copy &portable configuration to current user account")
		self.copyPortableConfigCheckbox = optionsSizer.addItem(wx.CheckBox(self, label=createPortableText))
		self.copyPortableConfigCheckbox.Value = False
		if globalVars.appArgs.launcher:
			self.copyPortableConfigCheckbox.Disable()

		bHelper = sHelper.addDialogDismissButtons(guiHelper.ButtonHelper(wx.HORIZONTAL))
		if shouldAskAboutAddons:
			# Translators: The label of a button to launch the add-on compatibility review dialog.
			reviewAddonButton = bHelper.addButton(self, label=_("&Review add-ons..."))
			reviewAddonButton.Bind(wx.EVT_BUTTON, self.onReviewAddons)

		# Translators: The label of a button to continue with the operation.
		continueButton = bHelper.addButton(self, label=_("&Continue"), id=wx.ID_OK)
		continueButton.SetDefault()
		continueButton.Bind(wx.EVT_BUTTON, self.onInstall)
		if shouldAskAboutAddons:
			self.confirmationCheckbox.Bind(
				wx.EVT_CHECKBOX,
				lambda evt: continueButton.Enable(not continueButton.Enabled)
			)
			continueButton.Enable(False)

		bHelper.addButton(self, id=wx.ID_CANCEL)
		# If we bind this using button.Bind, it fails to trigger when the dialog is closed.
		self.Bind(wx.EVT_BUTTON, self.onCancel, id=wx.ID_CANCEL)
		
		mainSizer.Add(sHelper.sizer, border=guiHelper.BORDER_FOR_DIALOGS, flag=wx.ALL)
		self.Sizer = mainSizer
		mainSizer.Fit(self)
		self.CentreOnScreen()
Esempio n. 8
0
def doSilentInstall():
	prevInstall=installer.isPreviousInstall()
	doInstall(installer.isDesktopShortcutInstalled() if prevInstall else True,config.getStartOnLogonScreen() if prevInstall else True,False,prevInstall,True)
Esempio n. 9
0
    def __init__(self, parent, isUpdate):
        self.isUpdate = isUpdate
        # Translators: The title of the Install NVDA dialog.
        super(InstallerDialog, self).__init__(parent, title=_("Install NVDA"))
        mainSizer = self.mainSizer = wx.BoxSizer(wx.VERTICAL)
        sHelper = gui.guiHelper.BoxSizerHelper(self, orientation=wx.VERTICAL)

        # Translators: An informational message in the Install NVDA dialog.
        msg = _(
            "To install NVDA to your hard drive, please press the Continue button."
        )
        if self.isUpdate:
            # Translators: An informational message in the Install NVDA dialog.
            msg += " " + _(
                "A previous copy of NVDA has been found on your system. This copy will be updated."
            )
            if not os.path.isdir(installer.defaultInstallPath):
                # Translators: a message in the installer telling the user NVDA is now located in a different place.
                msg += " " + _(
                    "The installation path for NVDA has changed. it will now  be installed in {path}"
                ).format(path=installer.defaultInstallPath)
        sHelper.addItem(wx.StaticText(self, label=msg))

        # Translators: The label of a checkbox option in the Install NVDA dialog.
        startOnLogonText = _("Use NVDA on the Windows &logon screen")
        self.startOnLogonCheckbox = sHelper.addItem(
            wx.CheckBox(self, label=startOnLogonText))
        self.startOnLogonCheckbox.Value = config.getStartOnLogonScreen(
        ) if self.isUpdate else True

        shortcutIsPrevInstalled = installer.isDesktopShortcutInstalled()
        if self.isUpdate and shortcutIsPrevInstalled:
            # Translators: The label of a checkbox option in the Install NVDA dialog.
            keepShortCutText = _("&Keep existing desktop shortcut")
            self.createDesktopShortcutCheckbox = sHelper.addItem(
                wx.CheckBox(self, label=keepShortCutText))
        else:
            # Translators: The label of the option to create a desktop shortcut in the Install NVDA dialog.
            # If the shortcut key has been changed for this locale,
            # this change must also be reflected here.
            createShortcutText = _(
                "Create &desktop icon and shortcut key (control+alt+n)")
            self.createDesktopShortcutCheckbox = sHelper.addItem(
                wx.CheckBox(self, label=createShortcutText))
        self.createDesktopShortcutCheckbox.Value = shortcutIsPrevInstalled if self.isUpdate else True

        # Translators: The label of a checkbox option in the Install NVDA dialog.
        createPortableText = _(
            "Copy &portable configuration to current user account")
        self.copyPortableConfigCheckbox = sHelper.addItem(
            wx.CheckBox(self, label=createPortableText))
        self.copyPortableConfigCheckbox.Value = False
        if globalVars.appArgs.launcher:
            self.copyPortableConfigCheckbox.Disable()

        bHelper = sHelper.addItem(guiHelper.ButtonHelper(wx.HORIZONTAL))
        # Translators: The label of a button to continue with the operation.
        continueButton = bHelper.addButton(self,
                                           label=_("&Continue"),
                                           id=wx.ID_OK)
        continueButton.SetDefault()
        continueButton.Bind(wx.EVT_BUTTON, self.onInstall)

        bHelper.addButton(self, id=wx.ID_CANCEL)
        # If we bind this using button.Bind, it fails to trigger when the dialog is closed.
        self.Bind(wx.EVT_BUTTON, self.onCancel, id=wx.ID_CANCEL)

        mainSizer.Add(sHelper.sizer,
                      border=guiHelper.BORDER_FOR_DIALOGS,
                      flag=wx.ALL)
        self.Sizer = mainSizer
        mainSizer.Fit(self)
        self.Center(wx.BOTH | wx.CENTER_ON_SCREEN)
Esempio n. 10
0
def doSilentInstall(startAfterInstall=True):
	prevInstall=installer.comparePreviousInstall() is not None
	doInstall(installer.isDesktopShortcutInstalled() if prevInstall else True,config.getStartOnLogonScreen() if prevInstall else True,False,prevInstall,silent=True,startAfterInstall=startAfterInstall)
Esempio n. 11
0
	def __init__(self, parent, isUpdate):
		self.isUpdate=isUpdate
		self.textWrapWidth = 600
		# Translators: The title of the Install NVDA dialog.
		wx.Dialog.__init__(self, parent, title=_("Install NVDA"))
		DpiScalingHelperMixin.__init__(self, self.GetHandle())

		import addonHandler
		self.version = buildVersion.getCurrentVersionTuple()
		addonsWithoutKnownCompat = list(addonHandler.getAddonsWithoutKnownCompatibility(self.version))
		shouldAskAboutAddons = any(addonsWithoutKnownCompat)

		mainSizer = self.mainSizer = wx.BoxSizer(wx.VERTICAL)
		sHelper = gui.guiHelper.BoxSizerHelper(self, orientation=wx.VERTICAL)

		# Translators: An informational message in the Install NVDA dialog.
		msg=_("To install NVDA to your hard drive, please press the Continue button.")
		if self.isUpdate:
			# Translators: An informational message in the Install NVDA dialog.
			msg+=" "+_("A previous copy of NVDA has been found on your system. This copy will be updated.") 
			if not os.path.isdir(installer.defaultInstallPath):
				# Translators: a message in the installer telling the user NVDA is now located in a different place.
				msg+=" "+_("The installation path for NVDA has changed. it will now  be installed in {path}").format(path=installer.defaultInstallPath)
		if shouldAskAboutAddons:
			# Translators: A message in the installer to let the user know that some addons are not compatible.
			msg+=_(
				"\n\nHowever, your NVDA configuration contains add-ons that are not tested with this version of NVDA. "
				"These add-ons will be disabled after installation. "
				"If you rely on these add-ons, please review the list to manually enable them before installation."
			)
			from addonHandler import AddonCompatibilityState, compatValues
			for a in addonsWithoutKnownCompat:
				# now that the use is warned about the compatibility and so that the user is
				# not prompted again after installation, we set the default compatibility
				AddonCompatibilityState.setAddonCompatibility(
					addon=a,
					NVDAVersion=self.version,
					compatibilityStateValue=compatValues.MANUALLY_SET_INCOMPATIBLE
				)

		text = sHelper.addItem(wx.StaticText(self, label=msg))
		text.Wrap(self.scaleSize(self.textWrapWidth))
		if shouldAskAboutAddons:
			self.confirmationCheckbox = sHelper.addItem(wx.CheckBox(
					self,
					# Translators: A message to confirm that the user understands that addons that have not been reviewed and made
					# available, will be disabled after installation.
					label=_("I understand that these untested add-ons will be disabled")
				))
			self.confirmationCheckbox.SetFocus()

		optionsSizer = guiHelper.BoxSizerHelper(self, sizer=sHelper.addItem(wx.StaticBoxSizer(
			wx.StaticBox(
				self,
				# Translators: The label for a group box containing the NVDA installation dialog options.
				label=_("Options")
			),
			wx.VERTICAL
		)))

		# Translators: The label of a checkbox option in the Install NVDA dialog.
		startOnLogonText = _("Use NVDA on the Windows &logon screen")
		self.startOnLogonCheckbox = optionsSizer.addItem(wx.CheckBox(self, label=startOnLogonText))
		if globalVars.appArgs.enableStartOnLogon is not None:
			self.startOnLogonCheckbox.Value = globalVars.appArgs.enableStartOnLogon
		else:
			self.startOnLogonCheckbox.Value = config.getStartOnLogonScreen() if self.isUpdate else True

		shortcutIsPrevInstalled=installer.isDesktopShortcutInstalled()
		if self.isUpdate and shortcutIsPrevInstalled:
			# Translators: The label of a checkbox option in the Install NVDA dialog.
			keepShortCutText = _("&Keep existing desktop shortcut")
			self.createDesktopShortcutCheckbox = optionsSizer.addItem(wx.CheckBox(self, label=keepShortCutText))
		else:
			# Translators: The label of the option to create a desktop shortcut in the Install NVDA dialog.
			# If the shortcut key has been changed for this locale,
			# this change must also be reflected here.
			createShortcutText = _("Create &desktop icon and shortcut key (control+alt+n)")
			self.createDesktopShortcutCheckbox = optionsSizer.addItem(wx.CheckBox(self, label=createShortcutText))
		self.createDesktopShortcutCheckbox.Value = shortcutIsPrevInstalled if self.isUpdate else True 
		
		# Translators: The label of a checkbox option in the Install NVDA dialog.
		createPortableText = _("Copy &portable configuration to current user account")
		self.copyPortableConfigCheckbox = optionsSizer.addItem(wx.CheckBox(self, label=createPortableText))
		self.copyPortableConfigCheckbox.Value = False
		if globalVars.appArgs.launcher:
			self.copyPortableConfigCheckbox.Disable()

		bHelper = sHelper.addDialogDismissButtons(guiHelper.ButtonHelper(wx.HORIZONTAL))
		if shouldAskAboutAddons:
			# Translators: The label of a button to launch the add-on compatibility review dialog.
			reviewAddonButton = bHelper.addButton(self, label=_("&Review add-ons..."))
			reviewAddonButton.Bind(wx.EVT_BUTTON, self.onReviewAddons)

		# Translators: The label of a button to continue with the operation.
		continueButton = bHelper.addButton(self, label=_("&Continue"), id=wx.ID_OK)
		continueButton.SetDefault()
		continueButton.Bind(wx.EVT_BUTTON, self.onInstall)
		if shouldAskAboutAddons:
			self.confirmationCheckbox.Bind(
				wx.EVT_CHECKBOX,
				lambda evt: continueButton.Enable(not continueButton.Enabled)
			)
			continueButton.Enable(False)

		bHelper.addButton(self, id=wx.ID_CANCEL)
		# If we bind this using button.Bind, it fails to trigger when the dialog is closed.
		self.Bind(wx.EVT_BUTTON, self.onCancel, id=wx.ID_CANCEL)
		
		mainSizer.Add(sHelper.sizer, border=guiHelper.BORDER_FOR_DIALOGS, flag=wx.ALL)
		self.Sizer = mainSizer
		mainSizer.Fit(self)
		self.CentreOnScreen()