"Fossies" - the Fresh Open Source Software Archive

Member "links-1.03/links.nsi" (29 Dec 2010, 3039 Bytes) of archive /linux/www/links-1.03.tar.gz:


As a special service "Fossies" has tried to format the requested source page into HTML format using (guessed) NSIS source code syntax highlighting (style: standard) with prefixed line numbers. Alternatively you can here view or download the uninterpreted source code file. See also the latest Fossies "Diffs" side-by-side code changes report for "links.nsi": 2.8_vs_1.03.

    1 ;NSIS Modern User Interface
    2 ;Basic Example Script
    3 ;Written by Joost Verburg
    4 
    5 ;--------------------------------
    6 ;Include Modern UI
    7 
    8   !include "MUI.nsh"
    9 
   10 ;--------------------------------
   11 ;General
   12 
   13   ;Name and file
   14   Name "Links WWW Browser"
   15   ;Icon "links.ico"
   16   ;!define MUI_ICON "links.ico"
   17   OutFile "Links-install.exe"
   18 
   19   ;Default installation folder
   20   InstallDir "$PROGRAMFILES\Links"
   21   
   22   ;Get installation folder from registry if available
   23   InstallDirRegKey HKCU "Software\Links" ""
   24 
   25   RequestExecutionLevel admin
   26 
   27   Var MUI_TEMP
   28   Var STARTMENU_FOLDER
   29 
   30 ;--------------------------------
   31 ;Interface Settings
   32 
   33   !define MUI_ABORTWARNING
   34 
   35 ;--------------------------------
   36 ;Pages
   37 
   38   !insertmacro MUI_PAGE_LICENSE "COPYING"
   39 ;  !insertmacro MUI_PAGE_COMPONENTS
   40   !insertmacro MUI_PAGE_DIRECTORY
   41 
   42 !define MUI_STARTMENUPAGE_REGISTRY_ROOT "HKCU" 
   43 !define MUI_STARTMENUPAGE_REGISTRY_KEY "Software\Links" 
   44 !define MUI_STARTMENUPAGE_REGISTRY_VALUENAME "Links"
   45   
   46 !insertmacro MUI_PAGE_STARTMENU Application $STARTMENU_FOLDER
   47 
   48   !insertmacro MUI_PAGE_INSTFILES
   49   
   50   !insertmacro MUI_UNPAGE_CONFIRM
   51   !insertmacro MUI_UNPAGE_INSTFILES
   52   
   53 ;--------------------------------
   54 ;Languages
   55  
   56   !insertmacro MUI_LANGUAGE "English"
   57 
   58 ;--------------------------------
   59 ;Installer Sections
   60 
   61 Section "-Default Links browser files" DefaultSection
   62 
   63   SetOutPath "$INSTDIR"
   64   
   65   ;ADD YOUR OWN FILES HERE...
   66 
   67 File COPYING
   68 File README
   69 File links.exe
   70 ;File c:\cygwin\bin\cygbz2-1.dll
   71 File c:\cygwin\bin\cygcrypto-0.9.8.dll
   72 File c:\cygwin\bin\cygssl-0.9.8.dll
   73 File c:\cygwin\bin\cygwin1.dll
   74 ;File c:\cygwin\bin\cygz.dll
   75   
   76   ;Store installation folder
   77   WriteRegStr HKCU "Software\Links" "" $INSTDIR
   78   
   79   ;Create uninstaller
   80   WriteUninstaller "$INSTDIR\Uninstall.exe"
   81 
   82 !insertmacro MUI_STARTMENU_WRITE_BEGIN Application
   83 
   84 CreateDirectory "$SMPROGRAMS\$STARTMENU_FOLDER"
   85 CreateShortCut "$SMPROGRAMS\$STARTMENU_FOLDER\Links.lnk" "$INSTDIR\Links.exe"
   86 CreateShortCut "$SMPROGRAMS\$STARTMENU_FOLDER\Uninstall.lnk" "$INSTDIR\Uninstall.exe"
   87 !insertmacro MUI_STARTMENU_WRITE_END
   88 SectionEnd
   89 
   90 
   91 ;--------------------------------
   92 ;Uninstaller Section
   93 
   94 Section "Uninstall"
   95 
   96   ;ADD YOUR OWN FILES HERE...
   97 Delete "$INSTDIR\BRAILLE_HOWTO"
   98 Delete "$INSTDIR\COPYING"
   99 Delete "$INSTDIR\KEYS"
  100 Delete "$INSTDIR\README"
  101 Delete "$INSTDIR\Links.exe"
  102 Delete "$INSTDIR\cygbz2-1.dll"
  103 Delete "$INSTDIR\cygcrypto-0.9.8.dll"
  104 Delete "$INSTDIR\cygssl-0.9.8.dll"
  105 Delete "$INSTDIR\cygwin1.dll"
  106 Delete "$INSTDIR\cygz.dll"
  107 Delete "$INSTDIR\.links\*"
  108 RMDir "$INSTDIR\.links"
  109 
  110   Delete "$INSTDIR\Uninstall.exe"
  111 
  112   RMDir "$INSTDIR"
  113 
  114 !insertmacro MUI_STARTMENU_GETFOLDER Application $MUI_TEMP
  115 
  116 Delete "$SMPROGRAMS\$MUI_TEMP\Uninstall.lnk"
  117 Delete "$SMPROGRAMS\$MUI_TEMP\Links.lnk"
  118 StrCpy $MUI_TEMP "$SMPROGRAMS\$MUI_TEMP"
  119 
  120 startMenuDeleteLoop:
  121 ClearErrors
  122 RMDir $MUI_TEMP
  123 GetFullPathName $MUI_TEMP "$MUI_TEMP\.."
  124 
  125 IfErrors startMenuDeleteLoopDone
  126 
  127 StrCmp $MUI_TEMP $SMPROGRAMS startMenuDeleteLoopDone startMenuDeleteLoop
  128 startMenuDeleteLoopDone:
  129 
  130   DeleteRegKey /ifempty HKCU "Software\Links"
  131 
  132 SectionEnd