Ignore:
Timestamp:
Mar 29, 2012, 3:09:42 PM (13 years ago)
Author:
Silvan Scherrer
Message:

SMPlayer: update to latest svn

File:
1 edited

Legend:

Unmodified
Added
Removed
  • smplayer/vendor/current/setup/smplayer.win32.nsi

    r121 r127  
    3030!endif
    3131
     32  !define SMPLAYER_REG_KEY "Software\SMPlayer"
    3233  !define SMPLAYER_APP_PATHS_KEY "Software\Microsoft\Windows\CurrentVersion\App Paths\smplayer.exe"
    33   !define SMPLAYER_REG_KEY "Software\SMPlayer"
     34  !define SMPLAYER_DEF_PROGS_KEY "Software\Clients\Media\SMPlayer"
    3435
    3536  !define SMPLAYER_UNINST_EXE "uninst.exe"
     
    327328SectionGroup $(ShortcutGroupTitle)
    328329
    329   ${MementoSection} $(Section_DesktopShortcut) SecDesktopShortcut
     330  ${MementoUnselectedSection} $(Section_DesktopShortcut) SecDesktopShortcut
    330331
    331332    SetOutPath "$INSTDIR"
     
    583584
    584585!macro WriteRegStrSupportedTypes EXT
    585   WriteRegStr HKLM  "${SMPLAYER_REG_KEY}\Capabilities\FileAssociations" ${EXT} "MPlayerFileVideo"
     586  WriteRegStr HKLM  "${SMPLAYER_DEF_PROGS_KEY}\Capabilities\FileAssociations" ${EXT} "MPlayerFileVideo"
    586587!macroend
    587588
     
    616617  Delete "$INSTDIR\mingwm10.dll"
    617618  Delete "$INSTDIR\zlib1.dll"
    618   Delete "$INSTDIR\Q*.dll"
     619  Delete "$INSTDIR\Qt*.dll"
    619620  Delete "$INSTDIR\smplayer.exe"
    620621  Delete "$INSTDIR\smtube.exe"
     
    628629  DeleteRegKey HKLM "${SMPLAYER_REG_KEY}"
    629630  DeleteRegKey HKLM "${SMPLAYER_APP_PATHS_KEY}"
     631  DeleteRegKey HKLM "${SMPLAYER_DEF_PROGS_KEY}"
    630632  DeleteRegKey HKLM "${SMPLAYER_UNINST_KEY}"
    631633  DeleteRegKey HKCR "MPlayerFileVideo"
     
    637639;--------------------------------
    638640;Shared functions
    639 
    640 !macro CheckUserRightsMacro UN
    641 Function ${UN}CheckUserRights
    642 
    643   ClearErrors
    644   UserInfo::GetName
    645   ${If} ${Errors}
    646     StrCpy $Is_Admin 1
    647     Return
    648   ${EndIf}
    649 
    650   Pop $UserName
    651   UserInfo::GetAccountType
    652   Pop $R0
    653   ${Switch} $R0
    654     ${Case} "Admin"
    655     ${Case} "Power"
    656       StrCpy $Is_Admin 1
    657       ${Break}
    658     ${Default}
    659       StrCpy $Is_Admin 0
    660       ${Break}
    661   ${EndSwitch}
    662 
    663 FunctionEnd
    664 !macroend
    665 !insertmacro CheckUserRightsMacro ""
    666 !insertmacro CheckUserRightsMacro "un."
    667641
    668642!macro RunCheckMacro UN
     
    700674  Call RunCheck
    701675
    702   ;Check for admin on older OSes
    703   Call CheckUserRights
    704 
    705   ${If} $Is_Admin == 0
     676  ;Check for admin on < Vista
     677  UserInfo::GetAccountType
     678  Pop $R0
     679  ${If} $R0 != "admin"
    706680    MessageBox MB_OK|MB_ICONSTOP $(Installer_No_Admin)
    707681    Abort
     
    921895
    922896  ;Modify the list of extensions added in the MacroAllExtensions macro
    923   WriteRegStr HKLM "${SMPLAYER_REG_KEY}\Capabilities" "ApplicationDescription" $(Application_Description)
    924   WriteRegStr HKLM "${SMPLAYER_REG_KEY}\Capabilities" "ApplicationName" "SMPlayer"
    925   WriteRegStr HKLM "Software\RegisteredApplications" "SMPlayer" "${SMPLAYER_REG_KEY}\Capabilities"
     897  WriteRegStr HKLM "${SMPLAYER_DEF_PROGS_KEY}" "" "SMPlayer"
     898  WriteRegStr HKLM "${SMPLAYER_DEF_PROGS_KEY}\Capabilities" "ApplicationDescription" $(Application_Description)
     899  WriteRegStr HKLM "${SMPLAYER_DEF_PROGS_KEY}\Capabilities" "ApplicationName" "SMPlayer"
     900  WriteRegStr HKLM "Software\RegisteredApplications" "SMPlayer" "${SMPLAYER_DEF_PROGS_KEY}\Capabilities"
    926901  !insertmacro MacroAllExtensions WriteRegStrSupportedTypes
    927902
     
    968943Function un.onInit
    969944
    970   ;Check for admin (mimic old Inno Setup behavior)
    971   Call un.CheckUserRights
    972 
    973   ${If} $Is_Admin == 0
     945  ;Check for admin on < Vista
     946  UserInfo::GetAccountType
     947  Pop $R0
     948  ${If} $R0 != "admin"
    974949    MessageBox MB_OK|MB_ICONSTOP $(Uninstaller_No_Admin)
    975950    Abort
Note: See TracChangeset for help on using the changeset viewer.