Archive: Includes include too much?


Includes include too much?
I'm not entirely an NSIS newbie, but I just downloaded the recent beta and am working on creating some installs.

The NSH includes must contain some information that is superceding what I'd like to do. I'm using the ModernUI interface, and I'm trying to get a custom icon to show up with the install and uninstall icon lines, etc.

The standard icon is still showing up.

Am I supposed to edit the include file itself to customize my install script on that level?

The problem is that now I'm updating/editing two files instead of one nice clean NSI file.

Do the new ModernUIs deprecate the XPSTYLE, smooth install bars, etc., or do you still have to specify those lines in your script? Can BGCOLOR backgrounds still be used?

For convention's sake, do I name my scripts *.nsi or *.nsh? What's the difference (I realize they are text files, I mean, what's the proper way to do it "by the book?")?

There are so many include files now, and seemingly so many ways to do crap, that it's really getting more confusing than it should be, IMHO. The documentation (as appreciative as I am to have it), assumes that the user is VERY advanced (to me, anyways), and is just as cryptic as not having documentation.

I've tried some of the GUIs for creating scripts, but they basically do the bare minimum and each has their own way of doing the same things, making intermingling scripts created between different GUIs impossible.

I'm just a bit frustrated is all.


Maybe I've figured it out...
So, looking a little deeper in the include files, if a certain "feature" of the ModernUI isn't used, it defaults, right?
Ok.

Do these things (such as MUI_UNICON) need to be defined like:

!define MUI_UNICON "c:\foo\uninstal.ico"

or is the !define portion not needed, and just include MUI_UNICON on a separate line?

Why the different conventions?

I mean, why have:

MUI_ICON

when the instructions say you define the icon with just:

ICON

?

It's these inconsistencies that make all of this confusing to me.


The NSH includes must contain some information that is superceding what I'd like to do. I'm using the ModernUI interface, and I'm trying to get a custom icon to show up with the install and uninstall icon lines, etc.

The standard icon is still showing up.

Am I supposed to edit the include file itself to customize my install script on that level?
No, just use the

!define MUI_ICON "myico.ico"
!define MUI_UNICON "myunico.ico"
;Same Icon structure (same color depth and size)

Do the new ModernUIs deprecate the XPSTYLE, smooth install bars, etc., or do you still have to specify those lines in your script? Can BGCOLOR backgrounds still be used?
Yeap, the "XPStyle" inserts the manifest into the installer to get
the visual style of the XP machine; if not XP, will use the current
desktop theme of the user "with the BGcolors you assign" :)
For convention's sake, do I name my scripts *.nsi or *.nsh? What's the difference (I realize they are text files, I mean, what's the proper way to do it "by the book?")?
Actually with the ".nsi" when you double click in the file you open
the Notepad for editing (or another app installed).
When you right click in the "*.nsi" filem you see the options to
quickly compile it, instead of open the makensiw.exe
I've tried some of the GUIs for creating scripts, but they basically do the bare minimum and each has their own way of doing the same things, making intermingling scripts created between different GUIs impossible.

I'm just a bit frustrated is all.
For this, all newbies an not newbies should first read the Manual
and see the Examples. If isn't enough, well... welcome to the
Nsis Forum :D

To make it all less confusing, I suggest you to read the Modern UI Documentation (Contrib\Modern UI\Readme.html).

The Modern UI is a new interface written using NSIS code. You can configure the interface with defines, as you can see in the readme.

All the lines of code to make the interface work (graphics, text fields, pages, dialog resources etc.) will be inserted for you. The Modern UI also has it's own defaults. That's why making Modern UI installers works a bit different.


I did read the documentation. Sometimes the syntax of the documentation makes things even more confusing.

Do the MUI_* commands need to be preceeded by a !define call, or can they be just on a separate line without the !define?

I did take a few steps forward today, though, things slowly kinda started to click, or my coffee started kicking in, one of the two.

It's all about syntax that confuses the hell out of me.
Do section names MEAN anything, or can you name them anything?

Component installation confuses me. I've seen it done 3 different ways, and I haven't a clue which way is right.

The mouse-over info in the multi-config confuses me. Where does that information show up in the script? How does it know to display the mouse-over information for whichever section if you have multiple sections?

You look at 2 different scripts that highlight 2 different features, yet you can't utlize both of them to make 1 master script because for one reason or another, once you combine the two, it doesn't work.

Like branding image or the bannerimage and then there's this bannerimage(r). It's description is about as cryptic as the command.

There's too much "theoretical" usage of these things, that trying to actually take advantage of the command to use in a script is impossible as there's no real solid plain english documentation (insert your language) on how to really use it.

Pop is not defined. Or if it is, you have to read 7 other documents to figure out what the heck it's for!! I STILL don't understand what it does. It's like you have to be in the NSIS secret Mason society to understand just about 80% of what NSIS can do. :weird:


As you can read in the Modern UI Readme below "3. Defines", you can configure the interface using defines:

!define MUI_ICON "bla.ico".

If you have a component selection page and multiple sections, the user can choose which section(s) to install (the name will be used).

Section 7: "7. Set the descriptions for the sections" describes the mouse-over descriptions.

Maybe checking out the Modern UI Examples (Examples\Modern UI) will make everything a bit more clear.


It's like you have to be in the NSIS secret Mason society to understand just about 80% of what NSIS can do. :weird:
:D Funny and sometimes true although :weird:

Try to undertand. Nsis still en develpment as the same time
the manual; it's really a lot a work to do for them.

I found NSIS the easiest thing to learn. It took me 4 years to fully learn howe to master the art of making Quake2 / Half-Life maps, and took me a measly 2 months to master the NSIS / MUI / IO / Whatever NSIS related!

I thank NSIS for their very good help, and I think their documents could not be better. (My opinion!)

Maybe I shall post my NSIS map-compiler program source.

-Stu


Afrow.
It's funny. I understand every technical issue about QRadiant, WorldCraft, BSP, etc. All of 'em. Used to help the developers of DETH as well for Doom.

Funny thing is, I can't DESIGN a level for crap.

I'm the opposite. When looking at a VERY good example script, I get it. Especially if it's color coded. HM NIS EDIT is a WONDERFUL program. Hands down my favorite unless WorkBench gets updated.

I'm just in a rut brain-wise, I think. Not quite clicking.


People (programmers) say to be able to be a programmer, you need to be able to think like a computer!

I'm only 15 now, so I have a lot of things to learn and do before I die.
I'm not sure how far I can get here in the UK (I'm near the Welsh border which is pretty deserlate) but I hope to learn Java, C++.

Perl is probably a waste of time, because I'm not willing to pay for a server which will support php / perl / whatever.

Personally, I will never use one of these wysiwyg editors, or installer generator progs. I want to get down to the hardcore code and learn it myself.
These generators will be forever limited, whereas notepad, yes notepad! will never be limited to the things you can do (unless you run out of memory!)

-Stu


...
The color coding helps me visualize different sections of code.

HM NIS Edit is basically just glorified notepad with a simple, quick wizard for the basics.

It auto-pastes all the MUI components, etc. And is very handy.

All in all, UltraEdit would work, too, if I wanted to take the time to create an NSIS color code template. :)


I'm 16 now, and it took me only last month to get C#. But I started with the Commodore 64, then QBasic in DOS, the Visual Basic 3! Now I use Visual Basic 6 and do a little Java programming for Robocode.

But I knew the basics of NSIS in about a month, and I have to confess:
I have NEVER create only a single NSIS script. Weird huh? :weird:
[edit]I mean: I have NEVER created a single NSIS script.[/edit]


Originally posted by virtlink
But I knew the basics of NSIS in about a month, and I have to confess:
I have NEVER create only a single NSIS script. Weird huh? :weird:
How do you mean?
You always make sarge large nsis scripts that they take up more than one file?

-Stu

Sorry, typo:

But I knew the basics of NSIS in about a month, and I have to confess:
I have NEVER created a single NSIS script. Weird huh? :weird: