Samuel just informed me that brltty.nsi is now in BRLTY svn; I hadn't
updated in a while. :) Here's a patch with all of my changes so far.
Changelog included.
--
James Teh
Email/MSN Messenger/Jabber: [EMAIL PROTECTED]
Web site: http://www.jantrid.net/
* Change readme to readme.install.txt.
* Don't install install.bat and uninstall.bat, as the installer handles
this functionality, so they are redundant.
* Don't overwrite etc\brltty.conf if it already exists.
* Don't hard-code the version. This must now be specified on the
command line using -DVERSION=x, where x is the version.
* The distribution directory (i.e. containing the build of BRLTTY) now
defaults to brltty-win-VERSION. You can override this by specifying -DDISTDIR=x
on the command line, where x is the directory.
* Similarly, the output file defaults to brltty-win-VERSION.exe. This
can be overridden with -DOUTFILE=x.
* Install (and remove) Start Menu shortcuts from All Users, not the
current user.
Index: brltty.nsi
===================================================================
--- brltty.nsi (revision 3969)
+++ brltty.nsi (working copy)
@@ -13,7 +13,9 @@
;Product Info
!define PRODUCT "BRLTTY"
- !define VERSION "3.10-2"
+ !ifndef VERSION
+ !error "VERSION is not defined"
+ !endif
!define MUI_WELCOMEPAGE_TITLE "Setup for ${PRODUCT}, Version ${VERSION}"
@@ -23,8 +25,16 @@
;Name and file
Name "${PRODUCT}"
Caption "${PRODUCT} ${VERSION} Setup"
- OutFile "brltty_setup.exe"
+ !ifdef OUTFILE
+ OutFile "${OUTFILE}"
+ !else
+ OutFile "brltty-win-${VERSION}.exe"
+ !endif
+ !ifndef DISTDIR
+ !define DISTDIR "brltty-win-${VERSION}"
+ !endif
+
SetCompressor /SOLID LZMA
SetOverwrite IfNewer
@@ -51,7 +61,7 @@
;Pages
!insertmacro MUI_PAGE_WELCOME
- !insertmacro MUI_PAGE_LICENSE "dist\copying.txt"
+ !insertmacro MUI_PAGE_LICENSE "${DISTDIR}\copying.txt"
!insertmacro MUI_PAGE_DIRECTORY
;Start Menu Folder Page Configuration
@@ -62,7 +72,7 @@
!insertmacro MUI_PAGE_STARTMENU Application $StartMenuFolder
!insertmacro MUI_PAGE_INSTFILES
- !define MUI_FINISHPAGE_SHOWREADME "$INSTDIR\README.first.txt"
+ !define MUI_FINISHPAGE_SHOWREADME "$INSTDIR\README.install.txt"
!insertmacro MUI_PAGE_FINISH
!insertmacro MUI_UNPAGE_CONFIRM
@@ -79,13 +89,18 @@
Section "install"
SetOutPath "$INSTDIR"
+ SetShellVarContext all
;Stop the BRLTTY service if it is running.
ExecWait "$SYSDIR\net.exe stop brlapi"
- File /r "dist\*"
+ File /r /x *install.bat /x brltty.conf "${DISTDIR}\*"
+ # Install the config file separately so we can avoid overwriting it.
+ SetOverwrite off
+ File /oname=etc\brltty.conf "${DISTDIR}\etc\brltty.conf"
+ SetOverwrite IfNewer
- !insertmacro InstallLib DLL NOTSHARED REBOOT_NOTPROTECTED
"dist\bin\brlapi-0.5.dll" "$SYSDIR\brlapi-0.5.dll" "$SYSDIR"
+ !insertmacro InstallLib DLL NOTSHARED REBOOT_NOTPROTECTED
"${DISTDIR}\bin\brlapi-0.5.dll" "$SYSDIR\brlapi-0.5.dll" "$SYSDIR"
;Store installation folder
WriteRegStr HKLM "Software\${PRODUCT}" "" $INSTDIR
@@ -119,6 +134,8 @@
Section "Uninstall"
+ SetShellVarContext all
+
;Stop and remove the BRLTTY service
ExecWait "$SYSDIR\net.exe stop brlapi"
ExecWait "$INSTDIR\bin\brltty.exe -R"
_______________________________________________
This message was sent via the BRLTTY mailing list.
To post a message, send an e-mail to: [email protected]
For general information, go to: http://mielke.cc/mailman/listinfo/brltty