X2Go Bug report logs - #1601
Patch for x2goclient Qt5 build on Windows

version graph

Package: x2goclient; Maintainer for x2goclient is X2Go Developers <x2go-dev@lists.x2go.org>; Source for x2goclient is src:x2goclient.

Reported by: Orion Poplawski <orion@nwra.com>

Date: Tue, 9 May 2023 17:00:01 UTC

Severity: normal

Tags: patch

Found in version 4.1.2.2

Reply or subscribe to this bug.

Toggle useless messages

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to x2go-dev@lists.x2go.org, X2Go Developers <x2go-dev@lists.x2go.org>:
Bug#1601; Package x2goclient. (Tue, 09 May 2023 17:00:01 GMT) (full text, mbox, link).


Acknowledgement sent to Orion Poplawski <orion@nwra.com>:
New Bug report received and forwarded. Copy sent to X2Go Developers <x2go-dev@lists.x2go.org>. (Tue, 09 May 2023 17:00:02 GMT) (full text, mbox, link).


Message #5 received at submit@bugs.x2go.org (full text, mbox, reply):

From: Orion Poplawski <orion@nwra.com>
To: "submit@bugs.x2go.org" <submit@bugs.x2go.org>
Subject: Patch for x2goclient Qt5 build on Windows
Date: Tue, 9 May 2023 10:56:08 -0600
[Message part 1 (text/plain, inline)]
Package: x2goclient
Version: 4.1.2.2
Tag: patch


When compiling against Qt5 5.15.9 I get:

../src/wapi.cpp: In function 'void wapiSetWindowIcon(HWND, const QPixmap&)':
../src/wapi.cpp:224:88: error: 'class QPixmap' has no member named 
'toWinHICON'
  224 |     largeIcon=icon.scaled(iconx,icony, 
Qt::IgnoreAspectRatio,Qt::SmoothTransformation).toWinHICON ();
      |                        ^~~~~~~~~~
../src/wapi.cpp:225:90: error: 'class QPixmap' has no member named 
'toWinHICON'
  225 |     smallIcon=icon.scaled(smallx,smally, 
Qt::IgnoreAspectRatio,Qt::SmoothTransformation).toWinHICON ();
      |                          ^~~~~~~~~~

Now, the only call to wapiSetWindowIcon() is commented out, so I just 
commented out the wapiSetWindowIcon() code as we...  Looks like the 
current function to use is QImage::toHICON().

I'm also curious that you need to shift to a Windows API call - 
shouldn't we be able to do everything in Qt?



-- 
Orion Poplawski
he/him/his  - surely the least important thing about me
IT Systems Manager                         720-772-5637
NWRA, Boulder/CoRA Office             FAX: 303-415-9702
3380 Mitchell Lane                       orion@nwra.com
Boulder, CO 80301                 https://www.nwra.com/
[x2goclient-qt5.patch (text/x-patch, attachment)]
[smime.p7s (application/pkcs7-signature, attachment)]

Information forwarded to x2go-dev@lists.x2go.org, X2Go Developers <x2go-dev@lists.x2go.org>:
Bug#1601; Package x2goclient. (Tue, 09 May 2023 17:30:03 GMT) (full text, mbox, link).


Acknowledgement sent to uli42@gmx.de:
Extra info received and forwarded to list. Copy sent to X2Go Developers <x2go-dev@lists.x2go.org>. (Tue, 09 May 2023 17:30:03 GMT) (full text, mbox, link).


Message #10 received at 1601@bugs.x2go.org (full text, mbox, reply):

From: Ulrich Sibiller <ulrich.sibiller@gmail.com>
To: Orion Poplawski <orion@nwra.com>, 1601@bugs.x2go.org
Cc: submit@bugs.x2go.org
Subject: Re: [X2Go-Dev] Bug#1601: Patch for x2goclient Qt5 build on Windows
Date: Tue, 9 May 2023 19:25:39 +0200
[Message part 1 (text/plain, inline)]
Iirc I have made some patches for the windows version. I thought they had
been merged but I must check that. For now try this:


#if QT_VERSION >= 0x050200
   largeIcon=QtWin::toHICON(icon.scaled(iconx,icony,
Qt::IgnoreAspectRatio,Qt::SmoothTransformation));
   smallIcon=QtWin::toHICON(icon.scaled(smallx,smally,
Qt::IgnoreAspectRatio,Qt::SmoothTransformation));
#else
   largeIcon=icon.scaled(iconx,icony,
Qt::IgnoreAspectRatio,Qt::SmoothTransformation).toWinHICON();
   smallIcon=icon.scaled(smallx,smally,
Qt::IgnoreAspectRatio,Qt::SmoothTransformation).toWinHICON();
#endif


Uli

Orion Poplawski <orion@nwra.com> schrieb am Di., 9. Mai 2023, 19:00:

> Package: x2goclient
> Version: 4.1.2.2
> Tag: patch
>
>
> When compiling against Qt5 5.15.9 I get:
>
> ../src/wapi.cpp: In function 'void wapiSetWindowIcon(HWND, const
> QPixmap&)':
> ../src/wapi.cpp:224:88: error: 'class QPixmap' has no member named
> 'toWinHICON'
>    224 |     largeIcon=icon.scaled(iconx,icony,
> Qt::IgnoreAspectRatio,Qt::SmoothTransformation).toWinHICON ();
>        |                        ^~~~~~~~~~
> ../src/wapi.cpp:225:90: error: 'class QPixmap' has no member named
> 'toWinHICON'
>    225 |     smallIcon=icon.scaled(smallx,smally,
> Qt::IgnoreAspectRatio,Qt::SmoothTransformation).toWinHICON ();
>        |                          ^~~~~~~~~~
>
> Now, the only call to wapiSetWindowIcon() is commented out, so I just
> commented out the wapiSetWindowIcon() code as we...  Looks like the
> current function to use is QImage::toHICON().
>
> I'm also curious that you need to shift to a Windows API call -
> shouldn't we be able to do everything in Qt?
>
>
>
> --
> Orion Poplawski
> he/him/his  - surely the least important thing about me
> IT Systems Manager                         720-772-5637
> NWRA, Boulder/CoRA Office             FAX: 303-415-9702
> 3380 Mitchell Lane                       orion@nwra.com
> Boulder, CO 80301                 https://www.nwra.com/
> _______________________________________________
> x2go-dev mailing list
> x2go-dev@lists.x2go.org
> https://lists.x2go.org/listinfo/x2go-dev
>
[Message part 2 (text/html, inline)]

Information forwarded to x2go-dev@lists.x2go.org, X2Go Developers <x2go-dev@lists.x2go.org>:
Bug#1601; Package x2goclient. (Tue, 09 May 2023 17:30:04 GMT) (full text, mbox, link).


Acknowledgement sent to uli42@gmx.de:
Extra info received and forwarded to list. Copy sent to X2Go Developers <x2go-dev@lists.x2go.org>. (Tue, 09 May 2023 17:30:04 GMT) (full text, mbox, link).


Message #15 received at 1601@bugs.x2go.org (full text, mbox, reply):

From: Ulrich Sibiller <ulrich.sibiller@gmail.com>
To: Orion Poplawski <orion@nwra.com>, 1601@bugs.x2go.org
Cc: submit@bugs.x2go.org
Subject: Re: [X2Go-Dev] Bug#1601: Patch for x2goclient Qt5 build on Windows
Date: Tue, 9 May 2023 19:27:38 +0200
Hi again,

the current upstream of x2goclient contains these lines. So it looks
like your QT_VERSION is not set correctly. (see
https://code.x2go.org/gitweb?p=x2goclient.git;a=blob;f=src/wapi.cpp;h=12732c24b7b7cbf2da4cc8b0d0d9f782646960d3;hb=HEAD)

Uli

On Tue, May 9, 2023 at 7:25 PM Ulrich Sibiller
<ulrich.sibiller@gmail.com> wrote:
>
> Iirc I have made some patches for the windows version. I thought they had been merged but I must check that. For now try this:
>
>
> #if QT_VERSION >= 0x050200
>    largeIcon=QtWin::toHICON(icon.scaled(iconx,icony, Qt::IgnoreAspectRatio,Qt::SmoothTransformation));
>    smallIcon=QtWin::toHICON(icon.scaled(smallx,smally, Qt::IgnoreAspectRatio,Qt::SmoothTransformation));
> #else
>    largeIcon=icon.scaled(iconx,icony, Qt::IgnoreAspectRatio,Qt::SmoothTransformation).toWinHICON();
>    smallIcon=icon.scaled(smallx,smally, Qt::IgnoreAspectRatio,Qt::SmoothTransformation).toWinHICON();
> #endif
>
>
> Uli
>
> Orion Poplawski <orion@nwra.com> schrieb am Di., 9. Mai 2023, 19:00:
>>
>> Package: x2goclient
>> Version: 4.1.2.2
>> Tag: patch
>>
>>
>> When compiling against Qt5 5.15.9 I get:
>>
>> ../src/wapi.cpp: In function 'void wapiSetWindowIcon(HWND, const QPixmap&)':
>> ../src/wapi.cpp:224:88: error: 'class QPixmap' has no member named
>> 'toWinHICON'
>>    224 |     largeIcon=icon.scaled(iconx,icony,
>> Qt::IgnoreAspectRatio,Qt::SmoothTransformation).toWinHICON ();
>>        |                        ^~~~~~~~~~
>> ../src/wapi.cpp:225:90: error: 'class QPixmap' has no member named
>> 'toWinHICON'
>>    225 |     smallIcon=icon.scaled(smallx,smally,
>> Qt::IgnoreAspectRatio,Qt::SmoothTransformation).toWinHICON ();
>>        |                          ^~~~~~~~~~
>>
>> Now, the only call to wapiSetWindowIcon() is commented out, so I just
>> commented out the wapiSetWindowIcon() code as we...  Looks like the
>> current function to use is QImage::toHICON().
>>
>> I'm also curious that you need to shift to a Windows API call -
>> shouldn't we be able to do everything in Qt?
>>
>>
>>
>> --
>> Orion Poplawski
>> he/him/his  - surely the least important thing about me
>> IT Systems Manager                         720-772-5637
>> NWRA, Boulder/CoRA Office             FAX: 303-415-9702
>> 3380 Mitchell Lane                       orion@nwra.com
>> Boulder, CO 80301                 https://www.nwra.com/_______________________________________________
>> x2go-dev mailing list
>> x2go-dev@lists.x2go.org
>> https://lists.x2go.org/listinfo/x2go-dev


Information forwarded to x2go-dev@lists.x2go.org, X2Go Developers <x2go-dev@lists.x2go.org>:
Bug#1601; Package x2goclient. (Tue, 09 May 2023 18:20:03 GMT) (full text, mbox, link).


Acknowledgement sent to Orion Poplawski <orion@nwra.com>:
Extra info received and forwarded to list. Copy sent to X2Go Developers <x2go-dev@lists.x2go.org>. (Tue, 09 May 2023 18:20:03 GMT) (full text, mbox, link).


Message #20 received at 1601@bugs.x2go.org (full text, mbox, reply):

From: Orion Poplawski <orion@nwra.com>
To: uli42@gmx.de, 1601@bugs.x2go.org
Cc: submit@bugs.x2go.org
Subject: Re: [X2Go-Dev] Bug#1601: Patch for x2goclient Qt5 build on Windows
Date: Tue, 9 May 2023 12:16:18 -0600
[Message part 1 (text/plain, inline)]
Gah, once again I make the mistake of not trying to build with the 
latest git
code.

So now I'm trying with that and getting:

i686-w64-mingw32-g++ -c -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 
-fexceptions --param=ssp-buffer-size=4 -fno-keep-inline-dllexport -O2 
-Wall -Wextra -mthreads -DUNICODE -DCFGCLIENT -DQT_STATIC 
-DQT_DESIGNER_STATIC -DDBUS_STATIC_BUILD -DPCRE_STATIC -DPCRE2_STATIC 
-DQT_NO_DEBUG -DQT_SVG_LIB -DQT_WIDGETS_LIB -DQT_WINEXTRAS_LIB 
-DQT_GUI_LIB -DQT_NETWORK_LIB -DQT_CORE_LIB -DQT_NEEDS_QMAIN 
-I../../x2goclient-1ca43813937df9cd136ae6d282204604ab659fab -I. -I../src 
-I/usr/i686-w64-mingw32/sys-root/mingw/include/qt5 
-I/usr/i686-w64-mingw32/sys-root/mingw/include/qt5/QtSvg 
-I/usr/i686-w64-mingw32/sys-root/mingw/include/qt5/QtWidgets 
-I/usr/i686-w64-mingw32/sys-root/mingw/include/qt5/QtWinExtras 
-I/usr/i686-w64-mingw32/sys-root/mingw/include/qt5/QtGui 
-I/usr/i686-w64-mingw32/sys-root/mingw/include/qt5/QtNetwork 
-I/usr/i686-w64-mingw32/sys-root/mingw/include/qt5/QtCore -Irelease -I. 
-I/usr/i686-w64-mingw32/sys-root/mingw/share/qt5/mkspecs/mingw-w64-g++ 
-o release/wapi.o ../src/wapi.cpp
../src/wapi.cpp:25:10: fatal error: AccCtrl.h: No such file or directory
   25 | #include <AccCtrl.h>
      |          ^~~~~~~~~~~

I couldn't find anything that provided that on my system so I simply 
removed it.  And that seems to compile okay.

Ah, just realized I'm on a case sensitive system, so changing that to 
<accctrl.h> works too.  But perhaps it isn't really needed?

On 5/9/23 11:27, Ulrich Sibiller wrote:
> Hi again,
> 
> the current upstream of x2goclient contains these lines. So it looks
> like your QT_VERSION is not set correctly. (see
> https://code.x2go.org/gitweb?p=x2goclient.git;a=blob;f=src/wapi.cpp;h=12732c24b7b7cbf2da4cc8b0d0d9f782646960d3;hb=HEAD)
> 
> Uli
> 
> On Tue, May 9, 2023 at 7:25 PM Ulrich Sibiller
> <ulrich.sibiller@gmail.com> wrote:
>>
>> Iirc I have made some patches for the windows version. I thought they had been merged but I must check that. For now try this:
>>
>>
>> #if QT_VERSION >= 0x050200
>>    largeIcon=QtWin::toHICON(icon.scaled(iconx,icony, Qt::IgnoreAspectRatio,Qt::SmoothTransformation));
>>    smallIcon=QtWin::toHICON(icon.scaled(smallx,smally, Qt::IgnoreAspectRatio,Qt::SmoothTransformation));
>> #else
>>    largeIcon=icon.scaled(iconx,icony, Qt::IgnoreAspectRatio,Qt::SmoothTransformation).toWinHICON();
>>    smallIcon=icon.scaled(smallx,smally, Qt::IgnoreAspectRatio,Qt::SmoothTransformation).toWinHICON();
>> #endif
>>
>>
>> Uli
>>
>> Orion Poplawski <orion@nwra.com> schrieb am Di., 9. Mai 2023, 19:00:
>>>
>>> Package: x2goclient
>>> Version: 4.1.2.2
>>> Tag: patch
>>>
>>>
>>> When compiling against Qt5 5.15.9 I get:
>>>
>>> ../src/wapi.cpp: In function 'void wapiSetWindowIcon(HWND, const QPixmap&)':
>>> ../src/wapi.cpp:224:88: error: 'class QPixmap' has no member named
>>> 'toWinHICON'
>>>    224 |     largeIcon=icon.scaled(iconx,icony,
>>> Qt::IgnoreAspectRatio,Qt::SmoothTransformation).toWinHICON ();
>>>        |                        ^~~~~~~~~~
>>> ../src/wapi.cpp:225:90: error: 'class QPixmap' has no member named
>>> 'toWinHICON'
>>>    225 |     smallIcon=icon.scaled(smallx,smally,
>>> Qt::IgnoreAspectRatio,Qt::SmoothTransformation).toWinHICON ();
>>>        |                          ^~~~~~~~~~
>>>
>>> Now, the only call to wapiSetWindowIcon() is commented out, so I just
>>> commented out the wapiSetWindowIcon() code as we...  Looks like the
>>> current function to use is QImage::toHICON().
>>>
>>> I'm also curious that you need to shift to a Windows API call -
>>> shouldn't we be able to do everything in Qt?
>>>
>>>
>>>
>>> --
>>> Orion Poplawski
>>> he/him/his  - surely the least important thing about me
>>> IT Systems Manager                         720-772-5637
>>> NWRA, Boulder/CoRA Office             FAX: 303-415-9702
>>> 3380 Mitchell Lane                       orion@nwra.com
>>> Boulder, CO 80301                 https://www.nwra.com/_______________________________________________
>>> x2go-dev mailing list
>>> x2go-dev@lists.x2go.org
>>> https://lists.x2go.org/listinfo/x2go-dev

-- 
Orion Poplawski
IT Systems Manager                         720-772-5637
NWRA, Boulder/CoRA Office             FAX: 303-415-9702
3380 Mitchell Lane                       orion@nwra.com
Boulder, CO 80301                 https://www.nwra.com/

[smime.p7s (application/pkcs7-signature, attachment)]

Information forwarded to x2go-dev@lists.x2go.org, X2Go Developers <x2go-dev@lists.x2go.org>:
Bug#1601; Package x2goclient. (Tue, 09 May 2023 18:25:01 GMT) (full text, mbox, link).


Acknowledgement sent to Orion Poplawski <orion@nwra.com>:
Extra info received and forwarded to list. Copy sent to X2Go Developers <x2go-dev@lists.x2go.org>. (Tue, 09 May 2023 18:25:01 GMT) (full text, mbox, link).


Message #25 received at 1601@bugs.x2go.org (full text, mbox, reply):

From: Orion Poplawski <orion@nwra.com>
To: uli42@gmx.de, 1601@bugs.x2go.org
Cc: submit@bugs.x2go.org
Subject: Re: [X2Go-Dev] Bug#1601: Patch for x2goclient Qt5 build on Windows
Date: Tue, 9 May 2023 12:19:48 -0600
[Message part 1 (text/plain, inline)]
And I think at the moment I still prefer simply removing the 
wapiSetWindowIcon() code since it isn't used and allows the removal of 
the QT winextras dependency.

On 5/9/23 12:16, Orion Poplawski wrote:
> Gah, once again I make the mistake of not trying to build with the 
> latest git
> code.
> 
> So now I'm trying with that and getting:
> 
> i686-w64-mingw32-g++ -c -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 
> -fexceptions --param=ssp-buffer-size=4 -fno-keep-inline-dllexport -O2 
> -Wall -Wextra -mthreads -DUNICODE -DCFGCLIENT -DQT_STATIC 
> -DQT_DESIGNER_STATIC -DDBUS_STATIC_BUILD -DPCRE_STATIC -DPCRE2_STATIC 
> -DQT_NO_DEBUG -DQT_SVG_LIB -DQT_WIDGETS_LIB -DQT_WINEXTRAS_LIB 
> -DQT_GUI_LIB -DQT_NETWORK_LIB -DQT_CORE_LIB -DQT_NEEDS_QMAIN 
> -I../../x2goclient-1ca43813937df9cd136ae6d282204604ab659fab -I. -I../src 
> -I/usr/i686-w64-mingw32/sys-root/mingw/include/qt5 
> -I/usr/i686-w64-mingw32/sys-root/mingw/include/qt5/QtSvg 
> -I/usr/i686-w64-mingw32/sys-root/mingw/include/qt5/QtWidgets 
> -I/usr/i686-w64-mingw32/sys-root/mingw/include/qt5/QtWinExtras 
> -I/usr/i686-w64-mingw32/sys-root/mingw/include/qt5/QtGui 
> -I/usr/i686-w64-mingw32/sys-root/mingw/include/qt5/QtNetwork 
> -I/usr/i686-w64-mingw32/sys-root/mingw/include/qt5/QtCore -Irelease -I. 
> -I/usr/i686-w64-mingw32/sys-root/mingw/share/qt5/mkspecs/mingw-w64-g++ 
> -o release/wapi.o ../src/wapi.cpp
> ../src/wapi.cpp:25:10: fatal error: AccCtrl.h: No such file or directory
>     25 | #include <AccCtrl.h>
>        |          ^~~~~~~~~~~
> 
> I couldn't find anything that provided that on my system so I simply 
> removed it.  And that seems to compile okay.
> 
> Ah, just realized I'm on a case sensitive system, so changing that to 
> <accctrl.h> works too.  But perhaps it isn't really needed?
> 
> On 5/9/23 11:27, Ulrich Sibiller wrote:
>> Hi again,
>>
>> the current upstream of x2goclient contains these lines. So it looks
>> like your QT_VERSION is not set correctly. (see
>> https://code.x2go.org/gitweb?p=x2goclient.git;a=blob;f=src/wapi.cpp;h=12732c24b7b7cbf2da4cc8b0d0d9f782646960d3;hb=HEAD)
>>
>> Uli
>>
>> On Tue, May 9, 2023 at 7:25 PM Ulrich Sibiller
>> <ulrich.sibiller@gmail.com> wrote:
>>>
>>> Iirc I have made some patches for the windows version. I thought they 
>>> had been merged but I must check that. For now try this:
>>>
>>>
>>> #if QT_VERSION >= 0x050200
>>>    largeIcon=QtWin::toHICON(icon.scaled(iconx,icony, 
>>> Qt::IgnoreAspectRatio,Qt::SmoothTransformation));
>>>    smallIcon=QtWin::toHICON(icon.scaled(smallx,smally, 
>>> Qt::IgnoreAspectRatio,Qt::SmoothTransformation));
>>> #else
>>>    largeIcon=icon.scaled(iconx,icony, 
>>> Qt::IgnoreAspectRatio,Qt::SmoothTransformation).toWinHICON();
>>>    smallIcon=icon.scaled(smallx,smally, 
>>> Qt::IgnoreAspectRatio,Qt::SmoothTransformation).toWinHICON();
>>> #endif
>>>
>>>
>>> Uli
>>>
>>> Orion Poplawski <orion@nwra.com> schrieb am Di., 9. Mai 2023, 19:00:
>>>>
>>>> Package: x2goclient
>>>> Version: 4.1.2.2
>>>> Tag: patch
>>>>
>>>>
>>>> When compiling against Qt5 5.15.9 I get:
>>>>
>>>> ../src/wapi.cpp: In function 'void wapiSetWindowIcon(HWND, const 
>>>> QPixmap&)':
>>>> ../src/wapi.cpp:224:88: error: 'class QPixmap' has no member named
>>>> 'toWinHICON'
>>>>    224 |     largeIcon=icon.scaled(iconx,icony,
>>>> Qt::IgnoreAspectRatio,Qt::SmoothTransformation).toWinHICON ();
>>>>        |                        ^~~~~~~~~~
>>>> ../src/wapi.cpp:225:90: error: 'class QPixmap' has no member named
>>>> 'toWinHICON'
>>>>    225 |     smallIcon=icon.scaled(smallx,smally,
>>>> Qt::IgnoreAspectRatio,Qt::SmoothTransformation).toWinHICON ();
>>>>        |                          ^~~~~~~~~~
>>>>
>>>> Now, the only call to wapiSetWindowIcon() is commented out, so I just
>>>> commented out the wapiSetWindowIcon() code as we...  Looks like the
>>>> current function to use is QImage::toHICON().
>>>>
>>>> I'm also curious that you need to shift to a Windows API call -
>>>> shouldn't we be able to do everything in Qt?
>>>>
>>>>
>>>>
>>>> -- 
>>>> Orion Poplawski
>>>> he/him/his  - surely the least important thing about me
>>>> IT Systems Manager                         720-772-5637
>>>> NWRA, Boulder/CoRA Office             FAX: 303-415-9702
>>>> 3380 Mitchell Lane                       orion@nwra.com
>>>> Boulder, CO 80301                 
>>>> https://www.nwra.com/_______________________________________________
>>>> x2go-dev mailing list
>>>> x2go-dev@lists.x2go.org
>>>> https://lists.x2go.org/listinfo/x2go-dev
> 

-- 
Orion Poplawski
he/him/his  - surely the least important thing about me
IT Systems Manager                         720-772-5637
NWRA, Boulder/CoRA Office             FAX: 303-415-9702
3380 Mitchell Lane                       orion@nwra.com
Boulder, CO 80301                 https://www.nwra.com/

[smime.p7s (application/pkcs7-signature, attachment)]

Information forwarded to x2go-dev@lists.x2go.org, X2Go Developers <x2go-dev@lists.x2go.org>:
Bug#1601; Package x2goclient. (Tue, 09 May 2023 19:30:02 GMT) (full text, mbox, link).


Acknowledgement sent to Ulrich Sibiller <uli42@gmx.de>:
Extra info received and forwarded to list. Copy sent to X2Go Developers <x2go-dev@lists.x2go.org>. (Tue, 09 May 2023 19:30:02 GMT) (full text, mbox, link).


Message #30 received at 1601@bugs.x2go.org (full text, mbox, reply):

From: Ulrich Sibiller <uli42@gmx.de>
To: Orion Poplawski <orion@nwra.com>
Cc: 1601@bugs.x2go.org, submit@bugs.x2go.org
Subject: Re: [X2Go-Dev] Bug#1601: Patch for x2goclient Qt5 build on Windows
Date: Tue, 9 May 2023 21:24:42 +0200
[Message part 1 (text/plain, inline)]
Ok, that makes sense.

Checkout README .mxe for instructions how to compile for windows using mxe
on Linux

Uli



Orion Poplawski <orion@nwra.com> schrieb am Di., 9. Mai 2023, 20:19:

> And I think at the moment I still prefer simply removing the
> wapiSetWindowIcon() code since it isn't used and allows the removal of
> the QT winextras dependency.
>
> On 5/9/23 12:16, Orion Poplawski wrote:
> > Gah, once again I make the mistake of not trying to build with the
> > latest git
> > code.
> >
> > So now I'm trying with that and getting:
> >
> > i686-w64-mingw32-g++ -c -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2
> > -fexceptions --param=ssp-buffer-size=4 -fno-keep-inline-dllexport -O2
> > -Wall -Wextra -mthreads -DUNICODE -DCFGCLIENT -DQT_STATIC
> > -DQT_DESIGNER_STATIC -DDBUS_STATIC_BUILD -DPCRE_STATIC -DPCRE2_STATIC
> > -DQT_NO_DEBUG -DQT_SVG_LIB -DQT_WIDGETS_LIB -DQT_WINEXTRAS_LIB
> > -DQT_GUI_LIB -DQT_NETWORK_LIB -DQT_CORE_LIB -DQT_NEEDS_QMAIN
> > -I../../x2goclient-1ca43813937df9cd136ae6d282204604ab659fab -I. -I../src
> > -I/usr/i686-w64-mingw32/sys-root/mingw/include/qt5
> > -I/usr/i686-w64-mingw32/sys-root/mingw/include/qt5/QtSvg
> > -I/usr/i686-w64-mingw32/sys-root/mingw/include/qt5/QtWidgets
> > -I/usr/i686-w64-mingw32/sys-root/mingw/include/qt5/QtWinExtras
> > -I/usr/i686-w64-mingw32/sys-root/mingw/include/qt5/QtGui
> > -I/usr/i686-w64-mingw32/sys-root/mingw/include/qt5/QtNetwork
> > -I/usr/i686-w64-mingw32/sys-root/mingw/include/qt5/QtCore -Irelease -I.
> > -I/usr/i686-w64-mingw32/sys-root/mingw/share/qt5/mkspecs/mingw-w64-g++
> > -o release/wapi.o ../src/wapi.cpp
> > ../src/wapi.cpp:25:10: fatal error: AccCtrl.h: No such file or directory
> >     25 | #include <AccCtrl.h>
> >        |          ^~~~~~~~~~~
> >
> > I couldn't find anything that provided that on my system so I simply
> > removed it.  And that seems to compile okay.
> >
> > Ah, just realized I'm on a case sensitive system, so changing that to
> > <accctrl.h> works too.  But perhaps it isn't really needed?
> >
> > On 5/9/23 11:27, Ulrich Sibiller wrote:
> >> Hi again,
> >>
> >> the current upstream of x2goclient contains these lines. So it looks
> >> like your QT_VERSION is not set correctly. (see
> >>
> https://code.x2go.org/gitweb?p=x2goclient.git;a=blob;f=src/wapi.cpp;h=12732c24b7b7cbf2da4cc8b0d0d9f782646960d3;hb=HEAD
> )
> >>
> >> Uli
> >>
> >> On Tue, May 9, 2023 at 7:25 PM Ulrich Sibiller
> >> <ulrich.sibiller@gmail.com> wrote:
> >>>
> >>> Iirc I have made some patches for the windows version. I thought they
> >>> had been merged but I must check that. For now try this:
> >>>
> >>>
> >>> #if QT_VERSION >= 0x050200
> >>>    largeIcon=QtWin::toHICON(icon.scaled(iconx,icony,
> >>> Qt::IgnoreAspectRatio,Qt::SmoothTransformation));
> >>>    smallIcon=QtWin::toHICON(icon.scaled(smallx,smally,
> >>> Qt::IgnoreAspectRatio,Qt::SmoothTransformation));
> >>> #else
> >>>    largeIcon=icon.scaled(iconx,icony,
> >>> Qt::IgnoreAspectRatio,Qt::SmoothTransformation).toWinHICON();
> >>>    smallIcon=icon.scaled(smallx,smally,
> >>> Qt::IgnoreAspectRatio,Qt::SmoothTransformation).toWinHICON();
> >>> #endif
> >>>
> >>>
> >>> Uli
> >>>
> >>> Orion Poplawski <orion@nwra.com> schrieb am Di., 9. Mai 2023, 19:00:
> >>>>
> >>>> Package: x2goclient
> >>>> Version: 4.1.2.2
> >>>> Tag: patch
> >>>>
> >>>>
> >>>> When compiling against Qt5 5.15.9 I get:
> >>>>
> >>>> ../src/wapi.cpp: In function 'void wapiSetWindowIcon(HWND, const
> >>>> QPixmap&)':
> >>>> ../src/wapi.cpp:224:88: error: 'class QPixmap' has no member named
> >>>> 'toWinHICON'
> >>>>    224 |     largeIcon=icon.scaled(iconx,icony,
> >>>> Qt::IgnoreAspectRatio,Qt::SmoothTransformation).toWinHICON ();
> >>>>        |                        ^~~~~~~~~~
> >>>> ../src/wapi.cpp:225:90: error: 'class QPixmap' has no member named
> >>>> 'toWinHICON'
> >>>>    225 |     smallIcon=icon.scaled(smallx,smally,
> >>>> Qt::IgnoreAspectRatio,Qt::SmoothTransformation).toWinHICON ();
> >>>>        |                          ^~~~~~~~~~
> >>>>
> >>>> Now, the only call to wapiSetWindowIcon() is commented out, so I just
> >>>> commented out the wapiSetWindowIcon() code as we...  Looks like the
> >>>> current function to use is QImage::toHICON().
> >>>>
> >>>> I'm also curious that you need to shift to a Windows API call -
> >>>> shouldn't we be able to do everything in Qt?
> >>>>
> >>>>
> >>>>
> >>>> --
> >>>> Orion Poplawski
> >>>> he/him/his  - surely the least important thing about me
> >>>> IT Systems Manager                         720-772-5637
> >>>> NWRA, Boulder/CoRA Office             FAX: 303-415-9702
> >>>> 3380 Mitchell Lane                       orion@nwra.com
> >>>> Boulder, CO 80301
> >>>> https://www.nwra.com/_______________________________________________
> >>>> x2go-dev mailing list
> >>>> x2go-dev@lists.x2go.org
> >>>> https://lists.x2go.org/listinfo/x2go-dev
> >
>
> --
> Orion Poplawski
> he/him/his  - surely the least important thing about me
> IT Systems Manager                         720-772-5637
> NWRA, Boulder/CoRA Office             FAX: 303-415-9702
> 3380 Mitchell Lane                       orion@nwra.com
> Boulder, CO 80301                 https://www.nwra.com/
>
>
[Message part 2 (text/html, inline)]

Send a report that this bug log contains spam.


X2Go Developers <owner@bugs.x2go.org>. Last modified: Sun Dec 22 05:43:26 2024; Machine Name: ymir.das-netzwerkteam.de

X2Go Bug tracking system

Debbugs is free software and licensed under the terms of the GNU Public License version 2. The current version can be obtained from https://bugs.debian.org/debbugs-source/.

Copyright © 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson, 2005-2017 Don Armstrong, and many other contributors.