Modify

Opened 2 years ago

Last modified 14 months ago

#22053 new defect

Windows installer shows no success message

Reported by: GerdP Owned by: team
Priority: normal Milestone:
Component: Installer Windows Version:
Keywords: template_report Cc: Don-vip

Description

What steps will reproduce the problem?

  1. Download josm-setup.exe
  2. Double click to start
  3. See a "Please wait" popup which disappears quickly.

What is the expected result?

A popup that asks for options or shows success with a hint how to continue or an option to launch the program.

What happens instead?

Nothing obvious, setup stops silently. It took me some time to find out that a new JOSM icon appeared on my desktop.

Please provide any additional information below. Attach a screenshot if possible.

Revision:18427
Build-Date:2022-04-05 19:23:14

Identification: JOSM/1.5 (18427 en) Windows 10 64-Bit
OS Build number: Windows 10 Home 2009 (19043)
Memory Usage: 198 MB / 1972 MB (59 MB allocated, but free)
Java version: 17.0.2+8-LTS, Azul Systems, Inc., OpenJDK 64-Bit Server VM
Look and Feel: com.sun.java.swing.plaf.windows.WindowsLookAndFeel
Screen: \Display0 1920×1080 (scaling 1.00×1.00)
Maximum Screen Size: 1920×1080
Best cursor sizes: 16×16→32×32, 32×32→32×32
System property file.encoding: Cp1252
System property sun.jnu.encoding: Cp1252
Locale info: en_DE
Numbers with default locale: 1234567890 -> 1234567890
VM arguments: [-Djpackage.app-version=1.5.18427, --add-modules=java.scripting,java.sql,javafx.controls,javafx.media,javafx.swing,javafx.web, --add-exports=java.base/sun.security.action=ALL-UNNAMED, --add-exports=java.desktop/com.sun.imageio.plugins.jpeg=ALL-UNNAMED, --add-exports=java.desktop/com.sun.imageio.spi=ALL-UNNAMED, --add-opens=java.base/java.lang=ALL-UNNAMED, --add-opens=java.base/java.nio=ALL-UNNAMED, --add-opens=java.base/jdk.internal.loader=ALL-UNNAMED, --add-opens=java.base/jdk.internal.ref=ALL-UNNAMED, --add-opens=java.desktop/javax.imageio.spi=ALL-UNNAMED, --add-opens=java.desktop/javax.swing.text.html=ALL-UNNAMED, --add-opens=java.prefs/java.util.prefs=ALL-UNNAMED, -Djpackage.app-path=%UserProfile%\AppData\Local\JOSM\JOSM.exe]

Plugins:
+ apache-commons (35924)
+ buildings_tools (35951)
+ contourmerge (v0.1.8)
+ ejml (35924)
+ geotools (35959)
+ imagery-xml-bounds (35893)
+ jackson (35958)
+ jaxb (35952)
+ jts (35924)
+ o5m (35893)
+ opendata (35910)
+ pbf (35893)
+ poly (35893)
+ reltoolbox (35893)
+ reverter (35893)
+ undelete (35893)
+ utilsplugin2 (35951)

Validator rules:
+ c:\josm\core\resources\data\validator\geometry.mapcss
+ c:\josm\core\resources\data\validator\unnecessary.mapcss
+ d:\java_tools\JOSM\mygeometry.mapcss

Last errors/warnings:
- 00000.493 W: extended font config - overriding 'filename.Myanmar_Text=mmrtext.ttf' with 'MMRTEXT.TTF'
- 00000.494 W: extended font config - overriding 'filename.Mongolian_Baiti=monbaiti.ttf' with 'MONBAITI.TTF'
- 00000.878 E: java.security.KeyStoreException: Windows-ROOT not found. Cause: java.security.NoSuchAlgorithmException: Windows-ROOT KeyStore not available

Attachments (0)

Change History (9)

comment:1 by anonymous, 2 years ago

Component: CoreInstaller Windows

comment:2 by taylor.smock, 2 years ago

Looking at https://docs.oracle.com/en/java/javase/17/docs/specs/man/jpackage.html , we don't have the following options set for Windows:

  • --win-shortcut-prompt
  • --win-update-url (Add/Remove programs)
  • --win-help-url (Add/Remove programs)

The --win-shortcut-prompt might force the installer to show a question at the end ("Add shortcuts?"), but I don't know.

The script used to make the installer is located at source:trunk/native/windows/win-jpackage.sh

Hopefully we don't have to edit source:trunk/native/windows/main.wxs (documentation, but might be v4 (I think v3, since we are adding WiX Toolset v3.11 to the $GITHUB_PATH variable)). If so,

  • native/windows/main.wxs

    diff --git a/native/windows/main.wxs b/native/windows/main.wxs
    index fa509d9310..b2f2f1a6d1 100644
    a b  
    147147      <RemoveExistingProducts Before="CostInitialize"/>
    148148    </InstallExecuteSequence>
    149149
     150    <UI>
     151      <Publish Dialog="ExitDlg" Control="Finish"/>
     152    </UI>
     153
    150154  </Product>
    151155</Wix>

might work, but since I don't have a windows machine, I cannot test that. I don't think I can even build it. If I have to, I can try testing using GitHub actions. I'll have to check and see if we are only building the releases on the main branch.

comment:3 by GerdP, 2 years ago

Cc: Don-vip added

Hm, opposite on my side: I don't have a recent linux system running, not even any virtual machines since years.

in reply to:  3 comment:4 by taylor.smock, 2 years ago

Replying to GerdP:

Hm, opposite on my side: I don't have a recent linux system running, not even any virtual machines since years.

I could probably try fiddling with WINE, but I know that it isn't perfect, so things could work under WINE but not under Windows. That is unlikely though.

comment:5 by taylor.smock, 14 months ago

@GerdP: I just read a machine translated post you made.

It reads like you interpreted comment:4 as needing a Linux machine to fiddle with the scripts for building on Windows. I'm sorry about the misunderstanding; I was trying to say that I could try to troubleshoot the building of the Windows installer under Linux, but I was not 100% confident that the same behavior would be exhibited under windows.

If you are running Windows 10 or later, you should be able to run source:trunk/native/windows/win-jpackage.sh .

comment:6 by GerdP, 14 months ago

I am running Windows 10.
Windows doesn't have a bash or other linux shells which would execute *.sh scripts unless I install something like cygwin or anything similar. I think Microsoft also offers some kind of linux system but I've never tried that.
I've played with these things in the past but I often ended up with a corrupted Windows system, probably because I have my own collection of unix tools like grep or sed (build for windows) and they didn't match regarding options, so I stopped these experiments.

Anyhow, the script looks like a rather simple wrapper for a tool called jpackage, I find this in the JDK. So, yes, I should be able to run that tool, but I would have to understand what the script tries to do with the three sed calls and if the stuff regarding certificates can be ignored.

comment:7 by taylor.smock, 14 months ago

If you enable WSL, bash should be callable from powershell, according to what I've read.

Anyway, the signing certificates can be ignored, so long as you aren't redistributing the installer -- if you do, users will get a warning of some kind from Windows.

For sed, it looks like it is replacing variables (%josm-source-dir%) with the current working directory, and then replacing the start of the pwd output with windows drive representations.

In any case, it is a "simple" wrapper for the jpackage command; the big thing is setting the %josm-source-dir% to the correct path.

comment:8 by GerdP, 14 months ago

I've created my own wrapper script now and get stuck with these messages from jpackage

[14:55:23.063] Can not find WiX tools (light.exe, candle.exe)
[14:55:23.064] Download WiX 3.0 or later from https://wixtoolset.org and add it to the PATH.

I tried to install wix.exe with the command lsited on the given website

dotnet tool install --global wix

but that doesn't seem to work:

Keine ausführbare Datei zum Befehl "dotnet-tool" gefunden.

I've never worked with any of these tools, so I've no idea what's missing. Maybe my version of dotnet is too old?

C:\josm\core>dotnet --version
2.1.4

comment:9 by taylor.smock, 14 months ago

You'll probably have better luck using wix3 -- we are using that in GitHub CI, anyway.

For dotnet tool, you need dotnet 3.1 or later, apparently. wix4 requires dotnet 6 or later. It looks like you can get dotnet here. But wix3 might require an older version of dotnet. I have no clue.

Don-vip would probably know more -- he set up the windows installer for #17083.

Modify Ticket

Change Properties
Set your email in Preferences
Action
as new The owner will remain team.
as The resolution will be set. Next status will be 'closed'.
to The owner will be changed from team to the specified user.
Next status will be 'needinfo'. The owner will be changed from team to GerdP.
as duplicate The resolution will be set to duplicate. Next status will be 'closed'. The specified ticket will be cross-referenced with this ticket.
The owner will be changed from team to anonymous. Next status will be 'assigned'.

Add Comment


E-mail address and name can be saved in the Preferences .
 
Note: See TracTickets for help on using tickets.