atar-axis / xpadneo

Advanced Linux Driver for Xbox One Wireless Controller (shipped with Xbox One S)
https://atar-axis.github.io/xpadneo/
GNU General Public License v3.0
1.95k stars 112 forks source link

v0.8.4: install script is path dependend #249

Closed atar-axis closed 3 years ago

atar-axis commented 3 years ago

The install script is depending on the path from which it is invoked.

Describe the bug

cp: cannot stat 'hid-xpadneo': No such file or directory

Steps to Reproduce

  1. clone repo
  2. invoke install.sh from ../
kakra commented 3 years ago

I'd say we fix this in master, v0.9 is going to land soon. Unless other bugs are found, I probably won't backport it to v0.8 because there's an easy work-around: Just don't run it from the parent directory.

The install/configure scripts itself use a lot of kludges like relying on a VERSION file in the repository, duplicating very similar code in multiple places, rewriting files inside the repository itself, etc. We should rather fix that. I already fixed a lot of that by outsourcing code to a library. But in the long term, I'd prefer a way to install through a makefile, with the master branch using no VERSION file at all.

atar-axis commented 3 years ago

There was a Makefile once upon a time before I switched to dkms. But why reinventing the wheel? dkms is a stable tool designed exactly for this type of things by a big company. So, when you say Makefile, are you talking about a Makefile that invokes dkms internally?

kakra commented 3 years ago

Yes...

There's still a makefile to build without dkms: make -C hid-xpapneo reinstall

kakra commented 3 years ago

Or at least remove the version logic from the install script... It doesn't seem to belong there. The sed command that writes the version to the include file should go away, too. Instead, the build script itself should have a rule to create a version.h from scratch.