[Jahshaka-cvs] jah/installer jahplayer.nsi, NONE, 1.1 jplayer.nsi, NONE, 1.1
Status: Beta
Brought to you by:
jahshaka
From: jpn <non...@us...> - 2006-10-14 16:26:14
|
Update of /cvsroot/jahshaka/jah/installer In directory sc8-pr-cvs6.sourceforge.net:/tmp/cvs-serv7409/installer Added Files: jahplayer.nsi jplayer.nsi Log Message: installer scripts for jahplayer & jplayer. For the last release these were actually executed from directories jah/jahplayer/installer & jah/jahtools/jplayer/installer respectively. --- NEW FILE: jplayer.nsi --- ;-------------------------------- ;NSIS Jplayer Installation Script ;-------------------------------- !ifndef VERSION !define VERSION 0.1.0 !endif ;-------------------------------- ;Configuration !ifdef OUTFILE OutFile "${OUTFILE}" !else OutFile jplayer-${VERSION}-installer.exe !endif SetCompressor /SOLID lzma InstType "Full" InstallDir $PROGRAMFILES\Jplayer InstallDirRegKey HKLM Software\Jplayer "" ;-------------------------------- ;Header Files !define ALL_USERS !include "MUI.nsh" !include "Sections.nsh" !include "add_to_path.nsh" !include "write_env_str.nsh" ;Names Name "Jplayer" Caption "Jplayer (v.${VERSION}) Setup" ;Interface Settings !define MUI_ABORTWARNING !define MUI_HEADERIMAGE !define MUI_HEADERIMAGE_BITMAP "jah-installer-header.bmp" ; optional !define MUI_WELCOMEFINISHPAGE_BITMAP "${NSISDIR}\Contrib\Graphics\Wizard\orange.bmp" !define MUI_COMPONENTSPAGE_SMALLDESC ;Pages !define MUI_WELCOMEPAGE_TITLE "Welcome to the Jplayer (v.${VERSION}) Setup Wizard" !define MUI_WELCOMEPAGE_TEXT "This wizard will guide you through the installation of the Jplayer.\r\n\r\n$_CLICK" !insertmacro MUI_PAGE_WELCOME !insertmacro MUI_PAGE_LICENSE "..\..\..\COPYING" !insertmacro MUI_PAGE_COMPONENTS !insertmacro MUI_PAGE_DIRECTORY !insertmacro MUI_PAGE_INSTFILES !define MUI_FINISHPAGE_LINK "Visit the web site for the latest news, FAQs and support" !define MUI_FINISHPAGE_LINK_LOCATION "http://www.jahshaka.org/" !insertmacro MUI_PAGE_FINISH !insertmacro MUI_UNPAGE_CONFIRM !insertmacro MUI_UNPAGE_INSTFILES ;-------------------------------- ;Languages !insertmacro MUI_LANGUAGE "English" Function .onInit ReadRegStr $R0 HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\Jplayer" "UninstallString" StrCmp $R0 "" done MessageBox MB_OKCANCEL|MB_ICONEXCLAMATION \ "Jplayer is already installed. $\n$\nClick `OK` to remove the \ previous version or `Cancel` to cancel this upgrade." \ IDOK uninst Abort uninst: ClearErrors SetDetailsPrint textonly DetailPrint "Uninstalling previous Jplayer installation..." SetDetailsPrint listonly ExecWait '$R0 _?=$INSTDIR' IfErrors no_remove_uninstaller goto done no_remove_uninstaller: MessageBox MB_ICONEXCLAMATION \ "Unable to remove previous version of Jplayer$\nTry uninstalling via the control panel." Abort done: FunctionEnd Section "Jplayer" SecCore SectionIn 1 2 3 RO SetOutPath $INSTDIR SetOverwrite on SetShellVarContext all SetDetailsPrint textonly DetailPrint "Installing Jplayer..." SetDetailsPrint listonly ; Jahplayer SetOutPath $INSTDIR File openlibraries-0.3.0-runtime.exe File /r "..\dist\*" SetDetailsPrint both SetOutPath $INSTDIR CreateDirectory "$SMPROGRAMS\Jahtools" CreateShortCut "$SMPROGRAMS\Jahtools\jplayer.lnk" "$INSTDIR\jplayer.exe" CreateShortCut "$DESKTOP\jplayer.lnk" "$INSTDIR\jplayer.exe" WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\Jplayer" "DisplayName" "Jplayer" WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\Jplayer" "UninstallString" "$INSTDIR\uninst-jplayer.exe" ;---------------------------------------------------------------------------------------- SetDetailsPrint textonly DetailPrint "Installing OpenLibraries..." SetDetailsPrint listonly ExecWait '"$INSTDIR\openlibraries-0.3.0-runtime.exe"' SectionEnd Section -post WriteUninstaller $INSTDIR\uninst-jplayer.exe SectionEnd ;-------------------------------- ;Descriptions !insertmacro MUI_FUNCTION_DESCRIPTION_BEGIN !insertmacro MUI_DESCRIPTION_TEXT ${SecCore} "Jplayer runtime files" !insertmacro MUI_FUNCTION_DESCRIPTION_END ;-------------------------------- ;Uninstaller Section Section Uninstall SetDetailsPrint textonly DetailPrint "Deleting Files..." SetDetailsPrint listonly SetShellVarContext all ;-- Remove registry keys DeleteRegKey HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\Jplayer" ;-- Remove desktop and start->Programs->Jah shortcuts Delete $DESKTOP\jplayer.lnk RMDir /r $SMPROGRAMS\Jahtools ;-- Remove install directory RMDir /r $INSTDIR ;-- Remove OpenLibraries ReadEnvStr $0 PYTHONPATH ExecWait '"$0\..\uninst-openlibraries.exe"' SetDetailsPrint both SectionEnd --- NEW FILE: jahplayer.nsi --- ;-------------------------------- ;NSIS Jahplayer Installation Script ;-------------------------------- !ifndef VERSION !define VERSION 0.1.0 !endif ;-------------------------------- ;Configuration !ifdef OUTFILE OutFile "${OUTFILE}" !else OutFile jahplayer-${VERSION}-installer.exe !endif SetCompressor /SOLID lzma InstType "Full" InstallDir $PROGRAMFILES\Jahplayer InstallDirRegKey HKLM Software\Jahplayer "" ;-------------------------------- ;Header Files !define ALL_USERS !include "MUI.nsh" !include "Sections.nsh" !include "add_to_path.nsh" !include "write_env_str.nsh" ;Names Name "Jahplayer" Caption "Jahplayer (v.${VERSION}) Setup" ;Interface Settings !define MUI_ABORTWARNING !define MUI_HEADERIMAGE !define MUI_HEADERIMAGE_BITMAP "jah-installer-header.bmp" ; optional !define MUI_WELCOMEFINISHPAGE_BITMAP "${NSISDIR}\Contrib\Graphics\Wizard\orange.bmp" !define MUI_COMPONENTSPAGE_SMALLDESC ;Pages !define MUI_WELCOMEPAGE_TITLE "Welcome to the Jahplayer (v.${VERSION}) Setup Wizard" !define MUI_WELCOMEPAGE_TEXT "This wizard will guide you through the installation of the Jahplayer.\r\n\r\n$_CLICK" !insertmacro MUI_PAGE_WELCOME !insertmacro MUI_PAGE_LICENSE "..\..\COPYING" !insertmacro MUI_PAGE_COMPONENTS !insertmacro MUI_PAGE_DIRECTORY !insertmacro MUI_PAGE_INSTFILES !define MUI_FINISHPAGE_LINK "Visit the web site for the latest news, FAQs and support" !define MUI_FINISHPAGE_LINK_LOCATION "http://www.jahshaka.org/" !insertmacro MUI_PAGE_FINISH !insertmacro MUI_UNPAGE_CONFIRM !insertmacro MUI_UNPAGE_INSTFILES ;-------------------------------- ;Languages !insertmacro MUI_LANGUAGE "English" Function .onInit ReadRegStr $R0 HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\Jahplayer" "UninstallString" StrCmp $R0 "" done MessageBox MB_OKCANCEL|MB_ICONEXCLAMATION \ "Jahplayer is already installed. $\n$\nClick `OK` to remove the \ previous version or `Cancel` to cancel this upgrade." \ IDOK uninst Abort uninst: ClearErrors SetDetailsPrint textonly DetailPrint "Uninstalling previous Jahplayer installation..." SetDetailsPrint listonly ExecWait '$R0 _?=$INSTDIR' IfErrors no_remove_uninstaller goto done no_remove_uninstaller: MessageBox MB_ICONEXCLAMATION \ "Unable to remove previous version of Jahplayer$\nTry uninstalling via the control panel." Abort done: FunctionEnd Section "Jahplayer" SecCore SectionIn 1 2 3 RO SetOutPath $INSTDIR SetOverwrite on SetShellVarContext all SetDetailsPrint textonly DetailPrint "Installing Jahplayer..." SetDetailsPrint listonly ; Jahplayer SetOutPath $INSTDIR File openlibraries-0.3.0-runtime.exe File /r "..\dist\*" SetDetailsPrint both SetOutPath $INSTDIR ;CreateDirectory "$SMPROGRAMS\Jahplayer" CreateShortCut "$SMPROGRAMS\jahplayer.lnk" "$INSTDIR\jahplayer.exe" CreateShortCut "$DESKTOP\jahplayer.lnk" "$INSTDIR\jahplayer.exe" WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\Jahplayer" "DisplayName" "Jahplayer" WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\Jahplayer" "UninstallString" "$INSTDIR\uninst-jahplayer.exe" ;---------------------------------------------------------------------------------------- SetDetailsPrint textonly DetailPrint "Installing OpenLibraries..." SetDetailsPrint listonly ExecWait '"$INSTDIR\openlibraries-0.3.0-runtime.exe"' SectionEnd Section -post WriteUninstaller $INSTDIR\uninst-jahplayer.exe SectionEnd ;-------------------------------- ;Descriptions !insertmacro MUI_FUNCTION_DESCRIPTION_BEGIN !insertmacro MUI_DESCRIPTION_TEXT ${SecCore} "Jahplayer runtime files" !insertmacro MUI_FUNCTION_DESCRIPTION_END ;-------------------------------- ;Uninstaller Section Section Uninstall SetDetailsPrint textonly DetailPrint "Deleting Files..." SetDetailsPrint listonly SetShellVarContext all ;-- Remove registry keys DeleteRegKey HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\Jahplayer" ;-- Remove desktop and start->Programs->Jahplayer shortcuts Delete $DESKTOP\jahplayer.lnk ;RMDir /r $SMPROGRAMS\Jah Delete $SMPROGRAMS\jahplayer.lnk ;-- Remove install directory RMDir /r $INSTDIR ;-- Remove OpenLibraries ReadEnvStr $0 PYTHONPATH ExecWait '"$0\..\uninst-openlibraries.exe"' SetDetailsPrint both SectionEnd |