uglyDwarf / linuxtrack

Headtracking for Linux/Mac
MIT License
158 stars 29 forks source link

Incompatible with Wine 6.3+ #185

Open a-leithner opened 3 years ago

a-leithner commented 3 years ago

In trying to get linuxtrack to build on the most recent OpenSuSe Tumbleweed build, I stumbled across the following rather peculiar error from winegcc:

NPClient_main.c: In function ‘DllMain’:
NPClient_main.c:55:14: error: ‘DLL_WINE_PREATTACH’ undeclared (first use in this function)
   55 |         case DLL_WINE_PREATTACH:
      |              ^~~~~~~~~~~~~~~~~~
NPClient_main.c:55:14: note: each undeclared identifier is reported only once for each function it appears in

My winegcc --version output is

gcc (SUSE Linux) 11.2.1 20210816 [revision 056e324ce46a7924b5cf10f61010cf9dd2ca10e9]
Copyright (C) 2021 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

However, I have a fairly new version of Wine installed, namely 6.17-1.2 (which roughly translates to the newest build of 6.17). It seems as though the Wine project has removed support for DLL_WINE_PREATTACH throughout its codebase in version 6.3; this can be seen in the (unofficial) changelog over at LinuxCompatible.org.

I'm unsure how to resolve this as I have never created DLLs with/for Wine and can thus offer no help. This issue sadly means that most users of SteamPlay Proton will not be able to build and/or use linuxtrack because Proton currently ships with Wine 6.3 (and at least using a package manager it is not possible to install an older version of Wine in order to build the DLL)

a-leithner commented 3 years ago

This seems to be fixed by #182 - although I cannot confirm that this builds correctly, as I cannot get it to work (neither the Linux nor the Wine binaries).

exuvo commented 2 years ago

What did you not get working with my patch? Compiles fine for me with wine 7.5 .

exuvo commented 2 years ago

If you use the changes in my patch (which includes rfvizarra's changes) here are some additional notes copied from my arch AUR comment:

Dependency changes: Replace qt4 and qtwebkit with qt5-dll, add mxml and nsis to depends. The linuxtrack configure should detect and also build the wine bridge.

When compiled run ltr_gui and use its misc->install linuxtrack-wine to extract the needed files from trackIRs installer. The final install step does not seem to work so we have to do that manually.

Run wine on /usr/share/linuxtrack/linuxtrack-wine.exe and install it. That should create drive_c/Program Files (x86)/Linuxtrack. Now copy the files the ltr_gui extracted (at .config/linuxtrack/tir_firmware/) into the new wine directory. Then run Tester64.exe to verify it works (it gives error boxes if any of the required files are missing).

a-leithner commented 2 years ago

What did you not get working with my patch? Compiles fine for me with wine 7.5 .

Yup, it compiles, but that's about it. When trying to run ltr_gui, it segfaults immediately. However, I have not yet tried your patches, @exuvo, because at the time I had given up on linuxtrack – however, I will try to come back to it once I have a little more time on my hands.

Originally, I opened this ticket to give the patches a little more visibility; but that doesn't seem to have worked...