Go Back   Winamp Forums > Developer Center > NSIS Discussion

Reply
Thread Tools Search this Thread Display Modes
Old 17th September 2012, 13:48   #1
tossnet
Junior Member
 
tossnet's Avatar
 
Join Date: Jan 2011
Location: LENS - FRANCE
Posts: 23
Custom Page : Bitmap not in package

Hi,
My problem is that my images are not visible. Unless I put the record.bmp next to the executable !?
anyone see my problem
Thank you !


code:
Name "Test BitMap"
OutFile "TestBitMap.exe"

## Include headers
!include MUI.nsh

## Pages
Page custom RecordingPage RecordingLeave ": Enregistrement"
Page Custom InputBoxPageShow InputBoxPageLeave
!insertmacro MUI_PAGE_COMPONENTS
!insertmacro MUI_PAGE_INSTFILES


# CUSTOM PAGE.
Function .onInit
#!insertmacro MUI_INSTALLOPTIONS_EXTRACT_AS "record.ini" "Recording"
InitPluginsDir
File /oname=$PLUGINSDIR\record.bmp "record.bmp"
File /oname=$PLUGINSDIR\demonstration.bmp "demonstration.bmp"
File /oname=$PLUGINSDIR\record.ini "record.ini"
FunctionEnd

Function RecordingPage
!insertmacro MUI_INSTALLOPTIONS_EXTRACT "record.ini"

!insertmacro MUI_INSTALLOPTIONS_WRITE "record.ini" "Field 1" "Text" "record.bmp"
!insertmacro MUI_INSTALLOPTIONS_WRITE "record.ini" "Field 2" "Text" "demonstration.bmp"

!insertmacro MUI_INSTALLOPTIONS_DISPLAY "record.ini"
FunctionEnd

Function RecordingLeave
!insertmacro MUI_INSTALLOPTIONS_READ $R1 "record.ini" "Field 3" "State"
!insertmacro MUI_INSTALLOPTIONS_READ $R2 "record.ini" "Field 5" "State"
FunctionEnd

Section 'A section'
SectionEnd

tossnet is offline   Reply With Quote
Old 17th September 2012, 16:29   #2
Afrow UK
Moderator
 
Afrow UK's Avatar
 
Join Date: Nov 2002
Location: Birmingham, England
Posts: 8,216
Give it the full path to the bitmap.

Stu

Need an installer? http://www.afrowsoft.co.uk
Afrow UK is offline   Reply With Quote
Old 17th September 2012, 16:31   #3
tossnet
Junior Member
 
tossnet's Avatar
 
Join Date: Jan 2011
Location: LENS - FRANCE
Posts: 23
Thumbs up

It's OK Thanks :
The code if it can help someone else :
code:
Function .onInit
InitPluginsDir
File /oname=$PLUGINSDIR\record.bmp "record.bmp"
File /oname=$PLUGINSDIR\demonstration.bmp "demonstration.bmp"
FunctionEnd

Function RecordingPage
!insertmacro MUI_INSTALLOPTIONS_EXTRACT "record.ini"

!insertmacro MUI_INSTALLOPTIONS_WRITE "record.ini" "Field 1" "Text" $PLUGINSDIR\record.bmp
!insertmacro MUI_INSTALLOPTIONS_WRITE "record.ini" "Field 2" "Text" $PLUGINSDIR\demonstration.bmp

!insertmacro MUI_INSTALLOPTIONS_DISPLAY "record.ini"
FunctionEnd


Last edited by tossnet; 17th September 2012 at 17:37.
tossnet is offline   Reply With Quote
Reply
Go Back   Winamp Forums > Developer Center > NSIS Discussion

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump