Archive: Nsis 2.0


NSIS 2.0
  I've been working on updating NSIS 2.0 with some patches. Here's what I've changed so far:

- Added /e option to Section and SubSection. If /e is present, the node is expanded by default in the treeview.
- Added the File attribute patch (posted on this forum). It adds an /a option to the File command. If present it will preserve its file attributes when installed on the host machine.

Are there any other patches/features that need to be implemented? If anybody wants a copy, just send me an pm through the forum.


how about more color/sizes on the icons? i've been trying to do this but since i don't now C++ so i can't really get it to work..

i've tried.. but alas.. nothing i've tried have worked..

or if you (or someone else) tell me what to edit (i know where in the code the icon replace code is.) then i could do this myself.. (in both future and older versions..)

or perhaps a swith that enables and disables multi size/color icons..

hope you can help.

Cheers.

/Christian AKA Sphinx


i think highcolor file-icons are more important than the bitmaps :D


I am currently working on high color icons. It will be ready soon.
My build will be based on 1.98 though...

My mod will also have an option to add XP style from within the script without the need to recompile.


I've also fixed a bug in makensisw where copy all did not work.


:(

There is sometype of bug in that was prevented the nodes to be toggled. If I sent you the source, it may not be working correctly.


OK. The bug is fixed. I also reorganized the NSIS directory structure a bit (and the installer).


You can download the installer here.

Here are the changes:
- Added expand node option to Section and SubSection
- Added preserv file attribute option to File command
- Copy-All bug fix in Makensisw
- Added NSISDIR to the define list
- Reorganized NSIS directory structure


Sugestions
  Sugestions for a new version of NSIS:

- An option for RmDir command "RmDir /ifempty"

- A command to check if directory is empty
IfDirectoryIsEmpty <directory> <jump_IfEmpty> <jump_IfNotEmpty>

- An option for CopyFiles command "CopyFiles /rebootok" (case the file is running)

- Insert a hint when mouse cursor is on DetailPrint line and its out of a Window size

- Permit to change the messages of DetailPrint (Example: Translate)
same as caps.nsh

Thanks folks


Re: Sugestions
 


- An option for RmDir command "RmDir /ifempty"
Just do:
RMDir $INSTDIR

It will only remove the directory if it was empty, so you can check if it was empty afterwards using IfFileExists on the directory.

Originally posted by rainwater
I've also fixed a bug in makensisw where copy all did not work.
i'm trying to write (read "my first c++ program") a gui for isdcc2 and am wondering if you could explain, or send me to a site, about how you capture the NSIS output w/o the window actually being shown.

thank you~

Other sugestions...
  Oh! I am a stupid. :igor:

The "Rmdir /ifempty" is default!

I'm sorry.

And about the others sugestions? What do you think?


Originally posted by liquidmotion


i'm trying to write (read "my first c++ program") a gui for isdcc2 and am wondering if you could explain, or send me to a site, about how you capture the NSIS output w/o the window actually being shown.
Check out this method in makensisw.cpp:

DWORD WINAPI MakeNSISProc

This thread executes the process. This version also captures the output along the way and calls a local method LogMessage.

Re: Sugestions
 

Originally posted by maragato
- A command to check if directory is empty
IfDirectoryIsEmpty <directory> <jump_IfEmpty> <jump_IfNotEmpty>
FindFirst$1 $2 "F:\\Temp\\WinTemp\\new\\*.*"

>FindNext $1 $2
FindNext$1 $2
StrCmp$2 "" empty notEmpty
>empty:
MessageBox MB_OK "not empty"
goto end
notEmpty:
MessageBox MB_OK "empty"
>end:
This code works for me...

Re: Sugestions
 

Originally posted by maragato
- Insert a hint when mouse cursor is on DetailPrint line and its out of a Window size
Will be added in my next version.
This will only be supported on systems with Internet Explorer 5 and above.

Thanks
  And about the others sugestions (translate, copyfiles)?
What do you think?

Your next version is a official nsis version?


AFAIK only Justin makes "official" versions.


I am working on translation options.

I have tried to add hints to long lines of deatils but it just didn't work :( I will try to sort things out and add it in the next version...

Why do you need CopyFiles /REBOOTOK? What's wrong with Rename /REBOOTOK? CopyFiles /REBOOTOK can be done using scripting. You can use FindFirst & FindNext & FindClose, find out which files where not copied and then copy them your self with Rename /REBOOTOK...

And like Sunjammer said, only Justin makes official versions :D