Hikari9 / comfortable-swipe

Comfortable 3-finger and 4-finger swipe gesture using Xdotool in native C++
GNU General Public License v3.0
560 stars 46 forks source link

Arch Linux: libinih #94

Open winteriscariot opened 4 years ago

winteriscariot commented 4 years ago

While I know that this program is intended primarily to work with Ubuntu, there shouldn't be any reason it can't work on Arch, except that libinih is causing me issues. So I'm coming here to see if I can source any assistance in getting this to work (maybe result in a PKGBUILD for the AUR?).

The main issue is that anything related to inih fails, because (as far as I can tell) there's no package that provides ini.h in Arch Linux. Therefore I've copied the ini.h from the inih project -- https://github.com/benhoyt/inih -- and updated the include in comfortable-swipe-main.cpp to point to the inih, but the ld command afterwards fails:

comfortable-swipe]$ ./install 
Installing binaries ...
/usr/bin/ld: cannot find -linih
/usr/bin/ld: cannot find -linih

Now I'm not super familiar with programming and specifically linking libraries, but I have what amounts to a very basic understanding. Now, based on the ld manpage:

-l namespec --library=namespec Add the archive or object file specified by namespec to the list of files to link. This option may be used any number of times. If namespec is of the form :filename, ld will search the library path for a file called filename, otherwise it will search the library path for a file called libnamespec.a.

So presumably this could statically be pointed to ini.h; however, frankly, I'm not familiar enough with programming t figure out where this would go. The only reference to linih i could find was here:

comfortable-swipe/compile:CXX_FLAGS='-std=c++14 -O2 -Wall -lxdo -linih -lxdo -linih'

At this point I'm a bit stumped. I don't suppose anyone might be able to point me in the right direction? Thanks!

Hikari9 commented 4 years ago

I haven't tested this, but it says from ini.h repo that you can install it with the vcpkg:

git clone https://github.com/Microsoft/vcpkg.git
cd vcpkg
./bootstrap-vcpkg.sh
./vcpkg integrate install
./vcpkg install inih

Or using conan.io:

pip install conan
conan remote add conan-radalytica https://api.bintray.com/conan/rd/conan-radalytica
conan install --reomte conan-radalytica inih/44.1@radalytica/stable

Pls tell me if it works @winteriscariot.

PS: some commands might need sudo.

keighrim commented 4 years ago

I used vcpkg to get inih. It installed the library in /$PATHTO/vcpkg/installed/x64-linux/lib, so I had to add -L /$PATHTO/vcpkg/installed/x64-linux/lib in CXX_FLAGS defined in compile file.

cinderisles commented 4 years ago

a bit off topic for this repo, but @winteriscariot, for Arch Linux the libinput wiki shows a few ways you can get gestures to work. I ended up using Fusuma and it's working great