Archive: Error when trying to compile


Error when trying to compile
Hi.
I'm new to the program and i have an error when trying to compile my nsi:

Error: resolving install function "Nsis2Io" in function "mui.WelcomePre_26.5.9"

I'm using the Modern UI in it.

Any idea of why im getting this?


You must have a call to Nsis2Io in your code - which doesn't exist? There isn't any references in MUI.nsh or MUI2.nsh.

Stu


I'm using the MUI.nsh.
I've searched in the System.nsh file and i founded this:

http://img379.imageshack.us/img379/9237/errorgr1.jpg

It says something about an uninstaller.


Well, i have decided not to use MUI.
Now my installer is running well.
But i still having a problem.
I want to add a file to the installer, to use it later (at the end of the installation).
I've tried using ReserveFile "name.exe" at the begining of the script, and later use Exec "name.exe" on the .onInstSucces function.
This works if the file exists in the nsi folder.
Then i tried removing the exe from the folder, and it did not work.

Any idea of how to do this?


ReserveFile doesn't actually extract but only adds the file to the compressed block. Use File instead.


I can't reproduce your original issue. Can you attach a script that demonstrates this?


Sure, here i wrote a script:

Name "Test"
InstallDir "C:\TestFolder\"
OutFile "Test.exe"
ReserveFile "name.exe" ; <--------------------

Page components
Page directory
Page instfiles

Function .onInstSuccess
Exec "name.exe" ; <--------------------
FunctionEnd

Section "Message"
MessageBox MB_ICONINFORMATION "Test Message"
SectionEnd
Just try doing it.
I won't work if the file "name.exe" doesn't exists until the run-time.

That's because ReserveFile doesn't actually extract. You must use File for that.

But I wasn't asking about that, I was referring to the original problem for which you opened this thread.


But I wasn't asking about that, I was referring to the original problem for which you opened this thread.
I modified my script.
But i'm sure is something about Modern UI.

That's because ReserveFile doesn't actually extract. You must use File for that.
You did not understand me.
This is what i want to do:

1)Put/add a file to the installer.
2)At the end of the instalation, execute that file that is INSIDE of the installer.
I want to attach a file to installer and later use it.

Can i do that?

You have to extract the file in order to execute it. You can't execute it from inside the installer. To extract it, use File.


Great, that works.
I used File "name.exe" to extract it, then i used ExecWait "name.exe" and then Delete "$INSTDIR\name.exe".
It works well.

Thank you very much.


Now i have another doubt.
I have readed somes scripts but i still can't understand how to change the description of a section.

How can i do this?


In runtime?
See Docs.


That's one of the scripts i've readed.
In fact, i did not understand it at all.

Can someone explain me the script?


That's a hard task when not using the MUI and requires knowledge of Win32 API. Without using the MUI, you don't even have a place to put the descriptions.

In short:


I'm gonna try to do it, but i'll have to read a lot.

Thanks again.


Re: Error when trying to compile

Originally posted by Biasoli
Error: resolving install function "Nsis2Io" in function "mui.WelcomePre_26.5.9"
I just had the same problem. It occured when I remmed the line
!insertmacro MUI_LANGUAGE "CustomLanguagefile1"
Enabling the line back again solved it. Disabling the Finish page also solved it.

It's got to have something to do with cross-version format changes of the language files, but I don't understand why it would give errors if I remove the entire line. After all, it should just use the default language then, right? And that should always work with the currently installed version of NSIS, right? (Unless the installer failed to overwrite it, but I have no reason to assume that.)


Edit: Note that my CustomLanguagefile1 was a copy from the *new* English languagefile, with one line edited. So it should be 100% new-version-compatible.

I don't understand what you've done to get this error. Please attach an example script.


I know why.... you have to insert your MUI_PAGES BEFORE including the MUI_LANGUAGE ...

If you run MUI_LANGUAGE before the MUI_PAGES => error to resolve Nsis2Io..


Gal'


That's strange, because kichik just told me in the channel that it needs to go AFTER the page declarations.

Either way, the problem occured for me when I disabled the language define, which is of course the very point - MUI doesn't default to a language, it needs the define. So pebkac, once again.


? you didn't understand what I wrote ?

you have to insert your MUI_PAGES BEFORE including the MUI_LANGUAGE ...
That's strange, because kichik just told me in the channel that it needs to go AFTER the page declarations.
It is the same thing.... MUI_PAGES come first then MUI_LANGUAGE and LangString.

And do not skip MUI_LANGUAGE declaration !!!

Following code is right:

!include "MUI.nsh"

Name "Modern UI Test"
OutFile test.exe
XPStyle on


!insertmacro MUI_PAGE_WELCOME
!insertmacro MUI_PAGE_INSTFILES
!insertmacro MUI_PAGE_FINISH

!insertmacro MUI_LANGUAGE "English"
!insertmacro MUI_LANGUAGE "Dutch"


LangString msg ${LANG_ENGLISH} "English msg"
LangString msg ${LANG_DUTCH} "Dutch msg"


function .onInit
!insertmacro MUI_LANGDLL_DISPLAY
functionEnd

section "Silent" SILENT_SEC
MessageBox MB_OK "$(msg)" ; $() instead of ${}
sectionEnd


Following code generates Nsis2io error:

!include "MUI.nsh"

Name "Modern UI Test"
OutFile test.exe
XPStyle on


!insertmacro MUI_LANGUAGE "English"
!insertmacro MUI_LANGUAGE "Dutch"

!insertmacro MUI_PAGE_WELCOME
!insertmacro MUI_PAGE_INSTFILES
!insertmacro MUI_PAGE_FINISH


LangString msg ${LANG_ENGLISH} "English msg"
LangString msg ${LANG_DUTCH} "Dutch msg"

function .onInit
!insertmacro MUI_LANGDLL_DISPLAY
functionEnd

section "Silent" SILENT_SEC
MessageBox MB_OK "$(msg)" ; $() instead of ${}
sectionEnd


Gal'