- ; xca.nsi
- ;
- ; This is the .nsi script for creating the nullsoft windows installer
- ; The name of the installer
- Name "X CA"
- Caption "X Certification Authority"
- ; The licenseagreement
- LicenseText "You must accept the following BSD like license to continue."
- LicenseData COPYRIGHT
- ; The file to write
- OutFile "xca.exe"
- ; The default installation directory
- InstallDir $PROGRAMFILESxca
- ; Registry key to check for directory (so if you install again, it will
- ; overwrite the old one automatically)
- InstallDirRegKey HKLM SOFTWARExca "Install_Dir"
- ; The text to prompt the user to enter a directory
- ComponentText "This will install the X Certification Authority (c) 2002 by Christian@Hohnstaedt.de"
- ; The text to prompt the user to enter a directory
- DirText "Choose a directory to install in to:"
- ; The stuff to install
- Section "xca (required)"
- ; Set output path to the installation directory.
- SetOutPath $INSTDIR
- ; Put file there
- File "Releasexca.exe"
- File "imgbigcert.png"
- File "imgbigcsr.png"
- File "imgbigkey.png"
- File "imgbigtemp.png"
- File "imghalfkey.png"
- File "imginvalidcert.png"
- File "imginvalidcertkey.png"
- File "imgkey.png"
- File "imgreq.png"
- File "imgreqkey.png"
- File "imgtemplate.png"
- File "imgvalidcert.png"
- File "imgvalidcertkey.png"
- File "c:develdb-4.0.14build_win32Releaselibdb40.dll"
- File "c:developenssl-0.9.6gout32dllReleaseSSLeay32.dll"
- File "c:developenssl-0.9.6gout32dllReleaselibeay32.dll"
- File "e:winqt2binmsvcrt.dll"
- File "c:windowssystemmsvcp60.dll"
- File "e:winqt2binqt-mt230nc.dll"
- ; Write the installation path into the registry
- WriteRegStr HKLM SOFTWARExca "Install_Dir" "$INSTDIR"
- ; Write the uninstall keys for Windows
- WriteRegStr HKLM "SoftwareMicrosoftWindowsCurrentVersionUninstallxca" "DisplayName" "X CA (remove only)"
- WriteRegStr HKLM "SoftwareMicrosoftWindowsCurrentVersionUninstallxca" "UninstallString" '"$INSTDIRuninstall.exe"'
- WriteUninstaller "uninstall.exe"
- SectionEnd
- ; optional section
- Section "Start Menu Shortcuts"
- CreateDirectory "$SMPROGRAMSxca"
- CreateShortCut "$SMPROGRAMSxcaUninstall.lnk" "$INSTDIRuninstall.exe" "" "$INSTDIRuninstall.exe" 0
- CreateShortCut "$SMPROGRAMSxcaxca xca.lnk" "$INSTDIRxca.exe" "" "$INSTDIRxca.exe" 0
- SectionEnd
- ; uninstall stuff
- UninstallText "This will uninstall xca. Hit next to continue."
- ; special uninstall section.
- Section "Uninstall"
- ; remove registry keys
- DeleteRegKey HKLM "SoftwareMicrosoftWindowsCurrentVersionUninstallxca"
- DeleteRegKey HKLM SOFTWARExca
- ; remove files
- Delete $INSTDIRxca.exe
- ; MUST REMOVE UNINSTALLER, too
- Delete $INSTDIRuninstall.exe
- ; remove shortcuts, if any.
- Delete "$SMPROGRAMSxca*.*"
- ; remove directories used.
- RMDir "$SMPROGRAMSxca"
- ;RMDir "$INSTDIR" NO, we keep the databasefiles xca.db
- Delete "$INSTDIRxca*.png"
- Delete "$INSTDIRxca*.dll"
- Delete "$INSTDIRbigcert.png"
- Delete "$INSTDIRbigcsr.png"
- Delete "$INSTDIRbigkey.png"
- Delete "$INSTDIRbigtemp.png"
- Delete "$INSTDIRhalfkey.png"
- Delete "$INSTDIRinvalidcert.png"
- Delete "$INSTDIRinvalidcertkey.png"
- Delete "$INSTDIRkey.png"
- Delete "$INSTDIRreq.png"
- Delete "$INSTDIRreqkey.png"
- Delete "$INSTDIRtemplate.png"
- Delete "$INSTDIRvalidcert.png"
- Delete "$INSTDIRvalidcertkey.png"
- Delete "$INSTDIRlibdb40.dll"
- Delete "$INSTDIRSSLeay32.dll"
- Delete "$INSTDIRlibeay32.dll"
- Delete "$INSTDIRmsvcrt.dll"
- Delete "$INSTDIRmsvcp60.dll"
- Delete "$INSTDIRqt-mt230nc.dll"
- SectionEnd
- ; eof