Built an installer, some questions remain
I'm an experienced (25 years) software engineer, but most of my development and deployements have been unix or linux based. I'm currently developing an open source java-based system. I have previously tested that the system runs under Windows. Some people requested a Windows installer rather than the zip file I had previously used to package for Windows. I looked around, and NSIS seemed the best system to use to build an installer. It works reasonably well. I was able to build a decent installer without asking any questions.
I used the Modern UI. It seemed easier to configure than the other approaches I tried. The installer is visible at http://svn.sourceforge.net/viewvc/*c...i?revision=375
Some comments and observations first, then some questions:
My code is released as open-source, so I didn't force people to "accept" the license. This was easy to do.
I wanted to display some instructions before prompting for configuration information, and the best approach I could find was to re-use the MUI_PAGE_LICENSE macro from Modern UI. (If you look in the installer.nsi file above, you'll see that I've copied and edited that macro.) This allows me to insert a file that the user can scroll through. I needed to change the header and top text (since my new page wasn't a license), and the standard macro didn't seem to allow this. Is there a better way to do this?
After displaying the instructions, I prompt for configuration parameters, verify the values, and substitute the values into a config file. ConfigRead and ConfigWrite worked quite well for this. (I verify that two parameters are numeric, and insist that the password that is entered isn't the default one that ships with the system.) Feel free to adapt this example for others to use if it looks like my approach was reasonable.
There are a few issues that it would be nice to clean up if anyone can suggest changes I might make.
QUESTION 1: I made a 150x57 BMP files from a .png file for the header image. It displays pretty nicely using the previewer, but NSIS does something ugly with it. Any suggestions?
The BMP I feed to NSIS is http://svn.sourceforge.net/viewvc/*c...ogo.zocalo.BMP The result looks like the attached image.
QUESTION 2: I used dialogs::InputBox, but couldn't figure out how to wrap long lines (\r\n didn't work). If my lines are longer than a certain length, parts are hidden under the buttons.