intiface / intiface-central

Intiface Central (Buttplug Frontend) Application for Desktop and Mobile
Other
122 stars 17 forks source link

Linux version doesn't work properly when started from any directory except where binary file is #40

Open maybe-hello-world opened 1 year ago

maybe-hello-world commented 1 year ago

Description: If I start intiface_central from any folder except where the binary is located, dynamic libraries are not loaded properly. Log:

kell@vika:~/Desktop$ ../Downloads/intiface_central_v2.2_linux_x64/intiface_central 
[ERROR:flutter/runtime/dart_vm_initializer.cc(41)] Unhandled Exception: Invalid argument(s): Failed to load dynamic library 'lib/libintiface_engine_flutter_bridge.so': lib/libintiface_engine_flutter_bridge.so: cannot open shared object file: No such file or directory
...

Steps to reproduce:

  1. Extract Linux version of intiface-central in any folder
  2. Start the binary filer from the console from any other folder
  3. Try to start the server

Expected behavior: The server is started

Observed behavior: Server doesn't start, exceptions in the console

Additional info: v2.2.0

Doomsdayrs commented 1 year ago

It seems that in https://github.com/intiface/intiface-central/blob/main/linux/CMakeLists.txt it is specified to "lib".

Can the file be modified to use proper GNU/UNIX directories?

Doomsdayrs commented 1 year ago

https://github.com/intiface/intiface-central/blob/635bcebab2399feaa028946fd9089e1b497beb3a/lib/ffi.dart#L17 seems to decide this, if the above is done this can be just loaded from LD path?