![]() |
Mui_page_directory
I have a problems.
1. in my installer i setup my files and Firebird. First i use ExecWait tu setup firebird. After then i show MUI_PAGE_DIRECTORY and add path of Firebird there. PHP Code:
When user change path in this field installer copy file not in new path, it use old path ($test_val). 2. How can i change value (space required) on directory page ? Thanks! |
Sections are executed in the INSTFILES page. Therefore, whatever changes you make to $test_val after the INSTFILES page will not affect anything run in sections.
|
thx very mach!
and what to do? how about number 2 question? |
That's a sum of the size required by each selected section. To change the size required by a section, use AddSize or SectionSetSize on runtime.
|
thx again.
and how use 2 directory page? show different path in each of them, and different free space requirement and diferent files install? thanks! |
PS and how connect 1 section to 1 directory page?
sorry for so many questions |
To show a different path, use MUI_DIRECTORYPAGE_VARIABLE as you already have and modify that variable so it's different than $INSTDIR.
To handle the required space, you must unselect all of the sections you don't want installed before showing the directory page. This way, their size won't be in the sum and they won't be executed. See the following example. http://nsis.sourceforge.net/Two_inst..._one_installer |
how can i change install path in directory page if before then i set MUI_DIRECTORYPAGE_VARIABLE
|
Change the variable that you pass on to MUI_DIRECTORY_VARIABLE. In your example, it should be:
code: |
:( it is not worked
|
What exactly didn't work? What exactly did you do? I can't help you without any details.
|
function .oninit start before then i get $test_val, because
$test_val i can get, after installer setup firebird |
Then set it once you get it, as long as it's set before the directory page that uses it shows.
|
thx, i did it( for example i setup before directory page c:\Firebird\data), but if user change path in directory page (for example d:\temp\), installer put my file .....
into c:\Firebird\data anyway. :cry: how can i do it? |
If it put the file in that directory, you told it to put it there. Try following the logic of your installer with message boxes so you see exactly when everything is executed. For example, add a message box saying "installing into test_val $test_val" and you'll see where and when it copies the files there.
Also read the tutorial for details about how everything works together. Pay special attention to Script Execution. |
Is someone know, how change MUI_DIRECTORYPAGE_VARIABLE from
MUI_PAGE_DIRECTORY . thx |
This is in the MUI documentation:
Just insert !define MUI_DIRECTORYPAGE_VARIABLE $yourvariable just before you add the page. Take some time to read through the rest of the MUI documentation included with NSIS. And see Kichik's last reply. There is a lot of good info out there--you just have to reach out and grab it. :up: |
I read it, i use logic whith MessageBox, but i dont understend how chenge the path
PHP Code:
|
please, try to use my code.
maybe it is error there |
Well, right off the bat, I see some syntax errors with your use (or lack of) the backslash character:
Examples:
|
Comperio
thx, but it is not syntax error(that errors appear when i insert my code in forum- message), it is logical error. Becauese, when appeare MUI_PAGE_DIRECTORY it is use path from MUI_DIRECTORYPAGE_VARIABLE (it is equal $test_val) BUT WHEN USER CHANGING PATH, AND NEW PATH APPEAR IN PATH-LINE ON PAGE, installer use old path (it is equal $test_val) why??????????????????????? |
Sorry, I didn't realize using [php] stripped the backslashes... (I guess this shows that [code] should be used instead of [php] in the forums when dealing with NSIS code.)
So back to your question: Do you expect something to happen execute after MUI_PAGE_DIRECTORY? If so, you need to add a function for that. Since you already used the sections when you inserted MUI_PAGE_INSTFILES, you'll have to execute the 2nd part using a leave function (which you can define with MUI_PAGE_CUSTOMFUNCTION_LEAVE) |
Where in that example do you use $test_val beyond the directory page? It's set in the sections, displayed and modified by the directory page and then ignored.
|
please show me how to do it.
thx |
That strictly depends on what you actually want to do. You let the user modify $test_val and then do nothing with it. What do you want to do with it?
|
yes. i want move File "B2.FDB" to user input path
|
Then why is the directory page after the instfiles page where the copy itself is made? If it's only for that ReadRegStr, put it in .onInit.
code: |
no!
i setup firebird in my installer, after .oninit. |
If it's just the one file you want to copy, then I'd try this: First, remove this code from the end of your section:
code: then try this: code: Or, if the FDB file is large and you want to see some progress, you could use the CopyFiles function to copy the file and then delete the file in the original location. |
Comperio, thx but no, i show a part of code. i cann't do your variant.
Maybe someone know how move only some file to place in path string ? |
You can have your installer gather all of the required installation details for Firebird and pass them on to their installer.
This way, you can show the directory page before the instfiles page and know exactly what the Firebird installer did.code: |
thx all!!!!!!!!!!!!!!!!!!!!!!
I do it! If it is interesting i'll show it there.(its Comperio variant whith some changes) thx all!!!! |
| All times are GMT. The time now is 04:10. |
Copyright © 1999 - 2010 Nullsoft. All Rights Reserved.