Open XavSPM opened 3 weeks ago
I have continued my investigations and replaced the variable $(phoebus.install)
with its value in the settings.ini
file:
org.phoebus.ui/home_display=C:\Users\xgoiziou\Desktop\produc-spr-4.7.4-SNAPSHOT\ui\main.bob?app=display_runtime
However, I still get the same error. I then replaced the \
with \\
:
org.phoebus.ui/home_display=C:\\Users\\xgoiziou\\Desktop\\produc-spr-4.7.4-SNAPSHOT\\ui\\main.bob?app=display_runtime
But this did not solve the problem. I also tried:
org.phoebus.ui/home_display=C\:\\Users\\xgoiziou\\Desktop\\produc-spr-4.7.4-SNAPSHOT\\ui\\main.bob?app=display_runtime
Without success. The only solution that worked is this:
org.phoebus.ui/home_display=C:/Users/xgoiziou/Desktop/produc-spr-4.7.4-SNAPSHOT/ui/main.bob?app=display_runtime
While researching online, I found this discussion: Java URI SyntaxException on Stack Overflow. It seems there is an issue with interpreting paths on Windows.
I see two possibilities to solve this problem:
java.net.URI
.settings.ini
files on both Linux and Windows.What do you think?
There are a few sections where on one hand we aim to use a "URL", on the other hand we're trying to be flexible and allow For example related displays, where we want to allow spaces in the relative path to another display, which then need to be patched as '%20' or the like.
The most practical solution here might be to add a replacement of '\' into '/' in a suitable location,
I have noticed another bug. For directories containing spaces, they need to be replaced with %20.
Example:
org.phoebus.ui/home_display=C:/Program Files/EPICS Arronax/app/ui/main.bob?app=display_runtime
should become org.phoebus.ui/home_display=C:/Program%20Files/EPICS%20Arronax/app/ui/main.bob?app=display_runtime
.
@kasemir If you wish, I can take care of this modification. However, since Java is not my preferred language, I would need to know in which file to make these changes.
I think we could use a formatting function if the os.name
variable is equal to Windows 11
.
Hello,
I have a problem with the settings.ini file on Windows. To give you some context, I create installation packages with jpackage. Inside these packages, I include everything my programs need (interface, settings, icons, etc.).
On Linux, everything works correctly (in .deb and .rpm formats). However, on Windows, I encounter an error with my settings.ini file. Here is the content of the settings.ini file:
I use the
$(phoebus.install)
variable because it points to the installation location of my program. However, when I run the application, I get this error:And the home button does nothing.
I have tried several combinations, and the only one that worked is this:
org.phoebus.ui/home_display=/Users/xgoiziou/phoebus_translate_fr/phoebus_product/target/ui/main.bob?app=display_runtime
However, this is not what I want because I lose the flexibility of using the
phoebus.install
variable.Thank you for your help.