Re: #10658: LyX cannot be compiled any longer with CMake to show a console

2017-05-11 Thread Kornel Benko
Am Freitag, 12. Mai 2017 um 00:13:22, schrieb Uwe Stöhr 
> El 12.05.2017 a las 00:00, Uwe Stöhr escribió:
> 
> >> OK. I suppose, that it may be equivalent to linux.
> >> I have to set the environment PATH, so that qmake.exe from my QT is 
> >> found.
>  > > I cannot set the PATH because this would require admin privileges.
> 
> That is correct but I can set the PATH locally and already do so in the 
> current script in master:
> 
> set PATH=%QT_PATH%;%PATH%
> 
> So the path to the qmake.exe is known. nevertheless CMake wants the path 
> in the variable CMAKE_PREFIX_PATH but I cannot set this because of the 
> problem I described.
> 
> regards Uwe

Sorry, I do not understand what is not working on Windows. Maybe Peter could 
help.

Kornel

signature.asc
Description: This is a digitally signed message part.


Re: #10658: LyX cannot be compiled any longer with CMake to show a console

2017-05-11 Thread Uwe Stöhr

El 12.05.2017 a las 00:00, Uwe Stöhr escribió:


OK. I suppose, that it may be equivalent to linux.
I have to set the environment PATH, so that qmake.exe from my QT is 
found.

> > I cannot set the PATH because this would require admin privileges.

That is correct but I can set the PATH locally and already do so in the 
current script in master:


set PATH=%QT_PATH%;%PATH%

So the path to the qmake.exe is known. nevertheless CMake wants the path 
in the variable CMAKE_PREFIX_PATH but I cannot set this because of the 
problem I described.


regards Uwe


Re: #10658: LyX cannot be compiled any longer with CMake to show a console

2017-05-11 Thread Uwe Stöhr

El 11.05.2017 a las 01:46, Kornel Benko escribió:


OK. I suppose, that it may be equivalent to linux.
I have to set the environment PATH, so that qmake.exe from my QT is found.


I cannot set the PATH because this would require admin privileges. But 
as I wrote this is not necessary, all I need is that


cmake %LYX_SOURCE% -DCMAKE_PREFIX_PATH="test"

leads to

//Used Qt version
CMAKE_PREFIX_PATH:PATH=test

in CMakeCache.txt. When I this path is the correct one, Qt is found and 
I am happy.



Have you also had the time to look for the console issue?


This variable (LYX_CONSOLE) is only valid with MSVC. So anything I do would be 
forcing you to test.


I don't understand. What should I test? As I reported as bug CMake tells 
that one should use the setting FORCE but this is incorrect. The correct 
setting is ON. I asked you if you could kindly correct this.

For further testing I need the above problem to be solved.


And you may have no time, at least it feels like that, considering how fast I 
get responses.


Ehm, yes I have not much time but try to reply as soon as possible.

thanks and regards
Uwe


Re: #10658: LyX cannot be compiled any longer with CMake to show a console

2017-05-10 Thread Kornel Benko
Am Donnerstag, 11. Mai 2017 um 01:05:21, schrieb Uwe Stöhr 
> El 10.05.2017 a las 08:21, Kornel Benko escribió:
> 
> >> in my build script I have now
> >>
> >> set LYX_BUILD=D:\LyXGit\Master\compile-2015
> >> cmake %LYX_SOURCE% -G"Visual Studio 14 2015" -DCMAKE_PREFIX_PATH="test"
> >> -DLYX_USE_QT=QT5 ...
> >>
> >> with this I get now in the CMakeCache.txt
> >>
> >> //Used Qt version
> >> CMAKE_PREFIX_PATH:PATH=D:/LyXGit/Master/compile-2015/test
> >>
> >> instead of
> >>
> >> //Used Qt version
> >> CMAKE_PREFIX_PATH:PATH=test
> >>
> >> So the bug is that CMAKE_PREFIX_PATH always starts with LYX_BUILD. But I
> >> need an empty value.
> > 
> > Cmake specifies the variable by default to be empty.
> 
> This is not the case. As I wrote, it is by default not empty but the 
> content of LYX_BUILD. It is only empty if I don't specify 
> CMAKE_PREFIX_PATH. But then I get of course the error that 
> CMAKE_PREFIX_PATH must be specified.
> 
> > What you probably want to set is CMAKE_SYSTEM_PREFIX_PATH (Path where the 
> > program qmake.exe (from QT5) will be found)
> 
> This does not work because then CMAKE_PREFIX_PATH is not set and  get an 
> error about this:
> "Add the installation prefix of "Qt5Core" to CMAKE_PREFIX_PATH"
> So I must be able to set CMAKE_PREFIX_PATH in a batch file but cannot 
> because of the described bug.

OK. I suppose, that it may be equivalent to linux.
I have to set the environment PATH, so that qmake.exe from my QT is found.
The call to qmake gives cmake all the information needed for configuration.

For instance
# qmake -query
gives following output here:
QT_SYSROOT:
QT_INSTALL_PREFIX:/usr/BUILD/BuildQtRoot
QT_INSTALL_ARCHDATA:/usr/BUILD/BuildQtRoot
QT_INSTALL_DATA:/usr/BUILD/BuildQtRoot
QT_INSTALL_DOCS:/usr/Docs/Qt-5.7
QT_INSTALL_HEADERS:/usr/BUILD/BuildQtRoot/include
QT_INSTALL_LIBS:/usr/BUILD/BuildQtRoot/lib
QT_INSTALL_LIBEXECS:/usr/BUILD/BuildQtRoot/libexec
QT_INSTALL_BINS:/usr/BUILD/BuildQtRoot/bin
QT_INSTALL_TESTS:/usr/BUILD/BuildQtRoot/tests
QT_INSTALL_PLUGINS:/usr/BUILD/BuildQtRoot/plugins
QT_INSTALL_IMPORTS:/usr/BUILD/BuildQtRoot/imports
QT_INSTALL_QML:/usr/BUILD/BuildQtRoot/qml
QT_INSTALL_TRANSLATIONS:/usr/BUILD/BuildQtRoot/translations
QT_INSTALL_CONFIGURATION:/usr/BUILD/BuildQtRoot
QT_INSTALL_EXAMPLES:/usr/Examples/Qt-5.7
QT_INSTALL_DEMOS:/usr/Examples/Qt-5.7
QT_HOST_PREFIX:/usr/BUILD/BuildQtRoot
QT_HOST_DATA:/usr/BUILD/BuildQtRoot
QT_HOST_BINS:/usr/BUILD/BuildQtRoot/bin
QT_HOST_LIBS:/usr/BUILD/BuildQtRoot/lib
QMAKE_SPEC:linux-g++
QMAKE_XSPEC:linux-g++
QMAKE_VERSION:3.0
QT_VERSION:5.7.0

> Have you also had the time to look for the console issue?

This variable (LYX_CONSOLE) is only valid with MSVC. So anything I do would be 
forcing you to test.
And you may have no time, at least it feels like that, considering how fast I 
get responses.

> thanks and regards
> Uwe

Kornel

signature.asc
Description: This is a digitally signed message part.


Re: #10658: LyX cannot be compiled any longer with CMake to show a console

2017-05-10 Thread Uwe Stöhr

El 10.05.2017 a las 08:21, Kornel Benko escribió:


in my build script I have now

set LYX_BUILD=D:\LyXGit\Master\compile-2015
cmake %LYX_SOURCE% -G"Visual Studio 14 2015" -DCMAKE_PREFIX_PATH="test"
-DLYX_USE_QT=QT5 ...

with this I get now in the CMakeCache.txt

//Used Qt version
CMAKE_PREFIX_PATH:PATH=D:/LyXGit/Master/compile-2015/test

instead of

//Used Qt version
CMAKE_PREFIX_PATH:PATH=test

So the bug is that CMAKE_PREFIX_PATH always starts with LYX_BUILD. But I
need an empty value.


Cmake specifies the variable by default to be empty.


This is not the case. As I wrote, it is by default not empty but the 
content of LYX_BUILD. It is only empty if I don't specify 
CMAKE_PREFIX_PATH. But then I get of course the error that 
CMAKE_PREFIX_PATH must be specified.



What you probably want to set is CMAKE_SYSTEM_PREFIX_PATH (Path where the 
program qmake.exe (from QT5) will be found)


This does not work because then CMAKE_PREFIX_PATH is not set and  get an 
error about this:

"Add the installation prefix of "Qt5Core" to CMAKE_PREFIX_PATH"
So I must be able to set CMAKE_PREFIX_PATH in a batch file but cannot 
because of the described bug.


Have you also had the time to look for the console issue?

thanks and regards
Uwe


Re: #10658: LyX cannot be compiled any longer with CMake to show a console

2017-05-10 Thread Kornel Benko
Am Mittwoch, 10. Mai 2017 um 01:16:31, schrieb Uwe Stöhr 
> El 10.05.2017 a las 00:31, Kornel Benko escribió:
> 
> >> LYX_CONSOLE:BOOL=ON
> >>
> >> But I explicitly set it to OFF, see the build5-2015.bat file in git master.
> > 
> > You mean in 'install' case. If mode == 'devel', you set it to "ON".
> 
> Yes.
> However, I found now the real problem. whatever i execute in my batch 
> file is never executed because the path to CMake was never specified and 
> by default the patch to the cmake.exe is no longer set to the Windows 
> environment variable PATH.
> I fixed this now but then I got the next problem I cannot solve:
> 
> in my build script I have now
> 
> set LYX_BUILD=D:\LyXGit\Master\compile-2015
> cmake %LYX_SOURCE% -G"Visual Studio 14 2015" -DCMAKE_PREFIX_PATH="test" 
> -DLYX_USE_QT=QT5 ...
> 
> with this I get now in the CMakeCache.txt
> 
> //Used Qt version
> CMAKE_PREFIX_PATH:PATH=D:/LyXGit/Master/compile-2015/test
> 
> instead of
> 
> //Used Qt version
> CMAKE_PREFIX_PATH:PATH=test
> 
> So the bug is that CMAKE_PREFIX_PATH always starts with LYX_BUILD. But I 
> need an empty value.

Cmake specifies the variable by default to be empty. So I would omit the 
specification in the build script.
What you probably want to set is CMAKE_SYSTEM_PREFIX_PATH (Path where the 
program qmake.exe (from QT5) will be found)

> If you could fix this, I could replace "test" with the correct path to 
> Qt and finally got a running batch file.
> 
> many thanks and regards
> Uwe

Kornel

signature.asc
Description: This is a digitally signed message part.


Re: #10658: LyX cannot be compiled any longer with CMake to show a console

2017-05-09 Thread Uwe Stöhr

El 10.05.2017 a las 00:31, Kornel Benko escribió:


LYX_CONSOLE:BOOL=ON

But I explicitly set it to OFF, see the build5-2015.bat file in git master.


You mean in 'install' case. If mode == 'devel', you set it to "ON".


Yes.
However, I found now the real problem. whatever i execute in my batch 
file is never executed because the path to CMake was never specified and 
by default the patch to the cmake.exe is no longer set to the Windows 
environment variable PATH.

I fixed this now but then I got the next problem I cannot solve:

in my build script I have now

set LYX_BUILD=D:\LyXGit\Master\compile-2015
cmake %LYX_SOURCE% -G"Visual Studio 14 2015" -DCMAKE_PREFIX_PATH="test" 
-DLYX_USE_QT=QT5 ...


with this I get now in the CMakeCache.txt

//Used Qt version
CMAKE_PREFIX_PATH:PATH=D:/LyXGit/Master/compile-2015/test

instead of

//Used Qt version
CMAKE_PREFIX_PATH:PATH=test

So the bug is that CMAKE_PREFIX_PATH always starts with LYX_BUILD. But I 
need an empty value.


If you could fix this, I could replace "test" with the correct path to 
Qt and finally got a running batch file.


many thanks and regards
Uwe


Re: #10658: LyX cannot be compiled any longer with CMake to show a console

2017-05-09 Thread Kornel Benko
Am Dienstag, 9. Mai 2017 um 23:19:30, schrieb Uwe Stöhr 
> El 09.05.2017 a las 23:04, Kornel Benko escribió:
> 
> > Please Uwe, do me the favour and check CMakeCache.txt.
> > I DO believe you, that it is not working. I want to know the value (if any) 
> > in CMakeCache.txt.
> 
> I will.
> Now I turned on the consile on the CMake gui and get a console.
> 
> but when i now use my build script to build an installer version:
> 
> -DLYX_CONSOLE=OFF
> 
> I still get a build with the console.
> in CMakeCache.txt I see
> 
> //Show console on Windows, enforce with =FORCE

The comment is clearly wrong. This is an option (which means cached BOOL 
variable).

> LYX_CONSOLE:BOOL=ON
> 
> But I explicitly set it to OFF, see the build5-2015.bat file in git master.

You mean in 'install' case. If mode == 'devel', you set it to "ON".

> Moreover FORCE is no BOOL value so
> LYX_CONSOLE:BOOL=FORCE
> cannot work.

Exactly.

> thank for having a look and regards
> Uwe

Kornel

signature.asc
Description: This is a digitally signed message part.


Re: #10658: LyX cannot be compiled any longer with CMake to show a console

2017-05-09 Thread Uwe Stöhr

El 09.05.2017 a las 23:04, Kornel Benko escribió:


Please Uwe, do me the favour and check CMakeCache.txt.
I DO believe you, that it is not working. I want to know the value (if any) in 
CMakeCache.txt.


I will.
Now I turned on the consile on the CMake gui and get a console.

but when i now use my build script to build an installer version:

-DLYX_CONSOLE=OFF

I still get a build with the console.
in CMakeCache.txt I see

//Show console on Windows, enforce with =FORCE
LYX_CONSOLE:BOOL=ON

But I explicitly set it to OFF, see the build5-2015.bat file in git master.

Moreover FORCE is no BOOL value so
LYX_CONSOLE:BOOL=FORCE
cannot work.

thank for having a look and regards
Uwe


Re: #10658: LyX cannot be compiled any longer with CMake to show a console

2017-05-09 Thread Kornel Benko
Am Dienstag, 9. Mai 2017 um 22:39:34, schrieb Uwe Stöhr 
> El 09.05.2017 a las 22:34, Kornel Benko escribió:
> 
> >>   Therefore I used a build script build5-2015.bat that is in LyX's master
> >>   git. There we have
> >>   -DLYX_CONSOLE=FORCE
> > 
> > Yes, but you also set -DLYX_INSTALL=0, which prevents the handling of 
> > LYX_CONSOLE=FORCE (See CMakeLists.txt:183)
> 
> I set -DLYX_INSTALL=0 because I don't want an install build but a debug 
> build. In the past (the last years) I could do this and got nevertheless 
> a console.
> 
> Nevertheless one cannot set LYX_CONSOLE to FORCE in the CMake gui but 
> the CMake gui tells me that I should do so to get a console on Windows.
> 
> >>   I therefore used now
> >>   -DLYX_CONSOLE=ON
> >>   but I still don't get a console.
> > 
> > Have you checked the value of LYX_CONSOLE in CMakeCache.txt?
> 
> I even deleted the CMake cache and set up everything from scratch with a 
> complete rebuild of LyX.

Please Uwe, do me the favour and check CMakeCache.txt.
I DO believe you, that it is not working. I want to know the value (if any) in 
CMakeCache.txt.

> Do I have to use
> -DLYX_CONSOLE=0
> instead of
> -DLYX_CONSOLE=ON
> 
> regards Uwe

Kornel

signature.asc
Description: This is a digitally signed message part.


Re: #10658: LyX cannot be compiled any longer with CMake to show a console

2017-05-09 Thread Uwe Stöhr

El 09.05.2017 a las 22:34, Kornel Benko escribió:


  Therefore I used a build script build5-2015.bat that is in LyX's master
  git. There we have
  -DLYX_CONSOLE=FORCE


Yes, but you also set -DLYX_INSTALL=0, which prevents the handling of 
LYX_CONSOLE=FORCE (See CMakeLists.txt:183)


I set -DLYX_INSTALL=0 because I don't want an install build but a debug 
build. In the past (the last years) I could do this and got nevertheless 
a console.


Nevertheless one cannot set LYX_CONSOLE to FORCE in the CMake gui but 
the CMake gui tells me that I should do so to get a console on Windows.



  I therefore used now
  -DLYX_CONSOLE=ON
  but I still don't get a console.


Have you checked the value of LYX_CONSOLE in CMakeCache.txt?


I even deleted the CMake cache and set up everything from scratch with a 
complete rebuild of LyX.


Do I have to use
-DLYX_CONSOLE=0
instead of
-DLYX_CONSOLE=ON

regards Uwe


Re: #10658: LyX cannot be compiled any longer with CMake to show a console

2017-05-09 Thread Kornel Benko
Am Dienstag, 9. Mai 2017 um 19:59:37, schrieb LyX Ticket Tracker 
> #10658: LyX cannot be compiled any longer with CMake to show a console
> ---+
>  Reporter:  uwestoehr  |  Owner:  kornel
>  Type:  defect | Status:  new
>  Priority:  normal |  Milestone:  2.3.0
> Component:  build  |Version:  2.3.0dev
>  Severity:  normal |   Keywords:  regression
> ---+
>  For a fresh build open the CMake gui.
>  it offers to set the variable
>  LYX_CONSOLE
>  The tooltip says "Show console on Windows, enforce with =FORCE"
> 
>  But one cannot set FORCE via the CMake gui.
> 
>  Therefore I used a build script build5-2015.bat that is in LyX's master
>  git. There we have
>  -DLYX_CONSOLE=FORCE

Yes, but you also set -DLYX_INSTALL=0, which prevents the handling of 
LYX_CONSOLE=FORCE (See CMakeLists.txt:183)

>  This works for LyX 2.2.x branch but not for master. I can compile but the
>  lyx.exe I get has no console.
> 
>  I therefore used now
>  -DLYX_CONSOLE=ON
>  but I still don't get a console.

Have you checked the value of LYX_CONSOLE in CMakeCache.txt?

>  As lat try I set
>  LYX_CONSOLE
>  in the CMake gui ut still don't get a console.
> 
>  A console is useful for debug builds so it would be nice to have a way to
>  get one.

Kornel

signature.asc
Description: This is a digitally signed message part.