Skip to content

Conversation

@todirbg
Copy link

@todirbg todirbg commented Apr 21, 2020

Hi I've added support for linux trough xlib. To compile it needs linking -lX11 and compiler option -fPIC to add libutil library. I compiled it with gcc via CodeBlocks and I don't have makefile for it. It has been tested only on my Mint 19.3. It changes cursors with theme ones instead of the provided pngs.

todirbg added 9 commits April 21, 2020 19:24
Used X11 xlib and extensions/XInput2. Cursor change with theme cursors. TODO Update makefile.
Used X11 xlib and extensions/XInput2. Cursor change with defaul theme cursors. TODO update makefile
query mouse button on every flight loop
@mwrf
Copy link

mwrf commented May 27, 2020

I've just moved my installation from Windows to Linux. I would love for this to be merged.

@todirbg Have you a build I can test?

@todirbg
Copy link
Author

todirbg commented May 29, 2020

Yes, check my fork releases.

@iblue
Copy link

iblue commented May 25, 2021

For those who try to compile it themselves:

In the Util/Makefile set CC=gcc and replace -DAPL by -DLIN.
In BetterMouseYoke/Makefile, set CC=gcc, replace -DAPL by -DLIN and set the LDFLAGS to ../XP/Libs/XPLM_64.so ../Util/util.a -fvisibility=hidden -shared -rdynamic -nodefaultlibs -undefined_warning -lX11 -fPIC and NAME=lin.xpl.

Also copy the Resources/plugins/XPLM_64.so from your X-Plane folder to XP/Libs/.

Then install the required headers (on Debian this is sudo apt get install libx11-dev libxi-dev libxcursor-dev).

In the Util directory, run make, then in the BetterMouseYoke also run make.

I will figure out what to do with the resulting file tomorrow.

@ghost
Copy link

ghost commented Sep 13, 2021

How do i use this? I followed iblue's guide to compiling it and I assume I'm supposed to put it in the Resources/plugins/BetterMouseYoke_1.5 folder, but it didn't work.

I'm a Linux noob, so I'm sorry if I'm missing something obvious.

@iblue
Copy link

iblue commented Sep 13, 2021

If I remember correctly, it goes to Resources/plugins/BetterMouseYoke/64/lin.xpl. Does this work for you?

@ghost
Copy link

ghost commented Sep 13, 2021

I renamed the folder from BetterMouseYoke_1.5 to BetterMouseYoke and added a folder named "64" and put lin.xpl inside it, but no, it didn't work...

@todirbg
Copy link
Author

todirbg commented Sep 20, 2021

@kikiokol attach your xplane log.txt if able or look into it for clues.

@ghost
Copy link

ghost commented Oct 20, 2021

Ok so i switched to Manjaro and now it works, i don't know what i did wrong last time but now it works. Thanks

@iltifatibad
Copy link

Hello , i try build the file ( I Use Arch ) , but i can't. I clone this https://github.com/smiley22/XPPlugins , and then i do this things :
For those who try to compile it themselves:

In the Util/Makefile set CC=gcc and replace -DAPL by -DLIN.
In BetterMouseYoke/Makefile, set CC=gcc, replace -DAPL by -DLIN and set the LDFLAGS to ../XP/Libs/XPLM_64.so ../Util/util.a -fvisibility=hidden -shared -rdynamic -nodefaultlibs -undefined_warning -lX11 -fPIC and NAME=lin.xpl.

Also copy the Resources/plugins/XPLM_64.so from your X-Plane folder to XP/Libs/.

Then install the required headers (on Debian this is sudo apt get install libx11-dev libxi-dev libxcursor-dev).

In the Util directory, run make, then in the BetterMouseYoke also run make.

I will figure out what to do with the resulting file tomorrow.

But i get an error like this .

Util]$ sudo make
gcc -Wall DLIN -O2 -Wno-unused-variable -Wno-return-type -c -o cmd.o cmd.c
In file included from ../XP/XPLMUtilities.h:18,
from util.h:25,
from cmd.c:10:
../XP/XPLMDefs.h:88:18: error: #error "Platform not defined!"
88 | #error "Platform not defined!"
| ^~~~~
../XP/XPLMDefs.h:121:10: error: #error "Platform not defined!"
121 | #error "Platform not defined!"
| ^~~~~
../XP/XPLMUtilities.h:377:9: error: expected ‘;’ before ‘void’
377 | XPLM_API void XPLMSimulateKeyPress(
| ^~~~~
| ;
../XP/XPLMUtilities.h:389:9: error: expected ‘;’ before ‘void’
389 | XPLM_API void XPLMSpeakString(
| ^~~~~
| ;
../XP/XPLMUtilities.h:401:9: error: expected ‘;’ before ‘void’
401 | XPLM_API void XPLMCommandKeyStroke(
| ^~~~~
| ;
../XP/XPLMUtilities.h:414:9: error: expected ‘;’ before ‘void’
414 | XPLM_API void XPLMCommandButtonPress(
| ^~~~~
| ;
../XP/XPLMUtilities.h:424:9: error: expected ‘;’ before ‘void’
424 | XPLM_API void XPLMCommandButtonRelease(
| ^~~~~
| ;
../XP/XPLMUtilities.h:436:9: error: expected ‘;’ before ‘const’
436 | XPLM_API const char * XPLMGetVirtualKeyDescription(
| ^~~~~~
| ;
../XP/XPLMUtilities.h:457:9: error: expected ‘;’ before ‘void’
457 | XPLM_API void XPLMReloadScenery(void);
| ^~~~~
| ;
../XP/XPLMUtilities.h:467:9: error: expected ‘;’ before ‘void’
467 | XPLM_API void XPLMGetSystemPath(
| ^~~~~
| ;
../XP/XPLMUtilities.h:479:9: error: expected ‘;’ before ‘void’
479 | XPLM_API void XPLMGetPrefsPath(
| ^~~~~
| ;
../XP/XPLMUtilities.h:491:9: error: expected ‘;’ before ‘const’
491 | XPLM_API const char * XPLMGetDirectorySeparator(void);
| ^~~~~~
| ;
../XP/XPLMUtilities.h:503:9: error: expected ‘;’ before ‘char’
503 | XPLM_API char * XPLMExtractFileAndPath(
| ^~~~~

A lot of errors like this

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants