# HG changeset patch # User Jan Nieuwenhuizen # Date 1300567159 -3600 # Node ID f5fa403f8bc6a2d0127184e3d1ea89d8de883f68 # Parent b12c1db261f88bace64b3ba19f0d536ab779b2fb schikkers-list.nsi: register .sy. diff -r b12c1db261f8 -r f5fa403f8bc6 nsis/schikkers-list.nsi --- 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"