Old 23rd January 2005, 00:09   #1
superwan
Senior Member
 
Join Date: Aug 2004
Posts: 109
Question install options : page custom like a welcome page

hello everybody...

I'm looking for anyone who would have tried to make himself a page custom which looks like exactly the same as a welcome or a finish page...

I couldn't do it, and I promise, I'm searching, and searching...


code:

[Settings]
NumFields=3
Rect=1044
[Field 1]
Type=bitmap
Text=c:\install.bmp
Left=0
Right=109
Top=0
Bottom=193
[Field 2]
Type=label
Left=120
Right=315
Top=10
[Field 3]
Type=label
Left=120
Right=315





does not work
1) the bitmap does not appear...
2) the branding text is there, I don't know how to make him disappear
3) the backside color isn't white


any ideas ?
superwan is offline   Reply With Quote
Old 23rd January 2005, 10:13   #2
superwan
Senior Member
 
Join Date: Aug 2004
Posts: 109
up
superwan is offline   Reply With Quote
Old 23rd January 2005, 11:32   #3
Afrow UK
Moderator
 
Afrow UK's Avatar
 
Join Date: Nov 2002
Location: Surrey, England
Posts: 8,434
Use Modern UI?

-Stu
Afrow UK is offline   Reply With Quote
Old 23rd January 2005, 11:40   #4
superwan
Senior Member
 
Join Date: Aug 2004
Posts: 109
?

i'm already using modern UI

if you're telling me to use the MUI_UNPAGE_WELCOME

i've already tried...
And I couldn't add a field to the ioSpecial.ini...
superwan is offline   Reply With Quote
Old 23rd January 2005, 11:49   #5
superwan
Senior Member
 
Join Date: Aug 2004
Posts: 109
I want to add to my welcome page some radiobuttons if a version of my software is already installed...
(I don't want to add a custom page after my welcome page, one click too much)

Well, I tried using the command MUI_WELCOMEFINISHPAGE_INI welcome.ini

I copied ioSpecial.ini to my welcome.ini
Changing the 3 fields of the welcome.ini works...
But I couldn't add fields...
And I want to
If somebody knows the solution to add a field to this ini file, this will solve my problem
superwan is offline   Reply With Quote
Old 23rd January 2005, 12:55   #6
pengyou
Major Dude
 
Join Date: Mar 2003
Posts: 571
The MUI uses ioSpecial.ini to define the WELCOME and FINISH pages.

If you want to change these pages, you can either modify ioSpecial.ini at run time (before the page gets displayed) or you can use the MUI_WELCOMEFINISHPAGE_INI setting to make MUI use a different INI file at compile time.
pengyou is offline   Reply With Quote
Old 23rd January 2005, 13:00   #7
superwan
Senior Member
 
Join Date: Aug 2004
Posts: 109
yes pengyou

I have written that i've tried to do it, and i couldn't add a field to this ini file...
superwan is offline   Reply With Quote
Old 23rd January 2005, 14:38   #8
superwan
Senior Member
 
Join Date: Aug 2004
Posts: 109
I don't understand what happens with the inifile and the command MUI_WELCOMEFINISHPAGE_INI

it is as if the fields had a predefined size... and you can't change it...

for example :

this ini :

code:

[Settings]
NumFields=5
rect=1044
[Field 1]
Type=bitmap
Left=0
Right=109
Top=0
Bottom=193
Text=install.bmp
Flags=RESIZETOFIT
[Field 2]
Type=radiobutton
Left=120
Right=315
Top=50
Bottom=60
Text=blabla4
[Field 3]
Type=radiobutton
Left=120
Right=315
Top=90
Bottom=100
Text=blabla0
[Field 4]
Type=radiobutton
Text=blabla
Left=120
Right=315
Top=100
Bottom=110
[Field 5]
Type=radiobutton
Text=blabla2
Left=120
Right=315
Top=120
Bottom=130


this ini gives me the 4 radiobuttons if I use a custompage




but the same ini in the welcome.ini defined with :
!define MUI_WELCOMEFINISHPAGE_INI

gives me only one radiobutton

this is a bug :L
superwan is offline   Reply With Quote
Old 23rd January 2005, 15:21   #9
pengyou
Major Dude
 
Join Date: Mar 2003
Posts: 571
Quote:
this is a bug
No, it is not a bug. When you use the MUI package you can choose various options for the WELCOME and FINISH pages, such as the MUI_WELCOMEPAGE_TITLE_3LINES, MUI_WELCOMEFINISHPAGE_BITMAP and MUI_FINISHPAGE_RUN settings. Some of these MUI settings make the MUI package alter the ioSpecial.ini file.

So if you want to make some changes to the WELCOME and FINISH pages, you need to make sure that your changes do not conflict with the changes made by the MUI package.

If you compile your script (without your extra changes) and run it then you can look at the ioSpecial.ini file in the TEMP folder to see what the MUI package has done (e.g. how many fields are present, what are their sizes, etc). Then you can work out how to add your extra fields and update your script.

Another way to find out what the MUI package will do to ioSpecial.ini is to look at the MUI source code, but looking at the actual ioSpecial.ini used when running your installer is probably easier to do.
pengyou is offline   Reply With Quote
Old 23rd January 2005, 15:37   #10
superwan
Senior Member
 
Join Date: Aug 2004
Posts: 109
yes I know this is not a bug... just a sort of

"you can't do anything that you want "

I'll have a look at it...
superwan is offline   Reply With Quote
Old 23rd January 2005, 15:45   #11
superwan
Senior Member
 
Join Date: Aug 2004
Posts: 109
x
superwan is offline   Reply With Quote
Old 23rd January 2005, 15:52   #12
superwan
Senior Member
 
Join Date: Aug 2004
Posts: 109
x
superwan is offline   Reply With Quote
Old 23rd January 2005, 16:00   #13
superwan
Senior Member
 
Join Date: Aug 2004
Posts: 109
I'm sorry, but I think this acts like a bug...

i do :
!define MUI_WELCOMEFINISHPAGE_INI welcome.ini
this is what happens in my temp folder :

"welcome code"
code:
[Settings]
Rect=1044
NumFields=5
RTL=0
NextButtonText=
CancelEnabled=
[Field 1]
Type=bitmap
Left=0
Right=109
Top=0
Bottom=193
Flags=RESIZETOFIT
Text=C:\DOCUME~1\ADMINI~1\LOCALS~1\Temp\nseBF.tmp\modern-wizard.bmp
[Field 2]
Type=label
Left=120
Right=315
Top=10
Text=Bienvenue dans le programme d'installation de K!TV
Bottom=38
[Field 3]
Type=label
Left=120
Right=315
Top=45
Bottom=150
Text=bla
[Field 4]
Type=radiobutton
Text=blabla
Left=120
Right=315
Top=150
Bottom=160
[Field 5]
Type=radiobutton
Text=blabla2
Left=120
Right=315
Top=160
Bottom=170




and the page appears wrong...
I have a look at "iospecial.ini" in the temps folder :
code:

[Settings]
Rect=1044
NumFields=3
RTL=0
NextButtonText=
CancelEnabled=
[Field 1]
Type=bitmap
Left=0
Right=109
Top=0
Bottom=193
Flags=RESIZETOFIT
Text=C:\DOCUME~1\ADMINI~1\LOCALS~1\Temp\nssC3.tmp\modern-wizard.bmp
[Field 2]
Type=label
Left=120
Right=315
Top=10
Text=test
Bottom=38
[Field 3]
Type=label
Left=120
Right=315
Top=45
Bottom=185
Text=test2
[Field 4]
Type=radiobutton
Text=blabla
Left=120
Right=315
Top=150
Bottom=160
[Field 5]
Type=radiobutton
Text=blabla2
Left=120
Right=315
Top=160
Bottom=170



why is the [Field 3] "bottom" value modified ???
superwan is offline   Reply With Quote
Old 23rd January 2005, 17:02   #14
pengyou
Major Dude
 
Join Date: Mar 2003
Posts: 571
Quote:
'm sorry, but I think this acts like a bug...
As I explained earlier, the MUI package will change the ioSpecial.ini file at run time. So your script needs to take these changes into account. The MUI package only uses 3 fields for the WELCOME page so it adjusts ioSpecial.ini to use only 3 fields, as you found out.

There is more than one way to do what you want. Here is one way:

(a) let MUI use the default ioSpecial.ini file (do not use MUI_WELCOMEFINISHPAGE_INI in your script)

(b) use the WELCOME page PRE function to add the two radio buttons to ioSpecial.ini

(c) use the WELCOME page SHOW function to make the two radio buttons use the same background as the rest of the page

and here is some code to do this:
code:
!define MUI_PAGE_CUSTOMFUNCTION_PRE "add_radio_buttons"
!define MUI_PAGE_CUSTOMFUNCTION_SHOW "fix_background_color"

!insertmacro MUI_PAGE_WELCOME

...
...

Function add_radio_buttons

!insertmacro MUI_INSTALLOPTIONS_WRITE "ioSpecial.ini" "Settings" "NumFields" "5"

!insertmacro MUI_INSTALLOPTIONS_WRITE "ioSpecial.ini" "Field 3" "Bottom" "150"

!insertmacro MUI_INSTALLOPTIONS_WRITE "ioSpecial.ini" "Field 4" "Type" "radiobutton"
!insertmacro MUI_INSTALLOPTIONS_WRITE "ioSpecial.ini" "Field 4" "Text" "blabla"
!insertmacro MUI_INSTALLOPTIONS_WRITE "ioSpecial.ini" "Field 4" "Left" "120"
!insertmacro MUI_INSTALLOPTIONS_WRITE "ioSpecial.ini" "Field 4" "Right" "315"
!insertmacro MUI_INSTALLOPTIONS_WRITE "ioSpecial.ini" "Field 4" "Top" "150"
!insertmacro MUI_INSTALLOPTIONS_WRITE "ioSpecial.ini" "Field 4" "Bottom" "160"

!insertmacro MUI_INSTALLOPTIONS_WRITE "ioSpecial.ini" "Field 5" "Type" "radiobutton"
!insertmacro MUI_INSTALLOPTIONS_WRITE "ioSpecial.ini" "Field 5" "Text" "blabla"
!insertmacro MUI_INSTALLOPTIONS_WRITE "ioSpecial.ini" "Field 5" "Left" "120"
!insertmacro MUI_INSTALLOPTIONS_WRITE "ioSpecial.ini" "Field 5" "Right" "315"
!insertmacro MUI_INSTALLOPTIONS_WRITE "ioSpecial.ini" "Field 5" "Top" "160"
!insertmacro MUI_INSTALLOPTIONS_WRITE "ioSpecial.ini" "Field 5" "Bottom" "170"

FunctionEnd

Function fix_background_color
Push $0

GetDlgItem $0 $MUI_HWND 1203
SetCtlColors $0 "" "FFFFFF"
GetDlgItem $0 $MUI_HWND 1204
SetCtlColors $0 "" "FFFFFF"

Pop $0
FunctionEnd

pengyou is offline   Reply With Quote
Old 23rd January 2005, 17:59   #15
superwan
Senior Member
 
Join Date: Aug 2004
Posts: 109
I really have to thank you

I try it this evening and come back to thank you...

want a kiss ?
superwan is offline   Reply With Quote
Old 23rd January 2005, 18:41   #16
superwan
Senior Member
 
Join Date: Aug 2004
Posts: 109
it works fine


really, really, thank you pengyou

:love:
superwan is offline   Reply With Quote
Old 24th January 2005, 21:23   #17
superwan
Senior Member
 
Join Date: Aug 2004
Posts: 109
hello, I'm back...

I have done what you said, pengyou, and it works... that means it is well displayed...
but I can't read the checkbox value, and I don't know where I'm wrong...


this is my code :


code:


;page finish
!define MUI_PAGE_CUSTOMFUNCTION_PRE "un.add_shortcuts_finishpage"
!define MUI_PAGE_CUSTOMFUNCTION_SHOW "un.fix_background_color"
!define MUI_PAGE_CUSTOMFUNCTION_LEAVE "un.finishpage"
!define MUI_FINISHPAGE_TITLE "$MUI_FINISHPAGE_TITLE"
!define MUI_FINISHPAGE_TEXT "$MUI_FINISHPAGE_TEXT"


;page de fin de désinstallation
!insertmacro MUI_UNPAGE_FINISH




and then I want to read the checkbox value of the 6th field...
the function that does not work :
code:

Function un.finishpage

ReadINIStr $R0 "$TEMP\ioSpecial.ini" "Field 6" "State"
StrCpy $R0 $R0
StrCmp $R0 "1" shortcut end
shortcut:
CreateShortcut "$DESKTOP\K!TV.lnk" "$INSTDIR\K!TV.exe" "" "$INSTDIR\K!TV.exe" "" "" "" "$(desktv)"
goto end
end:


FunctionEnd



the command createshortcut works fine outside the readinistr, etc...

but this command is not called in this function, i can't read a "1" value to the state of my 6th field...


why ?

is it because of my function called by MUI_CUSTOMFUNCTION_LEAVE ?

and what else can I do ?
superwan is offline   Reply With Quote
Old 24th January 2005, 21:28   #18
Afrow UK
Moderator
 
Afrow UK's Avatar
 
Join Date: Nov 2002
Location: Surrey, England
Posts: 8,434
ioSpecial.ini will be in $PLUGINSDIR not $TEMP.

-Stu
Afrow UK is offline   Reply With Quote
Old 24th January 2005, 21:48   #19
superwan
Senior Member
 
Join Date: Aug 2004
Posts: 109
arf

thanks it works now lol


I found it on my hard drive on a "temp" directory...
I couldn't know this directory called temp was the pluginsdir directory




thank you...
superwan is offline   Reply With Quote
Old 24th January 2005, 21:56   #20
Afrow UK
Moderator
 
Afrow UK's Avatar
 
Join Date: Nov 2002
Location: Surrey, England
Posts: 8,434
$PLUGINSDIR is a randomly generated folder inside the $TEMP folder called "nsxxxx.tmp".

-Stu
Afrow UK is offline   Reply With Quote
Old 25th January 2005, 16:54   #21
superwan
Senior Member
 
Join Date: Aug 2004
Posts: 109
hello I encountered some problem with the page created like pengyou said...

(with this sort of code :
code:
!define MUI_PAGE_CUSTOMFUNCTION_PRE "un.add_radio_buttons"

and
code:

!insertmacro MUI_INSTALLOPTIONS_WRITE "ioSpecial.ini" "Settings" "NumFields" "5"
!insertmacro MUI_INSTALLOPTIONS_WRITE "ioSpecial.ini" "Field 3" "Bottom" "150"
!insertmacro MUI_INSTALLOPTIONS_WRITE "ioSpecial.ini" "Field 4" "Type" "radiobutton"
!insertmacro MUI_INSTALLOPTIONS_WRITE "ioSpecial.ini" "Field 4" "Text" "$(reinstktv)"
!insertmacro MUI_INSTALLOPTIONS_WRITE "ioSpecial.ini" "Field 4" "Left" "120"
!insertmacro MUI_INSTALLOPTIONS_WRITE "ioSpecial.ini" "Field 4" "Right" "315"
!insertmacro MUI_INSTALLOPTIONS_WRITE "ioSpecial.ini" "Field 4" "Top" "120"
!insertmacro MUI_INSTALLOPTIONS_WRITE "ioSpecial.ini" "Field 4" "Bottom" "130"
!insertmacro MUI_INSTALLOPTIONS_WRITE "ioSpecial.ini" "Field 4" "State" "1"
!insertmacro MUI_INSTALLOPTIONS_WRITE "ioSpecial.ini" "Field 5" "Type" "radiobutton"
!insertmacro MUI_INSTALLOPTIONS_WRITE "ioSpecial.ini" "Field 5" "Text" "$(uninstktv)"
!insertmacro MUI_INSTALLOPTIONS_WRITE "ioSpecial.ini" "Field 5" "Left" "120"
!insertmacro MUI_INSTALLOPTIONS_WRITE "ioSpecial.ini" "Field 5" "Right" "315"
!insertmacro MUI_INSTALLOPTIONS_WRITE "ioSpecial.ini" "Field 5" "Top" "140"
!insertmacro MUI_INSTALLOPTIONS_WRITE "ioSpecial.ini" "Field 5" "Bottom" "150"



I have some clipping :L
Seems to be a display bug :L
when I'm hiding the window, and make it come back, the radiobuttons have disappeared and I must put my mouse on it in order to they reappear...


why why why... don't know...

any ideas ?
superwan is offline   Reply With Quote
Old 25th January 2005, 21:35   #22
superwan
Senior Member
 
Join Date: Aug 2004
Posts: 109
problem solved... my bottom value for the third field wasn't correct...


dumb am I
superwan is offline   Reply With Quote
Reply
Go Back   Winamp & Shoutcast 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