|
|
#1 |
|
Forum King
|
Installer script
I've just finished my new installer script, I thought that maybe some of you people here might prefer this method of installing to Winamp 2 or 3 (but still not both unfortunately) to the one using those messy message boxes. This one uses the 'Install Options' menu to choose between Winamp 2 and 3 like my old script but it also autodetects the install directory.
I've used my last minipack for the example script here. Please tell me if you find any bugs! Name "Jheriko - Purely Platonic" Icon "platonic.ico" OutFile "J Platonic.exe" EnabledBitmap d:\NSIS\Contrib\two-check.bmp DisabledBitmap d:\NSIS\Contrib\two-nocheck.bmp Function .onInit StrCpy $9 0 FunctionEnd Function .onNextPage IntOp $9 $9 + 1 IntCmp $9 2 nothing Goto jump nothing: SectionGetFlags 1 $1 IntCmpU $1 2147483648 getwa2path getwa3path getwa2path getwa2path: ReadRegStr $INSTDIR HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\Winamp" "UninstallString" StrCpy $INSTDIR $INSTDIR "" 1 Goto skippy getwa3path: ReadRegStr $INSTDIR HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\Winamp3" "UninstallString" skippy: StrCpy $1 $INSTDIR loopy: StrCpy $2 $INSTDIR 1 $1 StrCmp $2 "" lpdone StrCmp $2 "\" lpdone IntOp $1 $1 - 1 Goto loopy lpdone: StrCpy $INSTDIR $INSTDIR $1 jump: FunctionEnd Function .onPrevPage IntOp $9 $9 - 1 FunctionEnd DirText "Please enter your full Winamp path below." ComponentText "Please choose the version of Winamp that you wish to install to:" InstType "Winamp 2" InstType "Winamp 3" InstType /NOCUSTOM AutoCloseWindow false ShowInstDetails show Section "-" SectionIn 1 2 SectionEnd Section "PP Minipack for Winamp 2" SectionIn 1 SetOutPath "$INSTDIR\Plugins\AVS" File "D:\winamp3\wacs\data\avs\multiplier.ape" SetOutPath "$INSTDIR\Plugins\AVS\JHERiKO - Purely Platonic Minipack" File "D:\winamp3\wacs\data\avs\Jheriko - Purely Platonic Minipack\*.avs" SectionEnd Section "PP Minipack for Winamp 3" SectionIn 2 SetOutPath "$INSTDIR\wacs\data\AVS\" File "D:\winamp3\wacs\data\avs\multiplier.ape" SetOutPath "$INSTDIR\wacs\data\AVS\JHERiKO - Purely Platonic Minipack" File "D:\winamp3\wacs\data\avs\Jheriko - Purely Platonic Minipack\*.avs" SectionEnd |
|
|
|
|
|||||||
| Thread Tools | Search this Thread |
| Display Modes | |
|
|