Permalink
Browse files

Add a shortcut to Hackage to Start Menu.

  • Loading branch information...
1 parent cc2f1bc commit 5b654c2c5968f91eac8553c51d01a8544c6633e2 @23Skidoo committed Jul 21, 2009
Showing with 14 additions and 4 deletions.
  1. +5 −0 CreateInternetShortcut.nsh
  2. +9 −4 Nsisfile.nsi
@@ -0,0 +1,5 @@
+!macro CreateInternetShortcut FILENAME URL ICONFILE ICONINDEX
+WriteINIStr "${FILENAME}.url" "InternetShortcut" "URL" "${URL}"
+WriteINIStr "${FILENAME}.url" "InternetShortcut" "IconFile" "${ICONFILE}"
+WriteINIStr "${FILENAME}.url" "InternetShortcut" "IconIndex" "${ICONINDEX}"
+!macroend
View
@@ -8,6 +8,7 @@
!Include "LogicLib.nsh"
!Include "MUI2.nsh"
!Include "WordFunc.nsh"
+ !Include "CreateInternetShortcut.nsh"
;--------------------------------
;Defines
@@ -184,15 +185,19 @@ Section "-StartMenu" StartMenu
CreateDirectory "$SMPROGRAMS\$START_MENU_FOLDER"
CreateDirectory "$SMPROGRAMS\$START_MENU_FOLDER\${GHC_VERSION}"
CreateShortCut \
- "$SMPROGRAMS\$START_MENU_FOLDER\${GHC_VERSION}\GHC Documentation.lnk" \
+ "$SMPROGRAMS\$START_MENU_FOLDER\GHC Documentation.lnk" \
"$INSTDIR\doc\index.html"
CreateShortCut \
- "$SMPROGRAMS\$START_MENU_FOLDER\${GHC_VERSION}\GHC Flag Reference.lnk" \
+ "$SMPROGRAMS\$START_MENU_FOLDER\GHC Flag Reference.lnk" \
"$INSTDIR\doc\users_guide\flag-reference.html"
CreateShortCut \
- "$SMPROGRAMS\$START_MENU_FOLDER\${GHC_VERSION}\GHC Library Documentation.lnk" \
+ "$SMPROGRAMS\$START_MENU_FOLDER\GHC Library Documentation.lnk" \
"$INSTDIR\doc\libraries\index.html"
- CreateShortCut "$SMPROGRAMS\$START_MENU_FOLDER\${GHC_VERSION}\GHCi.lnk" "$INSTDIR\bin\ghci.exe"
+ CreateShortCut "$SMPROGRAMS\$START_MENU_FOLDER\GHCi.lnk" "$INSTDIR\bin\ghci.exe"
+ !insertmacro CreateInternetShortcut \
+ "$SMPROGRAMS\$START_MENU_FOLDER\HackageDB - Haskell Software Repository" \
+ "http://hackage.haskell.org" \
+ "$INSTDIR\icons\hackage.ico" "0"
!insertmacro MUI_STARTMENU_WRITE_END

0 comments on commit 5b654c2

Please sign in to comment.