|
|
#361 |
|
Moderator
Join Date: Jun 2002
Location: ${NSISDIR}
Posts: 5,442
|
@Afrow: the unicode merge has started, so whatever changes you make, add them to the official branch as well
IntOp $PostCount $PostCount + 1 |
|
|
|
|
|
#362 |
|
Senior Member
Join Date: Sep 2007
Posts: 204
|
Stu, I'm looking at the code right now and I don't see anything that could cause the behavior you are seeing. But the behavior is in line with a Unicode string being fed into an ANSI version of myatoi. Is there a simple NSI file that would test the problem?
Unicode NSIS advocate -- http://www.scratchpaper.com for latest build and source. |
|
|
|
|
|
#363 |
|
Moderator
Join Date: Nov 2002
Location: Surrey, England
Posts: 8,434
|
I'll see if I can knock something up.
Stu |
|
|
|
|
|
#364 | |
|
Moderator
Join Date: Nov 2002
Location: Surrey, England
Posts: 8,434
|
Ok here is the problem being reproduced:
Quote:
I've attached the plugins and NSIS script. Stu |
|
|
|
|
|
|
#365 | |
|
Registered User
|
Quote:
Please drop the command line spamming regarding file encoding or move them to /V3 this is my only desire in order to consider NSIS Unicode perfect. I'm using NSIS Unicode for more than two years and my only complain is regarding this, so called feature. A good command line utility should not spam you with few pages of useless text. This "feature" can make you miss potential warnings or even errors when compiling. Redirecting STDOUT is not an option. Also, I hope that NSIS will switch to NSISu as default instead of keeping the ancient ANSI version. |
|
|
|
|
|
|
#366 |
|
Senior Member
Join Date: Aug 2007
Location: Paris, France
Posts: 304
|
In my merging of NSIS Unicode in NSIS sources trunk, I removed most of these "File has a BOM"-type messages, keeping them only when it's a useful warning (no BOM).
So this will be solved in the future NSIS release that include my Unicode merge. As for switching to Unicode installers as default, I'm thinking more about adding a command-line option (that can be set as default, like the compressor in MakeNSISw) and an equivalent attribute command (like SetCompressor), for choosing ANSI or Unicode target. My NSIS plug-ins: http://wiz0u.free.fr/prog/nsis.php |
|
|
|
|
|
#367 |
|
Moderator
Join Date: Jun 2002
Location: ${NSISDIR}
Posts: 5,442
|
@Wizou: I posted a unofficial nsis installer ( http://forums.winamp.com/showthread.php?t=316842 ) that includes both ansi and unicode + a loader that tries to guess based on BOM or forced with command line param (Required hacked makensis.exe to allow different stub dirs) Once the unicode branch is fully merged, we could of course implement that functionality in a less hacky way (We need StubA/StubW and PluginsA/PluginsW folders and maybe for languages unless we are able to transform the ansi versions on the fly. Include dir should be shared (Some unicode fixes need to be added to make that come true IIRC))
IntOp $PostCount $PostCount + 1 |
|
|
|
|
|
#368 |
|
Senior Member
Join Date: Sep 2007
Posts: 204
|
2.46 RC1 Is Out!
2.46 RC1 Is Out!
The Unicode port of NSIS 2.46 is out as a release candidate. Apart from the straight port, I've made some improvements. New African languages are supported: •Cibemba (ANSI and Unicode) •Efik (Unicode only) •Igbo (Unicode only) •Malagasy (ANSI and Unicode) •Yoruba (Unicode only) As you can see, some of these languages are supported in my new ANSI build also. Please note that the translations aren't complete but "sufficient" as told to me by the translators so further enhancements may be forthcoming in a later release. Also, the System calls to lstr* family of functions in the kernel32.dll has been modified so that there is no longer the need to always suffix with "W" the lstr* functions for the Unicode build. The problem stemmed from the fact that in the kernel32.dll, the lstr* functions such as lstrlen, had three callable versions: lstrlenW, lstrlenA and lstrlen. (This is different from other win32 functions which only have two callable versions: the A and the W suffixed calls.) However, in kernel32, lstrlen is the same as lstrlenA. The reason for this strangeness in kernel32.dll was presumably for backward compatibility. So an NSI script that used System::Call kernel32::lstrlen would get lstrlenA in both the Unicode and the ANSI build of NSIS! Please note, this only happens with kernel32::lstr* functions. But this has been remedied by special code in the System plugin that looks for calls to kernel32::lstr* functions and adjusts the calls according to the build of NSIS so that there is no longer any confusion. The TCHAR-like names for the functions should now work for all of the win32 calls which should make porting of the standard NSIS scripts to the Unicode version much easier. I've also removed the "chatty" info messages regarding the Unicode encoding of the compiled NSI and NSH files. This was bothering some. In my personal testing, everything looked decent. Please take some time to check if your project works well with it and let me know if you find any problems. Unicode NSIS advocate -- http://www.scratchpaper.com for latest build and source. |
|
|
|
|
|
#369 |
|
Senior Member
Join Date: Sep 2007
Posts: 204
|
Stu,
I've tried looking at your TestMyatoi zip file and found only one version of pluginapi.lib there. Since you are saying this fails for the ANSI, you must be using the Unicode version of the lib. If you are building for ANSI, you need the ANSI version of the lib. You can't link to the same lib for both ANSI and Unicode version of your plugin. If this is something that is desired, I can create a unified lib with both ANSI and Unicode versions of the function existing in the lib with the pluginapi.h having #defines that map the different function calls to the right functions. This would basically mimic what win32 does. Unicode NSIS advocate -- http://www.scratchpaper.com for latest build and source. |
|
|
|
|
|
#370 |
|
Moderator
Join Date: Jun 2002
Location: ${NSISDIR}
Posts: 5,442
|
Are you saying you have a hardcoded check for "kernel32::lstr"? How do you know those are the only functions that are like that? I still say that if "t" type is used, unicode versions needs to go FooW() > Foo() > Fail
IntOp $PostCount $PostCount + 1 |
|
|
|
|
|
#371 |
|
Senior Member
Join Date: Sep 2007
Posts: 204
|
I'm pretty sure those are the only functions like that. Do the strings command on the various dlls and look for yourself. As for using 't' as the hint, would that work if the return type is what's different? It also won't work if the string type is actually a member of a struct and the pointer to the struct is what's being passed in. It's an interesting idea but I'm right now not sure if that is enough of a check.
Unicode NSIS advocate -- http://www.scratchpaper.com for latest build and source. |
|
|
|
|
|
#372 |
|
Moderator
Join Date: Jun 2002
Location: ${NSISDIR}
Posts: 5,442
|
@Jim: Yes, it would fail for structs. Not sure about return, I don't think you can have ...(...)t.s etc
Maybe we have to settle for some sort of flag. With the check for lstr, we can probably get by with your code until a problem actually shows up. IntOp $PostCount $PostCount + 1 |
|
|
|
|
|
#373 |
|
Moderator
Join Date: Nov 2002
Location: Surrey, England
Posts: 8,434
|
Jim,
bother didn't think about that. If you could make a define that would be handy. Stu |
|
|
|
|
|
#374 |
|
Senior Member
Join Date: Sep 2007
Posts: 204
|
Stu,
It is possible to do but probably not this release. It does require quite a bit of reworking for the pluginapi.h and I don't want to delay the 2.46 release any longer. But I'm sure 2.47 is around the corner and I will incorporate it then. Unicode NSIS advocate -- http://www.scratchpaper.com for latest build and source. |
|
|
|
|
|
#375 |
|
Major Dude
Join Date: Jun 2001
Posts: 1,173
|
Semi-on-topic...
First.. As I understand it, plugins written for the ANSI version of NSIS won't work in the Unicode version, and vice-versa. Am I correct in that understanding - or is this limited to plugins that perform specific tasks? Second.. As I understand it, the two compiles would typically result in two plugin files (Anders' BgWorker notwithstanding). Am I correct in that understanding - or would this again be limited to plugins that perform specific tasks? Just to use a particular example.. the GetVersion plugin by Stu (Afrow UK) has as part of its version notes "Better Unicode build support". However, the download only contains a single DLL. Is there anything specific one might look out for in a plugin's source - if available - that would tell a person that the plugin it would build would be ANSI, Unicode, or Hybrid (a la BgWorker)? The main reason I'm asking is because I'm working on compiling a list of plugins with some basic information - including whether it supports ANSI, Unicode or both - and GetVersion is the first one that made me realize that it might not be as trivial as simply checking if there's two DLLs (BgWorker makes its Hybrid method clear in both the wiki page and in the source). |
|
|
|
|
|
#376 |
|
Moderator
Join Date: Jun 2002
Location: ${NSISDIR}
Posts: 5,442
|
You can pretty much assume that no other plugin is a hybrid, it is a big ass pain to do.
If you look at the GetVersion source, you see that it uses the TCHAR type and _T/TEXT macros for strings. This is a indicator that it supports both unicode and ansi output. If UNICODE & _UNICODE is defined when building, you end up with a unicode dll. (@Stu: GetProcAddress does not take a unicode string!) If all you have is a compiled dll, open it in dependencywalker.com If a lot of the used functions in kernel32/user32 ends with A its ansi, or W for unicode. IntOp $PostCount $PostCount + 1 |
|
|
|
|
|
#377 |
|
Major Dude
Join Date: Jun 2001
Posts: 1,173
|
Cool - thanks Anders. I've used dependency walker before - just not that part of it.
Sounds like basically although the GetVersion plugin is Unicode-ready in terms of the source code, no compiled version is available in the official download at this time. 'll see about finishing that list later (fair bit later) and doing something with it in the wiki. |
|
|
|
|
|
#378 |
|
Moderator
Join Date: Nov 2002
Location: Surrey, England
Posts: 8,434
|
Yeh I did make sure the source was ready for Unicode (except GetProcAddress, thanks Anders) but never built (I don't think we had Unicode NSIS when I wrote that plug-in). I will build a Unicode version when I have time - in fact quite a few of my plug-ins needs updating but I'm stuck for time at the moment.
Stu |
|
|
|
|
|
#379 | |
|
Junior Member
Join Date: Sep 2009
Posts: 17
|
CallAnsiPlugin and nsisXML
Hi All
For my installer I use Anders' plugin "CallAnsiPlugin" with NSIS Unicode and everything's OK except with nsisXML by Wizou. Quote:
|
|
|
|
|
|
|
#380 |
|
Moderator
Join Date: Jun 2002
Location: ${NSISDIR}
Posts: 5,442
|
You are not checking that the nsisXML calls don't fail, if you did that you could maybe narrow down to the line that fails. What happens exactly, does it crash for example?
(There is also a chance that CallAnsiPlugin has a bug, it was never tested with this plugin) IntOp $PostCount $PostCount + 1 |
|
|
|
|
|
#381 | |
|
Junior Member
Join Date: Sep 2009
Posts: 17
|
Quote:
Actually, the first call (create) seems to be OK and then there is a crash of the exe. |
|
|
|
|
|
|
#382 |
|
Moderator
Join Date: Jun 2002
Location: ${NSISDIR}
Posts: 5,442
|
nsisXML has a unicode version in the zip file, why can't you use that?
IntOp $PostCount $PostCount + 1 |
|
|
|
|
|
#383 |
|
Junior Member
Join Date: Sep 2009
Posts: 17
|
@Anders:
Yeah you're right, I was using an older version. I'll try tomorrow the Unicode version. Thank You for your time and sorry for the incovenience |
|
|
|
|
|
#384 |
|
Moderator
Join Date: Jun 2002
Location: ${NSISDIR}
Posts: 5,442
|
I also found a varsync bug in CallAnsiPlugin, so I will update the wiki later today with the fixed version
IntOp $PostCount $PostCount + 1 |
|
|
|
|
|
#385 |
|
Junior Member
Join Date: Sep 2009
Posts: 17
|
Ok, the unicode nsisXML plugin works like a charm! thank You
|
|
|
|
|
|
#386 |
|
Senior Member
Join Date: Aug 2007
Location: Paris, France
Posts: 304
|
you're welcome ;-)
My NSIS plug-ins: http://wiz0u.free.fr/prog/nsis.php |
|
|
|
|
|
#387 |
|
Senior Member
Join Date: Sep 2007
Posts: 204
|
Unicode NSIS 2.46 is finally released!
Unicode NSIS advocate -- http://www.scratchpaper.com for latest build and source. |
|
|
|
|
|
#388 |
|
Moderator
|
Jim, thanks!
-Pawel PLEASE DONATE Projects: My Website | NSIS PL | Winamp PL | Winamp Help (PL) | Ultimate File Manager Winamp translations: Oficjalny Polski Pakiet Językowy (Official Polish Language Pack) Other Winamp projects: Winamp Color Themes | Winamp Icon Packs Winamp Tools: Winamp Tools (All About Winamp | Winamp Backup & Restore | Winamp Translation) |
|
|
|
|
|
#389 |
|
Member
Join Date: Nov 2009
Posts: 52
|
Hi JimPark, first of all I want to thank you for the updates lately !
as well I should let you know about TextFunc.nsh
it misses support for UTF-16LE files. I done a re-write of ${ConfigRead/Write} my self for now(see the attachment). I added the utf-16LE support within the same instruction by having it look for a BOM and handling the file accordingly. Hopefully all the other instructions can be done in a similar way. [edit: I just realized my re-write was a little buggy, as I forgot to reset the variable what indicates if there is a BOM or not. I re-uploaded, but just see it as an example !] Last edited by gringoloco023; 3rd June 2010 at 17:35. |
|
|
|
|
|
#390 |
|
Senior Member
Join Date: Aug 2007
Location: Paris, France
Posts: 304
|
I'm done porting NSIS sources to Unicode. It is now possible to compile NSIS sources (from Sourceforge repository) either as ANSI or UNICODE.
I'm now working on making the Unicode version able to generate both ANSI & Unicode installer, so we can make a switch and have everybody use a single (Unicode) version of makensis.exe My NSIS plug-ins: http://wiz0u.free.fr/prog/nsis.php |
|
|
|
|
|
#391 |
|
Moderator
Join Date: Nov 2002
Location: Surrey, England
Posts: 8,434
|
Very nice. On the plug-in side of things, will ANSI plug-ins be defunct now?
Stu |
|
|
|
|
|
#392 |
|
Senior Member
Join Date: Aug 2007
Location: Paris, France
Posts: 304
|
No, because people wanting to target Windows 9x & such still need ANSI installer & ANSI plugins.
However I have created a new version of the plugin API, mostly compatible with the current version, that allows plugins to work with both ANSI & Unicode installer (even if the plugin itself is compiled as ANSI or Unicode), making the conversions transparently. I will commit that soon to SVN. My NSIS plug-ins: http://wiz0u.free.fr/prog/nsis.php |
|
|
|
|
|
#393 |
|
Senior Member
Join Date: May 2005
Posts: 119
|
Hold it. Are you saying that there could be an official release from the main NSIS page with both ANSI and Unicode versions in the same package?
If this is true, this is HUGE for us, as we are only allowed by our legal department to use the versions of NSIS that come from the main page/official site. We are not allowed to use other versions (Unicode NSIS from scratchpaper, etc.) |
|
|
|
|
|
#394 |
|
Moderator
Join Date: Jun 2002
Location: ${NSISDIR}
Posts: 5,442
|
@CrushBug: Official SVN has working unicode build (It is pretty much the same code as the fork, at some point the merge will be complete hopefully)
IntOp $PostCount $PostCount + 1 |
|
|
|
|
|
#395 | |
|
Moderator
|
Quote:
Is it possible to write src\Docs\src\*.but files with utf8 encoding (and Halibut could parse it and create output html files with default utf8 encoding, that HTML Help Help Workshop could compile to chm)? Would be much simple for me, if it use this codepage, not default windows. Could someone with skills look into it? Or, this is to much work, and it is not worth... -Pawel PLEASE DONATE Projects: My Website | NSIS PL | Winamp PL | Winamp Help (PL) | Ultimate File Manager Winamp translations: Oficjalny Polski Pakiet Językowy (Official Polish Language Pack) Other Winamp projects: Winamp Color Themes | Winamp Icon Packs Winamp Tools: Winamp Tools (All About Winamp | Winamp Backup & Restore | Winamp Translation) |
|
|
|
|
|
|
#396 |
|
Senior Member
Join Date: Aug 2007
Location: Paris, France
Posts: 304
|
I'm not much aware about Halibut, and your demand is quite independent from porting NSIS code to Unicode.. I guess I won't be doing that soon..
Maybe someone else will look into it.. My NSIS plug-ins: http://wiz0u.free.fr/prog/nsis.php |
|
|
|
|
|
#397 |
|
Junior Member
Join Date: May 2010
Posts: 19
|
In Unicode NSIS this plug-in works incorrectly.
http://nsis.sourceforge.net/IP_plug-in Is there any other plug-in to get IPs of the computer or may be anybody could help with the solution for this plug-in? |
|
|
|
|
|
#398 |
|
Moderator
Join Date: Nov 2002
Location: Surrey, England
Posts: 8,434
|
If the plug-in is not Unicode then you will need to rebuild it.
How about this? http://www.codeproject.com/KB/vbscript/ipaddress.aspx Stu |
|
|
|
|
|
#399 | ||
|
Junior Member
Join Date: May 2010
Posts: 19
|
Quote:
And also I failed to understand how and what for to use a2u.exe program. Quote:
|
||
|
|
|
|
|
#400 |
|
Major Dude
Join Date: Feb 2007
Posts: 672
|
To get the IP address, have a look at the IpConfig plugin:
http://nsis.sourceforge.net/IpConfig_plugin |
|
|
|
![]() |
|
|||||||
| Thread Tools | Search this Thread |
| Display Modes | |
|
|