Skip to content
⌘ NSIS Forum Archive

NSIS 2 - Beta 0 is out!

202 posts

Joost Verburg#
Again, some compile errors (MS Visual C++ 6.0 SP5)

DialogTemplate.cpp
D:\Program Files\NSIS\Source\DialogTemplate.cpp(197) : error C2065: 'IS_INTRESOURCE' : undeclared identifier

ResourceEditor.cpp
D:\Program Files\NSIS\Source\ResourceEditor.cpp(374) : error C2065: 'IS_INTRESOURCE' : undeclared identifier

makensis.exe - 2 error(s), 0 warning(s)
SmartyMan#
When adding "LoadLanguageFile ...\English.nlf" to my script, I get this compiler output:
9 warnings:
unknown variable "\r$\n$\t"$0"$\r$\nHit" detected, ignoring
unknown variable "\n$\t"$0"$\r$\nHit" detected, ignoring
unknown variable "\t"$0"$\r$\nHit" detected, ignoring
unknown variable "\r$\nHit" detected, ignoring
unknown variable "\nHit" detected, ignoring
unknown variable "\r$\nretry" detected, ignoring
unknown variable "\nretry" detected, ignoring
unknown variable "\r$\nignore" detected, ignoring
unknown variable "\nignore" detected, ignoring
These are portions of english.nlf, line 36
Adding a "FileErrorText" command makes the warnings disappear.


Using the new multi-language concept, how will I get my Section names localized (e.g. "Section Examples" should show an entry named "Beispiele" on german systems)?
SmartyMan#
Originally posted by Sunjammer
You could try doubling up the $ characters so that they aren't mistaken for variables.
The file english.nlf is part of the nsis installation, its not one of my files and so I cant make changes to it (w/o loosing them when installing the next nsis update).
kichik#
Joost, please download the Platform SDK untill I release the next version (MSDN doesn't say anything about it... just assumes you have it =/).

SmartyMan, there is indeed a small bug. What I don't understand is why it didn't happen before 🧟 I just did copy & paste.
lang.cpp 378: remove ",0".
And that subcaption thingy:
script.cpp 1608 change "> 2" to "> 4".

Another version with these fixed will be out soon.

[quoteUsing the new multi-language concept, how will I get my Section names localized (e.g. "Section Examples" should show an entry named "Beispiele" on german systems)?[/quote]
Please answer the surveys. It is in there.

And thank you for doing the translation. It too will be included in the next version.
CodeSquid#
I've just seen the NSIS_CONFIG_PLUGIN_SUPPORT switch in the config.h in the latest repositiory version. That's a really nice feature, thanks for adding it, it will be really useful in my installers.

But I've also found a small bug (don't know if it already exits in the official NSIS versions, have not tried yet):
While writing an extension DLL which adds some lines to the list box during installation, I've found a small problem:
After the DLL has added some lines to the list, all further lines added by NSIS itself (by DetailPrint for example) don't go to the end of the list.
I've found the reason for this problem: Look at the function update_status_text in ui.c and you'll see the following line:
new_item.iItem++;
It increases the item index after adding an item. The problem is that this function does not know that my extension DLL has changed the number of lines so that the index is too low.
Please apply this fix to your great NSIS branch:
Remove the line "new_item.iItem++;" and add "new_item.iItem=ListView_GetItemCount(insthwnd);" before ListView_InsertItem...
This always set's the index to the end of the list.
Sunjammer#
NSIS_CONFIG_PLUGIN_SUPPORT is an expirimental idea of mine which is why it shows up in the CVS but is not part of any releases yet. If you haven't already seen this thread please take a look http://forums.winamp.com/showthread....threadid=96856
thomas.lentzsch#
Cannot compile with v2a3

I cannot compile make.nsi included in the attachment make.zip with NSIS 2.0a3. It runs good under v1.99.
veekee#
1st : i did not know how to use LoadLanguage... that's OKay now 😉 ! Fine, this works really good 😁

About Name.. the following script does not fully compile under v2a4, althought display will be fine...

Well, by the way : here is a multi-language script example 😁

Compiler returns : "1 warning: Name command not specified. Assuming default."

Name /LANG=1033 "Example1"
Name /LANG=1036 "Exemple1"
LoadLanguageFile "${NSISDIR}\Contrib\Language files\French.nlf"
LoadLanguageFile "${NSISDIR}\Contrib\Language files\English.nlf"
OutFile "example1.exe"
InstallDir $EXEDIR

LicenseText /LANG=1036 "This installer will install the Nullsoft Tiny Visualization 2000 Plug-in for Winamp. Please read the license below."
LicenseText /LANG=1033 "Ceci installera Nullsoft Tiny Visualization 2000 Plug-in pour Winamp. Veuillez lire la licence ci-dessus."
LicenseData /LANG=1033 license.txt
LicenseData /LANG=1036 licensefr.txt

DirText /LANG=1036 "Ceci installera un exemple1 très simple sur votre ordinateur. Choisissez un répertoire"
DirText /LANG=1033 "This will install the very simple example1 on your computer. Choose a directory"

Section "ThisNameIsIgnoredSoWhyBother?"
SectionEnd ; end the section
; eof
Zaraza#
Scary!

It's just plain scary to see what you guys can do in the space of 1 week with a SourceForge account! 😱

Can't wait till the

MakeCoffee strong | weak | decaf

command gets added to the next alpha,
which would make NSIS totally complete!
Sunjammer#
It's much easier to get your head down and code this stuff when you know that people will appreciate your efforts and the NSIS community seems to be especially good for that.
Joost Verburg#
Alpha 4 gives these compile errors:

D:\Program Files\NSIS\Source\DialogTemplate.cpp(197) : error C2065: 'ULONG_PTR' : undeclared identifier

D:\Program Files\NSIS\Source\ResourceEditor.cpp(374) : error C2065: 'ULONG_PTR' : undeclared identifier
kichik#
Veekee, thanks, now I know what the bug is. Will be fixed in next version 🙂 For now, put Name after LoadLanguageFile, it should solve it and some other issues that might occur because of this bug.

Joost, please download the platform SDK (from MS), your header files are outdated (according to MSDN =/). I will try to make next version comptibale with the old header files.
SmartyMan#
Originally posted by kichik
NSIS 2.0a4 will be uploaded in 3 minutes.
- The SubCaption bug is gone, but the FileErrorText bug is still there.

- Section names: i saw the survey now, thanks for that hint - so your answer is "there is no concept for this at the moment"?
If so, thats OK, I just ask because your "its in there" sounds to me like "you can read about the solution to your problem there". I am new to sourceforge, so I hope that I didnt miss something there.

- New bug: compile example1.nsi and look at the "space available/required" values... (values are switched)
now, compile example2.nsi and look at the same detail ('available' is visible and shows required value, 'required' label and value are invisible)

- Another bug (existing at least since V1.97): "SetCompress off" doesnt work when using bzip-2 as compressor;
motivation: on my old computer (Athlon 700), the compression of my installation took 55s(!), on my current system (Athlon XP 2000+) it takes 22s.
So, while styling the interface and testing the installer I'd like to use an uncompressed .exe (created in about 2s)
Joost Verburg#
Originally posted by kichik
Veekee, thanks, now I know what the bug is. Will be fixed in next version 🙂 For now, put Name after LoadLanguageFile, it should solve it and some other issues that might occur because of this bug.

Joost, please download the platform SDK (from MS), your header files are outdated (according to MSDN =/). I will try to make next version comptibale with the old header files.
NSIS 1.x always worked with these header files, I think it's good to make it compatible with these ones (MS Visual C++ 6.0 SP5).
kichik#
Another bug (existing at least since V1.97): "SetCompress off" doesnt work when using bzip-2 as compressor;
motivation: on my old computer (Athlon 700), the compression of my installation took 55s(!), on my current system (Athlon XP 2000+) it takes 22s.
So, while styling the interface and testing the installer I'd like to use an uncompressed .exe (created in about 2s)
This is not a bug. NSIS bzip2 uses compress whole and as a result can't compress just a few blocks here and a few block there. Disable compress whole and you will get the wanted results, although bzip2 will be useless then AFAIK.

The idea of different section names for each language exists, I just want to see if people are interested using the survey.

I will look into the other bugs.

Joost, I have no idea why Microsoft added these basic #defines only in their latest version... In the next version I will add a header file for older compilers. Could you please send me a list of what #defines your header can't find? (if it stops after one just define a dummy value for the one it stopped at).
eccles#
Does the ability to change section names not already exist? (SectionSetText). Or is the survey more specifically about the use of /LANG= with Section commands?

I hope Justin acknowledges the huge amount of work you've been putting into this and includes most, if not all, of it in future official NSIS releases.

Dave.
Sunjammer#
It will be nice to get Justin's opinion. I'm not sure that the amount of effort put in necessarily obligates it's inclusion in the core stream but I'd hope that's the way it goes.

Until Justin returns NSIS 2 is practically the official NSIS anyway 😛
kichik#
Does the ability to change section names not already exist? (SectionSetText). Or is the survey more specifically about the use of /LANG= with Section commands?

I hope Justin acknowledges the huge amount of work you've been putting into this and includes most, if not all, of it in future official NSIS releases.

Dave.
You are right, it does exist. I guess it means less work for me 😁
The survey did talk about Section /LANG=...

I too hope Justin will acknowledge this. He hasn't answered nither he read any of my PMs yet... =/
veekee#
I have a strange question, which is totally different from the upper posts !
Well, i wanted to know why the log feature could only be used with a silent install !
Well, why can't a log file be used during a normal installation ? I can't figure why this is not possible.... well, that's just a question (and maybe a modification in NSIS2 😉 ) !!!
kichik#
Veekee it has already been added... Have a look at NSIS 2.0a3 release notes. 'LogSet on' now creates a log file if not already created, that means you don't have to do it in silent mode.
veekee#
woo, sorry ! As i'm writing a tutorial for the french community, i was using my *old* french 1.98 😁 ! Sorry about it 😉 and thanks about this implementation 😉 !
matini#edited
The installer compiled with 2.0a4 displays wrong space texts.
ex.
Wrong:
Space available:2.6MB
Space required:2.2GB

correct:
Space required:2.6MB
Space available:2.2GB

should reverse the two lines in NSL files?

also,with custom InstType:
Wrong:
Select components to install:
Or, ...

Correct:
Select the type of install:
Or, ...
kichik#
Thanks but SmartyMan have alreayd mentioned that... I am working on it. Replacing the lines in the NLF should solve it, for now.
SmartyMan#
This is not a bug. NSIS bzip2 uses compress whole and as a result can't compress just a few blocks here and a few block there
OK, maybe you should add a short note about this in the docs then.

The idea of different section names for each language exists, I just want to see if people are interested using the survey.
Hm, which sense does it make to use the native language of the user in the entire installer - except for the components list?
Sunjammer#
Use SourceForge!

KiCHiK said:
Thanks but SmartyMan have alreayd mentioned that
This is not the first time this has happened in this thread I'm sure. Could people please use the bug logging facilities at SourceForge to :-
  • see if a bug has already been logged
  • log new bugs
  • track the status of existing bugs

The bug tracker can be found here :-
http://sourceforge.net/tracker/index...62&atid=489679.

note: by default the bug tracker only shows OPEN bugs - to see ALL bugs change the Status drop down to Any.
kichik#
People, Sunjammer is right... Please use SourceForge.

Newest version is available on CVS. Switched strings, FileErrorText bug have been fixed. ChangeUI can now change other dialogs too.
kichik#
Newest CVS version allows changing all of the dialogs in NSIS. It also allows you to make the installer show a specific text in the container dialog (105) using UseOuterUIItem. You can also set the text of an item in the container dialog using 'SetDlgItemText (inner|outer) item text'.

The language choosing mechanism now checks to see if a language of the same primary language is available before falling back into the default. I am still thinking of a way to make .onSelLanguage show some kind of dialog before any other dialog was created.

BTW, header size still is 37KB 😁