Include Python3 in the Windows installer
Yu Jin
technikmagma at gmail.com
Tue Mar 14 21:26:28 UTC 2023
Am Mo., 13. März 2023 um 19:38 Uhr schrieb Thibaut Cuvelier:
>
> About the installer: is it normal that I can't unselect the default
> dictionaries (like Russian or Portuguese, the probability that I'll use
> them is close to 0%)? I'm not saying anything about having the most common
> dictionaries included in the default LyX download. I'd just assume that
> there is no reason why I can't unselect the boxes here:
>
> [image: image.png]
>
Because I didn't implement it, this was not the point here, but probably
worth thinking about.
>
> Otherwise, with LyX-240dev-Installer-1-x64.exe, each time LyX starts,
> there is a terminal window that appears and immediately closes. However,
> LyX doesn't start. There is some error message in the window, but the
> normal user wouldn't be able to read it (it's shown for less than a few
> hundred milliseconds). That's because of my preference file, according to
> the error message (run from a PowerShell shell):
>
> PS C:\Program Files\LyX 2.4\bin> ./lyx.exe
> support\filetools.cpp (1262): Could not run file conversion script
> prefs2prefs.py.
> LyXRC.cpp (251): Unable to convert
> C:/Users/Thibaut/AppData/Roaming/LyX2.4/preferences to format 37
> Warning: Could not read configuration file
> ----------------------------------------
> Error while reading the configuration file
> preferences.
> Please check your installation.
>
> When removing the existing 2.4 directory, there is again a terminal window
> that opens with the results of configure. Not as nice as expected, newbies
> may not understand that it's coming from LyX. It looks like this:
>
> PS C:\Program Files\LyX 2.4\bin> ./lyx.exe
> LyX: Creating directory C:/Users/Thibaut/AppData/Roaming/LyX2.4/
> LyX: reconfiguring user directory
> +Running LyX configure with Python 3.11.2
> checking for DVI to DTL converter...
> +checking for "dv2dt"... yes
> checking for DTL to DVI converter...
>
> (This excerpt is when I run LyX from the command line; if I use the
> shortcut in the Start menu, a new terminal opens with the same content,
> except for the line starting LyX)
>
> Then, I'm shown a message saying that Welcome.lyx cannot be opened:
>
> [image: image.png]
>
> In the terminal:
>
> Error: Conversion script failed
> ----------------------------------------
> C:/Program Files/LyX 2.4/Resources/examples/Welcome.lyx is from an older
> version of LyX and the lyx2lyx script failed to convert it.
>
This is probably because of what I wrote earlier:
-- Oh, you might want to delete the file python311._pth inside the Python
folder, I just understood that it prevents loading custom modules if the
paths to those are not listed in it. Or you can put the paths to LyX'
modules manually in there, but I don't know which ones those are exactly,
so I think I'll just delete the file altogether in the future Windows
installers.
>
> To sum up:
>
> - minor interrogations:
> - some dictionaries must be installed, the user isn't given a choice
> - inconvenience:
> - without PyWin, LyX opens a terminal along the main GUI, which is
> not typical at all for Windows users; newbies will be afraid, others might
> find it inconvenient, but I expected the situation to be much worse
>
> Yes I am aware of that, the packages I gave you are not meant as a
release/beta whatever, I didn't bother deactivating any terminals, just
quickly packed what I had and gave to you.
>
> - with PyWin, at first, LyX opens a terminal — well, exactly like
> without PyWin
> - minor inconvenience: overall, there are 20 MB of files under the
> Python\Lib folders that don't seem required (~ 7% of the total install
> size, not that much of a big deal)
> - with PyWin, the help file is included:
> - C:\Program Files\LyX 2.4\Python\Lib\site-packagesC:\Program
> Files\LyX 2.4\Python\Lib\site-packages\PyWin32.chm
> - there are also tests, examples, and docs: are they really
> required? (Maybe for license reasons?)
> - C:\Program Files\LyX 2.4\Python\Lib\site-packages\adodbapi\test
> - C:\Program Files\LyX
> 2.4\Python\Lib\site-packages\adodbapi\examples
> - …
> - is the PythonWin EDI required?
> - C:\Program Files\LyX
> 2.4\Python\Lib\site-packages\pythonwinC:\Program Files\LyX
> 2.4\Python\Lib\site-packages\pythonwin
>
> I have no idea here, I don't know much about python, these files are what
pip installed along with pywin23 (all I did was pip install pywin32), I
don't know which unnecessary files pip installs and how to assess what is
needed in the first place.
>
> - potential bug:
> - LyX unable to upgrade my preferences. I'm attaching my AppData
> folder; I believe it's like ~/.LyX2.4 under Linux.
> - LyX unable to open Welcome.lyx
>
> To avoid these terminals, maybe it's a build problem at the Qt level? It's
> suggested to use WIN32 in the add_application() call in CMakeLists.txt:
> https://stackoverflow.com/a/36528717/1066843https://stackoverflow.com/a/36528717/1066843
>
This already exists, I just didn't activate it when preparing the packages
for you.
But what about the stuff you actually wanted to test?
-- Did you see my message about what this is supposed to do? Suppress
certain windows (terminals, I guess) from appearing when we're doing
certain things? If so, perhaps it would be worth seeing just how annoying
those windows are. If the answer is "not very", then maybe it isn't worth
the trouble.
Did you find anything useful about that? Or did the terminal make it
impossible to test? Do you want me to prepare new packages without the
terminal for you to give it another shot? I tried to test as well, but I
didn't find anything useful.
--
Eugene
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.lyx.org/pipermail/lyx-devel/attachments/20230314/7076021a/attachment-0001.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image.png
Type: image/png
Size: 130606 bytes
Desc: not available
URL: <http://lists.lyx.org/pipermail/lyx-devel/attachments/20230314/7076021a/attachment-0002.png>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image.png
Type: image/png
Size: 84551 bytes
Desc: not available
URL: <http://lists.lyx.org/pipermail/lyx-devel/attachments/20230314/7076021a/attachment-0003.png>
More information about the lyx-devel
mailing list