[Yanel-commits] rev 22776 - in public/yanel/trunk/src/binary-dist: . windows

michi at wyona.com michi at wyona.com
Mon Feb 19 10:51:54 CET 2007


Author: michi
Date: 2007-02-19 10:51:52 +0100 (Mon, 19 Feb 2007)
New Revision: 22776

Added:
   public/yanel/trunk/src/binary-dist/windows/
   public/yanel/trunk/src/binary-dist/windows/install-lenya.nsi
   public/yanel/trunk/src/binary-dist/windows/install.ico
   public/yanel/trunk/src/binary-dist/windows/start.ico
   public/yanel/trunk/src/binary-dist/windows/stop.ico
   public/yanel/trunk/src/binary-dist/windows/uninstall.ico
Log:
windows specific stuff added

Added: public/yanel/trunk/src/binary-dist/windows/install-lenya.nsi
===================================================================
--- public/yanel/trunk/src/binary-dist/windows/install-lenya.nsi	2007-02-19 09:19:41 UTC (rev 22775)
+++ public/yanel/trunk/src/binary-dist/windows/install-lenya.nsi	2007-02-19 09:51:52 UTC (rev 22776)
@@ -0,0 +1,190 @@
+# Auto-generated by EclipseNSIS Script Wizard
+# 16.02.2007 10:11:51
+
+Name Yanel
+
+# Defines
+!define REGKEY "SOFTWARE\$(^Name)"
+!define VERSION @YANEL_VERSION@
+!define COMPANY Wyona
+!define URL http://yanel.wyona.org
+
+# MUI defines
+!define MUI_ICON "install.ico"
+!define MUI_FINISHPAGE_NOAUTOCLOSE
+!define MUI_STARTMENUPAGE_REGISTRY_ROOT HKLM
+!define MUI_STARTMENUPAGE_NODISABLE
+!define MUI_STARTMENUPAGE_REGISTRY_KEY ${REGKEY}
+!define MUI_STARTMENUPAGE_REGISTRY_VALUENAME StartMenuGroup
+!define MUI_STARTMENUPAGE_DEFAULTFOLDER Yanel
+!define MUI_UNICON "uninstall.ico"
+!define MUI_UNFINISHPAGE_NOAUTOCLOSE
+
+# 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
+
+# Installer languages
+!insertmacro MUI_LANGUAGE German
+
+# Installer attributes
+OutFile install-yanel- at YANEL_VERSION@.exe
+InstallDir $PROGRAMFILES\Yanel
+CRCCheck on
+XPStyle on
+ShowInstDetails show
+VIProductVersion 1.0.0.0
+VIAddVersionKey ProductName Yanel
+VIAddVersionKey ProductVersion "${VERSION}"
+VIAddVersionKey CompanyName "${COMPANY}"
+VIAddVersionKey CompanyWebsite "${URL}"
+VIAddVersionKey FileVersion ""
+VIAddVersionKey FileDescription ""
+VIAddVersionKey LegalCopyright ""
+InstallDirRegKey HKLM "${REGKEY}" Path
+ShowUninstDetails show
+
+# Installer sections
+Section -Main SEC0000
+    Call findJavaPath
+    SetOutPath $INSTDIR
+    SetOverwrite on
+    File start.bat
+    File stop.bat
+    File start.ico
+    File stop.ico
+    SetOutPath $SMPROGRAMS\$StartMenuGroup
+    SetOutPath $INSTDIR
+    CreateShortcut "$SMPROGRAMS\$StartMenuGroup\yanel start.lnk" "$INSTDIR\start.bat" "" "$INSTDIR\start.ico" 
+    CreateShortcut "$SMPROGRAMS\$StartMenuGroup\yanel stop.lnk" "$INSTDIR\stop.bat" "" "$INSTDIR\stop.ico" 
+    SetOutPath $INSTDIR\apache-tomcat-5.5.20
+    File /r apache-tomcat-5.5.20\*
+    SetOutPath $INSTDIR
+    File LICENSE.txt
+    File README.txt
+    WriteRegStr HKLM "${REGKEY}\Components" Main 1
+SectionEnd
+
+Section -post SEC0001
+ExecShell "open" '"$INSTDIR\start.bat"' 0 SW_SHOWMINIMIZED
+    WriteRegStr HKLM "${REGKEY}" Path $INSTDIR
+    SetOutPath $INSTDIR
+    WriteUninstaller $INSTDIR\uninstall.exe
+Sleep 12000
+ExecShell "open" '"http://localhost:8080/yanel/"' 0 SW_SHOWNORMAL    
+    !insertmacro MUI_STARTMENU_WRITE_BEGIN Application
+    SetOutPath $SMPROGRAMS\$StartMenuGroup
+    CreateShortcut "$SMPROGRAMS\$StartMenuGroup\Uninstall $(^Name).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.Main UNSEC0000
+    Delete /REBOOTOK $INSTDIR\README.txt
+    Delete /REBOOTOK $INSTDIR\LICENSE.txt
+    RmDir /r /REBOOTOK $INSTDIR\apache-tomcat-5.5.20
+    Delete /REBOOTOK "$SMPROGRAMS\$StartMenuGroup\yanel stop.lnk"
+    Delete /REBOOTOK "$SMPROGRAMS\$StartMenuGroup\yanel start.lnk"
+    Delete /REBOOTOK $INSTDIR\stop.bat
+    Delete /REBOOTOK $INSTDIR\start.bat
+    Delete /REBOOTOK $INSTDIR\stop.ico
+    Delete /REBOOTOK $INSTDIR\start.ico
+    DeleteRegValue HKLM "${REGKEY}\Components" Main
+SectionEnd
+
+Section un.post UNSEC0001
+    DeleteRegKey HKLM "SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\$(^Name)"
+    Delete /REBOOTOK "$SMPROGRAMS\$StartMenuGroup\Uninstall $(^Name).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
+FunctionEnd
+
+
+# Uninstaller functions
+Function un.onInit
+    ReadRegStr $INSTDIR HKLM "${REGKEY}" Path
+    !insertmacro MUI_STARTMENU_GETFOLDER Application $StartMenuGroup
+    !insertmacro SELECT_UNSECTION Main ${UNSEC0000}
+FunctionEnd
+
+; =====================
+; FindJavaPath Function
+; =====================
+;
+; Find the JAVA_HOME used on the system, and put the result on the top of the
+; stack
+; Will exit if the path cannot be determined
+;
+Function findJavaPath
+
+  ClearErrors
+
+  ReadEnvStr $1 JAVA_HOME
+
+  IfErrors 0 FoundJDK
+
+  ClearErrors
+
+  ReadRegStr $2 HKLM "SOFTWARE\JavaSoft\Java Development Kit" "CurrentVersion"
+  ReadRegStr $1 HKLM "SOFTWARE\JavaSoft\Java Development Kit\$2" "JavaHome"
+  ReadRegStr $3 HKLM "SOFTWARE\JavaSoft\Java Runtime Environment" "CurrentVersion"
+  ReadRegStr $4 HKLM "SOFTWARE\JavaSoft\Java Runtime Environment\$3" "RuntimeLib"
+
+  FoundJDK:
+
+  IfErrors 0 NoAbort
+    MessageBox MB_OK "Couldn't find a Java Development Kit installed on this \
+computer. Please download one from http://java.sun.com. If there is already \ a JDK installed on this computer, set an environment variable JAVA_HOME to the \ pathname of the directory where it is installed."
+    Abort
+
+  NoAbort:
+
+  ; Put the result in the stack
+  Push $1
+
+FunctionEnd


Property changes on: public/yanel/trunk/src/binary-dist/windows/install-lenya.nsi
___________________________________________________________________
Name: svn:executable
   + *

Added: public/yanel/trunk/src/binary-dist/windows/install.ico
===================================================================
(Binary files differ)


Property changes on: public/yanel/trunk/src/binary-dist/windows/install.ico
___________________________________________________________________
Name: svn:executable
   + *
Name: svn:mime-type
   + application/octet-stream

Added: public/yanel/trunk/src/binary-dist/windows/start.ico
===================================================================
(Binary files differ)


Property changes on: public/yanel/trunk/src/binary-dist/windows/start.ico
___________________________________________________________________
Name: svn:executable
   + *
Name: svn:mime-type
   + application/octet-stream

Added: public/yanel/trunk/src/binary-dist/windows/stop.ico
===================================================================
(Binary files differ)


Property changes on: public/yanel/trunk/src/binary-dist/windows/stop.ico
___________________________________________________________________
Name: svn:executable
   + *
Name: svn:mime-type
   + application/octet-stream

Added: public/yanel/trunk/src/binary-dist/windows/uninstall.ico
===================================================================
(Binary files differ)


Property changes on: public/yanel/trunk/src/binary-dist/windows/uninstall.ico
___________________________________________________________________
Name: svn:executable
   + *
Name: svn:mime-type
   + application/octet-stream




More information about the Yanel-commits mailing list