Skip to content

Commit

Permalink
Add --disable-start-on-logon command line parameter and show portable…
Browse files Browse the repository at this point in the history
… path in the gui if applicable
  • Loading branch information
Leonard de Ruijter committed Aug 13, 2018
1 parent 898f580 commit 6e4496c
Show file tree
Hide file tree
Showing 4 changed files with 22 additions and 5 deletions.
19 changes: 16 additions & 3 deletions source/gui/installerGui.py
Expand Up @@ -77,7 +77,15 @@ def doInstall(createDesktopShortcut,startOnLogon,copyPortableConfig,isUpdate,sil

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)
startOnLogon=False if globalVars.appArgs.disableStartOnLogon else config.getStartOnLogonScreen() if prevInstall else True
doInstall(
installer.isDesktopShortcutInstalled() if prevInstall else True,
startOnLogon,
False,
prevInstall,
silent=True,
startAfterInstall=startAfterInstall
)

class InstallerDialog(wx.Dialog):

Expand All @@ -101,8 +109,11 @@ def __init__(self, parent, isUpdate):
# 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

self.startOnLogonCheckbox.Value = (
False if globalVars.appArgs.disableStartOnLogon else
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.
Expand Down Expand Up @@ -203,6 +214,8 @@ def __init__(self, parent):
dirDialogTitle = _("Select portable directory")
directoryEntryControl = groupHelper.addItem(gui.guiHelper.PathSelectionHelper(self, browseText, dirDialogTitle))
self.portableDirectoryEdit = directoryEntryControl.pathControl
if globalVars.appArgs.portablePath:
self.portableDirectoryEdit.Value = os.path.abspath(globalVars.appArgs.portablePath)

# Translators: The label of a checkbox option in the Create Portable NVDA dialog.
copyConfText = _("Copy current &user configuration")
Expand Down
1 change: 1 addition & 0 deletions source/nvda.pyw
Expand Up @@ -102,6 +102,7 @@ installGroup.add_argument('--create-portable',action="store_true",dest='createPo
installGroup.add_argument('--create-portable-silent',action="store_true",dest='createPortableSilent',default=False,help="Creates a portable copy of NVDA silently (does not start the new copy after installation).")
parser.add_argument('--portable-path',dest='portablePath',default=None,type=decodeMbcs,help="The path where a portable copy will be created")
parser.add_argument('--launcher',action="store_true",dest='launcher',default=False,help="Started from the launcher")
parser.add_argument('--disable-start-on-logon',action="store_true",dest='disableStartOnLogon',default=False,help="When installing, disable NVDA's start on the logon screen")
# This option currently doesn't actually do anything.
# It is passed by Ease of Access so that if someone downgrades without uninstalling (despite our discouragement),
# the downgraded copy won't be started in non-secure mode on secure desktops.
Expand Down
6 changes: 4 additions & 2 deletions user_docs/en/changes.t2t
Expand Up @@ -6,10 +6,12 @@ What's New in NVDA
= 2018.4 =

== New Features ==


- Added the "--disable-start-on-logon" command line parameter to allow silent installations of NVDA that don't run at the logon screen by default. (#8574)


== Changes ==
- "Report help balloons" in the Object Presentations dialog has been renamed to "Report notifications" to include reporting of toast notifications in Windows 8 and later. (#5789)
- When NVDA is started with the "--portable-path" command line parameter, the provided path is automatically filled in when trying to create a portable copy of NVDA using the NVDA menu.


== Bug Fixes ==
Expand Down
1 change: 1 addition & 0 deletions user_docs/en/userGuide.t2t
Expand Up @@ -2757,6 +2757,7 @@ Following are the command line options for NVDA:
| None | --no-sr-flag | Don't change the global system screen reader flag |
| None | --install | Installs NVDA (starting the newly installed copy) |
| None | --install-silent | Silently installs NVDA (does not start the newly installed copy) |
| None | --disable-start-on-logon | When installing, disable NVDA's start on the logon screen |
| None | --create-portable | Creates a portable copy of NVDA (starting the newly created copy). Requires --portable-path to be specified |
| None | --create-portable-silent | Creates a portable copy of NVDA (does not start the newly installed copy). Requires --portable-path to be specified |
| None | --portable-path=PORTABLEPATH | The path where a portable copy will be created |
Expand Down

0 comments on commit 6e4496c

Please sign in to comment.