uhhhhhhhhhhhhh
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

25 lines
1.1 KiB

2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
  1. # libwaystub - uhhhhhhhhhh
  2. There was a point in time when attempts at making firefox be compileable with only wayland support brought the issue with a hard runtime dependency on wayland libs even for X users. And that's why this, uh, thing, exists.
  3. # Idea
  4. If there are functions that we want to just omit in the C++ code, we can write stubs for these functions. That approach, surprisingly enough, worked. By simply writing functions that return `NULL` with the names of wayland library functions that firefox expects, we force firefox to believe that wayland libraries are either there and functional but wayland isn't running, or that the wayland library functions return errors in all cases (whichever it is). Despite the absurdity, the approach worked.
  5. # Building
  6. ```
  7. mkdir build
  8. cd build
  9. cmake ..
  10. make
  11. ```
  12. you should then have libwaystub.so in the build directory. Copy it to wherever you want to apply the stubs, and add the library to `LD_PRELOAD` before launching your application that you want to apply this stub for.
  13. # Dependencies
  14. `gdk`, a compiler and, preferrably, brain.
  15. # License
  16. This work is licensed under the MIT-0 license.