Skip to content

Commit

Permalink
Remove NVDA service, no longer needed as NVDA will require Windows 7 …
Browse files Browse the repository at this point in the history
…SP1 or higher (nvaccess#7625)

* NVDA service: py2exe will no longer build the service module, as the service is only needed on XP and Server 2003.

* Installer: no longer need to start NVDA service, as Windows 7 SP1 or higher is required now.

* NVDA service is hereby removed.

* Just assume Ease of Access is available.

Noted by Leonard de Ruijter: just assume Ease of Access is present.

* NVDA slave: proper copyright header, no longer manages NVDA service.

Added proper copyright header for the slave process. Also, as XP is no longer supported, service launcher is no more.

* Config: simplify secure screen startup by checking if NVDA is installed.

No more support for XP/Vista/7 RTM means:
* No more NVDA service.
* No more check for presence of Ease of Access.
Thus, the secure screen startup checker just returns if NVDA is installed, thus ready to be transformed into a flag in a future release.

* SConstruct: no more service builder.

Reviewed by Mick Curran (NV Access): knew something was incomplete when working on removing NVDA service - SCons should no longer be told to build the service executable, thereby allowing signed builds to proceed.

* NvDA service: include win32api so some add-ons can function properly.

The following add-on is known for using win32api: Golden Cursor. Because of the impact of this add-on, include win32api in 2017.4, to be removed in 2018 as part of Python 3 transition or a major code rewrite.
  • Loading branch information
josephsl authored and michaelDCurran committed Oct 25, 2017
1 parent 1fcc7fe commit 326c592
Show file tree
Hide file tree
Showing 6 changed files with 20 additions and 428 deletions.
2 changes: 1 addition & 1 deletion sconstruct
Original file line number Diff line number Diff line change
Expand Up @@ -234,7 +234,7 @@ def NVDADistGenerator(target, source, env, for_signature):
if env.get("uiAccess"):
buildCmd.append("--enable-uiAccess")
if certFile:
for prog in "nvda_noUIAccess.exe", "nvda_uiAccess.exe", "nvda_slave.exe", "nvda_service.exe", "nvda_eoaProxy.exe":
for prog in "nvda_noUIAccess.exe", "nvda_uiAccess.exe", "nvda_slave.exe", "nvda_eoaProxy.exe":
action.append(lambda target,source,env, progByVal=prog: signExec([target[0].File(progByVal)],source,env))

for ext in "", "c", "o":
Expand Down
16 changes: 3 additions & 13 deletions source/config/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -159,20 +159,10 @@ def setStartAfterLogon(enable):
except WindowsError:
pass

SERVICE_FILENAME = u"nvda_service.exe"

def isServiceInstalled():
if not os.path.isfile(SERVICE_FILENAME):
return False
try:
k = _winreg.OpenKey(_winreg.HKEY_LOCAL_MACHINE, ur"SYSTEM\CurrentControlSet\Services\nvda")
val = _winreg.QueryValueEx(k, u"ImagePath")[0].replace(u'"', u'')
return os.stat(val) == os.stat(SERVICE_FILENAME)
except (WindowsError, OSError):
return False

def canStartOnSecureScreens():
return isInstalledCopy() and (easeOfAccess.isSupported or isServiceInstalled())
# No more need to check for the NVDA service nor presence of Ease of Access, as only Windows 7 SP1 and higher is supported.
# This function will be transformed into a flag in a future release.
return isInstalledCopy()

def execElevated(path, params=None, wait=False,handleAlreadyElevated=False):
import subprocess
Expand Down
25 changes: 5 additions & 20 deletions source/installer.py
Original file line number Diff line number Diff line change
Expand Up @@ -212,12 +212,7 @@ def registerInstallation(installDir,startMenuFolder,shouldCreateDesktopShortcut,
_winreg.SetValueEx(k,"startMenuFolder",None,_winreg.REG_SZ,startMenuFolder)
if configInLocalAppData:
_winreg.SetValueEx(k,config.CONFIG_IN_LOCAL_APPDATA_SUBKEY,None,_winreg.REG_DWORD,int(configInLocalAppData))
if easeOfAccess.isSupported:
registerEaseOfAccess(installDir)
else:
import nvda_service
nvda_service.installService(installDir)
nvda_service.startService()
registerEaseOfAccess(installDir)
if startOnLogonScreen is not None:
config._setStartOnLogonScreen(startOnLogonScreen)
NVDAExe=os.path.join(installDir,u"nvda.exe")
Expand Down Expand Up @@ -251,22 +246,12 @@ def isDesktopShortcutInstalled():
return os.path.isfile(shortcutPath)

def unregisterInstallation(keepDesktopShortcut=False):
import nvda_service
try:
nvda_service.stopService()
except:
pass
try:
nvda_service.removeService()
except:
_winreg.DeleteKeyEx(_winreg.HKEY_LOCAL_MACHINE, easeOfAccess.APP_KEY_PATH,
_winreg.KEY_WOW64_64KEY)
easeOfAccess.setAutoStart(_winreg.HKEY_LOCAL_MACHINE, False)
except WindowsError:
pass
if easeOfAccess.isSupported:
try:
_winreg.DeleteKeyEx(_winreg.HKEY_LOCAL_MACHINE, easeOfAccess.APP_KEY_PATH,
_winreg.KEY_WOW64_64KEY)
easeOfAccess.setAutoStart(_winreg.HKEY_LOCAL_MACHINE, False)
except WindowsError:
pass
wsh=_getWSH()
desktopPath=os.path.join(wsh.SpecialFolders("AllUsersDesktop"),"NVDA.lnk")
if not keepDesktopShortcut and os.path.isfile(desktopPath):
Expand Down
Loading

0 comments on commit 326c592

Please sign in to comment.