-
Notifications
You must be signed in to change notification settings - Fork 277
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Windows: "Sorry, this version of QZ Tray cannot be installed on this system" #1095
Comments
Possible solution: https://stackoverflow.com/a/73775477/3196753 |
Thanks to a contributor on the JNA bug tracker, there's an experimental flag in Windows which will fix this called "Beta: Use Unicode UTF-8 for worldwide language support". To enable this setting:
Note: This workaround will NOT fix usernames containing exclamation marks due to this bug. |
This solution worked on my system with no further changed needed. I think we are pretty close to getting this working without that flag, but if this solution is acceptable there is no need to go further. I will stash my work-in-progress and write up some notes just in case we ever need to come back to this. |
Thanks for confirming.
I assume you mean the This can be tested with the following code: diff --git a/ant/windows/windows-installer.nsi.in b/ant/windows/windows-installer.nsi.in
index 9b8f80d..517dc86 100644
--- a/ant/windows/windows-installer.nsi.in
+++ b/ant/windows/windows-installer.nsi.in
@@ -1,3 +1,4 @@
+Unicode true
!define MUI_BGCOLOR "SYSCLR:Window"
!define MUI_TEXTCOLOR "SYSCLR:WindowText"
!include MUI2.nsh
@@ -86,7 +87,15 @@ Section
SetOutPath $INSTDIR
; Copy files to a temporary location
- SetOutPath "$PLUGINSDIR\payload"
+ StrCpy $0 $PLUGINSDIR
+ System::Call 'kernel32::GetLongPathName(t r0, t .r1, i ${NSIS_MAX_STRLEN}) i .r2'
+ StrCmp $2 error +2
+ StrCpy $0 $1
+ ; DetailPrint $0 # will print C:\Program Files\NSIS, where supported
+ SetOutPath "$0\payload" Produces this: Output folder: C:\Program Files\QZ Tray
+ Output folder: C:\Users\Mišć\AppData\Local\Temp\nsv7E44.tmp\payload ... as opposed to this: (Notice Output folder: C:\Program Files\QZ Tray
+ Output folder: C:\Users\MI7D68~1\AppData\Local\Temp\nsd7602.tmp\payload ... however, due to an upstream bug with the way Java handles encoding, it the runtime cannot find all of the files required to function correctly. If there's a future need to have Unicode support in the installers, we should be able to easily support this via the following patch: diff --git a/ant/windows/installer.xml b/ant/windows/installer.xml
index 412c64c..3df40e3 100644
--- a/ant/windows/installer.xml
+++ b/ant/windows/installer.xml
@@ -62,6 +62,8 @@
<!-- Create the exe -->
<exec executable="${nsisbin}" failonerror="true">
+ <arg value="-INPUTCHARSET"/>
+ <arg value="UTF8"/>
<arg value="${build.dir}/${nsis.script.out}"/>
</exec>
diff --git a/ant/windows/windows-installer.nsi.in b/ant/windows/windows-installer.nsi.in
index 9b8f80d..d95a3fe 100644
--- a/ant/windows/windows-installer.nsi.in
+++ b/ant/windows/windows-installer.nsi.in
@@ -1,3 +1,4 @@
+Unicode true
!define MUI_BGCOLOR "SYSCLR:Window"
!define MUI_TEXTCOLOR "SYSCLR:WindowText"
!include MUI2.nsh
diff --git a/ant/windows/windows-launcher.nsi.in b/ant/windows/windows-launcher.nsi.in
index 9051491..f02b0f2 100644
--- a/ant/windows/windows-launcher.nsi.in
+++ b/ant/windows/windows-launcher.nsi.in
@@ -1,3 +1,4 @@
+Unicode true
!include x64.nsh
!include LogicLib.nsh
diff --git a/ant/windows/windows-uninstaller.nsi.in b/ant/windows/windows-uninstaller.nsi.in
index e572ec1..8274066 100644
--- a/ant/windows/windows-uninstaller.nsi.in
+++ b/ant/windows/windows-uninstaller.nsi.in
@@ -1,3 +1,4 @@
+Unicode true
!define MUI_BGCOLOR "SYSCLR:Window"
!define MUI_TEXTCOLOR "SYSCLR:WindowText"
!include MUI2.nsh |
It appears that the Windows installer does not support diacritic characters in the user name.
Steps to reproduce:
Mišć
with Administrator rightsThe following error occurs:
Workaround
C:\qz-temp-installer
cd C:\qz-temp-installer\ runtime\bin\java.exe -jar qz-tray.jar install runtime\bin\java.exe -jar qz-tray.jar certgen
The text was updated successfully, but these errors were encountered: