LP1741309: Correct installed file permission
authorJason Boyer <JBoyer@library.in.gov>
Sun, 7 Jan 2018 03:21:09 +0000 (22:21 -0500)
committerBill Erickson <berickxx@gmail.com>
Mon, 8 Jan 2018 15:46:14 +0000 (10:46 -0500)
Because of the machinations of the _ReplaceInFile macro
the extension host JSON file does not inherit permissions
correctly. Adding the AccessControl NSIS plugin and using
the EnableFileInheritance function corrects this.

Signed-off-by: Jason Boyer <JBoyer@library.in.gov>
Signed-off-by: Chris Sharp <csharp@georgialibraries.org>
installer/windows/AccessControl.dll [new file with mode: 0755]
installer/windows/defines.nsh
installer/windows/hatch.nsi

diff --git a/installer/windows/AccessControl.dll b/installer/windows/AccessControl.dll
new file mode 100755 (executable)
index 0000000..0de0324
Binary files /dev/null and b/installer/windows/AccessControl.dll differ
index e311794..8afcac3 100644 (file)
@@ -14,7 +14,7 @@
 ; Version numbers should be integers
 !define VERSIONMAJOR 0
 !define VERSIONMINOR 1
-!define VERSIONBUILD 3
+!define VERSIONBUILD 5
 !define FULLVERSION "${VERSIONMAJOR}.${VERSIONMINOR}.${VERSIONBUILD}"
 ;---------------------------
 ; Add Remove info
index 91d1db3..54adc2b 100644 (file)
 !include ReplaceInFile.nsh
 ;---------------------------------------------------------------
 
+; Add local copy of AccessControl plugin
+!addplugindir .
+
 ; Installer's filename
-Outfile "${APPNAME} Installer.exe"
+Outfile "${APPNAME} Installer ${FULLVERSION}.exe"
 RequestExecutionLevel admin
 
 
@@ -174,6 +177,7 @@ section "install"
     ; Set path variable in org.ils_evergreen.hatch.json to $INSTDIR\hatch.bat
     ${StrRep} '$0' '$INSTDIR' '\' '\\'
     !insertmacro _ReplaceInFile  "$INSTDIR\extension\host\org.evergreen_ils.hatch.json" "/path/to/hatch.sh" "$0\\hatch.bat"
+    AccessControl::EnableFileInheritance "$INSTDIR\extension\host\org.evergreen_ils.hatch.json"
 
     ; Uninstaller
     writeUninstaller "$INSTDIR\Uninstall ${APPNAME}.exe"