Switch to AccessControl plugin, more reliable.
authorphasefx <phasefx@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Fri, 18 Mar 2011 18:08:51 +0000 (18:08 +0000)
committerphasefx <phasefx@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Fri, 18 Mar 2011 18:08:51 +0000 (18:08 +0000)
Only fetches it when needed.

Also make NSIS Less...verbose. Warnings/errors only.

Author: Thomas Berezansky <tsbere@mvlc.org>
Signed-off-by: Thomas Berezansky <tsbere@mvlc.org>
Signed-off-by: Jason Etheridge <jason@esilibrary.com>

git-svn-id: svn://svn.open-ils.org/ILS/trunk@19810 dcc99617-32d9-48b4-a31d-7c20da2025e4

Open-ILS/xul/staff_client/Makefile.am
Open-ILS/xul/staff_client/windowssetup.nsi

index a462ec0..5e3a030 100644 (file)
@@ -26,6 +26,8 @@ export NSIS_WICON=$$(if [ -f client/evergreen.ico ]; then echo '-DWICON'; fi)
 export NSIS_AUTOUPDATE=$$([ -f client/defaults/preferences/autoupdate.js ] && echo '-DAUTOUPDATE')
 export NSIS_DEV=$$([ -f client/defaults/preferences/developers.js ] && echo '-DDEVELOPER')
 export NSIS_PERMACHINE=$$([ -f client/defaults/preferences/aa_per_machine.js ] && echo '-DPERMACHINE')
+# Url taken from http://nsis.sourceforge.net/AccessControl_plug-in
+NSIS_ACCESSCONTROL=http://nsis.sourceforge.net/mediawiki/images/4/4a/AccessControl.zip
 
 #------------------------------
 # Build ILS XUL CLIENT/SERVER
@@ -250,8 +252,9 @@ linux-xulrunner: client_app
 # Build a windows installer.
 
 win-client: win-xulrunner
+       @if [ "${NSIS_AUTOUPDATE}${NSIS_PERMACHINE}" -a ! -d AccessControl ]; then echo 'Fetching AccessControl Plugin'; wget ${NSIS_ACCESSCONTROL} -O AccessControl.zip; unzip AccessControl.zip; fi
        @echo 'Building installer'
-       @makensis -DPRODUCT_VERSION="${STAFF_CLIENT_VERSION}" ${NSIS_WICON} ${NSIS_AUTOUPDATE} ${NSIS_DEV} ${NSIS_PERMACHINE} ${NSIS_EXTRAOPTS} windowssetup.nsi
+       @makensis -V2 -DPRODUCT_VERSION="${STAFF_CLIENT_VERSION}" ${NSIS_WICON} ${NSIS_AUTOUPDATE} ${NSIS_DEV} ${NSIS_PERMACHINE} ${NSIS_EXTRAOPTS} windowssetup.nsi
        @echo 'Done'
 
 # For linux, just build a tar.bz2 archive
index 0427ec9..d5077fb 100644 (file)
@@ -113,13 +113,8 @@ Section "Staff Client" SECMAIN
 
   !ifdef AUTOUPDATE | PERMACHINE
   ; For autoupdate and/or registering per machine, make sure we can write to the install directory.
-  ; If the AccessControl plugin was packaged or part of nsis we would use it instead.
-  ; Also, as cacls.exe is depreciated when icacls.exe exists, try icacls.exe first.
-  IfFileExists "$SYSDIR/icacls.exe" 0 +3
-  ExecWait '"$SYSDIR/icacls.exe" "$INSTDIR" /grant Everyone:(OI)(CI)F'  
-  Goto +3
-  IfFileExists "$SYSDIR/cacls.exe" 0 +2
-  ExecWait '"$SYSDIR/cacls.exe" "$INSTDIR" /E /G Everyone:F'
+  !addplugindir AccessControl/Plugins
+  AccessControl::GrantOnFile "$INSTDIR" "Everyone" "FullAccess"
   !endif
 SectionEnd