; Script generated with the Venis Install Wizard ; Define your application name !define APPNAME "MyApp for Pocket PC" !define APPNAMEANDVERSION "MyApp for Pocket PC 0.12 Beta" ; Use compression SetCompressor /FINAL /SOLID LZMA Icon "MyApp.ico" ; Main Install settings Name "${APPNAMEANDVERSION}" InstallDir "$PROGRAMFILES\MyCo\MyApp" InstallDirRegKey HKLM "Software\${APPNAME}" "" OutFile "MyAppPPC.exe" !define MUI_WELCOMEPAGE_TITLE_3LINES !define MUI_WELCOMEFINISHPAGE_BITMAP "${NSISDIR}\Contrib\Graphics\Wizard\orange.bmp" ; Modern interface settings !include "MUI.nsh" !include "FileFunc.nsh" ;!define MUI_FINISHPAGE_SHOWREADME "readme.txt" ;!define MUI_FINISHPAGE_LINK "MyApp for Pocket PC: http://www.myco.com" ;!define MUI_FINISHPAGE_LINK_LOCATION http://www.myco.com !define MUI_ABORTWARNING !insertmacro MUI_PAGE_WELCOME Page custom ReadmePage !insertmacro MUI_PAGE_LICENSE "eula.txt" ;!insertmacro MUI_PAGE_DIRECTORY !insertmacro MUI_PAGE_INSTFILES !insertmacro MUI_PAGE_FINISH !insertmacro MUI_UNPAGE_CONFIRM !insertmacro MUI_UNPAGE_INSTFILES ; Set languages (first is default language) !insertmacro MUI_LANGUAGE "English" !insertmacro MUI_LANGUAGE "Danish" !insertmacro MUI_LANGUAGE "Dutch" !insertmacro MUI_LANGUAGE "French" !insertmacro MUI_LANGUAGE "German" !insertmacro MUI_LANGUAGE "Italian" !insertmacro MUI_LANGUAGE "Japanese" !insertmacro MUI_LANGUAGE "Russian" !insertmacro MUI_RESERVEFILE_LANGDLL ReserveFile "readme.txt" ReserveFile "eula.txt" ReserveFile "readme.ini" !insertmacro GetParent Section "CEAppMgr" ; ; 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 PocketPC applications. \ Please install ActiveSync and reinstall WorkInTime" End: SectionEnd ; Section "netcf.all.wce4.armv4" Section1 SetOutPath "$INSTDIR" File "netcf.ini" File "C:\Program Files\Microsoft.NET\SDK\CompactFramework\v2.0\WindowsCE\wce400\armv4\NETCFv2.ppc.armv4.cab" File "C:\Program Files\Microsoft.NET\SDK\CompactFramework\v2.0\WindowsCE\wce500\armv4i\NETCFv2.wm.armv4i.cab" File "C:\Program Files\Microsoft.NET\SDK\CompactFramework\v2.0\WindowsCE\wce500\mipsii\NETCFv2.wce5.mipsii.cab" File "C:\Program Files\Microsoft.NET\SDK\CompactFramework\v2.0\WindowsCE\wce500\mipsiv\NETCFv2.wce5.mipsiv.cab" File "C:\Program Files\Microsoft.NET\SDK\CompactFramework\v2.0\WindowsCE\wce500\sh4\NETCFv2.wce5.sh4.cab" File "C:\Program Files\Microsoft.NET\SDK\CompactFramework\v2.0\WindowsCE\wce500\armv4i\NETCFv2.wce5.armv4i.cab" StrCpy $0 "$INSTDIR\netcf.ini" Call InstallCAB SectionEnd Section "MyApp" Section2 ${GetParent} "$1" $2 ; Set Section properties SetOverwrite on ; Set Section Files and Shortcuts SetOutPath "$2\MyApp" File "MyApp.cab" File "eula.txt" File "readme.txt" File "setup.ini" StrCpy $0 "$2\MyApp\setup.ini" Call InstallCAB SectionEnd Var HWND Var DLGITEM Function ReadmePage !insertmacro MUI_HEADER_TEXT "Release notes" "Please read" !insertmacro MUI_INSTALLOPTIONS_INITDIALOG "readme.ini" Pop $HWND ;HWND of dialog GetDlgItem $DLGITEM $HWND 1200 ;1200 + Field number - 1 ;$DLGITEM contains the HWND of the first field SetCtlColors $DLGITEM "" "${MUI_BGCOLOR}" ; clear the field SendMessage $DLGITEM ${WM_SETTEXT} 1 "STR: " FileOpen $1 "readme.txt" "r" loop: FileRead $1 $2 SendMessage $DLGITEM 0x00C2 0 "STR:$2" IfErrors 0 loop FileClose $1 SendMessage $DLGITEM 0x00B1 0 0 SendMessage $DLGITEM 0x00B7 0 0 !insertmacro MUI_INSTALLOPTIONS_SHOW FunctionEnd Function InstallCAB ExecWait '"$1" "$0"' FunctionEnd ; Modern install component descriptions !insertmacro MUI_FUNCTION_DESCRIPTION_BEGIN !insertmacro MUI_DESCRIPTION_TEXT ${Section2} "" !insertmacro MUI_FUNCTION_DESCRIPTION_END ; On initialization Function .onInit !insertmacro MUI_INSTALLOPTIONS_EXTRACT "readme.ini" !insertmacro MUI_INSTALLOPTIONS_EXTRACT "readme.txt" !insertmacro MUI_LANGDLL_DISPLAY FunctionEnd ; eof