Mercurial > gub
changeset 6508:f5fa403f8bc6
schikkers-list.nsi: register .sy.
author | Jan Nieuwenhuizen <janneke@gnu.org> |
---|---|
date | Sat, 19 Mar 2011 21:39:19 +0100 |
parents | b12c1db261f8 |
children | 51850cb3bb0f |
files | nsis/schikkers-list.nsi |
diffstat | 1 files changed, 28 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/nsis/schikkers-list.nsi Sat Mar 19 16:09:18 2011 +0100 +++ b/nsis/schikkers-list.nsi Sat Mar 19 21:39:19 2011 +0100 @@ -95,6 +95,7 @@ Call registry_installer Call registry_path + Call registry_sy Call postinstall_schikkers_list SectionEnd @@ -320,6 +321,33 @@ ;;py_end: FunctionEnd +Function registry_sy + ReadRegStr $R0 HKLM "${ENVIRON}" "PATHEXT" + ${StrLoc} $0 $R0 ".SY;" > + StrCmp $0 "" 0 sy_done + WriteRegStr HKLM "${ENVIRON}" "PATHEXT" ".SY;$R0" + +sy_done: + WriteRegStr HKCR ".sy" "" "Schikkers-List" + WriteRegStr HKCR ".sy" "Schikkers-List" "Schikkers-List" + WriteRegStr HKCR ".sy" "Content Type" "text/schikkers-list-source" + +;;sy_open: + ReadRegStr $R0 HKCR "Guile\shell\open\command" "" + ;;StrCmp $R0 "" 0 sy_auto_file + WriteRegStr HKCR "Schikkers-List\shell" "" "open" + # %1 is the GUILE command, so must be quoted bo the space + WriteRegExpandStr HKCR "Schikkers-List\shell\open\command" "" '"$INSTDIR\usr\bin\guile-windows.exe" "$INSTDIR\usr\bin\schikkers-list.scm" "%1" %2 %3 %4 %5 %6 %7 %8 %9' + +;;sy_auto_file: + ReadRegStr $R0 HKCR "sy_auto_file\shell\open\command" "" + ;;StrCmp $R0 "" 0 sy_end + WriteRegStr HKCR "sy_auto_file\shell" "" "open" + # %1 is the GUILE command, so must be quoted bo the space + WriteRegExpandStr HKCR "sy_auto_file\shell\open\command" "" '"$INSTDIR\usr\bin\guile-windows.exe" "$INSTDIR\usr\bin\schikkers-list.scm" "%1" %2 %3 %4 %5 %6 %7 %8 %9' +;;sy_end: +FunctionEnd + Function registry_guile WriteRegStr HKLM "${ENVIRON}" "XDG_CACHE_HOME" "$LOCALAPPDATA\cache" ReadRegStr $R0 HKLM "${ENVIRON}" "PATHEXT"