Name "Futuris Imager" OutFile "output\imager.exe" CRCCheck on BrandingText "Futuris Imager 2.5" Icon "imager.ico" EnabledBitmap "check.bmp" DisabledBitmap "nocheck.bmp" WindowIcon off LicenseText "To install Futuris Imager, you must accept following agreement:" LicenseData "license.txt" InstallDir "$PROGRAMFILES\Futuris\Imager" DirShow show DirText "Where should Futuris Imager be installed?" AutoCloseWindow true ShowInstDetails hide InstType "Typical" InstType "Full" ComponentText "Which components should be installed?" Section "Futuris Imager (required)" ; checking version of futuris.bpl IfFileExists "$SYSDIR\futuris.bpl" CheckVersion CopyDLL CheckVersion: GetDLLVersion "$SYSDIR\futuris.bpl" $5 $6 GetDLLVersionLocal "..\runtime\futuris.bpl" $7 $8 IntCmp $5 $7 CheckBuild CopyDLL NoAbort CheckBuild: IntCmp $6 $8 NoAbort CopyDLL NoAbort ; copying required DLL CopyDLL: SetOutPath "$SYSDIR" File "..\runtime\futuris.bpl" IfFileExists "$SYSDIR\futuris.bpl" NoAbort MessageBox MB_OK "Windows system folder is read-only.$\nSetup cannot continue." Abort NoAbort: ; registering as shared dll Push $SYSDIR\futuris.bpl Call AddSharedDLL ; copying general portion of required files SetOutPath "$INSTDIR" File "..\release\cleantmp.exe" File "..\release\imager.exe" File "..\release\plugscan.dll" File "..\release\plugscan.exe" File "..\release\cleantmp.exe" SetOutPath "$INSTDIR\help" File "..\release\help\*.*" SetOutPath "$INSTDIR\plugins" File "..\release\plugins\f_gif.dll" File "..\release\plugins\f_infoplug.dll" File "..\release\plugins\f_jpeg.dll" File "..\release\plugins\f_mail.dll" File "..\release\plugins\f_resize.dll" File "..\release\plugins\f_rotate.dll" File "..\release\plugins\f_shtml.dll" File "..\release\plugins\f_stdwin.dll" File "..\release\plugins\f_windib.dll" File "..\release\plugins\f_worryworth.dll" ; adding more stuff CreateDirectory "$INSTDIR\temp" CreateShortCut "$SMPROGRAMS\Futuris Imager.lnk" "$INSTDIR\imager.exe" SectionEnd SectionDivider "features" Section "Printing support" SectionIn 12 SetOutPath "$INSTDIR" File "..\release\print.dll" SectionEnd Section "TWAIN scanning support" SectionIn 12 SetOutPath "$INSTDIR\plugins" File "..\release\plugins\f_twain.dll" SectionEnd Section "File browser (with image preview)" SectionIn 12 SetOutPath "$INSTDIR" File "..\release\browser.exe" SectionEnd Section "Screen capture tool" SectionIn 12 SetOutPath "$INSTDIR" File "..\release\capture.exe" SectionEnd Section "WebView (support for webcams)" SectionIn 12 SetOutPath "$INSTDIR" File "..\release\webload.dll" SectionEnd SectionDivider "file formats" Section "TIFF, Targa, PhotoCD, Photoshop" SectionIn 12 SetOutPath "$INSTDIR\plugins" File "..\release\plugins\f_gex.dll" SectionEnd Section "PNG, MNG, JNG (recommended)" SectionIn 12 ; checking version of futuris.bpl IfFileExists "$SYSDIR\libmng.dll" CheckVersion CopyDLL CheckVersion: GetDLLVersion "$SYSDIR\libmng.dll" $5 $6 GetDLLVersionLocal "..\runtime\libmng.dll" $7 $8 IntCmp $5 $7 CheckBuild CopyDLL NoAbort CheckBuild: IntCmp $6 $8 NoAbort CopyDLL NoAbort ; copying required DLL CopyDLL: SetOutPath "$SYSDIR" File "..\runtime\libmng.dll" NoAbort: ; registering as shared dll Push $$SYSDIR\libmng.dll Call AddSharedDLL ; continuing SetOutPath "$INSTDIR\plugins" File "..\release\plugins\f_mng.dll" File "..\release\plugins\f_ngexport.dll" SectionEnd Section "Mavica 411" SectionIn 2 SetOutPath "$INSTDIR\plugins" File "..\release\plugins\f_mavica.dll" SectionEnd Section "AutoCAD slides" SectionIn 2 SetOutPath "$INSTDIR\plugins" File "..\release\plugins\f_slides.dll" SectionEnd Section "WAP bitmaps" SectionIn 2 SetOutPath "$INSTDIR\plugins" File "..\release\plugins\f_wap.dll" SectionEnd SectionDivider "plug-ins" Section "Filters (image transformations)" SectionIn 12 SetOutPath "$INSTDIR\plugins" File "..\release\plugins\f_blur.dll" File "..\release\plugins\f_brightness.dll" File "..\release\plugins\f_color.dll" File "..\release\plugins\f_colorreplace.dll" File "..\release\plugins\f_crop.dll" File "..\release\plugins\f_greyscale.dll" File "..\release\plugins\f_invert.dll" File "..\release\plugins\f_mirror.dll" SectionEnd Section "HEX Viewer" SectionIn 2 SetOutPath "$INSTDIR\plugins" File "..\release\plugins\f_hex.dll" SectionEnd Section "View-as-wallpaper tool" SectionIn 2 SetOutPath "$INSTDIR\plugins" File "..\release\plugins\f_wallpaper.dll" SectionEnd Section "Wallpaper manipulations" SectionIn 2 SetOutPath "$INSTDIR\plugins" File "..\release\plugins\f_setwall.dll" SectionEnd SectionDivider "exporters" Section "Export as Windows ICOn" SectionIn 2 SetOutPath "$INSTDIR\plugins" File "..\release\plugins\f_iconexp.dll" SectionEnd Section "Export as TIFF" SectionIn 2 SetOutPath "$INSTDIR\plugins" File "..\release\plugins\f_tiffsave.dll" SectionEnd Section "-post" ; writing uninstaller WriteRegStr HKEY_LOCAL_MACHINE "Software\Microsoft\Windows\CurrentVersion\Uninstall\FuturisImagerC" "DisplayName" "Futuris Imager 2.5" WriteRegStr HKEY_LOCAL_MACHINE "Software\Microsoft\Windows\CurrentVersion\Uninstall\FuturisImagerC" "DisplayIcon" '"$INSTDIR\imager.exe"' WriteRegStr HKEY_LOCAL_MACHINE "Software\Microsoft\Windows\CurrentVersion\Uninstall\FuturisImagerC" "Publisher" "Alexander Tereschenko" WriteRegStr HKEY_LOCAL_MACHINE "Software\Microsoft\Windows\CurrentVersion\Uninstall\FuturisImagerC" "URLInfoAbout" "http://futuris.plastiqueweb.com/" WriteRegStr HKEY_LOCAL_MACHINE "Software\Microsoft\Windows\CurrentVersion\Uninstall\FuturisImagerC" "UninstallString" '"$INSTDIR\uninst.exe"' WriteUninstaller "$INSTDIR\uninst.exe" ; setting Registry DeleteRegKey HKEY_CURRENT_USER "Software\Futuris\FIPIS" WriteRegStr HKEY_CURRENT_USER "Software\Futuris\ImagerC\Web" "Ref" "http://futuris.plastiqueweb.com/" WriteRegStr HKEY_CURRENT_USER "Software\Futuris\ImagerC\Web" "UA" "FuturisImager/2.5" ; initializing FIPIS ExecWait "$INSTDIR\plugscan.exe" ExecWait '"$INSTDIR\imager.exe" /regdock' ; the end MessageBox MB_OK "Futuris Imager 2.5 successfully installed." SectionEnd UninstallText "This will uninstall Futuris Imager from your system" ShowUninstDetails hide Section Uninstall ExecWait '"$INSTDIR\imager.exe" /unreg' DeleteRegKey HKEY_CURRENT_USER "Software\Futuris\ImagerC" DeleteRegKey HKEY_CURRENT_USER "Software\Futuris\FIPIS" DeleteRegKey /ifempty HKEY_CURRENT_USER "Software\Futuris" DeleteRegKey HKEY_CLASSES_ROOT "FuturisImager" DeleteRegKey HKEY_LOCAL_MACHINE "SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\FuturisImagerC" Delete "$SMPROGRAMS\Futuris Imager.lnk" ; deleting shared DLLs Push $SYSDIR\futuris.bpl Call un.RemoveSharedDLL Push $SYSDIR\libmng.dll Call un.RemoveSharedDLL ; deleting remaining files Delete "$INSTDIR\uninst.exe" RMDir /r "$INSTDIR" SectionEnd ; shared dlls support Function AddSharedDLL Exch $9 Push $0 ReadRegDWORD $0 HKLM Software\Microsoft\CurrentVersion\SharedDLLs $9 MessageBox MB_OK "Called ($9) ($0)" StrCmp "" $0 Zero NotZero Zero: WriteRegDWORD HKLM Software\Microsoft\CurrentVersion\SharedDLLs $9 1 Goto Common NotZero: IntOp $0 $0 + 1 WriteRegDWORD HKLM Software\Microsoft\CurrentVersion\SharedDLLs $9 $0 Goto Common Common: Pop $0 Pop $9 FunctionEnd Function un.RemoveSharedDLL Exch $9 Push $0 ReadRegDword $0 HKLM Software\Microsoft\CurrentVersion\SharedDLLs $9 StrCmp $0 "" remove IntOp $0 $0 - 1 IntCmp $0 0 rk rk uk rk: DeleteRegValue HKLM Software\Microsoft\CurrentVersion\SharedDLLs $9 goto remove uk: WriteRegDWORD HKLM Software\Microsoft\CurrentVersion\SharedDLLs $9 $0 Goto noremove remove: Delete /REBOOTOK $9 noremove: Pop $0 Pop $9 FunctionEnd