Subject: Bug#642: Changes in X2GoClient for Windows to enable it conform to Visual Studio's stricter type checking

From: "George Trakatelis" <[email-masked]>
Date: Wed, 15 Oct 2014 17:45:54 +0300

Package: x2goclient
Version: 4.0.2.1
Severity: wishlist

Given the ease of use of Visual Studio's built-in debugger, 
the ability to compile X2GoClient in Visual Studio 2010 
would be highly appreciated by developers eager to contribute 
in the evolution of X2GoClient for Windows.

Using the attached patch (also added config_win_vs.bat) 
I have only managed to compile x2gofree (with VS2010 nmake) 
on the command line. Despite my changes in x2goclient.pro,
Qt4 Visual Studio Add-in cannot produce a working project file
(x2goclient.vcxproj). 
Any help to enable building x2gofree in Visual Studio 2010 is welcome.

PS. The change in ONMainWindow::slotRetResumeSess 
is also mandatory for GCC 4.8.2 (i686-4.8.2-release-posix-dwarf-rt_v3-rev3).

-----------------------------------------------------------------
George Trakatelis 
Department of Applied Informatics, School of Information Sciences 
University of Macedonia, Greece
-----------------------------------------------------------------

---

From: Mike Gabriel <[email-masked]>
Date: Wed, 15 Oct 2014 20:33:58 +0000

Hi Alex, hi Mike#2,

> is also mandatory for GCC 4.8.2 (i686-4.8.2-release-posix-dwarf-rt_v3-rev3).

Please review George's patch. And possibly give support (if time  
allows it and priority provides it).

Thanks!
Mike

-- 

DAS-NETZWERKTEAM
mike gabriel, herweg 7, 24357 fleckeby
fon: +49 (1520) 1976 148

GnuPG Key ID 0x25771B31
mail: [email-masked], http://das-netzwerkteam.de

freeBusy:
https://mail.das-netzwerkteam.de/freebusy/m.gabriel%40das-netzwerkteam.de.xfb

---

From: Oleksandr Shneyder <[email-masked]>
Date: Thu, 16 Oct 2014 10:42:21 +0200

patch is ok.

regards,
Alex.
Am 15.10.2014 22:33, schrieb Mike Gabriel:
>> is also mandatory for GCC 4.8.2
>> (i686-4.8.2-release-posix-dwarf-rt_v3-rev3).
> 
> Please review George's patch. And possibly give support (if time allows
> it and priority provides it).
> 
> Thanks!
> Mike
> 

-- 
-----------------------------------------------------------
Oleksandr Shneyder        | Email: [email-masked]
phoca GmbH                | Tel. : 0911 - 14870374 0
Ludwig-Feuerbach-str. 18  | Fax. : 0911 - 14870374 9
D-90489 Nürnberg          | Mobil: 0163 - 49 64 461

Geschäftsführung:
Dipl.-Inf. Oleksandr Shneyder

Amtsgericht München | http://www.phoca-gmbh.de
HRB 196 658         | http://www.x2go.org
USt-IdNr.: DE281977973
-----------------------------------------------------------

---

From: Michael DePaulo <[email-masked]>
Date: Thu, 16 Oct 2014 10:16:16 -0400

I can merge it this evening. But should we merge it right before we release
4.0.3.0?

Sent from my Android Smartphone
On Oct 16, 2014 5:05 AM, "Oleksandr Shneyder" <[email-masked]>
wrote:

> _______________________________________________
> x2go-dev mailing list
> [email-masked]
> http://lists.x2go.org/listinfo/x2go-dev
>

---

From: Mike Gabriel <[email-masked]>
Date: Thu, 16 Oct 2014 14:30:29 +0000

Hi Mike#2

> I can merge it this evening. But should we merge it right before we release

No, please wait till 4.0.3.0 is out.

Mike

-- 

DAS-NETZWERKTEAM

GnuPG Key ID 0x25771B31

freeBusy:

---

From: "George Trakatelis" <[email-masked]>
Date: Wed, 22 Oct 2014 11:05:21 +0300

Dear Michael,

Please wait a little bit more before applying the patch 
as I will split it into 2 or 3 parts and 
give a word or two of explanation on each part. 

George

-----Original Message-----
From: Mike Gabriel [mailto:[email-masked]] 
Sent: Thursday, October 16, 2014 5:30 PM
To: 
Cc: [email-masked]; Oleksandr Shneyder; [email-masked]; George Trakatelis
Subject: Re: [X2Go-Dev] Bug#642: Bug#642: Changes in X2GoClient for Windows to enable it conform to Visual Studio's stricter type checking

Hi Mike#2

On  Do 16 Okt 2014 16:16:16 CEST, Michael DePaulo wrote:

> I can merge it this evening. But should we merge it right before we 
> release 4.0.3.0?
>

Mike

-- 

DAS-NETZWERKTEAM

GnuPG Key ID 0x25771B31

freeBusy:

---

From: "George Trakatelis" <[email-masked]>
Date: Tue, 28 Oct 2014 07:15:54 +0200

Hi Michael,

Now that release 4.0.3.0 of x2goclient is out, 
I attach my proposed changes and comment on each one:

1. conform-to-stricter-type-checking-mingw482.patch

Even mingw's debug build complains about this char * 
not having been declared as ought to be (const char *) 
and suggests using -fpermissive (not recommended).

2. conform-to-stricter-type-checking-VS2010.patch

a. A type-cast to match one of pow's declarations {float pow(float x, int y);}
b. In pure Windows there's no close() function to close a socket. 
   So you have to use closesocket() instead.
c. Include winsock2.h just before windows.h (also recommended by mingw).

3. add-libraries-to-build-with-VS2010.patch

a. A new batch file to configure x2goclient for VS2010 build (config_win_vs.bat). 
I have just substituted nmake for mingw32-make. 
Please remember to also use 'nmake' or 'nmake debug' when building.
b. Added necessary win32 libraries.

George

> To: Michael DePaulo
> Subject: Re: [X2Go-Dev] Bug#642: Bug#642: Changes in X2GoClient for
> Windows to enable it conform to Visual Studio's stricter type checking
> 
> Hi Mike#2
>

---

From: Mike Gabriel <[email-masked]>
Date: Tue, 28 Oct 2014 07:55:09 +0000

Hi George,

> b. Added necessary win32 libraries.

Thanks a lot for providing those patches.

Will applying all those patches provide enough reason/solution to  
close this bug (#642)?

Mike

-- 

DAS-NETZWERKTEAM

GnuPG Key ID 0x25771B31

freeBusy:

---

From: "George Trakatelis" <[email-masked]>
Date: Tue, 28 Oct 2014 18:55:52 +0200

Hi Mike,

My initial intention was to build X2GoClient for Windows using the VS2010 IDE, 
but that seems to be impossible for the time being due to a Qt4 Visual Studio Add-in limitation. 
The provided patches:

1. 'conform-to-stricter-type-checking-mingw482.patch', 
2. 'conform-to-stricter-type-checking-VS2010.patch', and 
3. the now attached 'add-libraries-to-build-with-VS2010-command-line.patch' 
   (which supersedes previously attached 'add-libraries-to-build-with-VS2010.patch') 

make it possible to build X2GoClient for Windows 4.0.3.0 from the command line 
using Visual Studio's nmake (one has to install VS2010 and Qt 4.8.6 for VS2010). 
As this wishlist bug is actually resolved by applying the 3 patches, my answer is 
'Yes, you can close it, provided that at least one volunteer confirms its validity'.

George

> Sent: Tuesday, October 28, 2014 9:55 AM
> To: George Trakatelis; [email-masked]
> > Now that release 4.0.3.0 of x2goclient is out, I attach my proposed
> > changes and comment on each one:
> >
> > Even mingw's debug build complains about this char * not having been
> > declared as ought to be (const char *) and suggests using -
> fpermissive
> > (not recommended).
> >
> > a. A type-cast to match one of pow's declarations {float pow(float x,
> > int y);} b. In pure Windows there's no close() function to close a
> > socket.
> Will applying all those patches provide enough reason/solution to close
> this bug (#642)?
> 
> Mike
> 
> 
> --
> 
> DAS-NETZWERKTEAM

---

From: Mike Gabriel <[email-masked]>
Date: Tue, 28 Oct 2014 17:49:10 +0000

HI Mike#2

> 'Yes, you can close it, provided that at least one volunteer
   ^^^^^^^^^^^^^^^^^^^^^

@Mike#2: I fear, this is on you...

Mike#1

-- 

DAS-NETZWERKTEAM

GnuPG Key ID 0x25771B31

freeBusy:

---

From: "George Trakatelis" <[email-masked]>
Date: Thu, 30 Oct 2014 08:44:14 +0200

Hi Mikes,

I have just discovered an error in one of the previously provided patch files.
Windows sockets cleanup is handled in SshProcess::~SshProcess() (as it should be),
so I had to remove WSACleanup() from patched SshMasterConnection::finalize(int)
which caused a connection error if someone -after logging out- tried to login to the same server.

To avoid any ambiguity I re-attach the correct patch files.

George

PS. I wish a constructive gathering to all participants.

> Sent: Tuesday, October 28, 2014 7:49 PM
> To: George Trakatelis
> Cc: [email-masked]; 'Mike DePaulo'
> > As this wishlist bug is actually resolved by applying the 3 patches,
> > my answer is 'Yes, you can close it, provided that at least one
> > volunteer confirms its validity'.
>    ^^^^^^^^^^^^^^^^^^^^^
>

---

From: Michael DePaulo <[email-masked]>
Date: Thu, 6 Nov 2014 21:55:10 -0500

On Thu, Oct 30, 2014 at 2:44 AM, George Trakatelis
<[email-masked]> wrote:
...
> To avoid any ambiguity I re-attach the correct patch files.
...

Sorry for the delay. I will test out the patches this weekend.

-Mike#2