Old 19th January 2011, 20:03   #441
mzd
Junior Member
 
Join Date: Dec 2010
Posts: 3
Logging support for unicode version

Hello All,

I appears to me that all queries regarding logging support in the unicode port are being ignored. So, here goes again: is there any support for logging using LogSet in the unicode port. I have not yet understood the motivation behind turning off such a basic feature in any scripting language and especially in an install tool.

Thanks,

-mzd
mzd is offline   Reply With Quote
Old 19th January 2011, 20:21   #442
Afrow UK
Moderator
 
Afrow UK's Avatar
 
Join Date: Nov 2002
Location: Surrey, England
Posts: 8,434
It is turned off because it adds extra overhead to the installer. You'll have wait for kichik or someone with greater knowledge of the internals of NSIS to explain why such a feature cannot be toggled dynamically at installer compile time though. Perhaps when logging was implemented the developers didn't think of allowing dynamic enabling, or that the amount of work required was unnecessary. Sometimes using C compile time directives (#if ... #endif) with separate builds of a product is much simpler. Now that the code base is so large it'd probably be a lot of work to change now.

Edit: When the next version of NSIS is released which is Unicode, you will have a logging build then (http://nsis.sf.net/Special_Builds). For now you will just have to rebuild. You just need to install a few things to build; nothing that will cost you anything.

Stu
Afrow UK is offline   Reply With Quote
Old 19th January 2011, 20:47   #443
mzd
Junior Member
 
Join Date: Dec 2010
Posts: 3
@afrowuk.

Appreciate the response. Rebuild is an option, but not for me, since I don't own the build tools. The NSIS distribution is shared with other products and I am not at liberty to replace it with a custom build. It needs to be a published release ( a published special build distribution is ok ).

You mentioned that the next version of NSIS will be unicode enabled. Is that 2.47+?
Any insights in to the timeframe? Anyway, these are queries for the general NSIS Discussion forum.

Thanks,

-mzd
mzd is offline   Reply With Quote
Old 19th January 2011, 21:49   #444
CrushBug
Senior Member
 
Join Date: May 2005
Posts: 119
Go, go, NSIS Unicode version!
CrushBug is offline   Reply With Quote
Old 20th January 2011, 10:36   #445
DrO
 
Join Date: Sep 2003
Posts: 27,873
Quote:
Originally Posted by mzd View Post
It needs to be a published release ( a published special build distribution is ok ).
as this unicode build isn't really an official version then it's not too surprising no logging version was offered and would assume that any 'official' unicode versions would have a logging version providing along with the large string version (unless plans, etc have changed in that respect).

Quote:
Originally Posted by mzd View Post
You mentioned that the next version of NSIS will be unicode enabled. Is that 2.47+? Any insights in to the timeframe?
it looks like it'd be 2.50 based on what's in cvs / help docs though i guess that might change and i think the timeframe is when it's done and ready. as work keeps starting / stopping on it, things seem to be taking longer than i guess it was hoped to have been.

-daz
DrO is offline   Reply With Quote
Old 21st January 2011, 17:11   #446
Anders
Moderator
 
Anders's Avatar
 
Join Date: Jun 2002
Location: ${NSISDIR}
Posts: 5,180
Quote:
Originally Posted by DrO View Post
it looks like it'd be 2.50 based on what's in cvs / help docs...
I think that number was just a placeholder used by the fork

IntOp $PostCount $PostCount + 1
Anders is offline   Reply With Quote
Old 18th May 2011, 03:48   #447
pabs
Senior Member
 
pabs's Avatar
 
Join Date: Mar 2005
Posts: 186
status?

Whats the status of the Unicode support in SVN?

Actually, what is the status of SVN itself, right now I can't even seem to build makensis from SVN on Linux, it complains about tchar.h being missing.

bye,
pabs
pabs is offline   Reply With Quote
Old 18th May 2011, 16:13   #448
jimpark
Senior Member
 
Join Date: Sep 2007
Posts: 204
mzd, sorry about not replying to this forum earlier. For some reason, my auto notification to a new message got lost. I just uploaded a logging version for you. You should see it in the download section of www.scratchpaper.com.

Unicode NSIS advocate -- http://www.scratchpaper.com for latest build and source.
jimpark is offline   Reply With Quote
Old 18th May 2011, 21:22   #449
Anders
Moderator
 
Anders's Avatar
 
Join Date: Jun 2002
Location: ${NSISDIR}
Posts: 5,180
Quote:
Originally Posted by pabs View Post
Whats the status of the Unicode support in SVN?

Actually, what is the status of SVN itself, right now I can't even seem to build makensis from SVN on Linux, it complains about tchar.h being missing.
Nobody has touched the unicode stuff in a while, don't get your hopes up about this ever getting fixed. (You might be able to compile with VS2005+, otherwise you are out of luck)

IntOp $PostCount $PostCount + 1
Anders is offline   Reply With Quote
Old 19th May 2011, 05:09   #450
MSG
Major Dude
 
Join Date: Oct 2006
Posts: 1,892
So, I guess it's unlikely that there will ever be a new version of NSIS, then?
MSG is offline   Reply With Quote
Old 19th May 2011, 17:18   #451
Anders
Moderator
 
Anders's Avatar
 
Join Date: Jun 2002
Location: ${NSISDIR}
Posts: 5,180
Quote:
Originally Posted by MSG View Post
So, I guess it's unlikely that there will ever be a new version of NSIS, then?
We can still do ansi builds...

IntOp $PostCount $PostCount + 1
Anders is offline   Reply With Quote
Old 20th May 2011, 06:01   #452
MSG
Major Dude
 
Join Date: Oct 2006
Posts: 1,892
I'm all for that, I'm sure, but I'm thinking that would require some amount of decisive effort on the devs' part, what with the year and a half hiatus?
MSG is offline   Reply With Quote
Old 20th May 2011, 18:13   #453
Anders
Moderator
 
Anders's Avatar
 
Join Date: Jun 2002
Location: ${NSISDIR}
Posts: 5,180
Quote:
Originally Posted by MSG View Post
I'm all for that, I'm sure, but I'm thinking that would require some amount of decisive effort on the devs' part, what with the year and a half hiatus?
All the unicode changes are inside #ifdef UNICODE blocks...

IntOp $PostCount $PostCount + 1
Anders is offline   Reply With Quote
Old 15th June 2011, 03:54   #454
pabs
Senior Member
 
pabs's Avatar
 
Join Date: Mar 2005
Posts: 186
Quote:
Originally Posted by Anders View Post
We can still do ansi builds...
Except for on Linux (needs tchar.h)... hmm, mingw-w64 has tchar.h, I guess the cross-compile checks are in need of an update for the new toolchains.

bye,
pabs
pabs is offline   Reply With Quote
Old 15th June 2011, 15:20   #455
Anders
Moderator
 
Anders's Avatar
 
Join Date: Jun 2002
Location: ${NSISDIR}
Posts: 5,180
Quote:
Originally Posted by pabs View Post
Except for on Linux (needs tchar.h)... hmm, mingw-w64 has tchar.h, I guess the cross-compile checks are in need of an update for the new toolchains.
I'm going to try to fix all the ansi problems, but I'm not sure if we should move to mingw-w64 or stick with the original. Anyways, we probably need our own tchar.h or hacks in platform.h since not all compilers/CRT agree on how swprintf works.

IntOp $PostCount $PostCount + 1
Anders is offline   Reply With Quote
Old 16th June 2011, 18:58   #456
noeld
Junior Member
 
Join Date: Jun 2011
Posts: 4
Question NSIS Unicode High-DPI Awareness?

Hello all,

Is there any way to enable High-DPI awareness in an NSIS Unicode installer? Currently it seems to rely on display scaling in Windows 7 which does not look really good on high-DPI screens.

High-DPI awareness requires a manifest as describe in the article at:
http://msdn.microsoft.com/en-us/libr...(v=vs.85).aspx (Declaring DPI Awareness)

I tried to use mt.exe to apply the DeclareDPIAware.manifest but after that I get a message that the installer integrity check failed.

If this is not currently supported, could this be considered for an upcoming version? Thank you.
noeld is offline   Reply With Quote
Old 16th June 2011, 20:24   #457
Anders
Moderator
 
Anders's Avatar
 
Join Date: Jun 2002
Location: ${NSISDIR}
Posts: 5,180
Quote:
Originally Posted by noeld View Post
Hello all,

Is there any way to enable High-DPI awareness in an NSIS Unicode installer? Currently it seems to rely on display scaling in Windows 7 which does not look really good on high-DPI screens.
You could try system::call 'user32::SetProcessDPIAware()' in .onInit, if that does not work you two other options:

A) Use !packhdr and resource hacker to change the manifest (Or maybe mt.exe, who knows)

B) Recompile from source

IntOp $PostCount $PostCount + 1
Anders is offline   Reply With Quote
Old 16th June 2011, 20:29   #458
Anders
Moderator
 
Anders's Avatar
 
Join Date: Jun 2002
Location: ${NSISDIR}
Posts: 5,180
Quote:
Originally Posted by pabs View Post
Except for on Linux (needs tchar.h)... hmm, mingw-w64 has tchar.h, I guess the cross-compile checks are in need of an update for the new toolchains.
I'm now able to compile (ansi) with MinGW, get latest source from SVN and add these changes:

Quote:
--- SConscript-HEAD
+++ /trunk/Contrib/SubStart/SConscript Thu Jun 16 19:42:13 2011
@@ -9,8 +9,7 @@
libs = Split("""
""")

-Import('BuildUtil')
-
-substart = BuildUtil(target, files, libs)
-
-env.DistributeBin(substart, names=['makensis.exe'], alias='install-compiler') # install as makensis
+if env['PLATFORM'] == 'win32': #Using cross_platform = True just to force console app in PE header...
+ Import('BuildUtil')
+ substart = BuildUtil(target, files, libs, cross_platform = True)
+ env.DistributeBin(substart, names=['makensis.exe'], alias='install-compiler') # install as makensis

And you need to rename Call.S to Call.sx if you want to compile system.dll

I did not add the substart change to SVN since it is a bit of a hack, it would be better if we actually fixed the SCons stuff.

Not sure what to do about the Call.S issue, it might be SCons/MinGW version specific.

IntOp $PostCount $PostCount + 1
Anders is offline   Reply With Quote
Old 16th June 2011, 22:14   #459
noeld
Junior Member
 
Join Date: Jun 2011
Posts: 4
Thanks Anders,

system::call 'user32::SetProcessDPIAware()' in .onInit and un.onInit seems to work just fine. Some text looks a bit small but this should be ok for now.
noeld is offline   Reply With Quote
Old 8th July 2011, 15:23   #460
noeld
Junior Member
 
Join Date: Jun 2011
Posts: 4
Changing default font size

Now that I am able to build a High-DPI aware NSIS, I'd like to be able to make the default fonts larger (and consequently the size of the dialog boxes) so that the text (all statics, buttons, etc.) is easier to read on large screen with high DPI.

Is it possible to change the default font size when the installer starts so that the size of the default font is adjusted based on the current custom DPI setting in Windows Control Panel? If yes, how can I do that?

Thank you.
noeld is offline   Reply With Quote
Old 9th July 2011, 01:05   #461
Anders
Moderator
 
Anders's Avatar
 
Join Date: Jun 2002
Location: ${NSISDIR}
Posts: 5,180
For Win95 to 2003, the correct font to use is MS Shell Dlg @ 8pt and that is what we are using. MS messed things up with Vista (Segoe needs to be 9pt)

IntOp $PostCount $PostCount + 1
Anders is offline   Reply With Quote
Old 9th July 2011, 10:15   #462
noeld
Junior Member
 
Join Date: Jun 2011
Posts: 4
Could you recommend a way to handle this? Is this enough to correctly handle both low and high DPI displays? Thank you.
noeld is offline   Reply With Quote
Old 30th July 2011, 13:37   #463
Instructor
Major Dude
 
Join Date: Jul 2004
Posts: 671
Quote:
Originally Posted by Instructor View Post
How plugin can detect that it has been called from Unicode NSIS or from Ansi NSIS? Maybe add some new parameter in "extra_parameters" structure.
Found the workaround, maybe for someone it will be useful:
code:
stack_t **g_stacktop;
char *g_variables;
unsigned int g_stringsize;
extra_parameters *g_pluginParms;
BOOL g_unicode;

#define EXDLL_INIT() \
{ \
g_stacktop=stacktop; \
g_variables=variables; \
g_stringsize=string_size; \
g_pluginParms=extra; \
{ \
wchar_t wszPath[]=L"C:\\"; \
g_pluginParms->validate_filename((char *)wszPath); \
g_unicode=(wszPath[2] == L'\\')?FALSE:TRUE; \
} \
}

Instructor is offline   Reply With Quote
Old 30th July 2011, 20:51   #464
Instructor
Major Dude
 
Join Date: Jul 2004
Posts: 671
Or more optimized:
code:
stack_t **g_stacktop;
char *g_variables;
unsigned int g_stringsize;
extra_parameters *g_pluginParms;
BOOL g_unicode=-1;

#define EXDLL_INIT() \
{ \
g_stacktop=stacktop; \
g_variables=variables; \
g_stringsize=string_size; \
g_pluginParms=extra; \
if (g_unicode == -1) \
{ \
wchar_t wszPath[]=L"C:\\"; \
g_pluginParms->validate_filename((char *)wszPath); \
g_unicode=(wszPath[2] == L'\\')?FALSE:TRUE; \
} \
}

Instructor is offline   Reply With Quote
Old 30th August 2011, 16:02   #465
nwightman
Junior Member
 
Join Date: Aug 2011
Posts: 2
Hello.

The unicode installer works great for me, but in some locations strings are not displayed correctly.

All the calls which are displayed wrong seem to be coming from
!insertmacro INSTALLOPTIONS_WRITE "DatabaseServer.ini" "Field 1" "text" "$(MSG118)"
type calls.

Does the InstallOptions.nsh script not work for Unicode?

Thanks
nwightman is offline   Reply With Quote
Old 30th August 2011, 21:45   #466
Anders
Moderator
 
Anders's Avatar
 
Join Date: Jun 2002
Location: ${NSISDIR}
Posts: 5,180
Does this .ini start with a UTF16 BOM ?

IntOp $PostCount $PostCount + 1
Anders is offline   Reply With Quote
Old 31st August 2011, 08:40   #467
nwightman
Junior Member
 
Join Date: Aug 2011
Posts: 2
The ini files were UTF-8 encoded, I converted them to ut6-16-le and it works. Thanks.
nwightman is offline   Reply With Quote
Old 5th September 2011, 17:05   #468
jimpark
Senior Member
 
Join Date: Sep 2007
Posts: 204
2.46.2 Released

2.46.2 is actually a fairly major release. Although based on the official NSIS 2.46 release, there has been some extensive improvements.
  • For example, we've added two new commands: GetFontVersion and GetFontVersionLocal. These commands can be used to get the version information from a TTF font file. This command is valuable for those who are distributing and updating fonts with their products.
  • Changed linear look-up of keyword tokens to a hash table which greatly increased NSI compilation speed. Although NSI script compilation is generally not a bottleneck in the build process, you will notice a marked improvement in NSI compilation speed.
  • The log generated by the logging build now outputs a BOM at the beginning of a new log file so that many text editors can recognize the file as UTF-16LE.

Apart from these major changes, there has been some general bug fixes and improvements to translations. The source code also now builds on Microsoft Visual Studio 2010's version of C++, as well as previous versions of VC++.

You can get it from the usual place: www.scratchpaper.com.

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

Last edited by jimpark; 5th September 2011 at 18:07.
jimpark is offline   Reply With Quote
Old 5th September 2011, 17:23   #469
Pawel
Moderator
 
Pawel's Avatar
 
Join Date: Aug 2004
Location: Poland
Posts: 537
Send a message via ICQ to Pawel
Thanks Jim.
Already installed
-Pawel
Pawel is offline   Reply With Quote
Old 12th September 2011, 13:55   #470
Yathosho
Forum King
 
Yathosho's Avatar
 
Join Date: Jan 2002
Location: AT-DE
Posts: 3,363
while i'm personally interested in unicode versions of these, please take this as documentation of plugins that aren't yet available

-FontName
-Locate
-TextReplace
-ToolTips (source)

the sources come with each plugin unless mentioned otherwise
Yathosho is offline   Reply With Quote
Old 13th September 2011, 16:29   #471
Yathosho
Forum King
 
Yathosho's Avatar
 
Join Date: Jan 2002
Location: AT-DE
Posts: 3,363
just find out about CallAnsiPlugin, but i can't get it to work with the locate plugin.

ansi plugin call:
locate::_Open /NOUNLOAD `${_PATH}` `${_OPTIONS}`

callansi call
CallAnsiPlugin::Call "$PLUGINSDIR\Locate" _Open /NOUNLOAD `${_PATH}` `${_OPTIONS}`
CallAnsiPlugin::Call "$PLUGINSDIR\Locate" Open /NOUNLOAD `${_PATH}` `${_OPTIONS}`

both don't work (Invalid command: locate::_Open), what am i doing wrong?
Yathosho is offline   Reply With Quote
Old 13th September 2011, 16:57   #472
Anders
Moderator
 
Anders's Avatar
 
Join Date: Jun 2002
Location: ${NSISDIR}
Posts: 5,180
@Yathosho: You need to look at the CallAnsiPlugin documentation on the wiki, you can't just copy and paste a working ansi plugin command!

(Hint: /NOUNLOAD is not valid, read about using the * prefix, also, you need to specify the parameter count)

Even if you get all that stuff correct it might not work since CallAnsiPlugin will not work with every plugin.

IntOp $PostCount $PostCount + 1
Anders is offline   Reply With Quote
Old 16th September 2011, 17:46   #473
vicokoby
Junior Member
 
Join Date: Jun 2011
Posts: 15
Problem with the parameter /CMDHELP (Missing Commands).

When run this: makensis.exe /CMDHELP, only show this:
MakeNSIS v2.46.2-Unicode - Copyright 1995-2009 Contributors
See the file COPYING for license details.
Credits can be found in the Users Manual.

Abort [message]
vicokoby is offline   Reply With Quote
Old 17th September 2011, 21:42   #474
LoRd_MuldeR
Major Dude
 
LoRd_MuldeR's Avatar
 
Join Date: Sep 2005
Location: Somewhere over the Slaughterhouse
Posts: 797
Hello. First of all: Thanks for the new release!

But unfortunately I just noticed that there is major bug in the 2.46.2 release:
The installer won't run under Windows 2000 anymore, while previous version (2.46.1) worked perfectly fine
Error message is "Not a valid Win32 application" and installer won't even start up.

I was able to track down the problem with the help of CFF Explorer:
The OperatingSystemVersion field in the PE header is now set to 5.1 rather than 5.0

Has support for Windows 2000 been dropped intentionally (I don't hope so!) or has this happened by mistake?

(And yes, I still have users on Windows 2000. And I just figured out how to make VS2010 binaries work on Win2k)

Important info
In order to make VS2010 compiled binaries work on Windows 2000 (and WinXP RTM!), two simple steps are required:
(1) You need to set "Minimum Required Options" (in the Linker/System options) to 5.0
(2) You need to link your binary against EncoderPointer.lib in order to remove a dependency on a certain export from Kernel32.DLL which did not exist in systems prior to Windows XP with Service Pack 2 (which includes Windows 2000, of course)

Regards,
MuldeR.

My Plugins: StdUtils | NSISList | CPUFeatures | ExecTimeout | KillProc
My source of inspiration: http://youtu.be/lCwY4_0W1YI
LoRd_MuldeR is offline   Reply With Quote
Old 20th September 2011, 01:09   #475
jimpark
Senior Member
 
Join Date: Sep 2007
Posts: 204
Thank you, Lord Mulder. Perhaps, the best thing would be for me to build with Visual Studio 2008 for now. I personally don't need to release any software to Win2K users but I see how this is a problem. I will rebuild and re-release 2.46.2 soon. Thanks for letting me know.

Unicode NSIS advocate -- http://www.scratchpaper.com for latest build and source.
jimpark is offline   Reply With Quote
Old 20th September 2011, 01:15   #476
LoRd_MuldeR
Major Dude
 
LoRd_MuldeR's Avatar
 
Join Date: Sep 2005
Location: Somewhere over the Slaughterhouse
Posts: 797
Quote:
Originally Posted by jimpark View Post
Thank you, Lord Mulder. Perhaps, the best thing would be for me to build with Visual Studio 2008 for now. I personally don't need to release any software to Win2K users but I see how this is a problem. I will rebuild and re-release 2.46.2 soon. Thanks for letting me know.
Thank you

(BTW: You know that VS2010 can use the VS2008 toolset? The toolset can be selected in project properties)

My Plugins: StdUtils | NSISList | CPUFeatures | ExecTimeout | KillProc
My source of inspiration: http://youtu.be/lCwY4_0W1YI

Last edited by LoRd_MuldeR; 20th September 2011 at 03:29.
LoRd_MuldeR is offline   Reply With Quote
Old 20th September 2011, 21:03   #477
jimpark
Senior Member
 
Join Date: Sep 2007
Posts: 204
I just released a beta version of 2.46.3. I've still compiled it using MSVC 2010 and I did not need the EncoderPointer.lib since I do not link to the standard library in exehead. So NSIS itself still requires Windows XP+ to build installers but the installer it generates should be able to run under Windows 2000. Lord Mulder, can you check this when you have the time? I've also added GetFontName and GetFontNameLocal to round out the font commands.

Unicode NSIS advocate -- http://www.scratchpaper.com for latest build and source.
jimpark is offline   Reply With Quote
Old 20th September 2011, 22:24   #478
LoRd_MuldeR
Major Dude
 
LoRd_MuldeR's Avatar
 
Join Date: Sep 2005
Location: Somewhere over the Slaughterhouse
Posts: 797
Quote:
Originally Posted by jimpark View Post
I just released a beta version of 2.46.3.
Thanks!

Quote:
Originally Posted by jimpark View Post
I've still compiled it using MSVC 2010 and I did not need the EncoderPointer.lib since I do not link to the standard library in exehead.
I see.

Quote:
Originally Posted by jimpark View Post
So NSIS itself still requires Windows XP+ to build installers but the installer it generates should be able to run under Windows 2000.
Actually it needs Windows XP with Service Pack 2. The RTM version or Service Pack 1 won't work either.

(That's why you still may consider linking EncoderPointer.lib into makensis.exe)

Quote:
Originally Posted by jimpark View Post
Lord Mulder, can you check this when you have the time? I've also added GetFontName and GetFontNameLocal to round out the font commands.
I just compiled an installer with NSIS v2.46.3 and it ran through on Windows 2000 just fine

My Plugins: StdUtils | NSISList | CPUFeatures | ExecTimeout | KillProc
My source of inspiration: http://youtu.be/lCwY4_0W1YI
LoRd_MuldeR is offline   Reply With Quote
Old 21st September 2011, 00:49   #479
jimpark
Senior Member
 
Join Date: Sep 2007
Posts: 204
Thanks for checking so quickly. If after a week of testing, I don't see any problems, I will release it. I don't think it's a problem to request WinXP SP2 for the developer boxes do you? I would like to keep moving forward with compiler updates as I move my other projects to the new tools.

On a side note, I'm considering dropping the third digit versioning and just moving forward to 2.47 and onwards. If and when the new NSIS comes out it is likely to be version 3, anyway. Besides, my code has forked enough that I don't think I can easily port over any changes from the trunk anyway. And there has been quite a lot of improvements to my code base since 2.46 came out two years ago. Kichik and I have very different philosophies on how NSIS should move forward. I personally think ANSI is dead. I don't believe in creating multiple versions of the build: big string version, logging version, logging with big string etc. I don't care about saving a few kilobytes on a setup that is a couple of megabytes big. So starting the next release, the builds will have the logging ability built in.

Unicode NSIS advocate -- http://www.scratchpaper.com for latest build and source.
jimpark is offline   Reply With Quote
Old 21st September 2011, 09:49   #480
MSG
Major Dude
 
Join Date: Oct 2006
Posts: 1,892
If the "new NSIS" you're hoping for is NSIS Unicode, I don't think it'll ever come unless the current unicode branch (your branch) gets merged into the trunk. Right now NSIS development is stalled because of this branching. If you want to continue development, please work on merging, instead of increasing the distance from trunk. You can't shoulder the entire development of NSIS on your own...
MSG is offline   Reply With Quote
Reply
Go Back   Winamp & Shoutcast Forums > Developer Center > NSIS Discussion

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump