I will be answering most concerns here, in no particular order. I think it will simplify the next messages.
- This is far from an overhaul of the script. The logic did not really change, neither the code structure. I have ideas on how to do it, and I could do it if you are OK with it, but I completely agree that larger changes should be delayed to the next version (or 2.4 should be delayed by a few months). This should also be the occasion to get rid of Python 2 completely, that would make the code much clearer. - The cosmetic changes are based on PEP8, which is the only style guide for Python. Highly similar patches already went into the code base less than a year ago (http://lists.lyx.org/pipermail/lyx-devel/2020-May/001464.html). Other style guides for Python are just more precise than PEP8 (e.g., Google: https://stackoverflow.com/a/2815311/1066843). I have yet to see an important open-source project that does not use PEP8 style guide. It's as unopiniated as opinion could get on Python. For now, the Python scripts follow the WTF style guide: every committer does what they prefer, without any kind of consistency. Python is very different from other languages in that there is a real consensus in the community on one style guide (PHP is going in the same direction, but it's not yet as commonly used: https://www.php-fig.org/psr/psr-2/). I am not proposing one style guide for C++ or Perl code, for instance. - This way to find Java is quite common on Windows platforms (actually, it's a lot like a port of JavaCall.jl's relevant portion of code: https://github.com/JuliaInterop/JavaCall.jl). It looks like Oracle's JVM does the same at installation: https://stackoverflow.com/a/9094539/1066843. Other JVMs mimic the same behaviour: https://github.com/AdoptOpenJDK/openjdk-installer/issues/64. Moreover, I don't think we can let beginner users on their own to configure the PATH, we really should go an extra step to find a Java binary (while letting the PATH have preference over anything else, so that users can still choose which Java they want). Using things like \HKEY_CLASSES_ROOT\Installer\Products\ is, in my opinion, the wrong way to check for Java in the registry: these identifiers seem to vary a lot between versions of Java ( https://docs.oracle.com/en/java/javase/15/install/installation-jdk-microsoft-windows-platforms.html#GUID-886D35CE-76AF-43B4-8C2F-7B34DB8B1666). On my machine, I have no 4EA42A62D9304AC4784BF2238120180F, for instance. I am attaching a new version of the patch based on https://docs.oracle.com/javase/9/install/installation-jdk-and-jre-microsoft-windows-platforms.htm#JSJIG-GUID-C11500A9-252C-46FE-BB17-FC5A9528EAEB. Does it work for you? Otherwise, would you have something else under HKEY_LOCAL_MACHINE\SOFTWARE\JavaSoft? On Fri, 29 Jan 2021 at 14:41, Kornel Benko <kor...@lyx.org> wrote: > Am Fri, 29 Jan 2021 13:39:19 +0100 > schrieb Pavel Sanda <sa...@lyx.org>: > > > On Fri, Jan 29, 2021 at 11:07:43AM +0000, José Abílio Matos wrote: > > > With the extent of the patches I fear that there could be bugs > (unintended > > > changes) lurking specially in relation to python 2. > > > > Riki's call, but I don't think this is the best time for python scripts > overhaul. > > Except the changes fixing real bugs we should IMHO postpone these to > post 2.4 world. > > > > Pavel > > +1 > > Kornel > -- > lyx-devel mailing list > lyx-devel@lists.lyx.org > http://lists.lyx.org/mailman/listinfo/lyx-devel >
0013-Configure-look-for-Java-in-the-registry-on-Windows.patch
Description: Binary data
-- lyx-devel mailing list lyx-devel@lists.lyx.org http://lists.lyx.org/mailman/listinfo/lyx-devel