;----------------------------------------------------------------------- ; The Multiple Installer Script - CompactFramework, SQLCE, JonasSmart -- ;----------------------------------------------------------------------- ;-------------------------------- ;Version Information VIProductVersion "2.7.6.0" VIAddVersionKey "JonasSmart" "Jonas Mobile Application" VIAddVersionKey "ProductName" "JonasSmart" VIAddVersionKey "Comments" "Support for this application can be obtained via support@jonassoftware.com" VIAddVersionKey "CompanyName" "Jonas Software" VIAddVersionKey "LegalTrademarks" "Software Company retains all legal rights to The JonasSmart." VIAddVersionKey "LegalCopyright" "© Jonas Software" VIAddVersionKey "FileDescription" "" VIAddVersionKey "FileVersion" "2.7" ;-------------------------------- Caption "The JonasSmart 2.7 by Jonas Software Company" BGGradient 000000 E62E1A FFFFFF InstallColors FF8080 000030 ;-------------------------------- ; HM NIS Edit Wizard helper defines ;-------------------------------- !define PRODUCT_NAME "JonasSmart" !define PRODUCT_VERSION "2.7" !define PRODUCT_PUBLISHER "Jonas Software" !define PRODUCT_WEB_SITE "http://www.jonassoftware.com" !define PRODUCT_UNINST_KEY "Software\Microsoft\Windows\CurrentVersion\Uninstall\${PRODUCT_NAME}" !define PRODUCT_UNINST_ROOT_KEY "HKLM" ;-------------------------------- ; MUI Settings ;-------------------------------- ;Include Modern UI !include "MUI.nsh" !define MUI_ABORTWARNING !define MUI_ICON "app.ico" !define MUI_UNICON "app.ico" !define MUI_HEADERIMAGE !define MUI_HEADERIMAGE_BITMAP "win.bmp" !define MUI_WELCOMEFINISHPAGE_BITMAP "arrow.bmp" ;-------------------------------- ; MUI Pages ;-------------------------------- ; Welcome page !insertmacro MUI_PAGE_WELCOME ; License page !define MUI_LICENSEPAGE_RADIOBUTTONS ;!define MUI_LICENSEPAGE_TEXT_TOP "Test" !insertmacro MUI_PAGE_LICENSE "eula.txt" ; Components page !insertmacro MUI_PAGE_COMPONENTS ; Instfiles page !insertmacro MUI_PAGE_INSTFILES ; Finish page !define MUI_FINISHPAGE_SHOWREADME "$INSTDIR\readme.html" !insertmacro MUI_PAGE_FINISH ; Uninstaller pages !insertmacro MUI_UNPAGE_INSTFILES ; Language files !insertmacro MUI_LANGUAGE "English" ;------------------------------------- ; MUI end ;------------------------------------- ;-------------------------------- ;Configuration ;-------------------------------- Name "${PRODUCT_NAME} ${PRODUCT_VERSION}" OutFile "JonasSmart.exe" InstallDir "$PROGRAMFILES\JonasSmart\" ShowInstDetails show ShowUnInstDetails show ;------------------------------- ; Call Pocket PC ActiveSync App ;------------------------------- Section ;locate and launch the CEAPPMGR for the Pocket PC Call InitInstallCAB SectionEnd ;-------------------------------- ; Installer Sections ;-------------------------------- Section "CompactFramework" SEC01 ;FRAMEWORKINSTALLED: SectionIn 1 SetOutPath "$INSTDIR" SetOverwrite on File netcf.ini File netcf.core.ppc3.arm.cab StrCpy $0 "$INSTDIR\netcf.ini" Call InstallCAB ;MessageBox MB_OK|MB_ICONEXCLAMATION \ "Please wait for the .NET Compact Framework install to finish on your device before continuing." ;FRAMEWORKNOTINSTALLED: SectionEnd ; end of section 'Optional' ; SQL Server CE Install Section "SQLServerCE" SEC02 SectionIn 1 SetOutPath "$INSTDIR" SetOverwrite on File sqlce.ini File sqlce.ppc3.arm.CAB StrCpy $0 "$INSTDIR\sqlce.ini" Call InstallCAB ; MessageBox MB_OK|MB_ICONEXCLAMATION \ "Please wait for the SQL Server CE Client install to finish on your device before continuing." SectionEnd ; end of section 'Optional' ; SQL Client Install Section "SQLClient" SEC03 SectionIn 1 SetOutPath "$INSTDIR" SetOverwrite on File sql.ini File sql.ppc3.arm.CAB StrCpy $0 "$INSTDIR\sql.ini" Call InstallCAB ;MessageBox MB_OK|MB_ICONEXCLAMATION \ "Please wait for the SQL Server CE install to finish on your device before continuing." SectionEnd ; end of section 'Optional' ; The JonasSmart Installer Install Section "JonasSmartInstaller" SEC04 ; (default, requried section) SectionIn 1, RO SetOutPath "$INSTDIR" SetOverwrite on File eula.txt File readme.html File install.ini File JonasSmart_PPC.ARM.CAB File JonasSmart_PPC.ARMV4.CAB File JonasSmart_PPC.MIPS.CAB File JonasSmart_PPC.SH3.CAB File JonasSmart_PPC.WCE420X86.CAB File JonasSmart_PPC.X86.CAB StrCpy $0 "$INSTDIR\install.ini" Call InstallCAB MessageBox MB_OK|MB_ICONEXCLAMATION \ "Please wait for The JonasSmart install to finish on your device before continuing." SectionEnd ; end of default section ;-------------------------------- ; Addtional Sections ;-------------------------------- Section -AdditionalIcons WriteIniStr "$INSTDIR\${PRODUCT_NAME}.url" "InternetShortcut" "URL" "${PRODUCT_WEB_SITE}" CreateDirectory "$SMPROGRAMS\JonasSmart" CreateShortCut "$SMPROGRAMS\JonasSmart\JonasSmart.lnk" "$INSTDIR\${PRODUCT_NAME}.exe" CreateShortCut "$SMPROGRAMS\JonasSmart\Website.lnk" "$INSTDIR\${PRODUCT_NAME}.url" CreateShortCut "$SMPROGRAMS\JonasSmart\Uninstall.lnk" "$INSTDIR\uninst.exe" SectionEnd Section -Post WriteUninstaller "$INSTDIR\uninst.exe" WriteRegStr ${PRODUCT_UNINST_ROOT_KEY} "${PRODUCT_UNINST_KEY}" "DisplayName" "$(^Name)" WriteRegStr ${PRODUCT_UNINST_ROOT_KEY} "${PRODUCT_UNINST_KEY}" "UninstallString" "$INSTDIR\uninst.exe" WriteRegStr ${PRODUCT_UNINST_ROOT_KEY} "${PRODUCT_UNINST_KEY}" "DisplayVersion" "${PRODUCT_VERSION}" WriteRegStr ${PRODUCT_UNINST_ROOT_KEY} "${PRODUCT_UNINST_KEY}" "URLInfoAbout" "${PRODUCT_WEB_SITE}" WriteRegStr ${PRODUCT_UNINST_ROOT_KEY} "${PRODUCT_UNINST_KEY}" "Publisher" "${PRODUCT_PUBLISHER}" ;SetOutPath $INSTDIR ;File "win.bmp" SectionEnd ;-------------------------------- ; Section Descriptions ;-------------------------------- !insertmacro MUI_FUNCTION_DESCRIPTION_BEGIN !insertmacro MUI_DESCRIPTION_TEXT ${SEC01} "Installs the .Net Compact Framework (Required to run application on non 2003 devices)," !insertmacro MUI_DESCRIPTION_TEXT ${SEC02} "Installs SQL Server CE (Required to run application)" !insertmacro MUI_DESCRIPTION_TEXT ${SEC03} "Installs SQL Client (Required to run application)" !insertmacro MUI_DESCRIPTION_TEXT ${SEC04} "Installs The JonasSmart Application" !insertmacro MUI_FUNCTION_DESCRIPTION_END ;-------------------------------- ;Uninstaller Section ;-------------------------------- Function un.onUninstSuccess HideWindow MessageBox MB_ICONINFORMATION|MB_OK "$(^Name) was successfully removed from your computer." FunctionEnd Function un.onInit MessageBox MB_ICONQUESTION|MB_YESNO|MB_DEFBUTTON2 "Are you sure you want to completely remove $(^Name) and all of its components?" IDYES +2 Abort FunctionEnd Section Uninstall Delete "$INSTDIR\${PRODUCT_NAME}.url" Delete "$INSTDIR\uninst.exe" Delete "$INSTDIR\readme.html" Delete "$INSTDIR\eula.txt" Delete "$INSTDIR\JonasSmart.ARM.CAB" Delete "$INSTDIR\JonasSmart.ARMV4.CAB" Delete "$INSTDIR\JonasSmart.MIPS.CAB" Delete "$INSTDIR\JonasSmart.SH3.CAB" Delete "$INSTDIR\JonasSmart.WCE420X86.CAB" Delete "$INSTDIR\JonasSmart.X86.CAB" Delete "$INSTDIR\sql.ppc3.arm.CAB" Delete "$INSTDIR\sqlce.ppc3.arm.CAB" Delete "$INSTDIR\netcf.core.ppc3.arm.cab" Delete "$SMPROGRAMS\JonasSmart\Uninstall.lnk" Delete "$SMPROGRAMS\JonasSmart\Website.lnk" RMDir "$SMPROGRAMS\JonasSmart" RMDir "$INSTDIR" DeleteRegKey ${PRODUCT_UNINST_ROOT_KEY} "${PRODUCT_UNINST_KEY}" SetAutoClose true SectionEnd ;-------------------------------- ; Pocket PC Install Section ;-------------------------------- ; Installs a JonasSmart PocketPC cab-application ; It expects $0 to contain the absolute location of the ini file to be installed. Function InstallCAB ExecWait '"$1" "$0"' FunctionEnd ;-------------------------------- ; OPEN CEAPPMGR FOR POCKET PC APPLICATION INSTALLING ;-------------------------------- Function InitInstallCAB ; one-time initialization needed for InstallCAB subroutine ReadRegStr $1 HKEY_LOCAL_MACHINE "software\Microsoft\Windows\CurrentVersion\App Paths\CEAppMgr.exe" "" IfErrors Error Goto End Error: MessageBox MB_OK|MB_ICONEXCLAMATION \ "Unable to find Application Manager for JonasSmart PocketPC applications. \ Please install ActiveSync and reinstall YourApp." End: FunctionEnd ; eof