install_dir : join_paths(get_option('mandir'), 'man1')
)
+config_builddir = configuration_data()
+config_builddir.set('BUILDDIR', meson.build_root())
+# libinput-measure-touchpad-pressure gets built but we install_data the
+# source instead. The built file is the one that uses the local list-quirks
+# and should be used for debugging.
install_data('tools/libinput-measure-touchpad-pressure',
install_dir : libinput_tool_path)
+configure_file(input: 'tools/libinput-measure-touchpad-pressure',
+ output: 'libinput-measure-touchpad-pressure',
+ configuration : config_builddir
+ )
+
configure_file(input : 'tools/libinput-measure-touchpad-pressure.man',
output : 'libinput-measure-touchpad-pressure.1',
configuration : man_config,
install : true,
install_dir : join_paths(get_option('mandir'), 'man1')
)
+# libinput-measure-touch-size gets built but we install_data the source
+# instead. The built file is the one that uses the local list-quirks and
+# should be used for debugging.
install_data('tools/libinput-measure-touch-size',
install_dir : libinput_tool_path)
+configure_file(input: 'tools/libinput-measure-touch-size',
+ output: 'libinput-measure-touch-size',
+ configuration : config_builddir
+ )
+
configure_file(input : 'tools/libinput-measure-touch-size.man',
output : 'libinput-measure-touch-size.1',
configuration : man_config,
# DEALINGS IN THE SOFTWARE.
#
+import os
import sys
import subprocess
import argparse
sys.exit(1)
def _init_thresholds_from_quirks(self):
- # FIXME: this uses the system-installed version
- # but we should really auto-detect when this is started
- # from the builddir
- command = ['libinput', 'list-quirks', self.path]
+ # This is replaced for the version in builddir but left as-is for
+ # the installed version. For the builddir one we need to run the
+ # builddir list-quirks
+ builddir = '@BUILDDIR@'
+ if builddir != '@' + 'BUILDDIR' + '@':
+ command = [os.path.join(builddir, 'libinput-list-quirks')]
+ else:
+ command = ['libinput', 'list-quirks']
+ command.append(self.path)
cmd = subprocess.run(command, stdout=subprocess.PIPE, stderr=subprocess.PIPE)
if cmd.returncode != 0:
print("Error querying quirks: {}".format(cmd.stderr.decode('utf-8')), file=sys.stderr)
# DEALINGS IN THE SOFTWARE.
#
+import os
import sys
import subprocess
import argparse
sys.exit(1)
def _init_thresholds_from_quirks(self):
- # FIXME: this uses the system-installed version
- # but we should really auto-detect when this is started
- # from the builddir
- command = ['libinput', 'list-quirks', self.path]
+ # This is replaced for the version in builddir but left as-is for
+ # the installed version. For the builddir one we need to run the
+ # builddir list-quirks
+ builddir = '@BUILDDIR@'
+ if builddir != '@' + 'BUILDDIR' + '@':
+ command = [os.path.join(builddir, 'libinput-list-quirks')]
+ else:
+ command = ['libinput', 'list-quirks']
+ command.append(self.path)
cmd = subprocess.run(command, stdout=subprocess.PIPE, stderr=subprocess.PIPE)
if cmd.returncode != 0:
print("Error querying quirks: {}".format(cmd.stderr.decode('utf-8')), file=sys.stderr)