Archive: NSIS 2.0 and DirShow for gamedev.sf.net


NSIS 2.0 and DirShow for gamedev.sf.net
I working on a new release of the Scrolling Game Development Kit which has an "Install Packager" component that creates an NSIS script to help the user create an installer for their game. I notice a few newer versions of NSIS have been released since I last visited this component of the program. I decided to try NSIS 2.0 RC2. I notice in reviewing the NSIS CVS log that DirShow has been "temporarily" disabled because it wasn't working. I would like to confirm that scripts designed for NSIS 1.96 will work as they used to when used in NSIS 2.0, at least with respect to the use of DirShow. I see it on the TODO list, but I'm still uneasy about it. Can anybody confirm this?

If not, I have another question. I notice that in version 2.0, if I simply remove the DirShow line, I get a nice installer with a default set of pages being displayed, I guess. Would such a script carry back to any pre-2.0 releases, or would the absence of a "DirShow" result in a non-functional installer or an un-compilable script? I would rather not go downloading older versions just to try it if someone can give me a tip here.

Basically, what are your recommendations for updating an NSIS script-generating wizard for a piece of software whose release (probably final release, as in no more updates) is coming up this week? It's currently labeled as "designed for NSIS 1.96". It would be nice if it could be compatible with all versions from 1.96 to 2.0.

Ooh, you can attach files in this forum... attached is a sample script, very similar to all scripts generated by this wizard. I have put in some tentative code for the next release with comments about using the script with NSIS 2.0.


'DirShow show' has always been the default behavior, you can safely remove it.

(The only "removed" feature is 'DirShow hide', because it does not easily fit in the new page system. However you can get the same behavior using a few lines of code in a page function.)

Most NSIS 2 features are backwards compatible, however some functions are deprecated. I recommend you to update your script to the NSIS 2 standards. That means that you should add page commands (Page directory, Page instfiles, UninstPage uninstConfirm and UninstPage instfiles) and
remove the text commands (DirText and UninstallText). You will automatically get good standard texts.

If you want you can make it support multiple langauges (using the provided language files) or include the modern user interface to get a wizard style like recent Windows versions.

Second: For a better way of installing the VB6 run-times see the NSIS Users Manual.


Compatibility level?
Attached is a script in which I think I took all your suggestions (Thank you, BTW). However, I'm still not entirely clear on the compatibility level of this script. If I'm using the include for UpgradeDLL to install the VB runtime files, and using the "Page" directive, are those new with NSIS 2.0? Will I now have to put "Designed for NSIS 2.0" and hope that people don't mind downloading a release candidate until the official 2.0 is ready? If that's the case, I might as well use the modern UI too instead of preceeding my reboot request with an old fashioned message box, right? (...assuming I can find the docs on adding that modern UI's finish dialog) Any further comments before I release the new version of GameDev with the new install script generator? Your detailed advice has been much appreciated.


The Modern UI automatically displays a finish page with radio buttons if the reboot flag is set.

You will indeed have to use NSIS 2, NSIS 1 doesn't support these features. The final release should be available within a few weeks.

If you want to use a components page you don't have to set ComponentText but just add "Page components", like the others. However, you have only one Section so there is no need to use it.


I don't know if looking at my scripts is more of a nuisance or a pleasure for you, but in case you're interested, I will attach my (probably) final version of a sample script generated from this utility. If you have any last comments, they are welcome. Otherwise, I think this is how the script generator will be released. I like the modern UI! It's worth switching to 2.0. Thanks again for your assistance.