Archive: NSIS 2 - Beta 0 is out!


NSIS 2
It is ready! My modifications of NSIS 2. Everything that was in NSIS 1.99 and even more. To see what's new go here.

This time it is hosted on SourceForge. CVS will be available soon. Project page can be found here

Download your copy here.
Request features here.
Post bugs here.
Click here to monitor this package (if you have a SourceForge account).

I will keep you updated on developments both here and on SourceForge. Please try to put all bug reports/requests on SourceForge.


Please answer this survey, it is about multiple languages:
http://sourceforge.net/survey/survey...urvey_id=13396


Originally posted by kichik
Please answer this survey, it is about multiple languages:
http://sourceforge.net/survey/survey...urvey_id=13396
Am I the only one not having a sourceforge account? :eek:

As I said before: if you need assistance with a german translation I'll be happy to help :)

as i explained to Kichik, i offer my help for the french transaltion ! Yeh, officially said :D ;)


CVS (latest development version) available here

User made UIs available here.


Great work!

The included source has some compile errors, can you fix 'em? :)

Other suggestions:

* A command to change the license, directory etc. dialogs
* A text on the top of the 'Browse For Folder' dialog


What compile errors? What compiler?

Suggestions added into todo list. Next time please use SourceForge.


I'm using MS Visual C++ 6.


NSIS\Source\exehead\Ui.c(554) : error C2065: 'IDC_HAND' : undeclared identifier
NSIS\Source\exehead\Ui.c(554) : warning C4047: 'function' : 'const char *' differs in levels of indirection from 'int '
NSIS\Source\exehead\Ui.c(554) : warning C4024: 'LoadCursorA' : different types for formal and actual parameter 2
NSIS\Source\exehead\Ui.c(634) : error C2065: 'BIF_NEWDIALOGSTYLE' : undeclared identifier

I'll use SF next time. ;) Should I submit suggestions I made earlier again (Build-in splash screen) ?

thank you so much, kichik! if you are looking for a german translation, let me know :)


Download ui.c from the CVS. It should solve that.

You don't need to resubmit anything, I have it all written down.


Multiple languages in one installer option is almost ready.
So here is yet another small teaser :D


Great, I'll wait for the next release :D When it is possible to customize all the dialogs, I'll make a modern-style UI for NSIS (like Inno Setup, InstallShield etc.).


Found another one :)

You should remove this from the NSIS install script:


WriteRegStr HKCR "NSISFile\shell\compile-bz2" "" "Compile NSI (with bz2)"
WriteRegStr HKCR "NSISFile\shell\compile-bz2\command" "" \
'"$INSTDIR\makensisw.exe" "$INSTDIR\makensis.exe" /CD /X"SetCompressor bzip2" "%1"'

Kichik, thought about BiDi support?(Hebrew, Arabic, etc...) Should go from right-to-left in those cases.

I'm sure you've noticed that in the image you posted here... ;)


Joost, I left it there for backward support, it works.
Nant, when I finish writing ChangeUI (make all dialogs changeable), you will be able to load a BiDi UI for Hebrew, Arabic and all others.


Another survery. This time about mutliple languages.

Please answer: http://sourceforge.net/survey/survey...urvey_id=13412


as we would be able to select language, i hope, we would be able to set visible or invisible this page ;) !


At the moment you can't select a language. You can only select the default if the user's default language doesn't match any of the languages you inserted into the installer.

What page are you referring to?


Well, as you were talking about a .onLanguageSelect function, i though there would be a special page, with a listbox, that would have allowed the user to select one of the available language !
We could use InstallOptions to do so, i know ! If so, what would be the use of such a function ?


If people vote yes for that option, you will be able to create an InstallOptions page to select the language.


So OK :D
I voted "Yes" (more work to do ;)..... :D) !


Originally posted by kichik
Joost, I left it there for backward support, it works.
Nant, when I finish writing ChangeUI (make all dialogs changeable), you will be able to load a BiDi UI for Hebrew, Arabic and all others.
Oops, I see, it does not use makensis-bz2 anymore :) Maybe you can make it optional in the installer.

I don't think it should be optional, it is very convenient and helpful.


Alpha 3 is out!

Added LoadLanguageFile
Added $LANGUAGE
Added /LANG option to string setters (Name, Caption, etc.)
'LogSet on' now builds a log file if not already created

Links can be found in the first post of this thread.


1) It shows NSISv2a2 during install !
2) this fails during copy, just after Output Dir ! Seems to be like an infinite loop (my system resources goes down ....) !


Big oops :(
Working on it... [edit]Done! Thanks veekee[/edit]


greaaat ! thanks a lot ...
:up:

But there are no example of language use :( !

BTW : great :up:


OK... lets go :
1) if LoadLanguage is not the first command, it seems that Name is skipped during compilation ...
2) LoadLanguage can only be used ouside a function .... This means that i can't write (in C++ style):
if($LANGUAGE==1036)
LoadLanguage "French.nlf"
else
LoadLanguage "English.nlf"

Currrently, the function is used during generation, not during the install process !

3) would we able, if language is set on-the-fly, to be able to use different LicenseText, depending of the language ?

4) how work $LANGUAGE ? Is the the language of the language file, of the one of the system ?

Thanks a lot ;)


LoadLanguageFile was meant to be used outside of functions. It doesn't make any sense to load it by the installer. $LANGUAGE is the lagnuage used on the user system. It is there to let you choose if you want to display a message in French or English.

LicenseText alreayd have a /LANG option so you can set different license texts for each language. You can also set different license data files for each language.

I will look into that name problem. [edit]Works for me... please try again[/edit]


Bug
When using makeNSIS V2.0a3 with this code:
37 SubCaption 0 ": Lizenz-Vereinbarung"
38 SubCaption 1 ": Installations-Optionen"
39 SubCaption 2 ": Installations-Verzeichnis"
40 SubCaption 3 ": Installiere Daten"
41 SubCaption 4 ": Installation abgeschlossen"

I get this error message:
Usage: SubCaption [/LANG=lang_id] page_number(0-4) new_subcaption
Error in script "G:\Programme\Smarty\Smarty.nsi" on line 40 -- aborting creation process
After removing the lines 40 and 41 (SubCaption 3 & 4) my installer compiles w/o error messages.


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)

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)?


You could try doubling up the $ characters so that they aren't mistaken for variables.


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).

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 :igor: 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.


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.


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


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.


SectionDivider is not available in NSIS 2.

NSIS 2.0a4 will be uploaded in 3 minutes.


1st : i did not know how to use LoadLanguage... that's OKay now ;) ! Fine, this works really good :D

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 :D

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

Archive: NSIS 2 - Beta 0 is out!


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

Can't wait till the

MakeCoffee strong | weak | decaf

command gets added to the next alpha,
which would make NSIS totally complete!


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.


great tools mean great communities... :up:


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

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.


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)

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).

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).

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.


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 :p


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 :D
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... =/

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 ;) ) !!!


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.


woo, sorry ! As i'm writing a tutorial for the french community, i was using my *old* french 1.98 :D ! Sorry about it ;) and thanks about this implementation ;) !


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, ...


Thanks but SmartyMan have alreayd mentioned that... I am working on it. Replacing the lines in the NLF should solve it, for now.


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?

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.

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.


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 :D


In the new release (2.0a4), both the required and available space text are inversed (read : Available Space : 1.8mb, Required Space : x GB !)...

I just realised that this also applies to 2.0a3 as well. I was previously having a2, that release DID NOT have this small bug.


bug in NSIS 2 a4
If DirText is not set then the installation starts automatically.

(Posted on SourceForge, too)

Example:


LoadLanguageFile German.nlf
Name "TEST"
OutFile "Setup.exe"
Caption "TEST"
Icon setup.ico
CRCCheck on
InstallDir '$PROGRAMFILES\Test'
DirShow show
AutoCloseWindow true
ShowInstDetails show
ShowUninstDetails show

Now the section "TEST" and "Uninstall"


I have answered both of you at SourceForge. There is no need to post here too if you post on SourceForge.


Hi kichik,

thanks for your answer.

But it's outdated to use DirText.
Now I'm using five different language files and so I don't use DirText. You should look at this.

Ramon :p


I got a strange problem using the latest CVS version.

Makensis.exe Revision 1.8 works fine, but later revisions don't work at all. When I try to start a compiled installer, it just enters an infinite loop (100% CPU usage), and nothing happens. A MessageBox at the beginning of onInit doesn't show up.


I guess I only uploaded the source that solves this problem... New makensis.exe that should solve this problem is up (at CVS). Please use SourceForge next time.


Originally posted by kichik
I guess I only uploaded the source that solves this problem... New makensis.exe that should solve this problem is up (at CVS). Please use SourceForge next time.
Thanks :D

Alpha 5 is finally out!

Please post bug reports and feature requests at SourceForge.

Change log:

  • Added UseOuterUIItem
  • Enahanced ChangeUI
  • Enahanced SetDlgItemText
  • Added one-section.nsi example file
  • Optimized Ximon's code for plug-in DLLs (back to 37KB)
  • If default user language doesn't fit exactly, will try to find primary language match
  • Fixed some strings that got reaplaced (space available and required etc.)
  • Compiles without MS Platform SDK
  • Included Spanish.nlf
  • Included MagicLime.exe by snowchyld

The new plugin code is not working anymore in alpha 5 when using multiple plugins in one script. I always get an error message saying the the dll could not be written.
Attached is a slighlty modified test.nsi of the install options demo which shows this bug.


Thanks, I will fix this ASAP.

Please use SourceForge for bug reporting. You don't even need to sign up to post bugs.

(edit) OK, here is the deal with this bug. It only happens if the runtime first plug-in command is called in a line after another plug-in command in the script.

That means that if you have a plug-in command in .onInit and in a Section but the Section comes first in the script itself this will happen.

The temporary solution until I work this out is just putting the runtime first plug-in command before any other plug-in command in the script.

(edit2) if two different DLLs are used the second one can not extracted =/
At least this one is easier then the first... New version should be here in about 30 minutes.


Bug #2 fixed on CVS version.
I already have an idea of how to solve the first bug. Alpha 6 with both of these fixes should be out soon.


Seems like the infinite loop bug from the beta version is back :(
Alpha 5 is down for now until I sort things out.


Alpha 6 is out. Bugs fixed.

CVS will be updated tomorrow because I have to go now.

[edit]CVS updated[/edit]

Good night,
KiCHiK


Could you update the gfx.nsi file?It's been a while since you last updated it :)

And btw, what could i use SetDlgItemText for?I'm still scratching my head at what it does.


one-section.nsi file that is included with alpha is outdated... Please use the one that is here.

mlbl, what is there to update in gfx.nsi? It works just fine... When I finish working with Joost on the InstallSheild look you will have a very extensive example, don't worry :D

SetDlgItemText is meant for you to set custom static text controls that are not used by NSIS. For example, you can put a static text control in IDD_INST and in .onNextPage set it to the page number.


Ok, i understand now :)


Alpha 6 is out. Bugs fixed.
Great work :)

One little question:
The docs say: "Added preserv file attribute option to File command", but the documentation of the "file" command doesnt mention this feature.
Could you please update the docs for this? Thanks.

Will do.


Is there a way to make XPStyle on and InstProgressFlags smooth working together ? It seems that InstProgressFlags smooth only works without XPStyle.


Originally posted by mlbl
Is there a way to make XPStyle on and InstProgressFlags smooth working together ? It seems that InstProgressFlags smooth only works without XPStyle.
No XPStyle will not support the Smooth option.. Its a limitation of the new 6.0 controls that don't allow it i belive.

Archive: NSIS 2 - Beta 0 is out!


Bug notice: giving a RTF file as the license data will result in showing the "source code" of the RTF instead of rendering the RTF under Windows 9x. A fix will be available as soon as possible.

And as you can see here, another bug relating to MBCS to Unicode conversion has been fixed (SetFont "Korean/Chinese/Japanese name" #).


RTF works under Win ME


Pre alpha 7 is available at the CVS.

Please let me know if the infinite loop bug is back. I am pretty sure it shouldn't come back, but if it is please let me know ASAP.

It is only a pre alpha version because I still have some stuff to do such as updating the documents, writing a DLL that will show a dialog to allow the user to select the language, updating InstallOptions and making some new UIs.

  • Language can be choosen from .onInit
  • Replaced SetDlgItemText by GetDlgItem
  • SendMessage WM_SETTEXT treats lParam as a string and not a number
  • Added CreateFont
  • Checkbox is only required in IDD_DIR if logging is enabled
  • Not specifying any language now really causes the script compiler to use the last used language
  • Fixed a bug with MBCS and the uninstaller text
  • Fixed a bug that caused RTF not to show on Windows 9x
  • Added a dialog that shows up if compress whole is used and initial uncompressing lasts longer than a second.
  • MBCS to Unicode and Unicode to MBCS conversion bugs fixed
  • Added .onStaticCtlBkColor and un.onStaticCtlBkColor

Thanks a lot to Dave Laundon (eccles) for optimizing the header and keeping it at 37KB.

Please post all bugs and new feature requests at SourceForge.

Small bug fixed. EXEDIR, CMDLINE and others had wrong values. Fixed in the latest CVS version.


Another note. When using MessageBox in .onInit you will get the "NSIS ERROR" caption because no language was selected yet so it doesn't know which caption to use.

I have uploaded another version (ui.c and makensis.exe changed) that uses the default language (first defined in the script) in .onInit.


Hi kichik,

I'm using the latest CVS version.
I'm using the following Code:

CreateDirectory "$SMPROGRAMS\SMTPAuth"
CreateShortCut "$SMPROGRAMS\SMTPAuth\SMTPAuth.lnk" "$INSTDIR\SMTPAuth.exe"

Now it puts the shortcuts in the Startmenu\Programs\AutoRun\SMTPAuth folder.
Is the $SMPROGRAMS var wrong set. It worked in the other versions.
(It takes the same path in the uninstaller)

Windows ME, German


Thanks Ramoon, latest CVS version fixes this.

You don't have to post the bug both here and at SourceForge, SourceForge is enough. Don't worry, I get an E-Mail for every bug report there so I won't miss it.


Latest version really lets you choose the language from .onInit.


how do you use onStaticCtlBkColor?


Function.onStaticCtlBkColor

;$0containstheHWNDofthecontrolthat
;needsabkcolor
;$0shouldcontainthecolorofthe
;controlwhenthefunctionfinishes
Push
$1
GetDlgItem
$1$HWNDPARENT1028;brandingtextcontrol
StrCmp
$1$00+3
StrCpy
$00x00BBGGRR
Gotodone
StrCpy
$0-1;usedefault
done:Pop$1
FunctionEnd

perfect, thanks


does it support the inner dialog?


Yes, it supports all of the static controls in NSIS (icons and bitmaps are static controls too).


I tried it on the license dialog and nothing.

Function.onStaticCtlBkColor

Push
$1
GetDlgItem
$1$HWNDPARENT1006
StrCmp
$1$00+3
StrCpy
$00x00FFFFFF
Gotodone
StrCpy
$0-1
done
:Pop$1
FunctionEnd
Any suggestions

1006 is not under $HWNDPARENT...
use

FindWindow$1"#32770"""$HWNDPARENT

to get the handle of the inner window first.

That did the trick. what does the "#32770" represent?


Windows dialog class name.


Thank you


Thanks for the abilitiy to set the language on .OnInit. :up:
But which command is used?
I looked at the source but I dind't find it. :cry:

Can you post an example?

Thanks


Sure.

Function.onInit

;prompttheuserforalanguagesomehow
;youcan'tuseInstallOptionsbecausethedialogwasn'tcreatedyet
Pop
$0;popresultinto$0
StrCmp
$0""default;didtheuserchoose?
StrCpy$LANGUAGE$0
Gotodone
;elseusedefaultlanguage
default:
StrCpy$LANGUAGE1033
done
:
FunctionEnd

Thanks for the example, but it doesn't work.
I get always on of these errors:

Invalid command: Pop*$0
Invalid command: *StrCmp*$0*""*default
Invalid command: ***StrCpy*$LANGUAGE*$0
Invalid command: Goto*done

StrCpy $LANGUAGE 1033
works, but there's no way to put an other var there.


Hmm... That's weird. Try rewriting these lines of code. For some reason makensis thinks "Pop $0" is the command name instead of Pop. I asure you you can treat $LANGUAGE as any other variable and copy anything into it.


Bug alert (pre alpha 7 only): don't use silent install or uninstall! It may crash the installer. I will fix this ASAP.


Fixed that bug and some more...


Friendly warning: don't use pre-alpha 7 =/
It has some threading issues... It is not safe.


Hi kichik,

I looked again at the code and I chose another solution:

I made a seperate .EXE in which you can select the language.
Now it uses the LANGID as a param and NSIS sets the language to this code.

It stores the Language in the registry and uses it in Uninstaller, too.

I attached the EXE and the NSI file so that you can look at it.

Will it be possible to have a dialoh like this without using an external EXE?


No, it will not be possible. You would have to use a DLL/EXE. I will include a more generic DLL with the release of alpha 7.


CopyFiles bug solved (link to newest libs)
Replaced .onStaticBkColor with .onInitDialog
Added SetStaticBkColor
Threads problems solved
CopyFiles script message no longer always prints (silent)
Summary now counts the required sections right
(old) ChangeUI can now change IDD_VERIFY

All in the CVS

You can now safely ignore the warning above :)


Ladies and gentlemen,

We have all been waiting for this great moment, and it has finally come. Please allow me to present, right out of the oven, steaming hot (it has been there a long time), NSIS 2 alpha 7! It is so new and so hot that this page can't even contain all the new features (this one can :D). Feast your eyes (no drooling allowed!) on the modern NSIS! So powerful, so beautiful, and yet so small!

Get your copy today! Only 99.95$ (before vat). Yes you heard me, this great product with all of those great features just for 99.95$. Buy your copy today!

Or, you can just download it from here for free :D

Note: please look at the examples (examples\languages.nsi and exmaples\modern ui) before you ask "how do I use that?".

I would like to thank Joost and Rainwater for writing the new UI, and for their help in making this version.


An impressive list of fixes/changes/additions/new contributions. Well done everyone involved :up:


A small update:
Fixed a bug with CallInstDLL and no /NOUNLOAD.
Updated InstallOptions test.nsi to get the new IO dll (in the plugins dir).


- Added yi-pixel.ico and yi-pixel-uninstall.ico by killahbite

aka Jan T. Sott :D

would prefer this!


Done. Will be up in 5 minutes.


Is there a posibility to change the language of "Unpacking data: x%" and "Please wait while setup is loading..." with one that match the current system (if i have included it in the script) or english instead? I think this translations must be included in *.nfl files.


Nope. These dialogs appear before the installer data is ready (where all the strings are), so there is no way to change it other then changing the source. You can however easily change "Please wait while setup is loading..." by editing the UI with Resource Hacker, but it will be the same for all languages.


Updated version of alpha 7 is available

This version is available as a release @ SF.NET and on CVS and contains a small change to my Modern UI.

The Finish header for the uninstaller can also be set using the MUI_FINISHHEADER macro.

Update your scripts, because MUI_FINISHHEADER requires an additional parameter.


Ok. Yes i can change it whit a resource editor but this isn't what i want :cry: Maybe having two separate data blocks, one with this translations only (very very small), that can be unpacked fast before display this dialog and a second 'normal'.


This dialog is for CRC too, no can do. Sorry.


I have finally succeeded in contacting Justin! He put a link at the official NSIS homepage to the SourceForge page and he will be going over it in order to release NSIS 2 final!!! :D


Bonus :)


Archive: NSIS 2 - Beta 0 is out!


Woahhhhhh

GREAT work kichik!

Thank you veryyyyyyyyy much!

:up: :up: :up: :up: :up: :up:


Modern UI update

Removed the titlebar from the Verifying installer & Unpacking data dialog. :)

Available in the new alpha 7 release or on CVS.


I've tried using the modern UI in the 2.0 alpha 7. I want to change UI components during runtime (text, color).

The documentation about ".InitDialog" explains that this event occurs only for new outer dialogs and not InstallOptions inner pages. However, I've seen a posts here that there is/will be an example on how to use the modern UI's flexibility even with InstallOptions pages...?

I mean that I want to change the outer dialog (for instance, change the text "License Agreement" to something else when a new inner dialog (a custom InstallOptions page of mine) is displayed.

I tried using ".onNextPage" based on the original example, but I guess that these component changes need to occur before actual display in order to take effect, and since the outer dialog is not reloaded each time an inner dialog is...

Well, any ideas?

Also, (maybe) unrelated: I saw some posts about a callback function called ".onStaticCtlBkColor" - but other than an example here in the forum on how to use it I didn't find any documentation on what it actually is, what it does, and when.


This callback is called right after an inner dialog is created (excluding InstallOptions dialogs) and before it is shown. Useful for CreateFont, SetStaticBkColor and any other last minute text changes.
It works for inner dialogs, not outer dialogs, and no IO dialogs. I haven't seen any posts about IO and the modern UI, I don't know what you are talking about.

Use SendMessage ${WM_SETTEXT} to set the text of the outer dialog when an inner dialog is created (.onNextPage, .onPrevPage).

.onStaticCtlBkColor is dead, use SetStaticBkColor from .onInitdialog instead.

Ugh, yeah, scratch that, I found a moronic mistake in my script... :igor:

Works like a charm.


Separate Installer Icon
The setting Icon is used for the desktop icon of the installer and also inside the installer in the upper right corner. I would like to suggest separating that into 2 setting such that you could use a different icon inside vs outside the program.

Steve


I got your message at SF, there is no need to post both here and there. I will try to add it to the next version.


Hey kichik,

I stumbled across NSIS2 alpha 7 at betanews.com(here) and... Well, they make it sound as if this is an official alpha release of NSIS2, when it's actually just your changes.
They also release it under Justin's name and I just thought that you might want to post there a little note, noting that this is not an official NSIS release untill Justin will actually review and merge this to his 'official' NSIS... (Less confusion, even though there were never any bad reviews about NSIS).

I totally dislike betanews.
(I could also be just wrong and Justin already accepted your changes...:))


Thanks for the heads up nant, I have dropped them a note.
Justin is currently working on merging the changes.


Hey all, sorry to be gone so much, just been busy with other projects (and non-computer-related funness). :) I'd just like to thank KiCHiK and everybody who has been contributing to the NSIS 2.a series. It looks HOT. I'm basically in the process of looking through it all, trying to catch up so I can understand everything that is happening.. But basically, it looks like when kichik and everybody is ready, we'll just make it the official 2.0 beta which we put on nullsoft.com for a week or two.. Then we fix any small or glaring bugs, and go to final. Or something. This sound good to people?

This really does rock guys, thank you for all this work. And people who have been contributing, update the docs/comments/msgs printed by makensis to reflect you/add credits. I'll coordinate with kichik to get the latest stuff (or I'll just pull the cvs from sf).

You guys put a big fat smile on my face. Anyway. :)

-Justin


Welcome Back Justin. We missed you. :)


Right-to-left (RTL) support available at the CVS!
Just use ChangeUI /RTL (...) (ui file) and it will move it all around for you! No RTL language files though :D

Friendly warning: no NLF will work with the latest CVS version for now. The reason is a new version of the NLF format due to a new string. You will have to wait for your language translator or send a translation yourself. The new string, by the way, is "Copy Details To Clipboard" which is used for a nice feature Sunjammer has added. It allows you to right-click the log window and copy all of its contents.


And here is a screen shot (look at the buttons).


Originally posted by kichik feature Sunjammer has added. It allows you to right-click the log window and copy all of its contents.
Before anyone asks yes CTRL-C support was tried as a way of avoiding the need for a new language string but (a) the context menu is nicer :) and (b) the CTRL-C code was crap :P

kichik, good work on the RTL support(most people here wouldn't really understand the change in that screen shot, btw... They don't understand Hebrew, remember? ;)).

I totally love this and good to know that Justin is going to add all your hard work to the official NSIS!


Bad news =/
WS_EX_RIGHT doesn't work on TreeView and ListView, which means the log, and the components selection page are not completely RTL :(

Actually, it should only works on OS with full support for a RTL language (localized).


Welcome back Justin :)

I don't understand the screenshot at all :D I'll update the Dutch/German/Frensh language files soon.


Originally posted by kichik
Bad news =/
WS_EX_RIGHT doesn't work on TreeView and ListView, which means the log, and the components selection page are not completely RTL :(

Actually, it should only works on OS with full support for a RTL language (localized).
nm

Joost, it doesn't. I have one, I can tell :D

Just look at the buttons, they are on the left ;)


I see :) Quite strange, RTL listviews and treeview are possible, there are some examples on MSDN.


Would you mind posting some links please?


http://www.microsoft.com/globaldev/w...WRG_mirror.asp

http://www.microsoft.com/middleeast/msdn/


Thanks Joost, but:

Only localized Arabic/Hebrew Win98 and all versions of Win2000 support mirroring.
:(

Fixed a bug that prevented the last letter from getting copied (copy details to clipboard feature). Available at the CVS.

Also new:
Always load RichEdit v2 if present.
DeleteRegKey 3 now only accepts two parameters as it should (and possibly /ifempty)


Plugin call method has changed.
You must now call plugins in the form of dllname[.dll]::FunctionName.
This prevents clashes with future commands.


Lose the .dll completely, it shouldn't be part of script syntax and is unnecessary and implied.


Done.


Bug alert: LandDLL::LangDialog must be used first in the script or it might pop a lot of things it shouldn't from the stack.


Make sure you run SetCVSShellCommands.exe before you start using the latest version of MakeNSISw from the CVS.


MakeNSISW
MakeNSISW has had a *lot* of work done to it to fix bugs over the last couple of days. The only way I have now of crashing it involves compiling about 30 .nsi files in parallel :D... so to anyone who has been having trouble with MakeNSISW I'd definitely recommend downloading the latest MakeNSISW.exe from CVS (get cvs revision 1.21, the most recent as of this post, here).


1.22 as of this post. Another buffer overflow bug fixed :cool:
If anyone still has crashes with MakeNSISw please come to the IRC channel, I am waiting there :D


The new homepage for NSIS development is at:

http://sourceforge.net/projects/nsis

Please use this url when posting bugs and/or features. The latest file release will be posted on the new project site soon.


File releases are up at the new project page. I have updated the links at the first post in this thread for your convenience.


Nasty bug alert:

Using .onInitDialog may cause some issues. As long as you don't use it, you should be OK.

The problem is caused due to .onInitDialog running parallel to other NSIS code sections, which causes problems due to static variables used in both.

This will be fixed ASAP.

http://sourceforge.net/tracker/index...49&atid=373085


Nasty bug fixed.


bzip2 installers now start up a lot faster.


Installers with plugins should now load faster too.

All in the latest CVS version, which is copied every night to the nightly snapshot (have a look at the FAQ).


A snapshot of all NSIS files (including the new Modern UI) is available at http://nsis.sourceforge.net/nsis-snapshot-sep22.exe.

This snapshot has an installer and the files have Windows line breaks, but snapshots with installer will not be made every day.


Latest CVS version now has user multilingual strings.

Example taken from languages.nsi:

LangStringSec1Name${LANG_ENGLISH}"!Englishsection#1"

LangStringSec1Name${LANG_DUTCH}"!Dutchsection#1"
LangStringSec1Name${LANG_FRENCH}"!Frenchsection#1"
LangStringSec1Name${LANG_GERMAN}"!Germansection#1"
LangStringSec1Name${LANG_KOREAN}"!Koreansection#1"
LangStringSec1Name${LANG_RUSSIAN}"!Russiansection#1"
LangStringSec1Name${LANG_SPANISH}"!Spanishsection#1"
LangStringSec1Name${LANG_SWEDISH}"!Swedishsection#1"
LangStringSec1Name${LANG_SLOVAK}"!Slovaksection#1"

LangStringMessage${LANG_ENGLISH}"Englishmessage"
LangStringMessage${LANG_DUTCH}"Dutchmessage"
LangStringMessage${LANG_FRENCH}"Frenchmessage"
LangStringMessage${LANG_GERMAN}"Germanmessage"
LangStringMessage${LANG_KOREAN}"Koreanmessage"
LangStringMessage${LANG_RUSSIAN}"Russianmessage"
LangStringMessage${LANG_SPANISH}"Spanishmessage"
LangStringMessage${LANG_SWEDISH}"Swedishmessage"
LangStringMessage${LANG_SLOVAK}"Slovakmessage"

Section$(Sec1Name)
MessageBoxMB_OK$(Message)
SectionEnd
Notes:

You will need to recompile makensis.exe for it to work.

To use in the uninstaller just add the un. prefix to the string name. Use it using it's name alone, without un.

These multilingual strings can't be used inside other strings. You can't write "bla bla $(mlstr) bla bla" only $(mlstr).

it doesn't work on subsection? or am i doing anything wrong?


Archive: NSIS 2 - Beta 0 is out!


No, you are not doing anything wrong. I have fixed this in the latest CVS version.


btw, have you changed the behaviour of SectionGetFlags? Now it returns 1 instead of 0x80000000 when a section is selected.
It took me some time to figure out why my script did no longer work and you've not said anything about this in the changelog.


Yes, you are right... I forgot to mention it, I am sorry about that.

Here are the new defines for the section flags:

!defineSF_SELECTED1

!defineSF_SUBSEC2
!defineSF_SUBSECEND4
!defineSF_BOLD8
!defineSF_RO16
!defineSF_EXPAND32

I have added an option for unprocessed user multilingual strings (LangStringUP). Use it if you see weird squares before any special character in your LangString.


Added support for !ifdef/!ifndef/!else in macros too.


how about supporting right to left languages?


In the progress.


the arabic work with the ltr system too, so it is ok to leave the arabic language even without rtl support :).
thank you


Yes, but it doesn't look good just like the Hebrew translation. RTL is already partially implemented in ChangeUI. Use ChangeUI /RTL "ui file.exe" and you will see. It isn't perfect yet but it's on the todo list so I hope it will be soon ;)


Big change in the latest CVS version

The latest CVS version contains a new advanced paging system. It will break old scripts, but believe me when I say it is worth it. The new paging system allows you to set the order of the pages (including custom pages!) in NSIS very easily. For example:

Pagelicense

PagecustomcustomPage
Pagecomponents
Pagedirectory
Pageinstfiles
Each page has two callback functions, pre-function and post-function. The pre-function is called just before the page is created and allows you to skip it using Abort. The post-function is called right after the page is created and before it is shown allowing you to tweak its UI using CreateFont and friends. Custom pages have only one callback function but it is mandatory. This function should create the page, and use Abort if it wants to go to the previous page.

What is it good for?
  • Modern UI way easier
  • Button names/enabled/disabled/shown/hidden are set automatically, custom pages no longer need to know where they are.
  • No need to follow the page number
  • You can add the same page twice
  • You can change the order of the pages
  • It's much easier to skip pages
  • It's much easier to add custom pages
  • No more keeping track on the direction of pages
  • No more complicated scripts such as MultIni4 or the Modern UI InstallOptions macros
  • EXE header is even smaller. 404 bytes shaved off :D
    zlib header is 34KB and bzip2 is 33.5KB.

All of the examples have been updated so you can look at them for more information. A new section in the documents about the new paging system was also created.

Wow!

That sounds great, can't wait to test this.

I only hate it to modify my scripts so often ;)


Works Fine in 2.07a
The code snippet appears to work fine in 2.07a


What code snippest?


A bit Off Topic
I was just wondering, if Justin has given his blessing on NSIS 2.*, and if so, when an 'official' release would be.


Yes, just look a few posts above and you will see it.

Here is a little quote from there:

But basically, it looks like when kichik and everybody is ready, we'll just make it the official 2.0 beta which we put on nullsoft.com for a week or two.. Then we fix any small or glaring bugs, and go to final. Or something. This sound good to people?

yeah i saw that. But that post is nearly 2 months old. And wasn't sure if anything changed or not.

So basically, it'll be official when you feel it is ready?


Yep. Beta 0 will be released soon. Justin will put it on the nullsoft page (if we can find him :D).


There is an empty folder MagicLime in NSIS\Contrib. What is going on with it?


Fixed, next snapshot will not have it.


More changes

The paging system is now even easier than before. I have made it so NSIS will handle all of the buttons input while using a custom page, which means you don't need to compare IO's output to cancel, success or back and call Abort or Quit accordingly, just let NSIS do it. You won't even need to use IO and StartPage's cancel confirm message boxes because NSIS will call .onUserAbort, and the plug-in dialog won't disapear until .onUserAbort is executed without an Abort.


Added caption argument for custom pages. InstallOptions will not flicker anymore :D

IO pages now completely look like there one of NSIS's other pages.


makensisw suggestions:
1. use Lucida Console for script display (or make font changeable)
2. change buttons and branding text to use Tahoma and maybe make it show NSIS 2.0b0, instead of only 2.0b0.

and, is it possible not to include that CVS empty folders in nightly builds?

my 0.02€ (I am from Europe:D)


It does show NSIS 2.0b0 and not only 2.0b. I will see what I can do about the font.


The log font was chosen by Justin himself. I wouldn't dare change it :)


Originally posted by rainwater
The log font was chosen by Justin himself. I wouldn't dare change it :)
Yeah, I remember now...

And font for buttons?

Originally posted by RIV@NVX


Yeah, I remember now...

And font for buttons?
The font of the buttons is MS Shell Dlg, which on 2000/XP systems is Tahoma. On Win 9x, the font is *usually* MS Sans Serif.

For more info on why I have chosen this font look here.

Originally posted by rainwater


The font of the buttons is MS Shell Dlg, which on 2000/XP systems is Tahoma. On Win 9x, the font is *usually* MS Sans Serif.

For more info on why I have chosen this font look here.
On my XP installation it is Microsoft Sans Serif. Weird. Shell Dlg 2 is Tahoma.

Originally posted by RIV@NVX


On my XP installation it is Microsoft Sans Serif. Weird. Shell Dlg 2 is Tahoma.
MS Shell Dlg is a safe font used on all systems. While I could make it "Tahoma", it wouldn't necessarily work on all systems. Therefore, I choose MS Shell Dlg. You can easily change the source to be Tahoma if you wish. I plan on having an options dialog in the future to customize some things, so setting this might be a possibility. Right now, I don't have the time to do that though.

Release ETA?
I know the ETA is "when it's done" :D, but I'd really like to pick up the new version for our upcoming release. Do you have an idea when you think it'll be ready to roll? I'm not asking for precise dates, but how about a ballpark: weeks, months, or longer? Our current install uses a custom NSIS build but it looks like 2.0 will have everything we need (and then some, especially multi-lingual support). I'm crossing my carpal-tunnel fingers...Thanks and keep up the good work. :up:


Just pull a nightly from http://nsis.sf.net :)

-Scott


The long awaited release is finally here, the first beta version of NSIS!

A lot of time has passed from the release of alpha 7, but not even a second of it was for slacking around. New features were constantly added, tons of bugs fixed. All was done to make NSIS quicker, smaller, easier and more powerful.

This release, unlike earlier alphas is no longer an unofficial modification. As of beta 0 this is an official beta as we work correspondingly with Justin Frankel, the original author of NSIS.

The main changes from alpha 7 are:
* Easier Modern User Interface with lots of new features
* New paging system which makes is easier to add custom pages to your installer
* New multilingual user strings
* Lots of new and improved plug-ins which you can use to download files from the internet, display additional graphics, run console programs and more!
* Over 15 new translations
* New documentation format

Download: https://sourceforge.net/project/show...ease_id=126427

Full change list: https://sourceforge.net/project/show...ease_id=126427


excellent work with this release..!


Yup, 200kb increase in size, but it's worth it...
Is this release going to be on Nullsoft's NSIS page (as Justin said)?


Yep, it's going to be on Nullsoft's page.


http://www.neowin.net/comments.php?c...ftware&id=7563

We're famous! :D


Just that famous?:D
EntCity


Well, it's a start ;)


kichik, put your development page as NSIS homepage because it is a lot nicer than Nullsoft's one (of course, do some modifications to it ;))


Congratulations, kichik & co.. Well done.

-Scott


I remember kichik's announcement for 2.0a7...
Where is it, I can't find it?


Archive: NSIS 2 - Beta 0 is out!


I believe that it's THIS thread, it's just been re-named.

-Scott


It's there, just a few posts above:

http://forums.winamp.com/showthread....r=3#post674220

The official homepage is at Justin's control. There is a link there to nsis.sf.net and b0 is already there.