From 4bc02b9947897c3f260c231f089485eda551974c Mon Sep 17 00:00:00 2001 From: Michael Curran Date: Mon, 1 Aug 2011 10:40:14 +1000 Subject: [PATCH] Added an nsis-based NVDA portable launcher, based on both the NVDA cd launcher and installer code. This launcher is a single executable, which automatically self-extracts and runs a portable version of NVDA. To build the launcher, for now run scons launcher. Currently its very basic. Eventually support for restarting NVDA, playing a sound while extracting could be added. Eventually launcher will replace portable, and the installer will be built into NVDA removing the need for the NSIS installer. --- launcher/nvdaLauncher.nsi | 27 +++++++++++++++++++++++++++ sconstruct | 9 +++++++++ 2 files changed, 36 insertions(+) create mode 100644 launcher/nvdaLauncher.nsi diff --git a/launcher/nvdaLauncher.nsi b/launcher/nvdaLauncher.nsi new file mode 100644 index 000000000..bcb907f12 --- /dev/null +++ b/launcher/nvdaLauncher.nsi @@ -0,0 +1,27 @@ +!include "fileFunc.nsh" + +!define launcher_appExe "nvdaLauncher.exe" + +SetCompressor /SOLID LZMA +SilentInstall silent +RequestExecutionLevel user + +Name "NVDA" +VIProductVersion "0.0.0.0" ;Needs to be here so other version info shows up +VIAddVersionKey "ProductName" "${PRODUCT}" +VIAddVersionKey "LegalCopyright" "Copyright 2006 - 2011 NVDA Contributors" +VIAddVersionKey "FileDescription" "NVDA launcher file" +VIAddVersionKey "ProductVersion" "${VERSION}" + +page instfiles + +section "install" +SetAutoClose true +initPluginsDir +CreateDirectory "$PLUGINSDIR\app" +setOutPath "$PLUGINSDIR\app" +file /R "${NVDADistDir}\" +${GetParameters} $0 +Banner::destroy +execWait "$PLUGINSDIR\app\nvda.exe $0" +SectionEnd diff --git a/sconstruct b/sconstruct index 1a72cc7fb..b1f9b2e1a 100755 --- a/sconstruct +++ b/sconstruct @@ -250,6 +250,15 @@ if certFile: env.AddPostAction(installer, [signExec]) env.Alias("installer", installer) +launcher = env.Command(outputDir.File("%s_launcher.exe" % outFilePrefix), ["launcher/nvdaLauncher.nsi", portableDist], + [[makensis, "/V2", + "/DVERSION=$version", '/DPUBLISHER="$publisher"', + "/DNVDADistDir=${SOURCES[1].abspath}", "/XOutFile ${TARGET.abspath}", + "$SOURCE"]]) +if certFile: + env.AddPostAction(launcher, [signExec]) +env.Alias("launcher", launcher) + clientArchive = env.SzArchive(outputDir.File("%s_controllerClient.zip" % outFilePrefix), clientDir, relativeToSourceDir=True) env.Alias("client", clientArchive) -- 2.11.0