Include Python3 in the Windows installer
Thibaut Cuvelier
dourouc05 at gmail.com
Mon Mar 13 18:38:14 UTC 2023
On Sun, 12 Mar 2023 at 16:03, Yu Jin <technikmagma at gmail.com> wrote:
> Am So., 12. März 2023 um 09:59 Uhr schrieb Yu Jin <technikmagma at gmail.com
> >:
>
>> Am So., 12. März 2023 um 03:37 Uhr schrieb Thibaut Cuvelier:
>>
>>> On Sun, 12 Mar 2023 at 03:25, Richard Kimberly Heck wrote:
>>>
>>>> On 3/11/23 20:18, Thibaut Cuvelier wrote:
>>>>
>>>> On Sun, 12 Mar 2023 at 01:44, Richard Kimberly Heck wrote:
>>>>
>>>>> On 3/11/23 03:22, Yu Jin wrote:
>>>>>
>>>> So what would you say? Is pywin32 needed or do I skip it?
>>>>>
>>>>> 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.
>>>>>
>>>> For a typical Windows user, as I could see, having such windows
>>>> appearing is associated with viruses. I'm not too fond of adding a message
>>>> to the user saying that such windows are normal, they'd tend to think that
>>>> LyX is poorly coded.
>>>>
>>>> Are you able to test with and without the PyWin packages?
>>>>
>>> I could with a recent installer for 2.4 (these modules don't appear in
>>> the 2.3 package); I think I could just delete a bunch of files. Eugene,
>>> could you provide me with that? Otherwise, I'll test with my local build
>>> (hoping that my results are reproducible with the installer).
>>>
>> Sure, I just uploaded 2 signed Installers to google drive for you, you
>> should have received a message from google a couple of minutes ago.
>>
> 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.
>
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]
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.
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
- 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
- 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
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.lyx.org/pipermail/lyx-devel/attachments/20230313/dadeedfd/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/20230313/dadeedfd/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/20230313/dadeedfd/attachment-0003.png>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: C_Users_Thibaut_AppData_Roaming_LyX2.4.zip
Type: application/zip
Size: 494455 bytes
Desc: not available
URL: <http://lists.lyx.org/pipermail/lyx-devel/attachments/20230313/dadeedfd/attachment-0001.zip>
More information about the lyx-devel
mailing list