Browse Source

wingrass: attempt to define python file association

git-svn-id: https://svn.osgeo.org/grass/grass/trunk@54612 15284696-431f-4ddb-bdfa-cd5b030d7da7
Martin Landa 12 năm trước cách đây
mục cha
commit
e0810ad4da
1 tập tin đã thay đổi với 7 bổ sung1 xóa
  1. 7 1
      mswindows/GRASS-Installer.nsi.tmpl

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

@@ -50,6 +50,7 @@ SetCompressorDictSize 64
 
 !include "MUI2.nsh"
 !include "LogicLib.nsh"
+!include "FileAssociation.nsh"
 
 ;----------------------------------------------------------------------------------------------------------------------------
 
@@ -621,7 +622,10 @@ Section "GRASS" SecGRASS
 	WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\${GRASS_BASE}" "HelpLink" "${WIKI_PAGE}"
 	WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\${GRASS_BASE}" "URLInfoAbout" "${WEB_SITE}"
 	WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\${GRASS_BASE}" "Publisher" "${PUBLISHER}"
-  
+        
+        ;File Association
+        ${registerExtension} "$INSTALL_DIR\extrabin\pythonw.exe" ".py" "Python File"
+        
 	;Create the Desktop Shortcut
 	SetShellVarContext current
 	
@@ -1002,6 +1006,8 @@ Section "Uninstall"
 	DeleteRegKey HKLM "Software\${GRASS_BASE}"
 	DeleteRegKey HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\${GRASS_BASE}"
 
+        ;File Association
+        ${unregisterExtension} ".py" "Python File"
 SectionEnd
 
 ;----------------------------------------------------------------------------------------------------------------------------