- NSIS Discussion
- And the NSI file says "Fix me!"
Archive: And the NSI file says "Fix me!"
Snover
1st May 2003 03:50 UTC
And the NSI file says "Fix me!"
Okay, I'm just about ready to go off the deep end on this one. Anyone that can fix any or all of these problems PLEASE post, heh.
Problem #1: Adding any other languages besides English causes the license to not show up.
Problem #2: Check to see if an old version of the program is installed (by checking registry keys of the old MSI installer) does not work.
Problem #3: DLLs are not registering successfully (yes, I am running as Admin).
Problem #4: Does not remove its uninstall keys from the registry.
Problem #5: I cannot detect if a DLL failed to unregister on uninstall since for whatever reason the Error flag is always on (even at the beginning of the section when I run ClearErrors!).
Problem #6: !insertmacro MUI_UNPAGECOMMAND_CONFIRM doesn't work. (But maybe that's because I wrote !define MUI_UNCONFIRMPAGE something.)
If someone could also clarify for me how the heck to define an end to a label, I'd be much obliged.
On the upside, files actually copy, and, the interface works and only the things I tell it to copy copy and the registry keys install.
Sunjammer
1st May 2003 08:41 UTC
An end to a label? What an Earth does that mean? A label is a position which can be "goto"'d to. It doesn't have a start or an end, it's just a position.
kichik
1st May 2003 11:03 UTC
1) You have to include a license for every language. Using the same license for all languages is not possible yet (in one command... You can always load the same license for all of them).
2) You should check for an error right after the first ReadRegStr call and not after both of them. Unless I am wrong and you have wrote both registry keys, one of them will always fail and cause your script to think there are no previous installations.
3) I need a bit more information... What's the error?
4) Is the error flag set?
5) UnregDLL sets the error flag if the DLL couldn't be loaded, the function was not found (DllUnregisterServer), or the functions didn't return S_OK (0).
6) What's the error?
Snover
2nd May 2003 17:29 UTC
Originally posted by kichik
1) You have to include a license for every language. Using the same license for all languages is not possible yet (in one command... You can always load the same license for all of them).
Ah. Okay. Except, you see, I was using English language and it was not appearing.
2) You should check for an error right after the first ReadRegStr call and not after both of them. Unless I am wrong and you have wrote both registry keys, one of them will always fail and cause your script to think there are no previous installations.
Good point. Fixed. :D
3) I need a bit more information... What's the error?
Let me read out the error and get back to you on this one.
4) Is the error flag set?
Possibly. Not sure. Will check along with #3.
5) UnregDLL sets the error flag if the DLL couldn't be loaded, the function was not found (DllUnregisterServer), or the functions didn't return S_OK (0).
6) What's the error?
No error, it just doesn't try to confirm, but I think this was an error on my part.
Regarding labels, ah, is that right? Well, what a pain. :P I figured that they were akin to C cases. I guess I'll just put gotos at the end of each of them, then. I really wish NSIS was a bit more like an upper-level programming language (honestly, strip and make some tweaks to PHP and you've got the perfect installation system) but c'est la vie. It's a lot easier than any of the others. :P
kichik
2nd May 2003 17:36 UTC
Ah. Okay. Except, you see, I was using English language and it was not appearing.
Attach an example that shows this, the example above has only one language.
Snover
2nd May 2003 17:37 UTC
Just uncomment the other languages. :)
kichik
2nd May 2003 17:41 UTC
I don't have any of the files the script wants, and it does work with the examples. Attach a minial example that uses NSIS's license (${NSISDIR}\license.txt) and then I'll be able to see where the problem is.
Snover
2nd May 2003 18:32 UTC
It works fine when I specify /LANG, but not if I don't.
Anyway, where would the error be if things weren't registering? I printed out $0 through $9 and they're all null except for one of them ($1) that contains the registry string that is supposed to be in there.
kichik
2nd May 2003 18:36 UTC
You have to specify /LANG or else NSIS won't know which language the license file should be used in. If /LANG isn't specified it uses the last used language which in your case was Turkish.
If there isn't any error in the details window, and non in the error flag then something went wrong in your function. Maybe it's the working directory. Use SetOutPath to set the working directory.
Snover
2nd May 2003 18:54 UTC
Originally posted by kichik
You have to specify /LANG or else NSIS won't know which language the license file should be used in. If /LANG isn't specified it uses the last used language which in your case was Turkish.
Ah. That makes sense. Well, I found a bunch of unofficial GNU GPL translations, so whee. :P
If there isn't any error in the details window, and non in the error flag then something went wrong in your function. Maybe it's the working directory. Use SetOutPath to set the working directory.
SetOutPath is set from the start to $INSTDIR. I ran this on a system that an old version of VDMS was installed on without uninstalling it first, so, maybe it just didn't complain because the stuff was already registered. Will try again and get back to you.