Re: Registry handling on windows (installer)

2020-04-05 Thread Yu Jin
Am So., 5. Apr. 2020 um 01:23 Uhr schrieb Richard Kimberly Heck <
rikih...@lyx.org>:

> On 3/27/20 2:23 PM, Yu Jin wrote:
>
> Am Fr., 27. März 2020 um 19:04 Uhr schrieb Richard Kimberly Heck <
> rikih...@lyx.org>:
>
>> On 3/23/20 1:49 PM, Yu Jin wrote:
>>
>> Here is another patch, I updated the description of DTL update, because
>> the newer version does not work with miktex, as discussed on the mailing
>> list today.
>>
>> Can you post all the necessary patches in one message? I've gotten a bit
>> confused about which is which.
>>
> Ok, here they are, I put the numbers in right order for it to be more
> clear.
>
> I've committed all of these now. Thanks!
>
> Can you remind me where the new dependencies are? I can upload them to
> ftp.lyx.org.
>
They are in my drive folder, which I have shared with you.

Eugene
-- 
lyx-devel mailing list
lyx-devel@lists.lyx.org
http://lists.lyx.org/mailman/listinfo/lyx-devel


Re: Registry handling on windows (installer)

2020-04-04 Thread Richard Kimberly Heck
On 3/27/20 2:23 PM, Yu Jin wrote:
> Am Fr., 27. März 2020 um 19:04 Uhr schrieb Richard Kimberly Heck
> mailto:rikih...@lyx.org>>:
>
> On 3/23/20 1:49 PM, Yu Jin wrote:
>> Here is another patch, I updated the description of DTL update,
>> because the newer version does not work with miktex, as discussed
>> on the mailing list today.
>
> Can you post all the necessary patches in one message? I've gotten
> a bit confused about which is which.
>
> Ok, here they are, I put the numbers in right order for it to be more
> clear.

I've committed all of these now. Thanks!

Can you remind me where the new dependencies are? I can upload them to
ftp.lyx.org.

Riki


-- 
lyx-devel mailing list
lyx-devel@lists.lyx.org
http://lists.lyx.org/mailman/listinfo/lyx-devel


Re: Registry handling on windows (installer)

2020-03-27 Thread Yu Jin
Am Fr., 27. März 2020 um 19:04 Uhr schrieb Richard Kimberly Heck <
rikih...@lyx.org>:

> On 3/23/20 1:49 PM, Yu Jin wrote:
>
> Here is another patch, I updated the description of DTL update, because
> the newer version does not work with miktex, as discussed on the mailing
> list today.
>
> Can you post all the necessary patches in one message? I've gotten a bit
> confused about which is which.
>
Ok, here they are, I put the numbers in right order for it to be more clear.

Eugene


0005-imagemagick-convert-and-description.patch
Description: Binary data


0001-implemented-64-bit-installer-removed-registry-hackin.patch
Description: Binary data


0004-updatelog-master.patch
Description: Binary data


0002-changed-main-registry-entry-LyX-Version-now-added-la.patch
Description: Binary data


0006-DTL-update-is-not-usable.patch
Description: Binary data


0003-description-for-windows-installer-and-dependencies.patch
Description: Binary data
-- 
lyx-devel mailing list
lyx-devel@lists.lyx.org
http://lists.lyx.org/mailman/listinfo/lyx-devel


Re: Registry handling on windows (installer)

2020-03-27 Thread Richard Kimberly Heck
On 3/23/20 1:49 PM, Yu Jin wrote:
> Am Fr., 20. März 2020 um 21:05 Uhr schrieb Yu Jin
> mailto:technikma...@gmail.com>>:
>
> Am Fr., 20. März 2020 um 20:16 Uhr schrieb Richard Kimberly Heck
> mailto:rikih...@lyx.org>>:
>
> I will do so by the end of the weekend. The main question is
> whether
> these will affect my 2.3.x builds in any way. 
>
> You would have to change the line
>
> !insertmacro FileListMSVC File "${FILES_LYX}\bin\"
> (file "install.nsh")
>
> you need the macro FileListMinGW here.
> You would also need to update the imagemagick in your
> dependencies, replacing it with the portable version.
> The main registry entry change is meant for 2.4.0, so not
> affecting your builds.
>
> Here is another patch, I updated the description of DTL update,
> because the newer version does not work with miktex, as discussed on
> the mailing list today.

Can you post all the necessary patches in one message? I've gotten a bit
confused about which is which.

Riki


-- 
lyx-devel mailing list
lyx-devel@lists.lyx.org
http://lists.lyx.org/mailman/listinfo/lyx-devel


Re: Registry handling on windows (installer)

2020-03-23 Thread Yu Jin
Am Fr., 20. März 2020 um 21:05 Uhr schrieb Yu Jin :

> Am Fr., 20. März 2020 um 20:16 Uhr schrieb Richard Kimberly Heck <
> rikih...@lyx.org>:
>
>> I will do so by the end of the weekend. The main question is whether
>> these will affect my 2.3.x builds in any way.
>
> You would have to change the line
>
> !insertmacro FileListMSVC File "${FILES_LYX}\bin\"
> (file "install.nsh")
>
> you need the macro FileListMinGW here.
> You would also need to update the imagemagick in your dependencies,
> replacing it with the portable version.
> The main registry entry change is meant for 2.4.0, so not affecting your
> builds.
>
Here is another patch, I updated the description of DTL update, because the
newer version does not work with miktex, as discussed on the mailing list
today.

Eugene


0001-DTL-update-is-not-usable.patch
Description: Binary data
-- 
lyx-devel mailing list
lyx-devel@lists.lyx.org
http://lists.lyx.org/mailman/listinfo/lyx-devel


Re: Registry handling on windows (installer)

2020-03-20 Thread Yu Jin
Am Fr., 20. März 2020 um 20:16 Uhr schrieb Richard Kimberly Heck <
rikih...@lyx.org>:

> On 3/20/20 1:47 PM, Pavel Sanda wrote:
> > On Tue, Mar 17, 2020 at 10:26:16AM +0100, Yu Jin wrote:
> >>> I have created a batch file, which deletes the redundant files. I have
> >>> decided to delete convert.exe and leave magick.exe, because it aligns
> with
> >>> the installed version of imagemagick and with what was shipped with LyX
> >>> until now.
> >>> I have attached the patch.
> >>>
> >> Any comments on these patches? commit?
> > I can commit if needed (though would prefer Riki looks at the path).
>
> I will do so by the end of the weekend. The main question is whether
> these will affect my 2.3.x builds in any way.

You would have to change the line

!insertmacro FileListMSVC File "${FILES_LYX}\bin\"
(file "install.nsh")

you need the macro FileListMinGW here.
You would also need to update the imagemagick in your dependencies,
replacing it with the portable version.
The main registry entry change is meant for 2.4.0, so not affecting your
builds.

Eugene
-- 
lyx-devel mailing list
lyx-devel@lists.lyx.org
http://lists.lyx.org/mailman/listinfo/lyx-devel


Re: Registry handling on windows (installer)

2020-03-20 Thread Richard Kimberly Heck
On 3/20/20 1:47 PM, Pavel Sanda wrote:
> On Tue, Mar 17, 2020 at 10:26:16AM +0100, Yu Jin wrote:
>>> I have created a batch file, which deletes the redundant files. I have
>>> decided to delete convert.exe and leave magick.exe, because it aligns with
>>> the installed version of imagemagick and with what was shipped with LyX
>>> until now.
>>> I have attached the patch.
>>>
>> Any comments on these patches? commit?
> I can commit if needed (though would prefer Riki looks at the path).

I will do so by the end of the weekend. The main question is whether
these will affect my 2.3.x builds in any way.

Riki


-- 
lyx-devel mailing list
lyx-devel@lists.lyx.org
http://lists.lyx.org/mailman/listinfo/lyx-devel


Re: Registry handling on windows (installer)

2020-03-20 Thread Pavel Sanda
On Tue, Mar 17, 2020 at 10:26:16AM +0100, Yu Jin wrote:
> > I have created a batch file, which deletes the redundant files. I have
> > decided to delete convert.exe and leave magick.exe, because it aligns with
> > the installed version of imagemagick and with what was shipped with LyX
> > until now.
> > I have attached the patch.
> >
> Any comments on these patches? commit?

I can commit if needed (though would prefer Riki looks at the path).
Pavel
-- 
lyx-devel mailing list
lyx-devel@lists.lyx.org
http://lists.lyx.org/mailman/listinfo/lyx-devel


Re: Registry handling on windows (installer)

2020-03-17 Thread Yu Jin
Am Di., 10. März 2020 um 08:18 Uhr schrieb Yu Jin :

> Am Mo., 9. März 2020 um 11:54 Uhr schrieb Pavel Sanda :
>
>> By scriptable I meant to have some kind of (shell?) script, which converts
>> the downloaded imagemagick to the one which is distributed by us,
>> if we make any changes to it. This would have two advatages:
>> 1. We are going to update imagemagick rather often because its often
>> fixed for
>>security vulnerabilities. (Again graphicmagick ppl claim they are
>>better in this regard, but it maybe just advertisement bull...)
>> 2. READMEs with manual instructions tend to be unupdated and manual
>> instructions
>>are sometime ambiguous.
>>
> I have created a batch file, which deletes the redundant files. I have
> decided to delete convert.exe and leave magick.exe, because it aligns with
> the installed version of imagemagick and with what was shipped with LyX
> until now.
> I have attached the patch.
>
Any comments on these patches? commit?

Eugene
-- 
lyx-devel mailing list
lyx-devel@lists.lyx.org
http://lists.lyx.org/mailman/listinfo/lyx-devel


Re: Registry handling on windows (installer)

2020-03-10 Thread Yu Jin
Am Mo., 9. März 2020 um 11:54 Uhr schrieb Pavel Sanda :

> By scriptable I meant to have some kind of (shell?) script, which converts
> the downloaded imagemagick to the one which is distributed by us,
> if we make any changes to it. This would have two advatages:
> 1. We are going to update imagemagick rather often because its often fixed
> for
>security vulnerabilities. (Again graphicmagick ppl claim they are
>better in this regard, but it maybe just advertisement bull...)
> 2. READMEs with manual instructions tend to be unupdated and manual
> instructions
>are sometime ambiguous.
>
I have created a batch file, which deletes the redundant files. I have
decided to delete convert.exe and leave magick.exe, because it aligns with
the installed version of imagemagick and with what was shipped with LyX
until now.
I have attached the patch.

Eugene


0001-updatelog-master.patch
Description: Binary data


0002-imagemagick-convert-and-description.patch
Description: Binary data
-- 
lyx-devel mailing list
lyx-devel@lists.lyx.org
http://lists.lyx.org/mailman/listinfo/lyx-devel


Re: Registry handling on windows (installer)

2020-03-09 Thread Pavel Sanda
On Sat, Mar 07, 2020 at 09:11:33AM +0100, Yu Jin wrote:
> Am Fr., 6. März 2020 um 19:09 Uhr schrieb Pavel Sanda :
> 
> > I think we use 'convert' but other executables are looking as a good
> > candidate
> > for removal.
> 
> Where do we use "convert"? There is no convert.exe in the current
> dependencies or LyX's install directories.

Well on non-Windows systems, you will call 'convert' not 'convert.exe'
so one has to make sure the first string is present in the sources
(which will probably give you gazilion false positives so I'm not
sure you want to spend your time on this :))

Another thing to check would be whether 'magick' is supported (I am pretty sure
'convert' is) by both imagemagick and graphicsmagick, which is alternatively
used on some systems (acutally you might want to check that fork -- maybe its
ported to windows, they claimed it's less conflicting with other software,
dunno what that means though).


> And also please do this scriptable, dependecies like imagemagick
> > need regular updates due to constant flow of security bugfixes...
> >
> Scriptable... Im not sure how you mean that, I dont know much about
> imagemagick, which files it really needs... there are lots of xml files...
> maybe imagemagick devs change something in the future. I planned to
> describe it as good as possible in the README for the windows installer,
> but I think a person would have to do it manually following the guide.

By scriptable I meant to have some kind of (shell?) script, which converts
the downloaded imagemagick to the one which is distributed by us,
if we make any changes to it. This would have two advatages:
1. We are going to update imagemagick rather often because its often fixed for
   security vulnerabilities. (Again graphicmagick ppl claim they are
   better in this regard, but it maybe just advertisement bull...)
2. READMEs with manual instructions tend to be unupdated and manual instructions
   are sometime ambiguous.

> Still, using the portable imagemagick would be a benefit, because no
> registry hacks would be required.

Completely agree.

> For stable: remove the registry writing part for imagemagick.
> For master change the main registry key from "...\LyX${APP_VERSION}" to
> "...\LyX\${APP_VERSION}".
> Finally update the readme and extend with description on how to update the
> dependencies.
> Is this ok with everybody?

Seems reasonable.
Pavel
-- 
lyx-devel mailing list
lyx-devel@lists.lyx.org
http://lists.lyx.org/mailman/listinfo/lyx-devel


Re: Registry handling on windows (installer)

2020-03-09 Thread Yu Jin
Am So., 8. März 2020 um 16:42 Uhr schrieb Yu Jin :

> Here is the second patch, for master, changing the discussed registry
> handling. I also added a value "latestVersion" which should contain a
> string with the newest installed LyX.
>
3rd patch with the descriptions.

Eugene


0001-description-for-windows-installer-and-dependencies.patch
Description: Binary data
-- 
lyx-devel mailing list
lyx-devel@lists.lyx.org
http://lists.lyx.org/mailman/listinfo/lyx-devel


Re: Registry handling on windows (installer)

2020-03-08 Thread Yu Jin
Am So., 8. März 2020 um 14:26 Uhr schrieb Yu Jin :

> Here is the first patch, I fixed some nsis errors I got, added code for a
> 64 bit installer and removed the registry hacking for imagemagick.
> This is meant for both master and 2.3.x
>
> @Riki, I also uploaded the updated dependencies (containing the portable
> imagemagick) to my drive. If you upload these to the ftp server, I could
> update the compile description for windows with the new link.
>
Here is the second patch, for master, changing the discussed registry
handling. I also added a value "latestVersion" which should contain a
string with the newest installed LyX.

Eugene


0001-changed-main-registry-entry-LyX-Version-now-added-la.patch
Description: Binary data
-- 
lyx-devel mailing list
lyx-devel@lists.lyx.org
http://lists.lyx.org/mailman/listinfo/lyx-devel


Re: Registry handling on windows (installer)

2020-03-08 Thread Yu Jin
Am Sa., 7. März 2020 um 09:11 Uhr schrieb Yu Jin :

> So as far as I can see I should do following:
> First update the dependencies with the portable imagemagick.
> For stable: remove the registry writing part for imagemagick.
> For master change the main registry key from "...\LyX${APP_VERSION}" to
> "...\LyX\${APP_VERSION}".
> Finally update the readme and extend with description on how to update the
> dependencies.
> Is this ok with everybody?
>
Here is the first patch, I fixed some nsis errors I got, added code for a
64 bit installer and removed the registry hacking for imagemagick.
This is meant for both master and 2.3.x

@Riki, I also uploaded the updated dependencies (containing the portable
imagemagick) to my drive. If you upload these to the ftp server, I could
update the compile description for windows with the new link.

Eugene


0001-implemented-64-bit-installer-removed-registry-hackin.patch
Description: Binary data
-- 
lyx-devel mailing list
lyx-devel@lists.lyx.org
http://lists.lyx.org/mailman/listinfo/lyx-devel


Re: Registry handling on windows (installer)

2020-03-07 Thread Yu Jin
Am Fr., 6. März 2020 um 22:42 Uhr schrieb Jean-Marc Lasgouttes <
lasgout...@lyx.org>:

>   No user has IM installed by default, and no package manager will do it
> for us. I really think that shipping the few binaries that we need and
> skipping the registry thing is the simplest solution for everyone.
>
Absolutely agree. It is one thing to not ship LaTeX with LyX (removing the
recently discussed Perl interpreter is somewhat grey zone imo, but when
mentioned in userguide in the specific sections (e.g. splitindex, or
wherever a perl interpreter is required), I would agree to that aswell),
compiling LaTeX files is not a LyX's feature (so I think it is right to ask
user to install LaTeX first), but displaying the content (which may have
e.g. pdf files) in the LyX window is. If I had to install additional
programs in order to make LyX display properly, as a user I would complain.
Even if I didn't know about that, I would make a bug report.

Am Fr., 6. März 2020 um 19:09 Uhr schrieb Pavel Sanda :

> I think we use 'convert' but other executables are looking as a good
> candidate
> for removal.

Where do we use "convert"? There is no convert.exe in the current
dependencies or LyX's install directories.

And also please do this scriptable, dependecies like imagemagick
> need regular updates due to constant flow of security bugfixes...
>
Scriptable... Im not sure how you mean that, I dont know much about
imagemagick, which files it really needs... there are lots of xml files...
maybe imagemagick devs change something in the future. I planned to
describe it as good as possible in the README for the windows installer,
but I think a person would have to do it manually following the guide.


> Isn't ghostscript used for (e)ps->pdf conversion?
>
Yes, it is, thank you. I have tried to do that with imagemagick and it does
not work (at least the ps part, eps do work), so ghostscript would need to
remain.

Still, using the portable imagemagick would be a benefit, because no
registry hacks would be required.
So as far as I can see I should do following:
First update the dependencies with the portable imagemagick.
For stable: remove the registry writing part for imagemagick.
For master change the main registry key from "...\LyX${APP_VERSION}" to
"...\LyX\${APP_VERSION}".
Finally update the readme and extend with description on how to update the
dependencies.
Is this ok with everybody?

Eugene
-- 
lyx-devel mailing list
lyx-devel@lists.lyx.org
http://lists.lyx.org/mailman/listinfo/lyx-devel


Re: Registry handling on windows (installer)

2020-03-07 Thread Stephan Witt
Am 07.03.2020 um 07:30 schrieb Daniel :
> 
> On 2020-03-06 22:06, Richard Kimberly Heck wrote:
>> On 3/6/20 3:24 PM, Daniel wrote:
>>> On 2020-03-06 19:53, Richard Kimberly Heck wrote:
 There is something I have always wondered here, but never really
 understood. Why do WE end to install ImageMagick? Why can't we just
 have the user install it, like we do on other platforms, and then
 detect it via the registry, if that's what we need to do? If we were
 going to use configure.py for fix broken dependencies then we can
 just use it to detect them in the first place, no? There is the issue
 that any installed ImageMagick will be bigger than what we ship. But
 the huge benefit is that, if there's a security issue with
 ImageMagick (as there sometimes is), we don't have to issue a new LyX
 installer to fix it.
 
 I'd ask the same questions about Ghostscript and Python.
 
 Riki
>>> 
>>> I guess the difference is that there is no package manager on Windows
>>> (and on macOS?).
>> Yes, of course, but we don't install ImageMagick with LyX on OSX, do we?
>> [...]
>> Riki
> 
> Actually, I am not sure about that. At least I never installed it manually on 
> macOS. Maybe it comes with the OS then?

No, it’s not part of the OS. It’s detected if installed and there are two good 
choices: macports and homebrew.

LyX is usable without these because of the shipped fallback converter for SVG 
or other format to PDF or any other format supported by QImage (see 
src/convert/lyxconvert.cpp).

Python is deprecated on OSX and this is a problem in the future.

Stephan
-- 
lyx-devel mailing list
lyx-devel@lists.lyx.org
http://lists.lyx.org/mailman/listinfo/lyx-devel


Re: Registry handling on windows (installer)

2020-03-06 Thread Daniel

On 2020-03-06 22:06, Richard Kimberly Heck wrote:

On 3/6/20 3:24 PM, Daniel wrote:

On 2020-03-06 19:53, Richard Kimberly Heck wrote:

There is something I have always wondered here, but never really
understood. Why do WE end to install ImageMagick? Why can't we just
have the user install it, like we do on other platforms, and then
detect it via the registry, if that's what we need to do? If we were
going to use configure.py for fix broken dependencies then we can
just use it to detect them in the first place, no? There is the issue
that any installed ImageMagick will be bigger than what we ship. But
the huge benefit is that, if there's a security issue with
ImageMagick (as there sometimes is), we don't have to issue a new LyX
installer to fix it.

I'd ask the same questions about Ghostscript and Python.

Riki


I guess the difference is that there is no package manager on Windows
(and on macOS?).


Yes, of course, but we don't install ImageMagick with LyX on OSX, do we?

[...]

Riki


Actually, I am not sure about that. At least I never installed it 
manually on macOS. Maybe it comes with the OS then?


Daniel

--
lyx-devel mailing list
lyx-devel@lists.lyx.org
http://lists.lyx.org/mailman/listinfo/lyx-devel


Re: Registry handling on windows (installer)

2020-03-06 Thread Jean-Marc Lasgouttes


Le 6 mars 2020 18:53:07 GMT+00:00, Richard Kimberly Heck  a 
écrit :
>There is something I have always wondered here, but never really
>understood. Why do WE end to install ImageMagick? Why can't we just
>have
>the user install it, like we do on other platforms, and then detect it
>via the registry, if that's what we need to do?

 No user has IM installed by default, and no package manager will do it for us. 
I really think that shipping the few binaries that we need and skipping the 
registry thing is the simplest solution for everyone.

JMarc
-- 
lyx-devel mailing list
lyx-devel@lists.lyx.org
http://lists.lyx.org/mailman/listinfo/lyx-devel


Re: Registry handling on windows (installer)

2020-03-06 Thread Richard Kimberly Heck
On 3/6/20 3:24 PM, Daniel wrote:
> On 2020-03-06 19:53, Richard Kimberly Heck wrote:
>> There is something I have always wondered here, but never really
>> understood. Why do WE end to install ImageMagick? Why can't we just
>> have the user install it, like we do on other platforms, and then
>> detect it via the registry, if that's what we need to do? If we were
>> going to use configure.py for fix broken dependencies then we can
>> just use it to detect them in the first place, no? There is the issue
>> that any installed ImageMagick will be bigger than what we ship. But
>> the huge benefit is that, if there's a security issue with
>> ImageMagick (as there sometimes is), we don't have to issue a new LyX
>> installer to fix it.
>>
>> I'd ask the same questions about Ghostscript and Python.
>>
>> Riki
>
> I guess the difference is that there is no package manager on Windows
> (and on macOS?). 

Yes, of course, but we don't install ImageMagick with LyX on OSX, do we?


> And installing ImageMagick youself seems a bit daunting:
>
> https://imagemagick.org/script/download.php#windows

There are just a lot of choices. We can make a suggestion about which
version people should install. I would assume first one was fine.

Riki


-- 
lyx-devel mailing list
lyx-devel@lists.lyx.org
http://lists.lyx.org/mailman/listinfo/lyx-devel


Re: Registry handling on windows (installer)

2020-03-06 Thread Daniel

On 2020-03-06 19:53, Richard Kimberly Heck wrote:
There is something I have always wondered here, but never really 
understood. Why do WE end to install ImageMagick? Why can't we just have 
the user install it, like we do on other platforms, and then detect it 
via the registry, if that's what we need to do? If we were going to use 
configure.py for fix broken dependencies then we can just use it to 
detect them in the first place, no? There is the issue that any 
installed ImageMagick will be bigger than what we ship. But the huge 
benefit is that, if there's a security issue with ImageMagick (as there 
sometimes is), we don't have to issue a new LyX installer to fix it.


I'd ask the same questions about Ghostscript and Python.

Riki


I guess the difference is that there is no package manager on Windows 
(and on macOS?). And installing ImageMagick youself seems a bit daunting:


https://imagemagick.org/script/download.php#windows

Daniel

--
lyx-devel mailing list
lyx-devel@lists.lyx.org
http://lists.lyx.org/mailman/listinfo/lyx-devel


Re: Registry handling on windows (installer)

2020-03-06 Thread Richard Kimberly Heck
On 3/6/20 5:21 AM, Yu Jin wrote:
> Am Fr., 6. März 2020 um 10:21 Uhr schrieb Jean-Marc Lasgouttes
> mailto:lasgout...@lyx.org>>:
>
> What I would propose for this kind of problem is to bundle a portable
> version of imagemagick with LyX. I would expect that this does not
> require registry hacking.
>
>
> Portable version would not need registry indeed. It contains a bunch
> of stuff LyX does not need though and is therefore much bigger than
> the one we are using now. Would you then also try looking through its
> files and see what could be deleted? My first thought is that we could
> delete all of those executables, which are the exact same size as
> "magick.exe", like "convert.exe", "compare.exe"  We could delete
> "ffmpeg.exe" aswell, because its not in the current dependencies. And
> we probably dont need "IMDisplay.exe" and the "images" and "www"
> folders. Im not sure how much Imagemagick and ghostscript LyX uses though.
> I have just tried to remove those files and I get a total size of
> 16MB. Conversion of images works, I have tried to convert pdf to eps,
> pdf to png, eps to png. And if eps to png is all ghostscript is used
> for, then we could also get rid of that and convert pdf directly to
> png. Or just dont deliver ghostscript and leave it as it is sinse eps
> to png uses magick command anyway.

There is something I have always wondered here, but never really
understood. Why do WE end to install ImageMagick? Why can't we just have
the user install it, like we do on other platforms, and then detect it
via the registry, if that's what we need to do? If we were going to use
configure.py for fix broken dependencies then we can just use it to
detect them in the first place, no? There is the issue that any
installed ImageMagick will be bigger than what we ship. But the huge
benefit is that, if there's a security issue with ImageMagick (as there
sometimes is), we don't have to issue a new LyX installer to fix it.

I'd ask the same questions about Ghostscript and Python.

Riki

-- 
lyx-devel mailing list
lyx-devel@lists.lyx.org
http://lists.lyx.org/mailman/listinfo/lyx-devel


Re: Registry handling on windows (installer)

2020-03-06 Thread Richard Kimberly Heck
On 3/6/20 4:21 AM, Jean-Marc Lasgouttes wrote:
> Le 06/03/2020 à 09:08, Yu Jin a écrit :
>> Hi all,
>> I've been training nsis and experimenting with the windows installer.
>> I think I am somewhat confident with that topic now. The purpose of
>> this Email is that I see some issues in the registry handling in the
>> code for the installer and I would like to discuss those issues.
>
> Hi Yu Jin,
>
> Here are some of my answer of non windows developer.
>
>> 1. We create e.g. "Computer\HKEY_LOCAL_MACHINE\SOFTWARE\LyX2344",
>> this is not convenient when searching the computer if any LyX is
>> installed (using code). I would rather do it like imagemagick does,
>> so "Computer\HKEY_LOCAL_MACHINE\SOFTWARE\LyX\2344". This would be a
>> somewhat huge change. This is also my issue with TeXLive, because it
>> also adds version number to its name, so I will have to do something
>> about that aswell (see nsis function LaTeXActions in LaTeX.nsh)
>
> Makes sense to me.

Part of the difficulty here is that very few, if any, of us now have
much experience with Windows. But this also makes sense to me.

Riki


-- 
lyx-devel mailing list
lyx-devel@lists.lyx.org
http://lists.lyx.org/mailman/listinfo/lyx-devel


Re: Registry handling on windows (installer)

2020-03-06 Thread Pavel Sanda
On Fri, Mar 06, 2020 at 11:21:36AM +0100, Yu Jin wrote:
> what could be deleted? My first thought is that we could delete all of
> those executables, which are the exact same size as "magick.exe", like
> "convert.exe", "compare.exe"  Wwe could delete "ffmpeg.exe" aswell,
> because its not in the current dependencies. And we probably dont need
> "IMDisplay.exe" and the "images" and "www" folders. Im not sure how much
> Imagemagick and ghostscript LyX uses though.

I think we use 'convert' but other executables are looking as a good candidate
for removal. And also please do this scriptable, dependecies like imagemagick
need regular updates due to constant flow of security bugfixes...

> I have just tried to remove those files and I get a total size of 16MB.
> Conversion of images works, I have tried to convert pdf to eps, pdf to png,
> eps to png. And if eps to png is all ghostscript is used for, then we could
> also get rid of that and convert pdf directly to png. Or just dont deliver
> ghostscript and leave it as it is sinse eps to png uses magick command
> anyway.

Isn't ghostscript used for (e)ps->pdf conversion?

Pavel
-- 
lyx-devel mailing list
lyx-devel@lists.lyx.org
http://lists.lyx.org/mailman/listinfo/lyx-devel


Re: Registry handling on windows (installer)

2020-03-06 Thread Yu Jin
Am Fr., 6. März 2020 um 10:21 Uhr schrieb Jean-Marc Lasgouttes <
lasgout...@lyx.org>:

> What I would propose for this kind of problem is to bundle a portable
> version of imagemagick with LyX. I would expect that this does not
> require registry hacking.
>

Portable version would not need registry indeed. It contains a bunch of
stuff LyX does not need though and is therefore much bigger than the one we
are using now. Would you then also try looking through its files and see
what could be deleted? My first thought is that we could delete all of
those executables, which are the exact same size as "magick.exe", like
"convert.exe", "compare.exe"  Wwe could delete "ffmpeg.exe" aswell,
because its not in the current dependencies. And we probably dont need
"IMDisplay.exe" and the "images" and "www" folders. Im not sure how much
Imagemagick and ghostscript LyX uses though.
I have just tried to remove those files and I get a total size of 16MB.
Conversion of images works, I have tried to convert pdf to eps, pdf to png,
eps to png. And if eps to png is all ghostscript is used for, then we could
also get rid of that and convert pdf directly to png. Or just dont deliver
ghostscript and leave it as it is sinse eps to png uses magick command
anyway.

Eugene
-- 
lyx-devel mailing list
lyx-devel@lists.lyx.org
http://lists.lyx.org/mailman/listinfo/lyx-devel


Re: Registry handling on windows (installer)

2020-03-06 Thread Jean-Marc Lasgouttes

Le 06/03/2020 à 09:08, Yu Jin a écrit :

Hi all,
I've been training nsis and experimenting with the windows installer. I 
think I am somewhat confident with that topic now. The purpose of this 
Email is that I see some issues in the registry handling in the code for 
the installer and I would like to discuss those issues.


Hi Yu Jin,

Here are some of my answer of non windows developer.

1. We create e.g. "Computer\HKEY_LOCAL_MACHINE\SOFTWARE\LyX2344", this 
is not convenient when searching the computer if any LyX is installed 
(using code). I would rather do it like imagemagick does, so 
"Computer\HKEY_LOCAL_MACHINE\SOFTWARE\LyX\2344". This would be a 
somewhat huge change. This is also my issue with TeXLive, because it 
also adds version number to its name, so I will have to do something 
about that aswell (see nsis function LaTeXActions in LaTeX.nsh)


Makes sense to me.

2. Imagemagick: The installer does not check if there is already 
imagemagick in the registry, it just puts it in there and creates a 
value "Computer\HKEY_LOCAL_MACHINE\SOFTWARE\ImageMagick\OnlyWithLyx". 

[...]

3. In order to not have to reinstall LyX when the user desides to remove 
his imagemagick and/or ghostscript (or an earlier version of LyX), we 
would need to make LyX being able to repair the registry for these 2 
programs. 

[...]

What I would propose for this kind of problem is to bundle a portable 
version of imagemagick with LyX. I would expect that this does not 
require registry hacking.


It is nice that you spend time on these issues, BTW.

JMarc
--
lyx-devel mailing list
lyx-devel@lists.lyx.org
http://lists.lyx.org/mailman/listinfo/lyx-devel


Registry handling on windows (installer)

2020-03-06 Thread Yu Jin
Hi all,
I've been training nsis and experimenting with the windows installer. I
think I am somewhat confident with that topic now. The purpose of this
Email is that I see some issues in the registry handling in the code for
the installer and I would like to discuss those issues.

1. We create e.g. "Computer\HKEY_LOCAL_MACHINE\SOFTWARE\LyX2344", this is
not convenient when searching the computer if any LyX is installed (using
code). I would rather do it like imagemagick does, so
"Computer\HKEY_LOCAL_MACHINE\SOFTWARE\LyX\2344". This would be a somewhat
huge change. This is also my issue with TeXLive, because it also adds
version number to its name, so I will have to do something about that
aswell (see nsis function LaTeXActions in LaTeX.nsh)
2. Imagemagick: The installer does not check if there is already
imagemagick in the registry, it just puts it in there and creates a value
"Computer\HKEY_LOCAL_MACHINE\SOFTWARE\ImageMagick\OnlyWithLyx". Then when
uninstalling, it checks this value and if it is true, it deletes the whole
ImageMagick key. When the user has Imagemagick installerd separately, lets
say version 7.0.9, he would get in registry "...\ImageMagick\7.0.9\...",
LyX's imagemagick would add a e.g. "...\ImageMagick\7.0.8\..." to that, and
when uninstalling, the whole "ImageMagick" wuld be gone, even though the
user didnt intend to uninstall his separate Imagemagick. But it won't work
now. What I would like to do about it is actually remove the "OnlyWithLyx"
value, but instead, when uninstalling, I would check the BinPath value
(which contains the folder in which magick.exe is) for $INSTALLDIR part
(which is where the uninstaller of lyx is) to determine if it is the
imagemagick installed with the lyx the user wants to uninstall now or not.
I would do the same with ghostscript and its value "GS_DLL". Also I would
not set "Computer\HKEY_LOCAL_MACHINE\SOFTWARE\ImageMagick\Current" key,
imagemagick works without it, I have tested it, and its just confusing imho.
3. In order to not have to reinstall LyX when the user desides to remove
his imagemagick and/or ghostscript (or an earlier version of LyX), we would
need to make LyX being able to repair the registry for these 2 programs. I
think that the reconfigure.py script would be a good place to implement it.
i will see if I will be able to do it myself, but if not I would open a new
topic asking for help. In general I would extract the imagemagick and
ghostscript files with the installation of lyx, but when registry entries
would be found for those 2 (and they would not contain a "LyX" substing), I
would not overwrite them. If we then would have something in the python
script to set them, in case the user removes his separate
imagemagick/ghostscript installations, the user would just need to
reconfigure and everything would work again.

I would definitely be able to code at least the nsis part for this. Just
before I start doing I would like to know if it is ok with everybody or if
there are reasons to not make some of these changes. If ok, I would target
the next major release and implement this in master.
-- 
lyx-devel mailing list
lyx-devel@lists.lyx.org
http://lists.lyx.org/mailman/listinfo/lyx-devel