I'm looking at this situation:
- I have downloaded Thonny 4 portable (with Python 3.10.6) and
- Installation of py5thonny mode worked fine on Windows 10.
- First activation of "imported mode for py5" downloaded the JDK-17 as expected, everything wonderful.
Then, when I move the portable folder arround, it breaks: The JDK is there in the right place, but the JAVA_HOME information in Thonny's configs/options got outdated.
It can be hard for beginners to understand what went wrong. If you uncheck and check the "imported mode for py5" menu a new updated JAVA_HOME line is added to the Thonny options, but the old one is not removed, and as far as I have tested this still won't work (you have to remove the outaded line, I think).
How could we improve this?
I had a proof of concept portable with everything already installed, but it counted on a laucher that would set JAVA-HOME every time, and also I had to modify thonny-py5mode so it would not add JAVA_HOME to Thonny options... I think this was far from ideal. So I'd like to enable people to build their own portables, and move them arround: that would be a good thing.
Is it too dangerous to check during plug-in loading if Thonny is portable and if so if JDK-17 is already installed and somehow act on it?
I hate to add too much magic and to override something the user could change in the options panel manually but maybe for this kind of beginner friendly tool it's reasonable. I'm really not sure at all how we should proceed.
I'm looking at this situation:
Then, when I move the portable folder arround, it breaks: The JDK is there in the right place, but the JAVA_HOME information in Thonny's configs/options got outdated.
It can be hard for beginners to understand what went wrong. If you uncheck and check the "imported mode for py5" menu a new updated JAVA_HOME line is added to the Thonny options, but the old one is not removed, and as far as I have tested this still won't work (you have to remove the outaded line, I think).
How could we improve this?
I had a proof of concept portable with everything already installed, but it counted on a laucher that would set JAVA-HOME every time, and also I had to modify thonny-py5mode so it would not add JAVA_HOME to Thonny options... I think this was far from ideal. So I'd like to enable people to build their own portables, and move them arround: that would be a good thing.
Is it too dangerous to check during plug-in loading if Thonny is portable and if so if JDK-17 is already installed and somehow act on it?
I hate to add too much magic and to override something the user could change in the options panel manually but maybe for this kind of beginner friendly tool it's reasonable. I'm really not sure at all how we should proceed.