# Auto-generated by EclipseNSIS Script Wizard # 29.08.2006 15:05:17 Name JAP SetCompressor /SOLID lzma # Defines !define REGKEY "SOFTWARE\$(^Name)" !define VERSION 00.06.001 !define COMPANY JAP-Team !define URL http://anon.inf.tu-dresden.de/ # MUI defines !define MUI_ICON Data\jap.ico !define MUI_FINISHPAGE_NOAUTOCLOSE !define MUI_STARTMENUPAGE_REGISTRY_ROOT HKLM !define MUI_STARTMENUPAGE_NODISABLE !define MUI_STARTMENUPAGE_REGISTRY_KEY Software\JAP !define MUI_STARTMENUPAGE_REGISTRY_VALUENAME StartMenuGroup !define MUI_STARTMENUPAGE_DEFAULT_FOLDER JAP !define MUI_UNICON Data\jap.ico !define MUI_UNFINISHPAGE_NOAUTOCLOSE !define MUI_LANGDLL_REGISTRY_ROOT HKLM !define MUI_LANGDLL_REGISTRY_KEY ${REGKEY} !define MUI_LANGDLL_REGISTRY_VALUENAME InstallerLanguage # Included files !include Sections.nsh !include MUI.nsh # Reserved Files !insertmacro MUI_RESERVEFILE_LANGDLL ReserveFile "${NSISDIR}\Plugins\AdvSplash.dll" # Variables Var StartMenuGroup #interface configuration !define MUI_HEADERIMAGE !define MUI_HEADERIMAGE_BITMAP "Data\Background.bmp" !define MUI_ABORTWARNING !define MUI_HEADERIMAGE_RIGHT # Installer pages !insertmacro MUI_PAGE_COMPONENTS !insertmacro MUI_PAGE_DIRECTORY !insertmacro MUI_PAGE_STARTMENU Application $StartMenuGroup !insertmacro MUI_PAGE_INSTFILES !insertmacro MUI_UNPAGE_CONFIRM !insertmacro MUI_UNPAGE_INSTFILES # Installer languages !insertmacro MUI_LANGUAGE English !insertmacro MUI_LANGUAGE German # Installer attributes OutFile japsetup.exe InstallDir $PROGRAMFILES\JAP CRCCheck on XPStyle on ShowInstDetails hide VIProductVersion 0.6.1.0 VIAddVersionKey ProductName JAP VIAddVersionKey ProductVersion "${VERSION}" VIAddVersionKey CompanyName "${COMPANY}" VIAddVersionKey Website "${URL}" VIAddVersionKey FileVersion "0.6.1.0" VIAddVersionKey FileDescription "JAP Setup" VIAddVersionKey LegalCopyright "" InstallDirRegKey HKLM "${REGKEY}" Path ShowUninstDetails hide # Installer sections Section "!JAP" SEC0000 SetOutPath $INSTDIR SetOverwrite on File JAP\JAP.jar File JAP\jap.exe WriteRegStr HKLM "${REGKEY}\Components" Main 1 !insertmacro MUI_STARTMENU_WRITE_BEGIN Application SetOutPath $SMPROGRAMS\$StartMenuGroup CreateShortcut "$SMPROGRAMS\$StartMenuGroup\JAP.lnk" $INSTDIR\jap.exe !insertmacro MUI_STARTMENU_WRITE_END SectionEnd Section Swing SEC0011 SetOutPath $INSTDIR SetOverwrite on File Data\swingall.jar SectionEnd Section "Java" SEC0012 SetOutPath $TEMP SetOverwrite on File JAVA\jre1.3.exe ExecWait '"$TEMP\jre1.3.exe"' $0 SectionEnd ;-------------------------------- ;Descriptions ;Language strings LangString DESC_SecJAP ${LANG_ENGLISH} "This will install the JAP. You must have installed Java version 1.1 or above." LangString DESC_SecJAP ${LANG_GERMAN} "Der JAP. Zum Ausführen des JAP wird Java Version 1.1 oder höher benötigt." LangString DESC_SecSwing ${LANG_ENGLISH} "This will install the Swing-Library. This library is only necessary if you do not have Java version 1.2 or higher installed. Use this option, if you get an error message, which tells you, that you need to install the Swing-Library." LangString DESC_SecSwing ${LANG_GERMAN} "Die Swing-Bibliothek. Sie ist zum Ausführen von JAP notwendig und in Java ab Version 1.2 bereits enthalten. Installieren Sie diese Bibliothek, wenn Sie beim Starten von JAP eine entsprechende Fehlermeldung erhalten." LangString DESC_SecJAVA ${LANG_ENGLISH} "The Java Runtime Environment neccessary to run JAP." LangString DESC_SecJAVA ${LANG_GERMAN} "Die Java Laufzeitumgebung. Diese ist notwendig, um JAP zu starten." ;Assign language strings to sections !insertmacro MUI_FUNCTION_DESCRIPTION_BEGIN !insertmacro MUI_DESCRIPTION_TEXT ${SEC0000} $(DESC_SecJAP) !insertmacro MUI_DESCRIPTION_TEXT ${SEC0011} $(DESC_SecSwing) !insertmacro MUI_DESCRIPTION_TEXT ${SEC0012} $(DESC_SecJAVA) !insertmacro MUI_FUNCTION_DESCRIPTION_END Section -post SEC0001 WriteRegStr HKLM "${REGKEY}" Path $INSTDIR WriteUninstaller $INSTDIR\uninstall.exe !insertmacro MUI_STARTMENU_WRITE_BEGIN Application SetOutPath $SMPROGRAMS\$StartMenuGroup CreateShortcut "$SMPROGRAMS\$StartMenuGroup\$(^UninstallLink).lnk" $INSTDIR\uninstall.exe !insertmacro MUI_STARTMENU_WRITE_END WriteRegStr HKLM "SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\$(^Name)" DisplayName "$(^Name)" WriteRegStr HKLM "SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\$(^Name)" DisplayVersion "${VERSION}" WriteRegStr HKLM "SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\$(^Name)" Publisher "${COMPANY}" WriteRegStr HKLM "SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\$(^Name)" URLInfoAbout "${URL}" WriteRegStr HKLM "SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\$(^Name)" DisplayIcon $INSTDIR\uninstall.exe WriteRegStr HKLM "SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\$(^Name)" UninstallString $INSTDIR\uninstall.exe WriteRegDWORD HKLM "SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\$(^Name)" NoModify 1 WriteRegDWORD HKLM "SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\$(^Name)" NoRepair 1 SectionEnd # Macro for selecting uninstaller sections !macro SELECT_UNSECTION SECTION_NAME UNSECTION_ID Push $R0 ReadRegStr $R0 HKLM "${REGKEY}\Components" "${SECTION_NAME}" StrCmp $R0 1 0 next${UNSECTION_ID} !insertmacro SelectSection "${UNSECTION_ID}" GoTo done${UNSECTION_ID} next${UNSECTION_ID}: !insertmacro UnselectSection "${UNSECTION_ID}" done${UNSECTION_ID}: Pop $R0 !macroend # Uninstaller sections Section /o un.JAP UNSEC0000 Delete /REBOOTOK $INSTDIR\jap.exe Delete /REBOOTOK $INSTDIR\JAP.jar Delete /REBOOTOK $INSTDIR\swingall.jar Delete /REBOOTOK "$SMPROGRAMS\$StartMenuGroup\JAP.lnk" DeleteRegValue HKLM "${REGKEY}\Components" Main SectionEnd Section un.post UNSEC0001 DeleteRegKey HKLM "SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\$(^Name)" Delete /REBOOTOK "$SMPROGRAMS\$StartMenuGroup\$(^UninstallLink).lnk" Delete /REBOOTOK $INSTDIR\uninstall.exe DeleteRegValue HKLM "${REGKEY}" StartMenuGroup DeleteRegValue HKLM "${REGKEY}" Path DeleteRegKey /IfEmpty HKLM "${REGKEY}\Components" DeleteRegKey /IfEmpty HKLM "${REGKEY}" RmDir /REBOOTOK $SMPROGRAMS\$StartMenuGroup RmDir /REBOOTOK $INSTDIR SectionEnd # Installer functions Function .onInit InitPluginsDir Push $R1 File /oname=$PLUGINSDIR\spltmp.bmp Data\splash.bmp advsplash::show 1000 600 400 -1 $PLUGINSDIR\spltmp Pop $R1 Pop $R1 # !insertmacro MUI_LANGDLL_DISPLAY FunctionEnd # Uninstaller functions Function un.onInit ReadRegStr $INSTDIR HKLM "${REGKEY}" Path ReadRegStr $StartMenuGroup HKLM "${REGKEY}" StartMenuGroup !insertmacro MUI_UNGETLANGUAGE !insertmacro SELECT_UNSECTION Main ${UNSEC0000} FunctionEnd # Installer Language Strings LangString ^UninstallLink ${LANG_GERMAN} "Lösche $(^Name)" LangString ^UninstallLink ${LANG_ENGLISH} "Uninstall $(^Name)"