瀏覽代碼

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 年之前
父節點
當前提交
402856977a
共有 1 個文件被更改,包括 6 次插入1 次删除
  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"
 	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"
 	
 	;create run_gmkfontcap.bat
@@ -590,6 +592,9 @@ Section "GRASS" SecGRASS
 	
 	;Run g.mkfontcap outside a grass session during installation to catch all fonts
 	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
 	SetOutPath "$GIS_DATABASE\demolocation"