Browse Source

GRASS-Installer.nsi.tmpl: attempt to fix https://trac.osgeo.org/grass/ticket/2448
make folder and file writeable before run g.mkfontcap
change after g.mkfontcap run back to only readable

git-svn-id: https://svn.osgeo.org/grass/grass/trunk@66166 15284696-431f-4ddb-bdfa-cd5b030d7da7

Helmut Kudrnovsky 9 years ago
parent
commit
402856977a
1 changed files with 6 additions and 1 deletions
  1. 6 1
      mswindows/GRASS-Installer.nsi.tmpl

+ 6 - 1
mswindows/GRASS-Installer.nsi.tmpl

@@ -528,7 +528,9 @@ Section "GRASS" SecGRASS
 	SetOutPath "$INSTALL_DIR"
 	SetOutPath "$INSTALL_DIR"
 	File /r ${PACKAGE_FOLDER}\*.*
 	File /r ${PACKAGE_FOLDER}\*.*
 
 
-	;grant modifying/overwriting fontcap file
+	;grant $INSTDIR\etc read write accessible
+	AccessControl::GrantOnFile "$INSTDIR\etc" "(S-1-5-32-545)" "GenericRead + GenericWrite"	
+	;grant modifying/overwriting fontcap file	
 	AccessControl::GrantOnFile "$INSTDIR\etc\fontcap" "(S-1-5-32-545)" "GenericRead + GenericWrite + Delete"
 	AccessControl::GrantOnFile "$INSTDIR\etc\fontcap" "(S-1-5-32-545)" "GenericRead + GenericWrite + Delete"
 	
 	
 	;create run_gmkfontcap.bat
 	;create run_gmkfontcap.bat
@@ -590,6 +592,9 @@ Section "GRASS" SecGRASS
 	
 	
 	;Run g.mkfontcap outside a grass session during installation to catch all fonts
 	;Run g.mkfontcap outside a grass session during installation to catch all fonts
 	ExecWait '"$INSTALL_DIR\etc\run_gmkfontcap.bat"'
 	ExecWait '"$INSTALL_DIR\etc\run_gmkfontcap.bat"'
+
+	;set $INSTDIR\etc back to read accessible
+	AccessControl::SetOnFile "$INSTDIR\etc" "(S-1-5-32-545)" "GenericRead + GenericExecute"	
 	
 	
 	;Install demolocation into the GIS_DATABASE directory
 	;Install demolocation into the GIS_DATABASE directory
 	SetOutPath "$GIS_DATABASE\demolocation"
 	SetOutPath "$GIS_DATABASE\demolocation"