Old 17th May 2003, 15:14   #1
kernel23
Junior Member
 
Join Date: May 2003
Posts: 4
Finish page

Hi all

I've trying to make installer to show custom page after file copying and do some actions before showing finish page.
like this
code:


!define MUI_CUSTOMFUNCTION_FINISH_PRE CreateIcons

;--------------------------------
;Modern UI Configuration
;--------------------------------
!define MUI_CUSTOMPAGECOMMANDS

!define MUI_WELCOMEPAGE
!define MUI_LICENSEPAGE
!define MUI_COMPONENTSPAGE
!define MUI_COMPONENTSPAGE_SMALLDESC
!define MUI_DIRECTORYPAGE
!define MUI_FINISHPAGE
!define MUI_FINISHPAGE_RUN "$INSTDIR\EMPI.exe"
!define MUI_FINISHPAGE_NOREBOOTSUPPORT

!define MUI_ABORTWARNING

!define MUI_UNINSTALLER
!define MUI_UNCONFIRMPAGE

;--------------------------------
;Pages
;--------------------------------
!insertmacro MUI_PAGECOMMAND_WELCOME
!insertmacro MUI_PAGECOMMAND_LICENSE
!insertmacro MUI_PAGECOMMAND_COMPONENTS
!insertmacro MUI_PAGECOMMAND_DIRECTORY
!insertmacro MUI_PAGECOMMAND_INSTFILES
Page custom IconsPage
!insertmacro MUI_PAGECOMMAND_FINISH



This works, but finish page having buttons "Back" and "Cancel" enabled.
I understand that I miss something, but can't find what.
Please help me a bit.

Thanks,
Alex.
kernel23 is offline   Reply With Quote
Old 17th May 2003, 15:38   #2
Afrow UK
Moderator
 
Afrow UK's Avatar
 
Join Date: Nov 2002
Location: Surrey, England
Posts: 8,434
So your custom page goes in before the finish page?
You will need to write to the ioSpecial.ini file in your custom page function like so:
code:

Function IconsPage
...other stuff here...
!insertmacro MUI_INSTALLOPTIONS_WRITE "ioSpecial.ini" "Settings" "BackEnabled" "0"
FunctionEnd



The ioSpecial.ini file is MUI's InstallOptions file that it uses for its own pages (e.g. Welcome / Finish pages)
This should hopefully work.

-Stu
Afrow UK is offline   Reply With Quote
Old 17th May 2003, 15:59   #3
kernel23
Junior Member
 
Join Date: May 2003
Posts: 4
Yes, my custom page goes before finish page.

And I have written "Function IconsPage" already and my page works and shows fine.

My question is :

"Why Finish page which described as :
code:


!define MUI_FINISHPAGE
!define MUI_FINISHPAGE_RUN "$INSTDIR\EMPI.exe"
!define MUI_FINISHPAGE_NOREBOOTSUPPORT

and shows after custom page with

...
Page custom IconsPage
!insertmacro MUI_PAGECOMMAND_FINISH



has enabled "Back" and "Cancel" buttons???"

How could I fix this error? (Make them disabled).
kernel23 is offline   Reply With Quote
Old 17th May 2003, 17:15   #4
Joel
Debian user
(Forum King)
 
Joel's Avatar
 
Join Date: Jan 2003
Location: Arch land
Posts: 4,917
maybe attaching the hole script we can review it.


* PC: Intel Core 2 DUO E6550 @ 2.33 GHz with 2 GB RAM: Archlinux-i686 with MATE.
* Laptop: Intel Core 2 DUO T6600 @ 2.20 GHz with 4 GB RAM: Archlinux-x86-64 with MATE.
Joel is offline   Reply With Quote
Old 17th May 2003, 17:45   #5
kernel23
Junior Member
 
Join Date: May 2003
Posts: 4
My script is very simple
I've modified standart example to make it work as mine.

I found that "Cancel" button is enable when
present "!define MUI_FINISHPAGE_RUN" - I think it's not correct.

But all questions stay.
Attached Files
File Type: nsi installoptions.nsi (4.2 KB, 129 views)
kernel23 is offline   Reply With Quote
Old 17th May 2003, 18:09   #6
Afrow UK
Moderator
 
Afrow UK's Avatar
 
Join Date: Nov 2002
Location: Surrey, England
Posts: 8,434
Just put this in your IconPage Function.
code:

!insertmacro MUI_INSTALLOPTIONS_WRITE "ioSpecial.ini" "Settings" "BackEnabled" "0"



This should fix it.
The reason it enables the back button, is because you have a custom page befor eit.
Just ike if you put a custom page beforea Directory page, you would be allowed to go back.
The Finish page is actually a Custom InstallOptions page too, but because it comes after the InstFiles page as default, the back button is always greyed out.
The piece of code will tell InstallOptions to grey out the back button on the finish page no matter where the finish page is.

-Stu
Afrow UK is offline   Reply With Quote
Old 17th May 2003, 18:23   #7
kernel23
Junior Member
 
Join Date: May 2003
Posts: 4
Ok
I did not thank you for the back button. Works fine. Great thanks.

Only problem with "Cancel" button remains.
Is it possible to disable it too or it's a bug?
kernel23 is offline   Reply With Quote
Old 17th May 2003, 18:41   #8
kichik
M.I.A.
[NSIS Dev, Mod]
 
kichik's Avatar
 
Join Date: Oct 2001
Location: Israel
Posts: 11,343
Take a look here for the answer:
http://forums.winamp.com/showthread....hreadid=134996

NSIS FAQ | NSIS Home Page | Donate $
"I hear and I forget. I see and I remember. I do and I understand." -- Confucius
kichik 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