OSDN Git Service

Added an nsis-based NVDA portable launcher, based on both the NVDA cd launcher and...
authorMichael Curran <mick@kulgan.net>
Mon, 1 Aug 2011 00:40:14 +0000 (10:40 +1000)
committerMichael Curran <mick@kulgan.net>
Mon, 1 Aug 2011 00:40:14 +0000 (10:40 +1000)
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 [new file with mode: 0644]
sconstruct

diff --git a/launcher/nvdaLauncher.nsi b/launcher/nvdaLauncher.nsi
new file mode 100644 (file)
index 0000000..bcb907f
--- /dev/null
@@ -0,0 +1,27 @@
+!include "fileFunc.nsh"\r
+\r
+!define launcher_appExe "nvdaLauncher.exe"\r
+\r
+SetCompressor /SOLID LZMA\r
+SilentInstall silent\r
+RequestExecutionLevel user\r
+\r
+Name "NVDA"\r
+VIProductVersion "0.0.0.0" ;Needs to be here so other version info shows up\r
+VIAddVersionKey "ProductName" "${PRODUCT}"\r
+VIAddVersionKey "LegalCopyright" "Copyright 2006 - 2011 NVDA Contributors"\r
+VIAddVersionKey "FileDescription" "NVDA launcher file"\r
+VIAddVersionKey "ProductVersion" "${VERSION}"\r
+\r
+page instfiles\r
+\r
+section "install"\r
+SetAutoClose true\r
+initPluginsDir\r
+CreateDirectory "$PLUGINSDIR\app"\r
+setOutPath "$PLUGINSDIR\app"\r
+file /R "${NVDADistDir}\"\r
+${GetParameters} $0\r
+Banner::destroy\r
+execWait "$PLUGINSDIR\app\nvda.exe $0"\r
+SectionEnd\r
index 1a72cc7..b1f9b2e 100755 (executable)
@@ -250,6 +250,15 @@ if certFile:
        env.AddPostAction(installer, [signExec])\r
 env.Alias("installer", installer)\r
 \r
+launcher = env.Command(outputDir.File("%s_launcher.exe" % outFilePrefix), ["launcher/nvdaLauncher.nsi", portableDist],\r
+       [[makensis, "/V2",\r
+       "/DVERSION=$version", '/DPUBLISHER="$publisher"',\r
+       "/DNVDADistDir=${SOURCES[1].abspath}", "/XOutFile ${TARGET.abspath}",\r
+       "$SOURCE"]])\r
+if certFile:\r
+       env.AddPostAction(launcher, [signExec])\r
+env.Alias("launcher", launcher)\r
+\r
 clientArchive = env.SzArchive(outputDir.File("%s_controllerClient.zip" % outFilePrefix), clientDir, relativeToSourceDir=True)\r
 env.Alias("client", clientArchive)\r
 \r