From: <fle...@us...> - 2007-03-14 21:17:48
|
Revision: 602 http://svn.sourceforge.net/magicmap/?rev=602&view=rev Author: flederohr Date: 2007-03-14 14:17:39 -0700 (Wed, 14 Mar 2007) Log Message: ----------- replace NSIS installer setup file for MagicMap Added Paths: ----------- trunk/magicmapclient/MagicMapSetup.nsi Removed Paths: ------------- trunk/magicmapclient/MagicMapSetup.nsi Deleted: trunk/magicmapclient/MagicMapSetup.nsi =================================================================== --- trunk/magicmapclient/MagicMapSetup.nsi 2007-03-14 21:15:10 UTC (rev 601) +++ trunk/magicmapclient/MagicMapSetup.nsi 2007-03-14 21:17:39 UTC (rev 602) @@ -1,234 +0,0 @@ -;NSIS Modern User Interface -;Welcome/Finish Page Example Script -;Written by Joost Verburg - -;-------------------------------- -;Include Modern UI - - !include "MUI.nsh" - -;-------------------------------- -;General - - ;Name and file - Name "MagicMap" - OutFile "MagicMapSetup.exe" - - ;Default installation folder - InstallDir "$PROGRAMFILES\MagicMap" - - SetCompressor ZLIB - - ;Default icon for installer (does not work yet) -; Icon "MagicMap2.ico" - - ;Get installation folder from registry if available - InstallDirRegKey HKCU "Software\MagicMap" "" - - -;-------------------------------- -;Variables - - Var MUI_TEMP - Var STARTMENU_FOLDER - -;-------------------------------- -;Interface Settings - - !define MUI_HEADERIMAGE - !define MUI_HEADERIMAGE_BITMAP "MagicMap_InstallHeader.bmp" - !define MUI_ICON "MagicMap.ico" - !define MUI_UNICON "MagicMap_Uninst.ico" - !define MUI_ABORTWARNING - - -;-------------------------------- -;Pages - - !insertmacro MUI_PAGE_WELCOME - !insertmacro MUI_PAGE_LICENSE "LICENSE.txt" -; !insertmacro MUI_PAGE_COMPONENTS - !insertmacro MUI_PAGE_DIRECTORY - - ;Start Menu Folder Page Configuration - !define MUI_STARTMENUPAGE_REGISTRY_ROOT "HKCU" - !define MUI_STARTMENUPAGE_REGISTRY_KEY "Software\Modern UI Test" - !define MUI_STARTMENUPAGE_REGISTRY_VALUENAME "Start Menu Folder" - - !insertmacro MUI_PAGE_STARTMENU Application $STARTMENU_FOLDER - - !insertmacro MUI_PAGE_INSTFILES - !insertmacro MUI_PAGE_FINISH - - !insertmacro MUI_UNPAGE_WELCOME - !insertmacro MUI_UNPAGE_CONFIRM - !insertmacro MUI_UNPAGE_INSTFILES - !insertmacro MUI_UNPAGE_FINISH - -;-------------------------------- -;Languages - - !insertmacro MUI_LANGUAGE "German" - -;-------------------------------- -;Installer Sections - -Section "MagicMap Client" SecDummy - - SetOutPath "$INSTDIR" - - - ;ADD YOUR OWN FILES HERE... - File LICENSE.txt - File magicmap.jar - File MagicMap.ico - File /r /x .svn lib - File /oname=lib\magicmap-server.jar "..\magicmapserver\dist\magicmap-server.jar" - -; File /r $EXEDIR\*.ico $INSTDIR 4 -; CreateDirectory $INSTDIR\dist -; File /r /FILESONLY $EXEDIR\dist\*.* $INSTDIR\dist 465 -; CreateDirectory $INSTDIR\lib -; File /r /FILESONLY $EXEDIR\lib\*.* $INSTDIR\lib 9930 - - ;Store installation folder - WriteRegStr HKCU "Software\Modern UI Test" "" $INSTDIR - - ;Add uninstall to Software overview - WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\MagicMap" "DisplayName" "MagicMap Client" - WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\MagicMap" "DisplayIcon" "$INSTDIR\MagicMap.ico" - WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\MagicMap" "DisplayVersion" "0.8.1" - WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\MagicMap" "HelpLink" "http://wiki.informatik.hu-berlin.de/nomads/index.php/MagicMapHelp" - WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\MagicMap" "InstallLocation" "$INSTDIR" - WriteRegDWORD HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\MagicMap" "NoModify" 0x00000001 - WriteRegDWORD HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\MagicMap" "NoRepair" 0x00000001 - WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\MagicMap" "UninstallString" "$INSTDIR\Uninstall.exe" - WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\MagicMap" "URLInfoAbout" "http://www2.informatik.hu-berlin.de/rok/MagicMap" - - ;Create uninstaller - WriteUninstaller "$INSTDIR\Uninstall.exe" - - !insertmacro MUI_STARTMENU_WRITE_BEGIN Application - - ;Create shortcuts - CreateDirectory "$SMPROGRAMS\$STARTMENU_FOLDER" - - CreateShortCut "$SMPROGRAMS\$STARTMENU_FOLDER\MagicMap Client.lnk" "$INSTDIR\magicmap.jar" "" "$INSTDIR\MagicMap.ico" - CreateShortCut "$SMPROGRAMS\$STARTMENU_FOLDER\Lizenz.lnk" "$INSTDIR\LICENSE.txt" - CreateShortCut "$SMPROGRAMS\$STARTMENU_FOLDER\Uninstall.lnk" "$INSTDIR\Uninstall.exe" - - !insertmacro MUI_STARTMENU_WRITE_END - -SectionEnd - -;-------------------------------- -;Descriptions - - ;Language strings -; LangString DESC_SecDummy ${LANG_ENGLISH} "Die MagicMap Clientkomponenten." - - ;Assign language strings to sections -; !insertmacro MUI_FUNCTION_DESCRIPTION_BEGIN -; !insertmacro MUI_DESCRIPTION_TEXT ${SecDummy} $(DESC_SecDummy) -; !insertmacro MUI_FUNCTION_DESCRIPTION_END - -;-------------------------------- -;Uninstaller Section - -Section "Uninstall" - - ;ADD YOUR OWN FILES HERE... -; Delete "$INSTDIR\dist\*.*" - Delete "$INSTDIR\lib\*.*" - Delete "$INSTDIR\MagicMap.ico" - Delete "$INSTDIR\magicmap.jar" -; Delete "$INSTDIR\start.bat" -; Delete "$INSTDIR\start_nightly.bat" - Delete "$INSTDIR\LICENSE.txt" - Delete "$INSTDIR\Uninstall.exe" - - RMDir "$INSTDIR\dist" - RMDir "$INSTDIR\lib" - RMDir "$INSTDIR" - - !insertmacro MUI_STARTMENU_GETFOLDER Application $MUI_TEMP - - Delete "$SMPROGRAMS\$MUI_TEMP\MagicMap Client.lnk" - Delete "$SMPROGRAMS\$MUI_TEMP\Lizenz.lnk" - Delete "$SMPROGRAMS\$MUI_TEMP\Uninstall.lnk" - - - ;Delete empty start menu parent diretories - StrCpy $MUI_TEMP "$SMPROGRAMS\$MUI_TEMP" - - startMenuDeleteLoop: - ClearErrors - RMDir $MUI_TEMP - GetFullPathName $MUI_TEMP "$MUI_TEMP\.." - - IfErrors startMenuDeleteLoopDone - - StrCmp $MUI_TEMP $SMPROGRAMS startMenuDeleteLoopDone startMenuDeleteLoop - startMenuDeleteLoopDone: - - DeleteRegKey /ifempty HKCU "Software\Modern UI Test" - - ;Remove uninstall to Software overview - DeleteRegKey /ifempty HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\MagicMap" - -SectionEnd - -Function IsJava15Installed - Push $R0 - ClearErrors - ReadRegStr $R0 HKCR ".jar" "" - IfErrors lbl_na - StrCpy $R0 1 - Goto lbl_end - lbl_na: - StrCpy $R0 0 - lbl_end: - Exch $R0 - FunctionEnd - -Function IsJarExecutable - Push $R0 - ClearErrors - ReadRegStr $R0 HKCR ".jar" "" - IfErrors lbl_na - StrCpy $R0 1 - Goto lbl_end - lbl_na: - StrCpy $R0 0 - lbl_end: - Exch $R0 - FunctionEnd - - Function GetParent - - Exch $R0 - Push $R1 - Push $R2 - Push $R3 - - StrCpy $R1 0 - StrLen $R2 $R0 - - loop: - IntOp $R1 $R1 + 1 - IntCmp $R1 $R2 get 0 get - StrCpy $R3 $R0 1 -$R1 - StrCmp $R3 "\" get - Goto loop - - get: - StrCpy $R0 $R0 -$R1 - - Pop $R3 - Pop $R2 - Pop $R1 - Exch $R0 - - FunctionEnd - - \ No newline at end of file Added: trunk/magicmapclient/MagicMapSetup.nsi =================================================================== --- trunk/magicmapclient/MagicMapSetup.nsi (rev 0) +++ trunk/magicmapclient/MagicMapSetup.nsi 2007-03-14 21:17:39 UTC (rev 602) @@ -0,0 +1,160 @@ +# Auto-generated by EclipseNSIS Script Wizard +# 08-Mar-2007 01:26:38 + +Name MagicMap + +SetCompressor /SOLID zlib + +# Defines +!define REGKEY "SOFTWARE\$(^Name)" +!define VERSION 0.8.1 +!define COMPANY "Humbold Universit\xE4t zu Berlin" +!define URL http://www2.informatik.hu-berlin.de/rok/MagicMap + +# MUI defines +!define MUI_HEADERIMAGE +!define MUI_HEADERIMAGE_BITMAP "MagicMap_InstallHeader.bmp" +!define MUI_ICON MagicMap.ico +#!define MUI_FINISHPAGE_NOAUTOCLOSE +!define MUI_STARTMENUPAGE_REGISTRY_ROOT HKLM +!define MUI_STARTMENUPAGE_REGISTRY_KEY ${REGKEY} +!define MUI_STARTMENUPAGE_REGISTRY_VALUENAME StartMenuGroup +!define MUI_STARTMENUPAGE_DEFAULTFOLDER MagicMap +!define MUI_UNICON MagicMap_Uninst.ico +!define MUI_ABORTWARNING + +# Included files +!include Sections.nsh +!include MUI.nsh + +# Variables +Var StartMenuGroup + +# Installer pages +!insertmacro MUI_PAGE_WELCOME +!insertmacro MUI_PAGE_LICENSE LICENSE.txt +!insertmacro MUI_PAGE_DIRECTORY +!insertmacro MUI_PAGE_STARTMENU Application $StartMenuGroup +!insertmacro MUI_PAGE_INSTFILES +!insertmacro MUI_PAGE_FINISH +!insertmacro MUI_UNPAGE_CONFIRM +!insertmacro MUI_UNPAGE_INSTFILES +!insertmacro MUI_UNPAGE_FINISH + +# Installer languages +!insertmacro MUI_LANGUAGE German + +# Installer attributes +OutFile MagicMapsetup.exe +InstallDir $PROGRAMFILES\MagicMap +CRCCheck on +XPStyle on +ShowInstDetails show +#BGGradient 004080 000040 FFFFFF +VIProductVersion ${VERSION}.0 +VIAddVersionKey /LANG=${LANG_GERMAN} ProductName MagicMap +VIAddVersionKey ProductVersion "${VERSION}" +VIAddVersionKey /LANG=${LANG_GERMAN} CompanyName "${COMPANY}" +VIAddVersionKey /LANG=${LANG_GERMAN} CompanyWebsite "${URL}" +VIAddVersionKey /LANG=${LANG_GERMAN} FileVersion "" +VIAddVersionKey /LANG=${LANG_GERMAN} FileDescription "" +VIAddVersionKey /LANG=${LANG_GERMAN} LegalCopyright "" +InstallDirRegKey HKLM "${REGKEY}" Path +ShowUninstDetails show + +# Installer sections +Section -Main SEC0000 + SetOutPath $INSTDIR + SetOverwrite on + File MagicMap.ico + File magicmap.jar + File LICENSE.txt + SetOutPath $INSTDIR\lib + File /r /x .svn lib\* + File ..\magicmapserver\dist\magicmap-server.jar + WriteRegStr HKLM "${REGKEY}\Components" Main 1 +SectionEnd + +Section -post SEC0001 + WriteRegStr HKLM "${REGKEY}" Path $INSTDIR + SetOutPath $INSTDIR + WriteUninstaller $INSTDIR\uninstall.exe + !insertmacro MUI_STARTMENU_WRITE_BEGIN Application + CreateDirectory "$SMPROGRAMS\$StartMenuGroup" + SetOutPath $INSTDIR + CreateShortCut "$SMPROGRAMS\$StartMenuGroup\MagicMap Client.lnk" $INSTDIR\magicmap.jar "" $INSTDIR\MagicMap.ico + CreateShortCut "$SMPROGRAMS\$StartMenuGroup\Lizenz.lnk" $INSTDIR\LICENSE.txt + 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)" HelpLink "http://wiki.informatik.hu-berlin.de/nomads/index.php/MagicMapHelp" + WriteRegStr HKLM "SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\$(^Name)" DisplayIcon $INSTDIR\MagicMap.ico + 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.Main UNSEC0000 + RmDir /r /REBOOTOK $INSTDIR\lib + Delete /REBOOTOK $INSTDIR\LICENSE.txt + Delete /REBOOTOK $INSTDIR\magicmap.jar + Delete /REBOOTOK $INSTDIR\MagicMap.ico + DeleteRegValue HKLM "${REGKEY}\Components" Main +SectionEnd + +Section un.post UNSEC0001 + DeleteRegKey HKLM "SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\$(^Name)" + Delete /REBOOTOK "$SMPROGRAMS\$StartMenuGroup\MagicMap Client.lnk" + Delete /REBOOTOK "$SMPROGRAMS\$StartMenuGroup\Lizenz.lnk" + 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 + Push $R0 + StrCpy $R0 $StartMenuGroup 1 + StrCmp $R0 ">" no_smgroup +no_smgroup: + Pop $R0 +SectionEnd + +# Installer functions +Function .onInit + InitPluginsDir +FunctionEnd + + +# Uninstaller functions +Function un.onInit + SetAutoClose true + ReadRegStr $INSTDIR HKLM "${REGKEY}" Path + !insertmacro MUI_STARTMENU_GETFOLDER Application $StartMenuGroup + !insertmacro SELECT_UNSECTION Main ${UNSEC0000} +FunctionEnd + + + +# Installer Language Strings +# TODO Update the Language Strings with the appropriate translations. + +LangString ^UninstallLink ${LANG_GERMAN} "Deinstalliere $(^Name)" This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |