1 ; $Id: zebra.nsi,v 1.28 2006-05-24 19:12:47 adam Exp $
3 !define VERSION "1.4.0"
4 !define VS_RUNTIME_LOCATION "c:\Program Files\Microsoft Visual Studio .NET 2003\SDK\v1.1\Bin"
11 Caption "Index Data Zebra ${VERSION} Setup"
12 OutFile "idzebra_${VERSION}.exe"
14 LicenseText "You must read the following license before installing:"
15 LicenseData license.txt
17 ComponentText "This will install Zebra on your computer:"
18 InstType "Full (w/ Source)"
19 InstType "Lite (w/o Source)"
21 InstallDir "$PROGRAMFILES\Zebra"
22 InstallDirRegKey HKLM "SOFTWARE\Index Data\Zebra" ""
24 ;--------------------------------
27 !insertmacro MUI_PAGE_LICENSE "license.txt"
28 !insertmacro MUI_PAGE_COMPONENTS
29 !insertmacro MUI_PAGE_DIRECTORY
30 !insertmacro MUI_PAGE_INSTFILES
32 !insertmacro MUI_UNPAGE_CONFIRM
33 !insertmacro MUI_UNPAGE_INSTFILES
38 ; UninstPage uninstConfirm
39 ; UninstPage instfiles
41 ;--------------------------------
44 !insertmacro MUI_LANGUAGE "English"
46 ;--------------------------------
47 Section "" ; (default section)
49 ; add files / whatever that need to be installed here.
50 WriteRegStr HKLM "SOFTWARE\Index Data\Zebra" "" "$INSTDIR"
51 WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\Zebra" "DisplayName" "Zebra ${VERSION} (remove only)"
52 WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\Zebra" "UninstallString" '"$INSTDIR\uninst.exe"'
53 ; write out uninstaller
54 WriteUninstaller "$INSTDIR\uninst.exe"
55 SetOutPath "$SMPROGRAMS\Index Data\Zebra\"
56 CreateShortCut "$SMPROGRAMS\Index Data\Zebra\Zebra Program Directory.lnk" \
58 WriteINIStr "$SMPROGRAMS\Index Data\Zebra\Zebra Home page.url" \
59 "InternetShortcut" "URL" "http://www.indexdata.dk/zebra/"
60 CreateShortCut "$SMPROGRAMS\Index Data\Zebra\Uninstall Zebra.lnk" \
67 SectionEnd ; end of default section
69 Section "Zebra Runtime"
71 SetOutPath $INSTDIR\bin
75 File ..\bin\libxml2.dll
77 File ..\bin\libexpat.dll
78 File "${VS_RUNTIME_LOCATION}\msvcr71.dll"
81 Section "Zebra Development"
83 SetOutPath $INSTDIR\include
85 SetOutPath $INSTDIR\include\idzebra
86 File ..\include\idzebra\*.h
87 SetOutPath $INSTDIR\lib
91 Section "Zebra Documentation"
93 SetOutPath $INSTDIR\doc
99 SetOutPath "$SMPROGRAMS\Index Data\Zebra\"
100 CreateShortCut "$SMPROGRAMS\Index Data\Zebra\HTML Documentation.lnk" \
101 "$INSTDIR\doc\index.html"
104 Section "Zebra Examples"
113 Section "Zebra Source"
115 SetOutPath $INSTDIR\util
117 SetOutPath $INSTDIR\dfa
120 SetOutPath $INSTDIR\index
123 SetOutPath $INSTDIR\isams
125 SetOutPath $INSTDIR\isamc
128 SetOutPath $INSTDIR\isamb
130 SetOutPath $INSTDIR\data1
132 SetOutPath $INSTDIR\recctrl
135 SetOutPath $INSTDIR\dict
138 SetOutPath $INSTDIR\bfile
141 SetOutPath $INSTDIR\rset
143 SetOutPath $INSTDIR\test\api
145 File ..\test\api\*.cfg
146 SetOutPath $INSTDIR\win
152 ; begin uninstall settings/section
153 UninstallText "This will uninstall Zebra ${VERSION} from your system"
156 ; add delete commands to delete whatever files/registry keys/etc you installed here.
157 Delete "$INSTDIR\uninst.exe"
158 DeleteRegKey HKLM "SOFTWARE\Index Data\Zebra"
159 DeleteRegKey HKLM "SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\Zebra"
160 ExecWait '"$INSTDIR\bin\zebrasrv" -remove'
161 RMDir /r "$SMPROGRAMS\Index Data\Zebra"
163 IfFileExists $INSTDIR 0 Removed
164 MessageBox MB_OK|MB_ICONEXCLAMATION \
165 "Note: $INSTDIR could not be removed."