Hello,

As many know libmpdclient2 is due any minute now for release, and the
win32 binary will probably follow behind soon thereafter. I would like
to create an installer so there's no question on how it's all done.
I'm not familiar with how this should work and it makes me want to cry
when I attempt to find out. Hoping that posting here and being lazy
will help.

Following is a conversion from the gmpc nsi file in which convert all
instances of gmpc to libmpdclient and removed the start menu entries.
The installation directory needs to be changed and possibly more. If I
can't get help with this it won't be worth releasing a win32 binary.
Please help!

Thanks!
--
; libmpdclient.nsi
;
; libmpdclient installation script for NSIS installer compiler
; By: Daniel Lindenaar <daniel-libmpdcli...@lindenaar.org>
; Modified by: Qball Cow <qb...@sarine.nl>
;--------------------------------


SetCompressor /SOLID lzma
;--------------------------------
;Include Modern UI

!include "MUI.nsh"


; The name of the installer
Name "libmpdclient"

; The file to write
OutFile "libmpdclient_win32_installer.exe"

; The default installation directory
InstallDir "$PROGRAMFILES\libmpdclient"
InstallDirRegKey HKLM "Software\libmpdclient" "InstallationDirectory"
;--------------------------------
;Variables

Var StartMenuFolder

;--------------------------------
;Interface Settings

!define MUI_ABORTWARNING

; Pages

; Install

!insertmacro MUI_PAGE_WELCOME
!insertmacro MUI_PAGE_LICENSE "../COPYING"
!insertmacro MUI_PAGE_DIRECTORY

;Start Menu Folder Page Configuration
!define MUI_STARTMENUPAGE_REGISTRY_ROOT "HKCU"
!define MUI_STARTMENUPAGE_REGISTRY_KEY "Software\libmpdclient"
!define MUI_STARTMENUPAGE_REGISTRY_VALUENAME "libmpdclient"

!insertmacro MUI_PAGE_INSTFILES
!define MUI_FINISHPAGE_RUN "$INSTDIR\libmpdclient.exe"
!insertmacro MUI_PAGE_FINISH

; Uninstall
!insertmacro MUI_UNPAGE_CONFIRM
!insertmacro MUI_UNPAGE_INSTFILES

;--------------------------------
;Languages

!insertmacro MUI_LANGUAGE "English"


;--------------------------------

; The stuff to install
Section "Install"
; Add entries to windows Add/Remove software
  WriteRegStr HKLM
"Software\Microsoft\Windows\CurrentVersion\Uninstall\libmpdclient"
"DisplayName" "libmpdclient"
  WriteRegStr HKLM
"Software\Microsoft\Windows\CurrentVersion\Uninstall\libmpdclient"
"UninstallString" '"$INSTDIR\uninstall.exe"'
  WriteRegDWORD HKLM
"Software\Microsoft\Windows\CurrentVersion\Uninstall\libmpdclient"
"NoModify" 1
  WriteRegDWORD HKLM
"Software\Microsoft\Windows\CurrentVersion\Uninstall\libmpdclient"
"NoRepair" 1

  ; Set output path to the installation directory.
  SetOutPath "$INSTDIR"

  ; Put file there
  File /r  ../libmpdclient-latest/*.*


; no idea
  WriteRegStr HKLM "Software\libmpdclient" "InstallationDirectory" $INSTDIR

; Install uninstaller
  WriteUninstaller "$INSTDIR\Uninstall.exe"

SectionEnd ; end the section

Section "Uninstall"
  ; Remove all the files in install dir
  RMDir /r "$INSTDIR"

  ; Remove registry keys
  DeleteRegKey HKLM
"Software\Microsoft\Windows\CurrentVersion\Uninstall\libmpdclient"
  DeleteRegKey HKLM "Software\libmpdclient"
SectionEnd
-- 
avuton
--
All opinions stated above are mine and do not necessarily reflect
those of the US secret service.

------------------------------------------------------------------------------
Come build with us! The BlackBerry&reg; Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay 
ahead of the curve. Join us from November 9&#45;12, 2009. Register now&#33;
http://p.sf.net/sfu/devconf
_______________________________________________
Musicpd-dev-team mailing list
Musicpd-dev-team@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/musicpd-dev-team

Reply via email to