-1

I am updating my script to version 3.06 of NSIS.

So I added "Unicode True" in my script, but I have a problem with plugins.

These plugins not of "x86-unicode" version:

If anyone is able to compile and provide dll, thank you in advance.

starworld
  • 1
  • 2

2 Answers2

0

Stackoverflow is not really the place for these type of questions. Your best bet is to ask the authors of these plug-ins to create a build for you.

Alternatively you can try the CallAnsiPlugin plug-in, it can call these older plug-ins in a Unicode installer.

Anders
  • 97,548
  • 12
  • 110
  • 164
0

The modification to add CallAnsiPlugin on the FontName plugin is more difficult.

I moved FontName.dll to the "x86-ansi" folder. I have converted FontName.nsh, FontReg.nsh and FontRegAdv.nsh ANSI to UTF8. In FontName.nsh I replaced FontName::Version with

File "/ONAME=$PLUGINSDIR\FontName.dll" "${NSISDIR}\Plugins\x86-ansi\FontName.dll"
CallAnsiPlugin::Call "*$PLUGINSDIR\FontName" Version 0

and FontName::Name with

File "/ONAME=$PLUGINSDIR\FontName.dll" "${NSISDIR}\Plugins\x86-ansi\FontName.dll"
CallAnsiPlugin::Call "*$PLUGINSDIR\FontName" Name 0

But during installation it causes an "CallAnsiPlugin error" and MessageBox "0". I added this modification : https://stackoverflow.com/a/56854513/15597989 Now print :

[ERROR] InstallTTFFont
[ERROR]     error: 0
[ERROR]     FontFile: startest.ttf
[ERROR]     FontFileName: startest.ttf
[ERROR]     Index: Line183.6

I discovered that the value 0 is none other than CallAnsiPlugin::Call "*$PLUGINSDIR\FontName" Name 0. So I test to replace (FontReg.nsh line 83) IfErrors 0 "${Index}-Add" by goto "${Index}-Add" always displays "CallAnsiPlugin error" but the file is installed.

  • I don't know how to remove this false return value !?

  • I saw that CallAnsiPlugin uses a file, this one is not deleted in the temporary folder created by the installer. I don't think this is normal ?

EDIT : My solution that works : https://github.com/22starworld/FontName-plug-in-NSIS

starworld
  • 1
  • 2
  • The file is not deleted because you prefixed the path with `*`. – Anders Apr 15 '21 at 13:13
  • ... `Name 0` should probably not be 0, it needs to be the parameter count. – Anders Apr 16 '21 at 21:40
  • In the source code of the plugin `Name` and `Version` is written `name` `version`, this is what causes the error "CallAnsiPlugin error". For the parameter : 1 for version and 7 for name, are values that work. – starworld Apr 18 '21 at 09:29