WINAMP.COM | Forums > Developer Center > NSIS Discussion > Unicode |
| Pages (9): [1] 2 3 » ... Last » |
Last Thread
Next Thread
|
| Author |
|
|
kichik M.I.A. [NSIS Dev, Mod]
Registered: Oct 2001 |
Unicode
Jim Park has issued a patch to add Unicode support to NSIS. Currently it's a completely different build that can create nothing but Unicode installers (no Windows 9x support). __________________ |
||
|
|
|
jimpark Senior Member
Registered: Sep 2007 |
Thanks for posting that kichik. __________________ |
||
|
|
|
kichik M.I.A. [NSIS Dev, Mod]
Registered: Oct 2001 |
Source code link: __________________ |
||
|
|
|
jimpark Senior Member
Registered: Sep 2007 |
Well, the niceness of this approach is that those who want the ANSI version for Win95/98/ME compatibility can use the ANSI version. For those who need support of languages that only Unicode can provide can use the Unicode version. It gives you a choice. And we can give you that choice with one code base. __________________ |
||
|
|
|
HaydenDevlin Junior Member
Registered: Jul 2007 |
I have just adapted my installer to use this unicode version for a russian language installer, and everything seems fine in russian except for some reason the welcome page has loads of question marks instead of the correct characters of the introduction text. It's weird because all the other panels are fine. Does anyone know what is going on here? |
||
|
|
|
jimpark Senior Member
Registered: Sep 2007 |
The introduction text should ALSO be Unicode. So open it up in Notepad and then save as Unicode encoding. That should work. So remember EVERYTHING must be Unicode. If you have an ASCII file, you need to make sure it's now UNICODE. Hope this helps. __________________ |
||
|
|
|
dienjd Senior Member
Registered: Oct 2005 |
Sounds great. One quick question: what happens when one of these builds gets run on 9x? Is it possible to detect in .onInit and show a MessageBox to the user, or would it just crash immediately? If the latter, then I guess the build could be wrapped by a non-Unicode build that does this detection and messaging. |
||
|
|
|
dienjd Senior Member
Registered: Oct 2005 |
|
||
|
|
|
Comm@nder21 Major Dude
Registered: Jul 2003 |
how about Microsoft Layer for Unicode on Win95/98/ME (MSLU)? __________________ |
||
|
|
|
Anders Major Dude
Registered: Jun 2002 |
yeah, but you have to ship the MSLU dll along with the installer __________________ |
||
|
|
|
Comm@nder21 Major Dude
Registered: Jul 2003 |
well, at least nsis may get compiled against mslu, so it still works normal on win2k/xp/vista, but also MAY work on win95/98/me IF the user has mslu installed. __________________ |
||
|
|
|
dienjd Senior Member
Registered: Oct 2005 |
When converting ANSI files to Unicode, I've noticed that the conversion works fine with Notepad, but converting using Textpad or the iconv program on FreeBSD results in the Unicode file not working with Unicode NSIS. |
||
|
|
|
kichik M.I.A. [NSIS Dev, Mod]
Registered: Oct 2001 |
There are a few possible reasons. The first is conversion to a wrong charset. Even Unicode has multiple charsets available. Make sure you convert to UTF-16LE. __________________ |
||
|
|
|
jimpark Senior Member
Registered: Sep 2007 |
My thoughts are exactly the same as kichik's. Here's a little utility I wrote called a2u.exe that converts an ANSI codepage text file to Unicode. You provide what codepage to use. So it can be run regardless of your OS codepage setting. So this will fit your bill in making this whole process automated. (I didn't convert all the include files, example, etc., by hand, you know?) It should also be helpful in converting your current NSIS scripts to Unicode as well.
|
||
|
|
|
dienjd Senior Member
Registered: Oct 2005 |
Thanks for the utility and patch. The Unicode support will hopefully save me from having to use InstallShield! |
||
|
|
|
Benski Ben Allison Lead Developer Winamp Dev Team
Registered: Jan 2005 |
Jim - |
||
|
|
|
Clammerz Junior Member
Registered: Apr 2006 |
Anymore news about this? |
||
|
|
|
kichik M.I.A. [NSIS Dev, Mod]
Registered: Oct 2001 |
Should be integrated, no timeframes and System can already handle both ANSI and Unicode so nothing should change. __________________ |
||
|
|
|
jimpark Senior Member
Registered: Sep 2007 |
The only change made to System is that all the calls default to Unicode strings rather than ANSI strings. So for example, if you specified MessageBox(...), then it will actualyl call MessageBoxW(...). As long as you provide the right function signature, then the System will work as you expect. I just had to rework some of the interfacing back and forth through the NSIS global stack but using it should be the same. __________________ |
||
|
|
|
jimpark Senior Member
Registered: Sep 2007 |
Kichik, I was wondering, also, of what it would take for it to be incorporated into the NSIS trunk. Since the source for Unicode NSIS can generate both Unicode and ANSI versions of NSIS, bug fixes in this version of the source will benefit both the Unicode and the ANSI version. I would hate to see the Unicode NSIS code get orphaned. If we wait much longer the code base for the NSIS and Unicode NSIS will diverge too much and someone's going to have to redo the 1.5 months of fulltime work to make it work again. __________________ |
||
|
|
|
kichik M.I.A. [NSIS Dev, Mod]
Registered: Oct 2001 |
As I see it, the first step is a completely separate build for Unicode (like 8192 string and logging builds) which will minimally affect the main build. Later, the compiler can start moving towards being able to create either type of installers. Finally, the stubs could be made common so ANSI will be automatically used on 9x and Unicode on any capable system. __________________ |
||
|
|
|
kichik M.I.A. [NSIS Dev, Mod]
Registered: Oct 2001 |
Just had a look at Benski's Unicode branch and saw he used a nice trick to get around the CHAR4_TO_DWORD optimization - QTCHAR. __________________ |
||
|
|
|
jimpark Senior Member
Registered: Sep 2007 |
Actually, I disagree that the examples and NSIS include files should be generated from a single source for both. Eventually, the number of languages supported for Unicode will continue to grow while the number ANSI languages have already stopped growing. The common subset (e.g. Latin I) may be able to share a common source but even then there are things like System calls that will be subtly different for ANSI and Unicode. Much like the C++ source itself, we may have to add #ifdef UNICODE or some equivalent into the NSIS scripts if we pursue having one source script for both. But again, I imagine that the Unicode languages will continue to grow which will never have an ANSI counterpart. And Win9x/ME OSes will continue to dwindle in significance. __________________ |
||
|
|
|
kichik M.I.A. [NSIS Dev, Mod]
Registered: Oct 2001 |
But currently there are none and so it generates an unjustified work overhead. Updating an example requires updating two files. That's always a cause for nice little "oops" bugs. __________________ |
||
|
|
|
jimpark Senior Member
Registered: Sep 2007 |
That is true. So for now, I do have that a2u.exe that I've uploaded here. We can use it as part of the build process to take the ANSI scripts and convert them to Unicode ones for those which are easily derivable. For those that do need hand tweaks (there may be a few), we can keep those separate. For scripts that use the System plugin, for example, we need only use the API without the "W" or "A" as the suffix i.e. don't use MessageBoxA or MessageBoxW just MessageBox and the correct version will be picked up by the System plugin. So I think it's quite possible to achieve a unified single source for most scripts. __________________ |
||
|
|
|
jimpark Senior Member
Registered: Sep 2007 |
I may have misunderstood your post. If you mean that there are no languages that are Unicode-only, then here are some: __________________ |
||
|
|
|
kichik M.I.A. [NSIS Dev, Mod]
Registered: Oct 2001 |
There are none in NSIS. And even if language files are added for those, it still doesn't justify having every example in Unicode as most examples don't demonstrate multiple languages and those that do, usually do this with a small collection of languages. __________________ |
||
|
|
|
AxelMock Junior Member
Registered: Apr 2007 |
|
||
|
|
|
kichik M.I.A. [NSIS Dev, Mod]
Registered: Oct 2001 |
__________________ |
||
|
|
|
jimpark Senior Member
Registered: Sep 2007 |
As I mentioned before, for the languages that have codepage support, I simply ran a a2u.exe to convert the ANSI script to the Unicode script. I did not hand edit all of those. I don't know 25 languages, after all. __________________ |
||
|
|
|
KrisAster Junior Member
Registered: Aug 2005 |
From your reply, Kichik, it seems as though there IS going to be a Unicode build of some form. Is this correct? Does that mean that this Unicode build is going to be integrated into the main release sometime soon? |
||
|
|
|
kichik M.I.A. [NSIS Dev, Mod]
Registered: Oct 2001 |
KrisAster, there's no time frame and my bet won't be on soon. __________________ |
||
|
|
|
jimpark Senior Member
Registered: Sep 2007 |
For those using the Unicode version of NSIS, I took the latest 2.33 source and merged the changes onto the Unicode version. The new binaries and source are posted to http://www.scratchpaper.com. Let me know if you find any problems with this release. Also let me know if you find the Unicode version useful. |
||
|
|
|
jimpark Senior Member
Registered: Sep 2007 |
I modified the Unicode language files in the installer to contain vernacular names for the various languages. So you can do something like this: __________________ |
||
|
|
|
havas Junior Member
Registered: Nov 2007 |
Thanks for this work. the unicode build works well. |
||
|
|
|
CodeSquid Member
Registered: Dec 2001 |
Thanks for your patch, it seems to be working great. |
||
|
|
|
jimpark Senior Member
Registered: Sep 2007 |
Unicode NSIS has been updated to support Georgian (a Unicode only language). Updated Unicode Simplified Chinese language files. Also fixed some bugs in __________________ |
||
|
|
|
prz Junior Member
Registered: Apr 2006 |
I'm trying to use your Unicode version. It works well until the use of some plugins. |
||
|
|
|
jimpark Senior Member
Registered: Sep 2007 |
Well, it will be a bit difficult not knowing C++ if you want to convert other plugins. But you could try downloading the source from the NSIS branch, then download the source from my site. And you could compare the source files for a smaller plugin like LangDLL and see what the differences are. __________________ |
||
|
|
|
| Pages (9): [1] 2 3 » ... Last » |
Last Thread Next Thread
|
WINAMP.COM | Forums > Developer Center > NSIS Discussion > Unicode |
Forum Rules:
|