1;NSIS Modern User Interface 2 3;-------------------------------- 4;Include Modern UI 5 6 !include "MUI.nsh" 7 !include "EnvVarUpdate.nsh" 8 !include "x64.nsh" 9 10;-------------------------------- 11; Initialization function to properly set the installation directory 12Function .onInit 13 ${If} ${RunningX64} 14 StrCpy $INSTDIR "$PROGRAMFILES64\NCBI\blast-BLAST_VERSION+" 15 ${EndIf} 16FunctionEnd 17 18;-------------------------------- 19;General 20 21 ;Name and file 22 Name "NCBI BLAST BLAST_VERSION+" 23 OutFile "ncbi-blast-BLAST_VERSION+.exe" 24 ; Install/uninstall icons 25 !define MUI_ICON "ncbilogo.ico" 26 !define MUI_UNICON "${NSISDIR}\Contrib\Graphics\Icons\nsis1-uninstall.ico" 27 28 ;Default installation folder 29 InstallDir "$PROGRAMFILES\NCBI\blast-BLAST_VERSION+" 30 31 ;Get installation folder from registry if available 32 InstallDirRegKey HKCU "Software\NCBI\blast-BLAST_VERSION+" "" 33 34;-------------------------------- 35;Interface Settings 36 37 !define MUI_ABORTWARNING 38 39;-------------------------------- 40;Pages 41 42 !insertmacro MUI_PAGE_LICENSE "LICENSE" 43 !insertmacro MUI_PAGE_DIRECTORY 44 !insertmacro MUI_PAGE_INSTFILES 45 ;!insertmacro MUI_PAGE_FINISH 46 47 !insertmacro MUI_UNPAGE_CONFIRM 48 !insertmacro MUI_UNPAGE_INSTFILES 49 50;-------------------------------- 51;Languages 52 53 !insertmacro MUI_LANGUAGE "English" 54 55;-------------------------------- 56;Installer Sections 57 58Section "DefaultSection" SecDflt 59 60 SetOutPath "$INSTDIR\bin" 61 62 File "blastn.exe" 63 File "blastp.exe" 64 File "blastx.exe" 65 File "tblastn.exe" 66 File "tblastx.exe" 67 File "psiblast.exe" 68 File "rpsblast.exe" 69 File "rpstblastn.exe" 70 File "legacy_blast.pl" 71 File "update_blastdb.pl" 72 File "cleanup-blastdb-volumes.py" 73 File "get_species_taxids.sh" 74 File "makeblastdb.exe" 75 File "makembindex.exe" 76 File "makeprofiledb.exe" 77 File "blastdbcmd.exe" 78 File "blastdb_aliastool.exe" 79 File "segmasker.exe" 80 File "dustmasker.exe" 81 File "windowmasker.exe" 82 File "convert2blastmask.exe" 83 File "blastdbcheck.exe" 84 File "blast_formatter.exe" 85 File "deltablast.exe" 86 File "nghttp2.dll" 87 88 SetOutPath "$INSTDIR\doc" 89 File "README.txt" 90 91 ;Store installation folder 92 WriteRegStr HKCU "Software\NCBI\blast-BLAST_VERSION+" "" $INSTDIR 93 94 ;Create uninstaller 95 WriteUninstaller "$INSTDIR\Uninstall-ncbi-blast-BLAST_VERSION+.exe" 96 97 ;Update PATH 98 ${EnvVarUpdate} $0 "PATH" "P" "HKCU" "$INSTDIR\bin" 99 100SectionEnd 101 102;-------------------------------- 103;Uninstaller Section 104 105Section "Uninstall" 106 Delete "$INSTDIR\Uninstall-ncbi-blast-BLAST_VERSION+.exe" 107 108 Delete "$INSTDIR\bin\blastn.exe" 109 Delete "$INSTDIR\bin\blastp.exe" 110 Delete "$INSTDIR\bin\blastx.exe" 111 Delete "$INSTDIR\bin\tblastn.exe" 112 Delete "$INSTDIR\bin\tblastx.exe" 113 Delete "$INSTDIR\bin\psiblast.exe" 114 Delete "$INSTDIR\bin\rpsblast.exe" 115 Delete "$INSTDIR\bin\rpstblastn.exe" 116 Delete "$INSTDIR\bin\legacy_blast.pl" 117 Delete "$INSTDIR\bin\update_blastdb.pl" 118 Delete "$INSTDIR\bin\cleanup-blastdb-volumes.py" 119 Delete "$INSTDIR\bin\get_species_taxids.sh" 120 Delete "$INSTDIR\bin\makeblastdb.exe" 121 Delete "$INSTDIR\bin\makembindex.exe" 122 Delete "$INSTDIR\bin\makeprofiledb.exe" 123 Delete "$INSTDIR\bin\blastdbcmd.exe" 124 Delete "$INSTDIR\bin\blastdb_aliastool.exe" 125 Delete "$INSTDIR\bin\segmasker.exe" 126 Delete "$INSTDIR\bin\dustmasker.exe" 127 Delete "$INSTDIR\bin\windowmasker.exe" 128 Delete "$INSTDIR\bin\convert2blastmask.exe" 129 Delete "$INSTDIR\bin\blastdbcheck.exe" 130 Delete "$INSTDIR\bin\blast_formatter.exe" 131 Delete "$INSTDIR\bin\deltablast.exe" 132 Delete "$INSTDIR\doc\README.txt" 133 RmDir "$INSTDIR\bin" 134 RmDir "$INSTDIR\doc" 135 RMDir "$INSTDIR" 136 137 DeleteRegKey /ifempty HKCU "Software\NCBI\blast-BLAST_VERSION+" 138 139 ; Remove installation directory from PATH 140 ${un.EnvVarUpdate} $0 "PATH" "R" "HKCU" "$INSTDIR\bin" 141 142SectionEnd 143