|
General Talk And Support General talk and peer-to-peer support about BS.Player and other video and audio multimedia players. |
| LinkBack | Thread Tools | Search this Thread | Display Modes |
| |||
bsplayer nsis ;NSIS SETUP SCRIPT FOR BSPLAYER by scarface: !define PRODUCT_NAME "BSPlayer" !define PRODUCT_VERSION "2.34.980" !define PRODUCT_PUBLISHER "BST" !define PRODUCT_WEB_SITE "http://www.bsplayer.org" SetCompressor bzip2 !include "MUI.nsh" !define MUI_ABORTWARNING !define MUI_ICON "${NSISDIR}\Contrib\Graphics\Icons\bplay-install.ico" !define MUI_UNICON "${NSISDIR}\Contrib\Graphics\Icons\bplay-install.ico" !define MUI_COMPONENTSPAGE_SMALLDESC !insertmacro MUI_PAGE_WELCOME !insertmacro MUI_PAGE_COMPONENTS !insertmacro MUI_PAGE_DIRECTORY !insertmacro MUI_PAGE_INSTFILES !insertmacro MUI_PAGE_FINISH !insertmacro MUI_UNPAGE_INSTFILES !insertmacro MUI_LANGUAGE "English" !insertmacro MUI_RESERVEFILE_INSTALLOPTIONS Name "Bsplayer" Caption "Bsplayer 2.34 Setup" OutFile "BSPlay_setup.exe" InstallDir "$PROGRAMFILES\BSPlayer" InstallDirRegKey HKCU "Software\bsplayer" "AppPath" AutoCloseWindow false ShowInstDetails hide ShowUnInstDetails hide Section "BSPlayer (required)" SEC01 SectionIn RO SetOutPath "$INSTDIR" SetOverwrite on File "bsplayer.exe" File "bsrendv2.dll" File "bplay.exe" SetOutPath "$INSTDIR\plugins\" File "oldskin.dll" SetOutPath "$INSTDIR\skins\" File "BSplayer.bsz" SetOutPath "$APPDATA\Bsplayer\" File "BSplayer.xml" SectionEnd Section "Start Menu" SEC02 CreateShortCut "$SMPROGRAMS\BSPLAYER\BSPlayer.lnk" "$INSTDIR\bsplayer.exe" CreateShortCut "$SMPROGRAMS\BSPLAYER\Uninst.lnk" "$INSTDIR\uninst.exe" SectionEnd Section "file associations (required)" SEC03 SectionIn RO WriteUninstaller "$INSTDIR\uninst.exe" UNRegDLL "$INSTDIR\bsrendv2.dll" WriteRegStr HKLM "SOFTWARE\BSplayer\Capabilities\FileAssociatio ns" ".mpg" "BSPlayerFile.MPG" WriteRegStr HKLM "SOFTWARE\BSplayer\Capabilities\FileAssociatio ns" ".mpe" "BSPlayerFile.MPE" WriteRegStr HKLM "SOFTWARE\BSplayer\Capabilities\FileAssociatio ns" ".mpeg" "BSPlayerFile.MPEG" WriteRegStr HKLM "SOFTWARE\BSplayer\Capabilities\FileAssociatio ns" ".asx" "BSPlayerFile.ASX" WriteRegStr HKLM "SOFTWARE\BSplayer\Capabilities\FileAssociatio ns" ".avi" "BSPlayerFile.AVI" WriteRegStr HKLM "SOFTWARE\BSplayer\Capabilities\FileAssociatio ns" ".asf" "BSPlayerFile.ASF" WriteRegStr HKLM "SOFTWARE\BSplayer\Capabilities\FileAssociatio ns" ".vob" "BSPlayerFile.VOB" WriteRegStr HKLM "SOFTWARE\BSplayer\Capabilities\FileAssociatio ns" ".mpg" "BSPlayerFile.MPG" WriteRegStr HKLM "SOFTWARE\BSplayer\Capabilities\FileAssociatio ns" ".mp4" "BSPlayerFile.MP4" WriteRegStr HKLM "SOFTWARE\BSplayer\Capabilities\FileAssociatio ns" ".flv" "BSPlayerFile.FLV" WriteRegStr HKLM "SOFTWARE\BSplayer\Capabilities\FileAssociatio ns" ".ape" "BSPlayerFile.APE" WriteRegStr HKLM "SOFTWARE\BSplayer\Capabilities\FileAssociatio ns" ".flac" "BSPlayerFile.FLAC" WriteRegStr HKLM "SOFTWARE\BSplayer\Capabilities\FileAssociatio ns" ".m3u" "BSPlayerFile.M3U" WriteRegStr HKLM "SOFTWARE\BSplayer\Capabilities\FileAssociatio ns" ".m2v" "BSPlayerFile.M2V" WriteRegStr HKLM "SOFTWARE\BSplayer\Capabilities\FileAssociatio ns" ".m2ts" "BSPlayerFile.M2TS" WriteRegStr HKLM "SOFTWARE\BSplayer\Capabilities\FileAssociatio ns" ".mkv" "BSPlayerFile.MKV" WriteRegStr HKLM "SOFTWARE\BSplayer\Capabilities\FileAssociatio ns" ".divx" "BSPlayerFile.DIVX" WriteRegStr HKLM "SOFTWARE\BSplayer\Capabilities\FileAssociatio ns" ".ogg" "BSPlayerFile.OGG" WriteRegStr HKLM "SOFTWARE\BSplayer\Capabilities\FileAssociatio ns" ".ogm" "BSPlayerFile.OGM" WriteRegStr HKLM "SOFTWARE\BSplayer\Capabilities\FileAssociatio ns" ".bsb" "BSPlayerFile.BSB" WriteRegStr HKLM "SOFTWARE\BSplayer\Capabilities\FileAssociatio ns" ".pls" "BSPlayerFile.PLS" WriteRegStr HKCR "SOFTWARE\BSplayer\Capabilities\FileAssociatio ns" ".mpg" "BSPlayerFile.MPG" WriteRegStr HKCR "SOFTWARE\BSplayer\Capabilities\FileAssociatio ns" ".mpe" "BSPlayerFile.MPE" WriteRegStr HKCR "SOFTWARE\BSplayer\Capabilities\FileAssociatio ns" ".mpeg" "BSPlayerFile.MPEG" WriteRegStr HKCR "SOFTWARE\BSplayer\Capabilities\FileAssociatio ns" ".asx" "BSPlayerFile.ASX" WriteRegStr HKCR "SOFTWARE\BSplayer\Capabilities\FileAssociatio ns" ".avi" "BSPlayerFile.AVI" WriteRegStr HKCR "SOFTWARE\BSplayer\Capabilities\FileAssociatio ns" ".asf" "BSPlayerFile.ASF" WriteRegStr HKCR "SOFTWARE\BSplayer\Capabilities\FileAssociatio ns" ".vob" "BSPlayerFile.VOB" WriteRegStr HKCR "SOFTWARE\BSplayer\Capabilities\FileAssociatio ns" ".mpg" "BSPlayerFile.MPG" WriteRegStr HKCR "SOFTWARE\BSplayer\Capabilities\FileAssociatio ns" ".mp4" "BSPlayerFile.MP4" WriteRegStr HKCR "SOFTWARE\BSplayer\Capabilities\FileAssociatio ns" ".flv" "BSPlayerFile.FLV" WriteRegStr HKCR "SOFTWARE\BSplayer\Capabilities\FileAssociatio ns" ".ape" "BSPlayerFile.APE" WriteRegStr HKCR "SOFTWARE\BSplayer\Capabilities\FileAssociatio ns" ".flac" "BSPlayerFile.FLAC" WriteRegStr HKCR "SOFTWARE\BSplayer\Capabilities\FileAssociatio ns" ".m3u" "BSPlayerFile.M3U" WriteRegStr HKCR "SOFTWARE\BSplayer\Capabilities\FileAssociatio ns" ".m2v" "BSPlayerFile.M2V" WriteRegStr HKCR "SOFTWARE\BSplayer\Capabilities\FileAssociatio ns" ".m2ts" "BSPlayerFile.M2TS" WriteRegStr HKCR "SOFTWARE\BSplayer\Capabilities\FileAssociatio ns" ".mkv" "BSPlayerFile.MKV" WriteRegStr HKCR "SOFTWARE\BSplayer\Capabilities\FileAssociatio ns" ".divx" "BSPlayerFile.DIVX" WriteRegStr HKCR "SOFTWARE\BSplayer\Capabilities\FileAssociatio ns" ".ogg" "BSPlayerFile.OGG" WriteRegStr HKCR "SOFTWARE\BSplayer\Capabilities\FileAssociatio ns" ".ogm" "BSPlayerFile.OGM" WriteRegStr HKCR "SOFTWARE\BSplayer\Capabilities\FileAssociatio ns" ".bsb" "BSPlayerFile.BSB" WriteRegStr HKCR "SOFTWARE\BSplayer\Capabilities\FileAssociatio ns" ".pls" "BSPlayerFile.PLS" WriteRegStr HKCR ".avi" "" "BSPlayerFile.AVI" WriteRegStr HKCR ".mpg" "" "BSPlayerFile.MPG" WriteRegStr HKCR ".mkv" "" "BSPlayerFile.MPG" WriteRegStr HKU HKEY_CURRENT_USER\Software\Microsoft\Windows\Curre ntVersion\Explorer\FileExts\.flv" "Application" "bsplayer.exe" WriteRegStr HKLM "Software\RegisteredApplications" "BSPlayer" "SOFTWARE\BSplayer\Capabilities" WriteRegStr HKCR "BSPlayerFile\DefaultIcon" "" '"$INSTDIR\BSplayer.exe",1' WriteRegStr HKCR "BSPlayerFile\shell\enqueue" "" "Enqueue in BSplayer" WriteRegStr HKCR "BSPlayerFile\shell\enqueue\command" "" '"$INSTDIR\BSplayer.exe" -add-to-playlist "%1"' WriteRegStr HKCR "BSPlayerFile\shell\open" "FriendlyAppName" "BSplayer" WriteRegStr HKCR "BSPlayerFile\shell\open\command" "" '"$INSTDIR\BSplayer.exe" "%1"' WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\App Paths\bsplayer.exe" "" "$INSTDIR\bsplayer.exe" WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninsta ll\${PRODUCT_NAME}" "DisplayName" "$(^Name)" WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninsta ll\${PRODUCT_NAME}" "UninstallString" "$INSTDIR\uninst.exe" WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninsta ll\${PRODUCT_NAME}" "DisplayIcon" "$INSTDIR\bplay.exe" WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninsta ll\${PRODUCT_NAME}" "DisplayVersion" "${PRODUCT_VERSION}" WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninsta ll\${PRODUCT_NAME}" "URLInfoAbout" "${PRODUCT_WEB_SITE}" WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninsta ll\${PRODUCT_NAME}" "Publisher" "${PRODUCT_PUBLISHER}" SectionEnd !insertmacro MUI_FUNCTION_DESCRIPTION_BEGIN !insertmacro MUI_DESCRIPTION_TEXT ${SEC01} "Install BSPlayer on your computer." !insertmacro MUI_DESCRIPTION_TEXT ${SEC02} "Create Start Menu and Desktop Items." !insertmacro MUI_FUNCTION_DESCRIPTION_END Function un.onUninstSuccess HideWindow MessageBox MB_ICONINFORMATION|MB_OK "$(^Name) was successfully removed from your computer." FunctionEnd Function un.onInit MessageBox MB_ICONQUESTION|MB_YESNO|MB_DEFBUTTON2 "Are you sure you want to completely remove $(^Name) and all of its components?" IDYES +2 Abort Push $0 loop: FindWindow $0 "BSPlayer" IntCmp $0 0 done SendMessage $0 16 0 0 Sleep 100 Goto loop done: Pop $0 FunctionEnd Section Uninstall UNRegDLL "$INSTDIR\bsrendv2.dll" Delete "$INSTDIR\uninst.exe" Delete "$INSTDIR\bplay.exe" Delete "$INSTDIR\bsrendv2.dll" Delete "$INSTDIR\bsplayer.exe" Delete "$INSTDIR\plugins\oldskin.dll" Delete "$INSTDIR\skins\BSplayer.bsz" Delete "$SMPROGRAMS\Bsplayer\BSPlayer.lnk" RMDir "$APPDATA\Bsplayer\" RMDir "$INSTDIR\skins\" RMDir "$INSTDIR" DeleteRegKey HKCR "Applications\bsplayer.exe\" DeleteRegKey HKCU "Software\BST\bsplayer\" DeleteRegKey HKLM "Software\Microsoft\Windows\CurrentVersion\Uninsta ll\${PRODUCT_NAME}" DeleteRegKey HKLM "Software\Microsoft\Windows\CurrentVersion\App Paths\bsplayer.exe" SetAutoClose false SectionEnd Last edited by scarface; 22nd February 2009 at 07:15 AM. |
| |||
I don't know why the shortcuts don't get created (are you sure you check the shortcut section when installing BSplayer? The start menu shortcuts section is the only one not forced option, and if you don't select it the shortcuts don't get created) About the file associations, I think the problem is that section the registry key you wrote is Code: "SOFTWARE\BSplayer\Capabilities\FileAssociatio ns" Code: "SOFTWARE\BSplayer\Capabilities\FileAssociations" Plus (but I'm not sure about this) if you define a "BSPlayerFile.MPG" file type, you have to register it in file associations as this: Code: WriteRegStr HKCR "BSPlayerFile.MPG\DefaultIcon" "" '"$INSTDIR\BSplayer.exe",1' WriteRegStr HKCR "BSPlayerFile.MPG\shell\enqueue" "" "Enqueue in BSplayer" WriteRegStr HKCR "BSPlayerFile.MPG\shell\enqueue\command" "" '"$INSTDIR\BSplayer.exe" -add-to-playlist "%1"' WriteRegStr HKCR "BSPlayerFile.MPG\shell\open" "FriendlyAppName" "BSplayer" WriteRegStr HKCR "BSPlayerFile.MPG\shell\open\command" "" '"$INSTDIR\BSplayer.exe" "%1"' Plus (again ) I think you should not add this codes: Code: WriteRegStr HKCR "SOFTWARE\BSplayer\Capabilities\FileAssociatio ns" ".mpg" "BSPlayerFile.MPG" etc. Code: WriteRegStr HKCR ".avi" "" "BSPlayerFile.AVI" WriteRegStr HKCR ".mpg" "" "BSPlayerFile.MPG" WriteRegStr HKCR ".mkv" "" "BSPlayerFile.MPG" Code: WriteRegStr HKCR ".mkv" "" "BSPlayerFile.MPG" I hope to have been of some help, and if you still need suggestions feel free to ask here again (almost 3 years has passed since last time I used NSIS install packager, and it seems they added a ton of new features, but I'll try to help you) Ever thought to use an NSIS script editor (maybe you already use one)? I used something called phoenix or similar... sorry, I can't remember
__________________ BSP SkinMaker (v1.07) the one and only Skin Editor for BSplayer BSP Definitions Manager (v1.02) BS.Player's FAQ (by BSPeter) | Italian language file (v2.57 build 1051) |
| |||
ok now works for extension. I removed the first part. but even with this shortcut dont work. Section "Start Menu (required)" SEC02 SectionIn RO CreateShortCut "$SMPROGRAMS\BSPLAYER\BSPlayer.lnk" "$INSTDIR\bsplayer.exe" CreateShortCut "$SMPROGRAMS\BSPLAYER\Uninst.lnk" "$INSTDIR\uninst.exe" SectionEnd in fact before it worked without the folder bsplayer : Section "Start Menu" SEC02 CreateShortCut "$SMPROGRAMS\BSPlayer.lnk" "$INSTDIR\bsplayer.exe" CreateShortCut "$SMPROGRAMS\Uninst.lnk" "$INSTDIR\uninst.exe" SectionEnd |
Tags |
nsis |
| |
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
ATI Remote Wonder plug-in for BSPlayer (dll inside) | matz | General Talk And Support | 18 | 10th July 2020 07:25 AM |
BUGS in BSplayer v2.12.941 (Normal/Pro) | Tizio | Bug Reports And Codecs | 0 | 5th October 2006 06:43 PM |
READ THIS FIRST BEFORE POSTING | BSPeter | General Talk And Support | 0 | 17th January 2005 01:29 AM |
Fixing the Icon Problem for yourself | neato713 | Feature Requests, Feedback And Suggestions | 1 | 3rd October 2004 02:04 PM |
Make a custom bsplayer install with NSIS (v2.0b4) | gadz | General Talk And Support | 2 | 20th November 2003 04:49 PM |