; The name of the installer Name "Nosy" ; The file to write OutFile "SetupNosy.exe" Section "FindPythonDir" ;------------ Find Python Install Dir ReadRegStr $1 HKLM "Software\Python\PythonCore\2.5\InstallPath" "" IfErrors 0 FOUNDIT ReadRegStr $1 HKLM "Software\Python\PythonCore\2.4\InstallPath" "" IfErrors 0 FOUNDIT ReadRegStr $1 HKLM "Software\Python\PythonCore\2.3\InstallPath" "" IfErrors 0 FOUNDIT ReadRegStr $1 HKLM "Software\Python\PythonCore\2.2\InstallPath" "" IfErrors 0 FOUNDIT ReadRegStr $1 HKLM "Software\Python\PythonCore\2.1\InstallPath" "" IfErrors 0 FOUNDIT ;-- Failed to find it. MessageBox MB_OK|MB_ICONSTOP "Could not find directory to install into...information was not in registry under HKLM\Software\Python\PythonCore, for versions 2.5,2.4,2.3,2.2 or 2.1" Quit FOUNDIT: MessageBox MB_OK "Installing into $1Scripts" ;------------ Make sure Nose is installed IfFileExists $1Scripts\nosetests.exez NOSEINSTALLED ; Nose is missing.. gripe. MessageBox MB_OK|MB_ICONSTOP "Nose is not installed! (didn't find $1Scripts\nosetests.exe) Install Nose from http://somethingaboutorange.com/mrl/projects/nose/." Quit NOSEINSTALLED: SectionEnd ;-------------------------------- ; Pages Page instfiles ;-------------------------------- ; The stuff to install Section "" ;No components page, name is not important ; Set output path to the installation directory. SetOutPath $1Scripts ; Put file there File nosy.py StrCpy $2 "$1Scripts\nosy.bat" FileOpen $R0 $2 "w" FileWrite $R0 '"$1python" "$1Scripts\nosy.py"' FileClose $R0 MessageBox MB_OK "Installation succesful! You should be able to run Nose tests by going to a directory and typing 'nosy' into a DOS window." SectionEnd ; end the section