Archive: Someone edit this for me!! PLZ


Someone edit this for me!! PLZ
Ive tried and tried and its probobly really simple i just can't get it will someone edit this for me to where it would show a img for the background PLZ!!

;Title Of Your Application
Name "ChickenMod Installer v1.0.5.1"
Icon "C:\Program Files\NSIS Workbench\Setup3.ico"

;Don't Do A CRC Check
CRCCheck Off

;The Default Installation Directory
InstallDir "$PROGRAMFILES\Steam\SteamApps\(YOR E-MAIL)\dedicated server\cstrike"

;Output File Name
OutFile "chickenmod.exe"

;The text to prompt the user to enter a directory
DirText "Please select the folder below"

Section "Install"
;Install Files
SetOutPath $INSTDIR\sound\misc
SetCompress Auto
SetOverwrite IfNewer
File "C:\Documents and Settings\Matthew Woods\Desktop\cstrike\cstrike\sound\misc\chicken0.wav"
File "C:\Documents and Settings\Matthew Woods\Desktop\cstrike\cstrike\sound\misc\chicken1.wav"
File "C:\Documents and Settings\Matthew Woods\Desktop\cstrike\cstrike\sound\misc\chicken2.wav"
File "C:\Documents and Settings\Matthew Woods\Desktop\cstrike\cstrike\sound\misc\chicken3.wav"
File "C:\Documents and Settings\Matthew Woods\Desktop\cstrike\cstrike\sound\misc\chicken4.wav"
File "C:\Documents and Settings\Matthew Woods\Desktop\cstrike\cstrike\sound\misc\cow.wav"
File "C:\Documents and Settings\Matthew Woods\Desktop\cstrike\cstrike\sound\misc\killChicken.wav"
File "C:\Documents and Settings\Matthew Woods\Desktop\cstrike\cstrike\sound\misc\knife_hit1.wav"
File "C:\Documents and Settings\Matthew Woods\Desktop\cstrike\cstrike\sound\misc\knife_hit3.wav"
FileOpen $4 "$INSTDIR\addons\amx\plugins\plugins.ini" a
FileSeek $4 0 END
FileWrite $4 "$\r$\n" ; we write a new line
FileWrite $4 "amx_chicken.amx"
FileWrite $4 "$\r$\n" ; we write an extra line
FileClose $4 ; and close the file
SetOutPath $INSTDIR\models
File "C:\Documents and Settings\Matthew Woods\Desktop\cstrike\cstrike\models\chick.mdl"
File "C:\Documents and Settings\Matthew Woods\Desktop\cstrike\cstrike\models\feather.mdl"
File "C:\Documents and Settings\Matthew Woods\Desktop\cstrike\cstrike\models\w_chickenc4.mdl"
SetOutPath $INSTDIR\addons\chickenmod\dlls
File "C:\Documents and Settings\Matthew Woods\Desktop\cstrike\cstrike\addons\chickenmod\dlls\chicken_mm.dll"
SetOutPath $INSTDIR\addons\amx\examples
File "C:\Documents and Settings\Matthew Woods\Desktop\cstrike\cstrike\addons\amx\examples\amx_chicken.sma"
FileOpen $4 "$INSTDIR\addons\metamod\plugins.ini" a
FileSeek $4 0 END
FileWrite $4 "$\r$\n" ; we write a new line
FileWrite $4 "addons/chickenmod/dlls/chicken_mm.dll"
FileWrite $4 "$\r$\n" ; we write an extra line
FileClose $4 ; and close the file
SetOutPath $INSTDIR\addons\amx\examples\include
File "C:\Documents and Settings\Matthew Woods\Desktop\cstrike\cstrike\addons\amx\examples\include\chicken.inc"
File "C:\Documents and Settings\Matthew Woods\Desktop\cstrike\cstrike\addons\amx\examples\include\lang_default.inc"
SetOutPath $INSTDIR\addons\amx\plugins
File "C:\Documents and Settings\Matthew Woods\Desktop\cstrike\cstrike\addons\amx\plugins\amx_chicken.amx"
SetOutPath $INSTDIR\addons\amx\plugins\chicken
File "C:\Documents and Settings\Matthew Woods\Desktop\cstrike\cstrike\addons\amx\plugins\chicken\chicken.cfg"
SectionEnd

Section "Shortcuts"
;Add Shortcuts
SectionEnd

There isn't a single of code in this script related to background images. At least show what you have tried and didn't work.


Look for the bgimage plugin in your NSIS folders :)


thanks joost for the help...................................................................................................................


for your install path for steam.. i would use the registry to look for the users default location... this is the NUMBER ONE PEAVE that pisses me off with install applications for games etc.

so use this...

InstallDirRegKey 'HKLM' 'SOFTWARE\Red Storm Entertainment\RAVENSHIELD' 'InstalledPath'


the code above is for ravenshield, you will have to search YOUR registry for the INSTALLPATH or something simular for steam for CS. i dont have steam installed so i cant do that for you.

hope that helps ya out.

thanks that helps alot now all thats left is figuring out this stupid background img ... ill play around with it for a while i might get it, ive seen the example for it just cant seem to put it in my installer and get it to still work:(


i got that file and stuff i needed for it but i still can figure it out plz i need some help!!!!


Using NSIS 2.0 without the Modern UI? then you'll just have to copy the .onGuiInit / .onGuiEnd function from the example and it should work.

If not, attach a script the things you have tried.


well i messed with a little and never got it to work i tried putting the example in but diddant know what all to do i put this in it and it complies but nothing happens.

!define PRODUCT_NAME "ChicenMod Installer v1.0.5.1"
!define PRODUCT_VERSION "1.0.5.1"
!define PRODUCT_DIR_REGKEY "Software\Microsoft\Windows\CurrentVersion\App Paths\makensis.exe"

; MUI 1.67 compatible ------
!include "MUI.nsh"


; MUI Settings
!define MUI_ABORTWARNING
!define MUI_ICON "${NSISDIR} Workbench\Setup2.ico"

; Welcome page
!insertmacro MUI_PAGE_WELCOME
; License page
!insertmacro MUI_PAGE_LICENSE "C:\Documents and Settings\Matthew Woods\Desktop\txt.txt"
; Instfiles page
;Directory Page
!insertmacro MUI_PAGE_DIRECTORY
;Install Files
!insertmacro MUI_PAGE_INSTFILES
; Finish page
!insertmacro MUI_PAGE_FINISH
; Language files
!insertmacro MUI_LANGUAGE "English"

; MUI end ------

XPStyle on

Name "ChickenMod Installer v1.0.5.1"
OutFile "Setup.exe"
InstallDir "$PROGRAMFILES\Steam\SteamApps\(YOR E-MAIL)\dedicated server\cstrike"
InstallDirRegKey HKLM "${PRODUCT_DIR_REGKEY}" ""
ShowInstDetails show

;Title Of Your Application
Name "ChickenMod Installer v1.0.5.1"
Icon "C:\Program Files\NSIS Workbench\Setup3.ico"

;Don't Do A CRC Check
CRCCheck Off

;The Default Installation Directory
InstallDir "$PROGRAMFILES\Steam\SteamApps\(YOR E-MAIL)\dedicated server\cstrike"


;Output File Name
OutFile "chickenmod.exe"

;The text to prompt the user to enter a directory
DirText "Please select the folder below"

Function .onGUIEnd
# the plugins dir is automatically deleted when the installer exits
InitPluginsDir
# lets extract some bitmaps...
File /oname=$PLUGINSDIR\1.bmp "${NSISDIR}\Contrib\Graphics\Wizard\llama.bmp"
File /oname=$PLUGINSDIR\2.bmp "${NSISDIR}\Contrib\Graphics\Checks\modern.bmp"

!ifdef DEBUG
# turn return values on if in debug mode
BgImage::SetReturn /NOUNLOAD on
!endif

FunctionEnd

Section "Install"
;Install Files
SetOutPath $INSTDIR\sound\misc
SetCompress Auto
SetOverwrite IfNewer
File "C:\Documents and Settings\Matthew Woods\Desktop\cstrike\cstrike\sound\misc\chicken0.wav"
File "C:\Documents and Settings\Matthew Woods\Desktop\cstrike\cstrike\sound\misc\chicken1.wav"
File "C:\Documents and Settings\Matthew Woods\Desktop\cstrike\cstrike\sound\misc\chicken2.wav"
File "C:\Documents and Settings\Matthew Woods\Desktop\cstrike\cstrike\sound\misc\chicken3.wav"
File "C:\Documents and Settings\Matthew Woods\Desktop\cstrike\cstrike\sound\misc\chicken4.wav"
File "C:\Documents and Settings\Matthew Woods\Desktop\cstrike\cstrike\sound\misc\cow.wav"
File "C:\Documents and Settings\Matthew Woods\Desktop\cstrike\cstrike\sound\misc\killChicken.wav"
File "C:\Documents and Settings\Matthew Woods\Desktop\cstrike\cstrike\sound\misc\knife_hit1.wav"
File "C:\Documents and Settings\Matthew Woods\Desktop\cstrike\cstrike\sound\misc\knife_hit3.wav"
FileOpen $4 "$INSTDIR\addons\amx\plugins\plugins.ini" a
FileSeek $4 0 END
FileWrite $4 "$\r$\n" ; we write a new line
FileWrite $4 "amx_chicken.amx"
FileWrite $4 "$\r$\n" ; we write an extra line
FileClose $4 ; and close the file
SetOutPath $INSTDIR\models
File "C:\Documents and Settings\Matthew Woods\Desktop\cstrike\cstrike\models\chick.mdl"
File "C:\Documents and Settings\Matthew Woods\Desktop\cstrike\cstrike\models\feather.mdl"
File "C:\Documents and Settings\Matthew Woods\Desktop\cstrike\cstrike\models\w_chickenc4.mdl"
SetOutPath $INSTDIR\addons\chickenmod\dlls
File "C:\Documents and Settings\Matthew Woods\Desktop\cstrike\cstrike\addons\chickenmod\dlls\chicken_mm.dll"
SetOutPath $INSTDIR\addons\amx\examples
File "C:\Documents and Settings\Matthew Woods\Desktop\cstrike\cstrike\addons\amx\examples\amx_chicken.sma"
FileOpen $4 "$INSTDIR\addons\metamod\plugins.ini" a
FileSeek $4 0 END
FileWrite $4 "$\r$\n" ; we write a new line
FileWrite $4 "addons/chickenmod/dlls/chicken_mm.dll"
FileWrite $4 "$\r$\n" ; we write an extra line
FileClose $4 ; and close the file
SetOutPath $INSTDIR\addons\amx\examples\include
File "C:\Documents and Settings\Matthew Woods\Desktop\cstrike\cstrike\addons\amx\examples\include\chicken.inc"
File "C:\Documents and Settings\Matthew Woods\Desktop\cstrike\cstrike\addons\amx\examples\include\lang_default.inc"
SetOutPath $INSTDIR\addons\amx\plugins
File "C:\Documents and Settings\Matthew Woods\Desktop\cstrike\cstrike\addons\amx\plugins\amx_chicken.amx"
SetOutPath $INSTDIR\addons\amx\plugins\chicken
File "C:\Documents and Settings\Matthew Woods\Desktop\cstrike\cstrike\addons\amx\plugins\chicken\chicken.cfg"
SectionEnd

Section "Shortcuts"
;Add Shortcuts
SectionEnd

Hey whoa its you you still cant make any installers...


im tring lol ... will you help me with this ;)


You need to put code in the GUI initialization function too. See the Modern UI readme for information about setting custom functions.