Archive: NSIS 1.97 - well, hopefully


NSIS 1.97 - well, hopefully
  Hi all, sorry I've been slacking for so long (just been working on some other projects). So here's NSIS 1.97, well, if it doesn't have any major problems anyway.. If all goes well I'll link it on the web page.

http://firehose.net/free/nsis/nsis197.exe

Changes:


Let me know if you find any problems, there were some pretty major changes for the section shit, so it may have broken things. If nobody gives me any reports in a few days, I'll put it on the page.

Oh, one more thing. Soon I will start designing NSIS 2.0, which will not be a big rewrite or anything stupid like that, but will just have two basic but fundamental improvements:
1) support for multiple languages in one installer
2) support for section hierarchies. just gotta figure out the best way to do an owner drawn treeview with checkboxes. Or something.
oh and 3) maybe a slightly bigger install window? :)

-Justin

[I editted this to add the 2.0 plans]

l33tness :D
gonna test it later today J!


I've tested it and recompiled with BZIP2 support...

I've noticed that if I enable the COMPRESS_WHOLE option, the installer will crash on startup (this program has caused... classic window error)

without the COMPRESS_WHOLE it runs fine.

only my 2 cents

bye


Originally posted by ALoR
I've tested it and recompiled with BZIP2 support...

I've noticed that if I enable the COMPRESS_WHOLE option, the installer will crash on startup (this program has caused... classic window error)

without the COMPRESS_WHOLE it runs fine.

only my 2 cents

bye
Make sure when you recompile you rebuild all.. Just don't do a make and then you probably won't get this error.. I just recompiled NSIS with bzip and compress all + xp support and it works just fine..

You forgot to include Contrib\Makensisw\makensisw.xml in the installer, so you can't compile the makensisw source. While I'm at it I updated makensisw to 1.3. You can get it here.


1.97 updates (-2)
  Here is an update to 1.97:

http://firehose.net/~deadbeef/free/nsis/nsis197-2.exe


Changes:


This is nice, because now you can completely hide/show sections, change section names, etc. You can make sections visible dependent on other sections, and whatnot.

Let me know what we all think..

-Justin

Everything fine.


Justin, I am quite pleased to see that we can set sections with the install script now. I will update my script to remember previously selected sections to set them next time the installer is run. This way a user doesn't have to customize the installation each time they run my installer. ;)

If you're thinking about modifying the installer windows may I suggest you add the ability to add images (to the top, sides, and/or bottom) to each installation screen?

As I've said many times before, great job on NSIS! :up:


More 1.97 updates...
  OK I just had to do these two things:

1) SetShellVarContext - changes where $SMPROGRAMS etc point to (Current user or all users)
2) Parameter suppport for macros. you can now do things like:

!macro Test PARM1

DetailPrint "This is a test: ${PARM1}"
>!macroend


>...


!insertmacro Test "Booga"
and so on.

http://firehose.net/~deadbeef/free/nsis/nsis197-3.exe

Hopefully I didn't break too much =)

-Justin

Justin,
Just an idea.. since you added paramater support for macros.. would it be possible to add paramaters for certain functions so for instance..
Function .onNextPage PAGE
${PAGE} would then be the page number of what the next page is.. this would be better then having to keep track of the numbers yourself. even though it is simple.. I think this would be better use for the onSelChange so you can have a parameter of which one changed making it easier and alot less script to make changes.. But not sure how much would need to change existing code to support this..


Ok, here's another update to makensisw here. It fixes a problem with the documentation menu item causing a recompile. It also makes the edit script action work even if the file association is not set. I also cleaned up some of the code and removed a file or two.


I found this small bug in the installer. If you define NSIS_CONFIG_XPSTYLE_SUPPORT and set InstProgressFlags and InstallColors, the progress bar does not change colors. If you remove the NSIS_CONFIG_XPSTYLE_SUPPORT then the progress bar shows the correct colors. The details window will always show the correct colors.


So... when NSIS 1.97 can be expected ? :)


its out right now can't you see the links.


I have problems with Logset command. It doesn't write any log. I've tried tu put it in function .onInit and in the first Section. The compiler doesn't give me any error, thus it fails in run time. I've already uncomment #define NSIS_CONFIG_LOG in congif.h and recompile teh source code with Visual C++.


Logset works for me when i put it in a section. Make sure you are checking in the $INSTDIR. Shouldn't this be a global option though, not for each section?


Originally posted by Schultz
Justin,
Just an idea.. since you added paramater support for macros.. would it be possible to add paramaters for certain functions so for instance..
Function .onNextPage PAGE
${PAGE} would then be the page number of what the next page is.. this would be better then having to keep track of the numbers yourself. even though it is simple.. I think this would be better use for the onSelChange so you can have a parameter of which one changed making it easier and alot less script to make changes.. But not sure how much would need to change existing code to support this..


Since functions are compiled ahead of time, this isn't really possible in the same way. I'd like to do something that passes parameters on the stack, though.

-Justin

Quote:


its out right now can't you see the links.
I'm talking about official release on:
http://www.firehose.net/~deadbeef/free/nsis/

Re: More 1.97 updates...
 

Originally posted by justin
2) Parameter suppport for macros. you can now do things like:
Yay! Yet another feature I've often wanted (but never mentioned... :hang: )

I've not thrashed it yet, but the things I use appear to still work ok! :)

--
Dave

Originally posted by futuris


I'm talking about official release on:
http://www.firehose.net/~deadbeef/free/nsis/
i've never seen the "~deadbeef" before. must be a mirror site?:igor:

Originally posted by bballer182


i've never seen the "~deadbeef" before. must be a mirror site?:igor:
May be ?

It's Justin's user directory. The same content (~deadbeef/free/) is mapped to /free/.


zlib 1.1.4 is out while nsis still use 1.1.3
  http://www.gzip.org/zlib/
Current release:
zlib 1.1.4

This version fixes a potential security problem, see details here. Any software that is linked against or derived from an earlier version of zlib should be upgraded immediately. A partial list of over 500 applications using zlib is given here (uncompressed).


and bzip2 has updated to 1.02
http://sources.redhat.com/bzip2/
Getting the latest version: bzip2-1.0.2
1.0.2 is a minor maintenance release which fixes some security holes and various minor problems in 1.0.0/1.0.1. See the CHANGES file in the sources for details. Upgrading to 1.0.2 is recommended.


Re: zlib 1.1.4 is out while nsis still use 1.1.3
 

Originally posted by hotice
http://www.gzip.org/zlib/
Current release:
zlib 1.1.4

This version fixes a potential security problem, see details here. Any software that is linked against or derived from an earlier version of zlib should be upgraded immediately. A partial list of over 500 applications using zlib is given here (uncompressed).


and bzip2 has updated to 1.02
http://sources.redhat.com/bzip2/
Getting the latest version: bzip2-1.0.2
1.0.2 is a minor maintenance release which fixes some security holes and various minor problems in 1.0.0/1.0.1. See the CHANGES file in the sources for details. Upgrading to 1.0.2 is recommended.



Security issues really don't apply to NSIS, since the code and data come together anyway. I.e. you will never have a NSIS installer decompressing data other than what makensis generates. And if you do, there are far worse problems that could result.

-J

Originally posted by rainwater
Logset works for me when i put it in a section. Make sure you are checking in the $INSTDIR. Shouldn't this be a global option though, not for each section? Logset is a global option, but it is implemented as an instruction, so that it can be toggled on or off whenever.

-J

heh
well using up to date libs is always better no? :)


RE: Logset
  Perhaps I can't write a log with Logset because I'm changing INSTIR in a Section with 'StrCpy $INSTDIR $R1'. I also hide the dirshow dialog with 'DirShow hide' as I ask for the installation directory before, in a InstOpt dialog. :eek: What's is more surprising is that at the beginning, Logset worked in my installer, but suddenly it has stopped working.


Quote:


The default value $TEMP for the SetShellVarContext is not very useful:
if you try to create a start menu item in the all users start menu and the folder cannot be located, the value for the current user would be much better. Using the temp directory will never show a start menu item.

I think the default values must be the current user values (may be this case can be indicated by an error code).


Re: More 1.97 updates...
 

Originally posted by justin
2) Parameter suppport for macros. you can now do things like:
!macro Test PARM1

DetailPrint "This is a test: ${PARM1}"
>!macroend

>...

!insertmacro Test "Booga"
This doesn't work with multiple parameters :(

Name Test

OutFile Test
.exe

>!macro Testing one two three
MessageBox MB_OK '"${one}" "${two}" "${three}"'
>!macroend

Section
!insertmacro Testing 1 2 3
SectionEnd
>
This gives two compiler warnings about unknown variables {two} and {three} and, when run, shows "3" "{two}" "{three}"

Love the idea tho :p

--
Dave.

Re: Re: More 1.97 updates...
  Ah stupid little bug on my end :) fixing...

-Justin

Originally posted by eccles

This doesn't work with multiple parameters :(

Name Test

OutFile Test
.exe

>!macro Testing one two three
MessageBox MB_OK '"${one}" "${two}" "${three}"'
>!macroend

Section
!insertmacro Testing 1 2 3
SectionEnd
>
This gives two compiler warnings about unknown variables {two} and {three} and, when run, shows "3" "{two}" "{three}"

Love the idea tho :p

--
Dave.

Cheers,

Dave.


OK I fixed the macro parameter bug, and made it so if you set shit to all users, but all users is not found, it drops back to current user. and I'm calling it 1.98 for fun. It's up on firehose.net/free/nsis/.

-Justin



Originally posted by Thor
heh
well using up to date libs is always better no? :)
How's that? you know how the saying goes... "if it ain't broke don't fix it"