Xpra: Ticket #1413: 64-bit MS Windows builds

Split from #678, related to #1253.

Following the wiki/Building/MSWindows, we can get a 64-bit build environment with almost everything needed.

TODO:



Tue, 17 Jan 2017 15:55:15 GMT - Antoine Martin: status, description changed


Wed, 18 Jan 2017 12:17:40 GMT - Antoine Martin: attachment set

pkgconfig file for nvenc7


Wed, 18 Jan 2017 12:17:57 GMT - Antoine Martin: attachment set

pkgconfig file for NVAPI


Wed, 18 Jan 2017 12:32:37 GMT - Antoine Martin:

Packaging

64-bit packaging improvements in r14814: we can have both versions installed now.

CUDA / pycuda

remove "/EHsc" and "/FORCE" from siteconf.py. Add BOOST_USE_WINDOWS_H=1 in EXTRA_DEFINES of setup.py to workaround this boost bug: http://stackoverflow.com/questions/18134148/

python ./setup.py build -c mingw32
python ./setup.py install

Optional: rm -fr build && python3 ./setup.py clean then repeat the build with python3.

NVAPI

Fails: does not build with mingw, not sure how easy it would be to fix (uses DX / MSVC macros)

NVENC

r14815 makes it possible to build the codec using Cython. Still TODO: the CUDA kernels cannot be compiled with nvcc and mingw, or at least I haven't been able to figure out how. (the documentation does seem to indicate that it should be possible) Options:


Sat, 21 Jan 2017 08:52:33 GMT - Antoine Martin:

Remaining tasks:

Maybe also:


Mon, 23 Jan 2017 16:55:59 GMT - Antoine Martin:

The gtkglext problem is upstream and is not in our (to be upstreamed) port of pygtkglext. Created a ticket for it: mingw-w64-x86_64-gtkglext DLL wrongly imports DllMain.


Tue, 24 Jan 2017 09:41:02 GMT - Antoine Martin:

Found a solution: build gtkglext with "-mwindows", so we now have opengl with 64-bit builds! (PS: it seems that simply building from source is enough)


Tue, 24 Jan 2017 15:26:11 GMT - Antoine Martin: owner, status changed

r14852 fixes the keyboard with 64-bit builds. (was a ctypes method signature error)

It's likely that there are other places where we should be more strict with C API signatures. 64-bit builds are more likely to expose these problems.

64-bit builds are also likely to be much faster at video decoding.

@afarr: over to you to find some bugs. Please bug smo to make sure you can reproduce these builds on your own environment.

I have uploaded 3 different types of r14852 builds you can test - this should help us figure out if the bug is caused by the move to msys2 (#678) or 64-bit builds.

Here's how to differentiate them from now on:


Thu, 26 Jan 2017 00:15:25 GMT - J. Max Mena:

Alright, so I pulled down all three installers and gave it a whirl against a 2.0 r13454 server (latest package available on my Fedora 25 machine, for some odd reason sound is completely borked when I build from source - am investigating):

Legacy:

Launcher output:

2017-01-25 13:47:58,256 propsys missing
Traceback (most recent call last):
  File "xpra\platform\win32\gui.pyc", line 53, in <module>
ImportError: No module named propsys
2017-01-25 13:47:58,256 Warning: propsys support missing, window grouping is not available
2017-01-25 13:47:58,348 Xpra gtk2 client version 2.0-r14852 32-bit
2017-01-25 13:47:58,348  running on Microsoft Windows 8.1
Warning: failed to import GStreamer 1.x:
 No module named gi
2017-01-25 13:47:58,536 Error: failed to query sound subsystem:
2017-01-25 13:47:58,552  query did not return any data
xpra main error:
Traceback (most recent call last):
  File "xpra\scripts\main.pyc", line 136, in main
  File "xpra\scripts\main.pyc", line 1204, in run_mode
  File "xpra\scripts\main.pyc", line 2051, in run_client
  File "xpra\client\ui_client_base.pyc", line 434, in init_ui
  File "xpra\client\gtk_base\gtk_client_base.pyc", line 643, in init_opengl
  File "xpra\platform\win32\gui.pyc", line 189, in gl_check
ImportError: No module named OpenGL.platform

But other than that it appears to work fine.


Appears to work fine, however there's a typo when importing gsview:

2017-01-25 14:43:42,215 Error initializing printing support:
2017-01-25 14:43:42,215  cannot find gsprint.exe in 'C:/Program Files (x86)/Xpra\gsview'

The last slash is a backslash not a forward slash.

Other than that seems to work fine.


Same error with gsview:

2017-01-25 15:09:02,451 Error initializing printing support:
2017-01-25 15:09:02,451  cannot find gswin32c.exe in 'C:/Program Files/Xpra\gsview'

Although I do wonder if it's possible to use the 32-bit gsview for printing


Thu, 26 Jan 2017 09:01:20 GMT - Antoine Martin: owner changed


Thu, 26 Jan 2017 22:57:59 GMT - J. Max Mena: owner changed

No obvious bugs with the r14860 clients (connected against a r14862 2.0 server), but I do have one piece of feedback for you:

The session info does not denote what architecture the client and server are running, and since we'll be mixing 32 and 64 bit builds, it would make sense to put that information in the Session Info page.


Passing back to you - if you feel it's unnecessary, then go ahead and close (unless you have anything else that needs to be done) as I can't seem to find anything wrong with any of the builds. Anecdotally, video performance *feels* better because I can play FTL at a notably better FPS with the 64-bit build. I wish I had some hard data to back that up, but until then anecdotal evidence will have to suffice.


Sat, 18 Feb 2017 15:08:45 GMT - Antoine Martin: status, component changed; keywords, resolution, milestone set

Performance is notoriously hard to measure.

Good point about the ability to distinguish builds, r15115 adds the "64bit" string to the about dialog.


Fri, 01 Nov 2019 12:03:50 GMT - Antoine Martin:

pycuda update: had to do this to get pycuda 2019.1.2 to build on MSYS2:

pushd src/cpp
ln -sf ../../bpl-subset/bpl_subset/boost pycudaboost
popd
pacman -S mingw-w64-x86_64-python3-mako mingw-w64-x86_64-python3-decorator

Sat, 23 Jan 2021 05:23:38 GMT - migration script:

this ticket has been moved to: https://github.com/Xpra-org/xpra/issues/1413