12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485 |
- #setup vars
- Name "PhotoBunny"
- OutFile "setup.exe"
- InstallDir "$PROGRAMFILES\PhotoBunny"
- RequestExecutionLevel highest
- #version stuff
- VIAddVersionKey "ProductName" "PhotoBunny"
- VIAddVersionKey "CompanyName" "GwillzCorp"
- VIAddVersionKey "LegalTrademarks" "Licensed under GPL 3.0"
- VIAddVersionKey "LegalCopyright" "© Gwilyn Saunders"
- VIAddVersionKey "FileDescription" "Setup installer for PhotoBunny"
- VIAddVersionKey "FileVersion" "1.0"
- VIAddVersionKey "ProductVersion" "1.0.0.0"
- VIProductVersion "1.0.0.0"
- LicenseData "installer\GPL3.txt"
- DirText "Select somewhere to install and junk"
- #imports
- !include "LogicLib.nsh"
- #layout
- Page license
- Page directory
- Page instfiles
- UninstPage uninstConfirm
- UninstPage instfiles
- #default section
- Section "Common Files (Required)"
- SectionIn RO
- SetOutPath $INSTDIR
- #copy files
- File "build\release\PhotoBunny.exe"
- File "installer\QtCore4.dll"
- File "installer\QtGui4.dll"
- File "installer\QtNetwork4.dll"
- File "installer\QtWebKit4.dll"
- File "installer\qjson.dll"
- File "installer\libeay32.dll"
- File "installer\ssleay32.dll"
- File "installer\vcredist_sp1_x86.exe"
- File "installer\GPL3.txt"
-
- #Check for 32bit VC2010 on a 32bit system
- ReadRegDWORD $0 HKLM "SOFTWARE\Microsoft\VisualStudio\10.0\VC\VCRedist\x86" "Installed"
- ${If} $0 == ""
- #then check on a 64bit system
- ReadRegDWORD $1 HKLM "SOFTWARE\Wow6432Node\Microsoft\VisualStudio\10.0\VC\VCRedist\x86" "Installed"
- ${If} $1 == ""
- ExecWait "$INSTDIR\vcredist_sp1_x86.exe"
- ${EndIf}
- ${EndIf}
-
- #create uninstaller
- WriteUninstaller "$INSTDIR\uninstall.exe"
- #create shortcuts
- CreateDirectory "$SMPROGRAMS\PhotoBunny"
- CreateShortCut "$SMPROGRAMS\PhotoBunny\PhotoBunny.lnk" "$INSTDIR\PhotoBunny.exe"
- CreateShortCut "$SMPROGRAMS\PhotoBunny\Licence.lnk" "$INSTDIR\GPL3.txt"
- CreateShortCut "$SMPROGRAMS\PhotoBunny\Uninstall.lnk" "$INSTDIR\uninstall.exe"
- SectionEnd
- #uninstall section
- Section "Uninstall"
- #remove program files
- Delete "$INSTDIR\PhotoBunny.exe"
- Delete "$INSTDIR\QtCore4.dll"
- Delete "$INSTDIR\QtGui4.dll"
- Delete "$INSTDIR\QtNetwork4.dll"
- Delete "$INSTDIR\QtWebKit4.dll"
- Delete "$INSTDIR\qjson.dll"
- Delete "$INSTDIR\libeay32.dll"
- Delete "$INSTDIR\ssleay32.dll"
- Delete "$INSTDIR\GPL3.txt"
- Delete "$INSTDIR\uninstall.exe"
-
- #remove shortcut files
- Delete "$SMPROGRAMS\PhotoBunny\PhotoBunny.lnk"
- Delete "$SMPROGRAMS\PhotoBunny\Licence.lnk"
- Delete "$SMPROGRAMS\PhotoBunny\Uninstall.lnk"
- RMDir "$SMPROGRAMS\PhotoBunny"
-
- SectionEnd
|