Unicode

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts
  • jimpark
    Senior Member
    • Sep 2007
    • 204

    Just modified the System plugin so that the 't' type specifier acts like a TCHAR*, that is, it will be an ANSI string in the ANSI version of NSIS, but will act as a wide-char string (Unicode string) in the Unicode NSIS.

    I introduced an 'm' type specifier to specify an ANSI string. Why 'm'? Well, I can't do 'a' or 's'. So 'm' stands for multi-byte string which ANSI strings can be (although, usually not). Also 'm' looks like an upside down 'w' which stands for wide-char string.

    This means that the conversion from your ANSI NSI script to the Unicode one will be mostly straightforward file conversion unless you were naughty and used the ANSI Windows API specifically, such as MessageBoxA. Some Windows API like GetProcAddress only take ANSI strings, so you should still look at your System calls carefully.

    The new version is dubbed 2.38.1. You know where to get it.

    I've also added an FAQ page (http://www.scratchpaper.com/unicodensisfaq). If there are any missing topics you'd like to see or there's some erroneous info, please e-mail me.
    Unicode NSIS advocate -- http://www.scratchpaper.com for latest build and source.

    Comment

    • Anders
      Moderator
      • Jun 2002
      • 5630

      there was already a feature request for this (http://sourceforge.net/tracker/index...49&atid=373088) would be great if you could submit a patch so the system plugin stays in sync
      IntOp $PostCount $PostCount + 1

      Comment

      • jimpark
        Senior Member
        • Sep 2007
        • 204

        I didn't know there was already a feature request. The feature request mentions 'z' as the potential type specifier. I did consider that but favored 'm'. Can we settle with 'm'?
        Unicode NSIS advocate -- http://www.scratchpaper.com for latest build and source.

        Comment

        • jimpark
          Senior Member
          • Sep 2007
          • 204

          BTW, I can't add the modified source to the feature request. I can only submit comments. (Permissions issue?) Or do I have to submit a new patch request?
          Unicode NSIS advocate -- http://www.scratchpaper.com for latest build and source.

          Comment

          • Anders
            Moderator
            • Jun 2002
            • 5630

            yeah, go with 'm', and you would have to submit it as a patch, not sure why its not possible to attach files
            IntOp $PostCount $PostCount + 1

            Comment

            • vcoder
              Junior Member
              • Jun 2008
              • 7

              2.39

              We a waiting for Unicode version of NSIS 2.39...

              Comment

              • jimpark
                Senior Member
                • Sep 2007
                • 204

                I'll probably work on it this weekend.
                Unicode NSIS advocate -- http://www.scratchpaper.com for latest build and source.

                Comment

                • Ta2i4
                  Junior Member
                  • Sep 2006
                  • 13

                  This code work well on ANSI version of NSIS 2.38 and failed on Unicode 2.38.1 version:

                  !define HAVE_UPX
                  !ifdef HAVE_UPX
                  !packhdr tmpexe.tmp "UPX --best -f -q -v --ultra-brute --all-methods --all-filters --compress-icons=0 tmpexe.tmp"
                  !endif

                  Comment

                  • jimpark
                    Senior Member
                    • Sep 2007
                    • 204

                    Have you tried packhdr just on its own to see whether it works on Unicode NSIS generated installers?
                    Unicode NSIS advocate -- http://www.scratchpaper.com for latest build and source.

                    Comment

                    • xbarns
                      Senior Member
                      • Aug 2007
                      • 187

                      I tried using a2u.exe on a Windows 2003 Server (SP1, Standard English) it gives me an error: "This application has failed to start because the application configuration is incorrect. Reinstalling the application may fix this problem."

                      It works fine on XP Pro. (SP2, German).

                      Comment

                      • Pidgeot
                        Senior Member
                        • Jan 2002
                        • 136

                        You most likely need a newer verison of the C++ redistributables installed: http://www.microsoft.com/downloads/d...DisplayLang=en

                        (If that doesn't work, try the 2008 one)

                        Comment

                        • jimpark
                          Senior Member
                          • Sep 2007
                          • 204

                          Well, if it is because of the redistributable, then it's a silly mistake on my part. I tried rebuilding the project. Can you try downloading a2u.zip and trying the executable inside it again?

                          As for the Unicode NSIS update, I don't think it's happening this week. I've got way too much other work to do. Hopefully, next week some time.
                          Unicode NSIS advocate -- http://www.scratchpaper.com for latest build and source.

                          Comment

                          • xbarns
                            Senior Member
                            • Aug 2007
                            • 187

                            It works now,thanks a lot!

                            Comment

                            • Ta2i4
                              Junior Member
                              • Sep 2006
                              • 13

                              Have you tried packhdr just on its own to see whether it works on Unicode NSIS generated installers?
                              This code I found in ansi-NSIS help file. I converted my ansi script file to unicode by a2u.exe and tried to compile it by unicode-NSIS. Result is error when part of code with UPX is processing.

                              Comment

                              • jimpark
                                Senior Member
                                • Sep 2007
                                • 204

                                Okay, so can you try calling UPX itself to see if it works on Unicode NSIS installers? What does the errors say? I just don't have a lot of time to work on Unicode NSIS these days, so you're going to have to help me find the problem a bit.

                                - Jim
                                Unicode NSIS advocate -- http://www.scratchpaper.com for latest build and source.

                                Comment

                                Working...
                                X