NSIS Error "LicenseLangString: wchar_t conversion failed!" after Debian and NSIS Update - linux

I create Windows installers under Linux with the help of the program "makensis". Recently I updated the Linux machine from Debian 9 to Debian 11, which brought an upgrade of NSIS from version 2.51 to 3.04..
Since then my script to create the installer does not compile anymore. The script is generated from a build environment and I know that other people have it running on Debian 11, so it seems to be due to my environment rather than syntactical errors in the script.
If I test install NSIS 2.51 from Debian 9, the script runs without problems.
The script should create installers in English and German, if I comment out the German entries, it also works.
I have checked the syntax several times and am now at a loss.
Output of the error (shortened):
makensis -V4 ./work/XXX/XXX.nsi
MakeNSIS v3.06.1-1 - Copyright 1999-2020 Contributors
See the file COPYING for license details.
Credits can be found in the Users Manual.
Processing config: /etc/nsisconf.nsh
....
!insertmacro: MUI_LANGUAGE
!insertmacro: end of MUI_LANGUAGE
LangString: "INWpTitle" 1033 "Installation of XXX"
LangString: "INWpTitle" 1031 "Installation der XXX"
LangString: "INWpText" 1033 "This Wizard will be guiding you through the installation of XXX.
Before installation BaseCamp must be closed for allowing installation of the map data.
Choose Next for starting the installation."
LangString: "INWpText" 1031 "Dieser Assistent wird Sie durch die Installation der XXX begleiten.
Vor der Installation muss das Programm BaseCamp geschlossen werden damit Kartendateien ersetzt werden koennen.
Klicken Sie auf Weiter um mit der Installation zu beginnen."
LicenseLangString: "licenseFile" 1033 "XXX.nsis.license.en"
LicenseLangString: wchar_t conversion failed!
Error in script "./work/XXX/XXX.nsi" on line 114 -- aborting creation process
Content of XXX.nsi
105 !insertmacro MUI_LANGUAGE "English"
106 !insertmacro MUI_LANGUAGE "German"
...
113 LicenseLangString licenseFile ${LANG_ENGLISH} "XXX.nsis.license.en"
114 LicenseLangString licenseFile ${LANG_GERMAN} "XXX.nsis.license.de"

On non-Windows systems, iconv is used to convert the license file in NSIS 3 and there is something in that file it does not like.
You can
A) Convert the license file to RTF format.
B) Convert the license file to UTF-8 or UTF-16LE and make sure the file starts with a BOM/Signature.

Related

NSIS ShellExecAsUser plugin not found

I'd like to use the ShellExecAsUser plugin with NSIS 3.08.
I have placed the plugin .dll Unicode version into the "Plugins\x86-unicode" and the ANSI version into the "Plugins\x86-ansi" directory.
When I do
!insertmacro ShellExecAsUser::ShellExecAsUser 'open' '$INSTDIR\bin\program.exe' '' '' ''
... then makensis produces the following error:
!insertmacro: macro named "ShellExecAsUser::ShellExecAsUser" not
found!
What do I need to do to make the plugin work?
Plug-ins don't use !insertmacro.
Just call it directly:
ShellExecAsUser::ShellExecAsUser "" cmd.exe "/k echo Hello" SW_SHOWDEFAULT

Javacard 3.1 to 3.04 converter

Does anyone have any experience with Javacard tools 3.1?
I've run through the "installation and getting started": https://docs.oracle.com/en/java/javacard/3.1/guide/introduction.html
I can build / run / simulate and debug the demos in eclipse. Generating CAP files for 3.1 and 3.0.5
But when I run the converter to target 3.0.4 files, there is a verification error:
[ INFO: ] Converting CAP file HelloWorld with target version 3.0.4
[ INFO: ] Converter [v3.1.0]
[ INFO: ] Copyright (c) 1998, 2021, Oracle and/or its affiliates. All rights reserved.
parsing C:\Program Files (x86)\Oracle\Java Card Development Kit Simulator 3.1.0\samples\classic_applets\HelloWorld\applet\bin\com\oracle\jcclassic\samples\helloworld\HelloWorld.class
converting com.oracle.jcclassic.samples.helloworld.HelloWorld
writing C:\Program Files (x86)\Oracle\Java Card Development Kit Simulator 3.1.0\samples\classic_applets\HelloWorld\applet\deliverables\HelloWorld\com\oracle\jcclassic\samples\helloworld\javacard\helloworld.exp
writing C:\Program Files (x86)\Oracle\Java Card Development Kit Simulator 3.1.0\samples\classic_applets\HelloWorld\applet\deliverables\HelloWorld\com\oracle\jcclassic\samples\helloworld\javacard\helloworld.jca
Verifier Error: Version number mismatch on imported package javacard/framework (AID a0:0:0:0:62:1:1):
imported version is 1.6, export file version is 1.5
Verification failed
[ INFO: ] conversion completed with 1 errors and 0 warnings.
"C:\Program Files\Java\jdk-11.0.10\bin\java" "-Djc.home=C:\java\java_card_tools-win-bin-b_108-06_jan_2021\bin\\.." -classpath "C:\java\java_card_tools-win-bin-b_108-06_jan_2021\bin\\..\lib\api_classic_annotations-3.1.0.jar;C:\java\java_card_tools-win-bin-b_108-06_jan_2021\bin\\..\lib\api_classic-3.1.0.jar;C:\java\java_card_tools-win-bin-b_108-06_jan_2021\bin\\..\lib\tools.jar;C:\java\java_card_tools-win-bin-b_108-06_jan_2021\bin\\..\lib\json.jar;C:\java\java_card_tools-win-bin-b_108-06_jan_2021\bin\\..\lib\jctasks_tools.jar;C:\java\java_card_tools-win-bin-b_108-06_jan_2021\bin\\..\lib\commons-logging-1.2-9f99a00.jar;C:\java\java_card_tools-win-bin-b_108-06_jan_2021\bin\\..\lib\commons-cli-1.4.jar;C:\java\java_card_tools-win-bin-b_108-06_jan_2021\bin\\..\lib\asm-8.0.1.jar;" com.sun.javacard.converter.Main -config "C:\Program Files (x86)\Oracle\Java Card Development Kit Simulator 3.1.0\samples\classic_applets\HelloWorld\applet\configurations\HelloWorld.conf"
Has anyone seen this, or any idea what it could be? I only have the basic install from "Guide" link.

NSIS: Script compatible with NSIS2 and NSIS3

Nsis 3 supports new commands like Unicode true. I want a script that works with makensis2 and makensis3. Is this possible? I use linux.
I tried to write a script. But the compiler doens't accept this
Update:
!if "${NSIS_PACKEDVERSION}" > 0x02ffffff ; NSIS 3+
Unicode true
ManifestSupportedOS all
!else
!warning "NSIS v2, compiling ANSI installer!"
!endif
I use this but get still the error message warning 7070: Invalid number: "${NSIS_PACKEDVERSION}".
${If} is a run-time command but you need to use preprocessor instructions and all of those start with !.
!if "${NSIS_PACKEDVERSION}" > 0x02ffffff ; NSIS 3+
Unicode true
!else
!warning "NSIS v2, compiling ANSI installer!"
!endif
This is the official way but might not work with unofficial releases if VER_PACKED was not passed to SCons when building MakeNSIS.
Here is something that relies on the improved number parser in NSIS v3 instead:
!if 0n1 > 0 ; >= 3.0b0 (Documented in chapter 5.1)
Unicode true
!else
!warning "NSIS v2, compiling ANSI installer!"
!endif

Nsis MultiLanguage display language 2 times in language selection textbox

I have created my windows application installer using NSIS 3.02.1.
In language selection textbox, language is display 2 times.
EX.
English/English
Chinese (Simplified) / Hanyu (Jiantizi)
Russian / Russkij...
In my previous setup, which was build using NSIS 2.46 this language setup is looks like :
English
Chinese
Russian...
I don't want to change this in my language selection setup. How can I achieve language selection setup as define in NSIS 2.46 in NSIS 3.02.1?
If you still support Windows 95/98/ME then I would recommend that you use NSIS v2.51, it has all the security updates from NSIS v3 and better language support in the language selection dialog.
If you only support newer versions of Windows then you should add Unicode True to your script, this will display the native name of the language in the language selection dialog and all languages are supported on all systems.
If you insist on creating ANSI installers with NSIS v3 then you can use the undocumented LANGFILE_LANGDLL_FMT define:
OutFile test.exe
RequestExecutionLevel user
!define LANGFILE_LANGDLL_FMT "%NATIVEASCIINAME%" ; %NATIVENAME% can also be used but it will display ? in some cases.
!include "MUI2.nsh"
!insertmacro MUI_RESERVEFILE_LANGDLL
!insertmacro MUI_PAGE_COMPONENTS
!insertmacro MUI_PAGE_INSTFILES
!insertmacro MUI_LANGUAGE "English"
!insertmacro MUI_LANGUAGE "Swedish"
!insertmacro MUI_LANGUAGE "Russian"
!insertmacro MUI_LANGUAGE "SimpChinese"
Function .onInit
!insertmacro MUI_LANGDLL_DISPLAY
FunctionEnd
Section
SectionEnd

Error: component "zip" not found

I'm trying to install the zip library.
wonko:Desktop andrew$ alisp
International Allegro CL Free Express Edition
8.2 [Mac OS X (Intel)] (Jan 25, 2010 14:49)
Copyright (C) 1985-2010, Franz Inc., Oakland, CA, USA. All Rights Reserved.
This development copy of Allegro CL is licensed to:
Allegro CL 8.2 Express user
;; Optimization settings: safety 1, space 1, speed 1, debug 2.
;; For a complete description of all compiler switches given the
;; current optimization settings evaluate (EXPLAIN-COMPILER-SETTINGS).
CL-USER(1): (asdf:oos 'asdf:load-op :zip)
; Autoloading for package "ASDF":
; Fast loading /Applications/AllegroCL/code/ASDF.fasl
; Autoloading for package "EXCL.OSI":
; Fast loading /Applications/AllegroCL/code/OSI.fasl
; Fast loading from bundle code/fileutil.fasl.
; Autoloading for package "REGEXP":
; Fast loading from bundle code/regexp2-s.fasl.
; Autoloading for REGEXP::MAKE-VM-CLOSURE:
; Fast loading /Applications/AllegroCL/code/regexp2.fasl
; Fast loading /Applications/AllegroCL/code/YACC.fasl
Error: component "zip" not found
[condition type: MISSING-COMPONENT]
Restart actions (select using :continue):
0: Return to Top Level (an "abort" restart).
1: Abort entirely from this (lisp) process.
[1] CL-USER(2):
Specs:
Allegro CL 8.2
ASDF (presumably included with Allegro)
Mac OS X 10.6.4
MacBook Pro 5,1
The weird thing is that ASDF doesn't appear to search online for zip. It just gives up.
ASDF does not download libraries, you have to get them yourself. ASDF only searches the directories that are in the list asdf:central-registry for system definition files (.asd). If you want automatic installation and downloading of libraries checkout quicklisp or clbuild

Resources