Does anyone use .onVerifyInstDir? If so, don't use it with SpaceTexts none or it will not work.
Sorry about this...
This bug will be fixed in my next version (merged with 2.0a1 finally 😁)
[edit]Another one 🙁
Switching from non custom to custom installation will not show the component selection sub-window if SpaceTexts none was specified...
This too will be fixed in the next version[/edit]
Full color icon, XP style without recompiling and smaller header size
136 posts
Originally posted by kichikMaybe you will get better results when centering the image in the foreseen range of the window instead of resizing it?
Currently I am just using LoadImage(0, filename, IMAGE_BITMAP, width, height, LR_LOADFROMFILE). If you know another way that resiezs better, besides resizing it myself, please tell me.
Of course the RichEditCtrl can use different Fonts, but I hope that you dont attempt to ignore/overwrite the font settings given in the .rtf by the author?
In my next version I intend to make the license agreement use RTF instead of text. Correct me if I am wrong but this will give you the option to change the font. If not the font, at least its size.
If it's possible maybe try to detect the DPI, if it's 96 DPI then use branding image, if it doesn't match 96 DPI - disable it (or have an option for it).
Just cenetering the image won't give a good result because not all of the image will be shown. I will use StreachBlt in my next version, it should resize better.
Don't worry, I won't overrun any settings in the RTF...
The branding image control is added at script compile time, so it can not be disabled at runtime.
Don't worry, I won't overrun any settings in the RTF...
The branding image control is added at script compile time, so it can not be disabled at runtime.
Originally posted by kichikMaybe we talk about different things, so I have made a small demo showing "my" way of displaying the image and also a possible solution for the details-window problems.
Just cenetering the image won't give a good result because not all of the image will be shown. I will use StreachBlt in my next version, it should resize better.
Resize the window to see the effect, and if you arent sure how this works, take a look in the included source.
Don't worry, I won't overrun any settings in the RTF...OK 🙂
BTW: did you ever thought about concepts allowing more than one "licence" page?
Example: you might want to display a short description of the software, then the licence.
Originally posted by kichikSearch the VisualStudio help (aka MSDN) for "EM_AUTOURLDETECT" and see if you like what you read.
If RTF supports it...
Originally posted by SmartyManAn introduction screen would be very nice! 😁
OK 🙂
BTW: did you ever thought about concepts allowing more than one "licence" page?
Example: you might want to display a short description of the software, then the licence.
What I would also like to see is a modern style user interface for NSIS, just like all other instllers (Microsoft, Inno Setup, InstallShield). Look at the attechment.
Originally posted by Joost VerburgNSIS was made to be small and simple (in terms of size and interface). Having an interface like Installshield/Inno setup would be really nice but if you prefer your installer to have that kind of interface, use it then.
An introduction screen would be very nice! 😁
What I would also like to see is a modern style user interface for NSIS, just like all other instllers (Microsoft, Inno Setup, InstallShield). Look at the attechment.
Inno setup is FREE and not only that, you can actually do quite a lot of stuff with it provided that you know how to with the use of the "beefed" up version of Inno Setup called My Inno Setup Extensions that allows you to use Pascal/Delphi like coding for your installer. It's not as easy to code though, compared to NSIS 🙂
Originally posted by mlblI'm not going to use Inno Setup. NSIS scripting rocks 😁 Inno Setup is also quite large.
NSIS was made to be small and simple (in terms of size and interface). Having an interface like Installshield/Inno setup would be really nice but if you prefer your installer to have that kind of interface, use it then.
Inno setup is FREE and not only that, you can actually do quite a lot of stuff with it provided that you know how to with the use of the "beefed" up version of Inno Setup called My Inno Setup Extensions that allows you to use Pascal/Delphi like coding for your installer. It's not as easy to code though, compared to NSIS 🙂
This interface could just be an option. I think it's nicer and more user friendly. It's possible now to remove unused resources, so using another dialog for this interface is no problem.
Unfortunately, I cannot code C++, otherwise I would have made such an interface immediately.
I have also heard from other developpers that they don't use NSIS because of it's interface.
Originally posted by Joost VerburgI can't believe it. I'm using NSIS (among other things) because of its good interface: Small, simple and without too much fancy stuff.
I have also heard from other developpers that they don't use NSIS because of it's interface.
Originally posted by CodeSquidSure, NSIS has a good interface. 😉 It's just a bit classic. I would prefer a more modern interface, like the other installers. 🙂 Another good reason is that the user is familiar with such an interface.
I can't believe it. I'm using NSIS (among other things) because of its good interface: Small, simple and without too much fancy stuff.
There is no need for a change in the standard interface, but it would be great as an option.
Possible Problem?
The code
GetTempFileName $1
MessageBox MB_OK $1
displays
G:\DOKUME~1\ADMINI~1\LOKALE~1\Temp\nst74.tmp
on my system (german W2000/SP2).
With this value of $1, the code
File /oname=$1 logo.bmp
creates a tmp file with 0 bytes length, so code like
SetBrandingImage $1
doesnt work.
Replacing the "GetTempFileName" line by
StrCpy $1 "G:\DOKUME~1\ADMINI~1\LOKALE~1\Temp\nst74.bmp"
or
StrCpy $1 "G:\Dokumente und Einstellungen\Administrator\Lokale Einstellungen\Temp\nst74.bmp"
makes the code work, but using
StrCpy $1 "G:\Dokumente und Einstellungen\Administrator\Lokale Einstellungen\Temp\nst74.tmp"
fails again.
Another way to make the code work is
GetTempFileName $1
StrCpy $1 "$1.bmp"
(resulting in "G:\DOKUME~1\ADMINI~1\LOKALE~1\Temp\nst74.tmp.bmp")
So it seems that the extension causes the problem...
...BUT: compiling the unmodified gfx.nsi shows the images although the extension of $1 is ".tmp"
I can live with this, but maybe other users will experience this problem too, so I thought I should drop a line.
The code
GetTempFileName $1
MessageBox MB_OK $1
displays
G:\DOKUME~1\ADMINI~1\LOKALE~1\Temp\nst74.tmp
on my system (german W2000/SP2).
With this value of $1, the code
File /oname=$1 logo.bmp
creates a tmp file with 0 bytes length, so code like
SetBrandingImage $1
doesnt work.
Replacing the "GetTempFileName" line by
StrCpy $1 "G:\DOKUME~1\ADMINI~1\LOKALE~1\Temp\nst74.bmp"
or
StrCpy $1 "G:\Dokumente und Einstellungen\Administrator\Lokale Einstellungen\Temp\nst74.bmp"
makes the code work, but using
StrCpy $1 "G:\Dokumente und Einstellungen\Administrator\Lokale Einstellungen\Temp\nst74.tmp"
fails again.
Another way to make the code work is
GetTempFileName $1
StrCpy $1 "$1.bmp"
(resulting in "G:\DOKUME~1\ADMINI~1\LOKALE~1\Temp\nst74.tmp.bmp")
So it seems that the extension causes the problem...
...BUT: compiling the unmodified gfx.nsi shows the images although the extension of $1 is ".tmp"
I can live with this, but maybe other users will experience this problem too, so I thought I should drop a line.
Is it possible to add an option for setting the margins and border used by the branding image?
I would prefer brandings like shown in nsis-demo.zip (no margins at left/right/top when using "top" and no margins at top/bottom/left when using "left" instead of the 10-12 pixels used currently, and "sunken" style for the border)
And: what is the reason for blurring the image? In the attached screenshot you may see what I mean (original at the top, nsis version below)
I would prefer brandings like shown in nsis-demo.zip (no margins at left/right/top when using "top" and no margins at top/bottom/left when using "left" instead of the 10-12 pixels used currently, and "sunken" style for the border)
And: what is the reason for blurring the image? In the attached screenshot you may see what I mean (original at the top, nsis version below)
Re: Possible Problem?
Originally posted by SmartyManOf course, because File does not overwrite the temp file by default. You should use something like this:
The code
GetTempFileName $1
MessageBox MB_OK $1
displays
G:\DOKUME~1\ADMINI~1\LOKALE~1\Temp\nst74.tmp
on my system (german W2000/SP2).
With this value of $1, the code
File /oname=$1 logo.bmp
creates a tmp file with 0 bytes length
Hard coding a temp file name is not good, because the file has to be unique.GetTempFileName $1
SetOverwrite On
File /oname=$1 logo.bmp
SetOverwrite Off
SetBrandingImage $1The branding image has to be included when the installer is compiled, so you cannot use variables in the file name.
Originally posted by SmartyManYeah, an option for setting margins would be great, but I think that the size of the current dialog is limited, this should be changed.
Is it possible to add an option for setting the margins and border used by the branding image?
I would prefer brandings like shown in nsis-demo.zip (no margins at left/right/top when using "top" and no margins at top/bottom/left when using "left" instead of the 10-12 pixels used currently, and "sunken" style for the border)
And: what is the reason for blurring the image? In the attached screenshot you may see what I mean (original at the top, nsis version below)
When I zoom in at your image, I can see that it gets resized a litle bit (1 pixel), I think that's the problem (a bug).
OK, here is what I will do. I will add an option to load anohter dialog resource instead of the default dialog, an option to send a message to a dialog control, and replace SetBrandingImage with ChangeImage control_id image.
This will allow to customize NSIS interface in every way you wish to and to set your own place/margin/styles (including centering) to the branding image.
About the blurring, did you take note of the size reported by AddBrandingImage and used it?
Another license page could be achived by using InstallOptions.
Did I miss any question? I hope not 😁
This will allow to customize NSIS interface in every way you wish to and to set your own place/margin/styles (including centering) to the branding image.
About the blurring, did you take note of the size reported by AddBrandingImage and used it?
Another license page could be achived by using InstallOptions.
Did I miss any question? I hope not 😁
Will all of this development going on (which is great), I think it's time to get yourself a proper project page on Sourceforge.net!
BTW, I'm working on adding NSIS syntax highlighting support to the wonderful JEdit 4.0 text editor, so even 1 more tool with support NSIS. Hope to make it available soon.
BTW, I'm working on adding NSIS syntax highlighting support to the wonderful JEdit 4.0 text editor, so even 1 more tool with support NSIS. Hope to make it available soon.
Hmm... That could be a good idea, this way I won't bug Sunjammer so much anymore 😁 I am sure he will be glad not to upload 3 versions everyday 😉
Signing up now...
Signing up now...
Originally posted by kichikWithout size limitations or margins? Great! 😁
OK, here is what I will do. I will add an option to load anohter dialog resource instead of the default dialog.
Re: Re: Possible Problem?
The posting was ment as a report with maximum possible accuracy, to make it easier for the readers to find out whats going on.
Of course, because File does not overwrite the temp file by default. You should use something like thisOf cource i have proofed that there was no file with this name in my temp dir before i started the installer
Hard coding a temp file name is not good, because the file has to be unique.This is correct, but which other options i have to spot the reason for the effect (0 bytes files) and to make the code work?
The posting was ment as a report with maximum possible accuracy, to make it easier for the readers to find out whats going on.
The branding image has to be included when the installer is compiled, so you cannot use variables in the file name.Please read the docs and/or take a look into gfx.nsi and then correct yourself 😉
I will add an option to load another dialog resource instead of the default dialogSo I can design the dialogs using the VisualStudio Resource-Editor and then copy the .rc file into my installation?
Whow, that would be very impressing - but you can make me also happy with changing the syntax of AddBrandingImage by adding options
/center (-> SS_CENTERIMAGE|SS_REALSIZEIMAGE)
/nomargins (-> MoveWindow(0,0,..) instead of MoveWindow(12,10,...))
/border (-> SS_SUNKEN) 🙂
About the blurring, did you take note of the size reported by AddBrandingImage and used it?I use /V3 when starting makeNSIS, so I didnt saw this info (OK, I had not seen it even w/o the /V option because of the text masses produced by the compiler 😉
Your suggestion was correct, the width prompted by AddBrandingImage differed by 1 pixel from the width of the image; I have fixed that and the result is OK now - thanks 🙂
Another license page could be achived by using InstallOptions.Have I missed something?
With InstallOptions, I can create a RichEditCtrl object and will be able to make it load a .rtf?
I dont think so 😉
Of cource i have proofed that there was no file with this name in my temp dir before i started the installerGetTempFileName creates a 0-byte temp file, so you should SetOverwrite On before using the File command, because this 0-byte file needs to be overwritten.
So I can design the dialogs using the VisualStudio Resource-Editor and then copy the .rc file into my installation?I was thinking more at the direction of making it editable with Resource Hacker so everyone can edit it, not only people who have VC...
Re: Re: Re: Possible Problem?
So you should extract the files first and use than use SetBrandingImage? That's good, because different branding images on different pages will work better using this method.
Originally posted by SmartyManI have not tried this feature yet 😁 I'll wait for the merge of 1.99 and 2.0a1 and the other changes.
Please read the docs and/or take a look into gfx.nsi and then correct yourself 😉
So you should extract the files first and use than use SetBrandingImage? That's good, because different branding images on different pages will work better using this method.
Originally posted by Joost VerburgIf the overwrite flag is the reason, why does the gfx.nsi work?
GetTempFileName creates a 0-byte temp file, so you should SetOverwrite On before using the File command, because this 0-byte file needs to be overwritten.
But OK, I will try this, thanks anyway.
Originally posted by kichikHm, so we have to do this work again and again, anytime we compile a new installer?
I was thinking more at the direction of making it editable with Resource Hacker so everyone can edit it, not only people who have VC...
In this case, I would prefer the mentioned options for AddBrandingImage 😉
Originally posted by SmartyManI had the same problems using GetTempFileName, so I guess this will work.
If the overwrite flag is the reason, why does the gfx.nsi work?
But OK, I will try this, thanks anyway.
The problem doesn't occour in gfx.nsi because I left SetOverwrite to the default value which is on. If you changed the overwrite setting to anything else anywhere in your script to no or ifnewer it just won't work.
Hm, so we have to do this work again and again, anytime we compile a new installer?Nope, you will just have to add a line such as 'ChangeUI "${NSISDIR}\Contrib\UIs\LeftBI.exe"' to your script.
In this case, I would prefer the mentioned options for AddBrandingImage
So you are planning the use compiled Win32 resource files (.res) which can be edited with ResHack?
Yes 😁