NSIS Installer, Unicode and the UltraModern Interface
So, it’s been almost a week of fight but I managed to get through it at last.
I’ve recently embarked in a small crusade to get the NSIS installer and the UltraModern Interface work in Unicode. While it is quite simple to get NSIS Unicode (from this link) and to get the UltraModern installer (from here, thank SuperPat), some of the plugins in the latter need to be recompiled in Unicode.
Prior to do that of course, some of the code need to be changed to use TCHAR instead of char and the _T() wrapper around costant, as clearly explained by PerditionC in this post.
So after a few days of struggling I managed to recompile the SkinnedControls.dll and the InstallOptionsEx.dll which are used by UMUI to get everything working in Unicode . The last plugin you need is the NSISArray plugin already compiled in Unicode (thank to AfrowUK).
What to do:
- Download the three plugins from the above links and once you have all 3, put them into your plugin folder.
- before merrily going and compiling your scripts, convert all the INI files present in $NSISDIR\Contrib\UltramodernUI\Ini\ to UTF-16LE (You can do this with Notepad++). That way, WriteIniStr can detect the encoding and write a proper string that can appear no problem.
- addendum: You may need to download my Unicode version of UMUI.nsh from here in order to get some advanced features (like the Treeview StartMenu page) working.
- Enjoy.
Please do keep in mind that all of this is in beta and is provided “as-is” with no explicit or implied warranties.
Happy coding everyone!
PS: At the time of writing, my InstallerOptionsEx unicode plugin does NOT have support for RichText boxes in your custom pages. I just had no time to go over the file-open and file-read functions to convert to Unicode.
Dobogókő mon amour MEF and Unity in an ASP.NET MVC Application. Part1: MEF