Commit graph

16 commits

Author SHA1 Message Date
Derek Foreman c7210434d4 tests: allow running make check without make install
desktop shell and weston keyboard both refer to themselves prefixed by
LIBEXECDIR, however this is only valid once installed.  make check will
currently either fail or run pre-existing versions.

This patch adds a way to override that location by setting the env var
WESTON_BUILD_DIR - which is then set by the test env script so make check
will test the versions in the build directory regardless of whether they're
installed or not.

Reviewed-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
2014-08-22 17:47:33 +03:00
Kristian Høgsberg eeefc9e311 compositor: Log the full path of the config file we're using 2013-09-21 23:17:35 -07:00
Kristian Høgsberg 1abe0486bb config-parser: Make weston_config_parse() tkae a file name
Take a basename of the config file to parse instead of an fd.
2013-09-21 23:05:45 -07:00
Kristian Høgsberg 81c2c2eb5e shared: Remove no longer used parse_config_file() 2013-09-21 23:05:12 -07:00
Armin K b502f906db evdev-touchpad: Set some options using weston.ini
This patch adds 3 new options to weston.ini to allow
the user to change default constant_accel_factor,
min_accel_factor and max_accel_factor. If no options
are set, it falls back using defaults as it did before.

v2: create weston_config_section_get_double and use it
instead of manualy converting string to double.

v3: add default values in weston_config_get_double
instead of using conditionals.

v4: don't pass diagonal as pointer.
2013-08-12 22:42:17 -07:00
Kristian Høgsberg f73f316248 config-parser: Add section iterator API
The X backend needs to iterate through all outputs.
2013-05-26 20:50:53 -04:00
Kristian Høgsberg 732747114a Add new config parser
The current config parser, parses the ini file and pulls out the values
specified by the struct config_section passed to parse_config_file() and
then throw the rest away.  This means that every place we want to get
info out of the ini file, we have to parse the whole thing again.  It's not
a big overhead, but it's also not a convenient API.

This patch adds a parser that parses the ini file to a data structure and
puts that in weston_compositor->config along with API to query comfig
keys from the data structure.  The old parser is still available, but
we'll transition to the new approach over the next few commits.
2013-05-23 21:25:42 -04:00
Ossama Othman a50e6e4c50 config-parser: Honor XDG_CONFIG_DIRS
This set of changes adds support for searching for a given config file
in the directories listed in $XDG_CONFIG_DIRS if it wasn't found in
$XDG_CONFIG_HOME or ~/.config.  This allows packages to install custom
config files in /etc/xdg/weston, for example, thus allowing them to
avoid dealing with home directories.

To avoid a TOCTOU race the config file is actually open()ed during the
search.  Its file descriptor is returned and stored in the compositor
for later use when performing subsequent config file parses.

Signed-off-by: Ossama Othman <ossama.othman@intel.com>
2013-05-14 14:36:37 -04:00
Giulio Camuffo 7fe01b18d8 sdk: be C++ friendly
This renames the weston_surface's private member to configure_private
and externs "C" the headers of the SDK.
2013-03-28 14:03:58 -04:00
Kristian Høgsberg 4172f668e7 Pass argc pointer to parse_options()
This lets us keep argc up to date as the backend picks out arguments
from the argv array.
2013-02-20 15:27:49 -05:00
Kristian Høgsberg 6006ecb497 configure.ac: Don't link weston to cairo or image libraries
We were pulling in cairo and the image loading libraries through libshared.
Split out libshared into a core libshared and a libshared-cairo that
pulls in the extra libraries.
2012-11-29 13:32:11 -05:00
Kristian Høgsberg b71302e1db Fix a few -pedantic warnings
We're not enabling -pedantic by default, but a quick test brought up a few
issues that we should fix.
2012-05-10 14:11:44 -04:00
Kristian Høgsberg f02a649a3c Consolidate image loading code and move to shared/ 2012-03-12 01:40:59 -04:00
Kristian Høgsberg bcacef19b0 Add an option parser
On one hand, getopt (in particular the -o suboption syntax) sucks on the
server side, and on the client side we would like to avoid the glib
dependency.  We can roll out own option parser and solve both problems
and save a few lines of code total.
2012-03-12 01:28:50 -04:00
Scott Moreau fa1de69203 Implement CONFIG_KEY_UNSIGNED_INTEGER
strtol() does not work when trying to assign 32 bits of data into a
regular signed int on 32 bit systems. Use corresponding strtoul()
instead.
2012-01-27 15:34:27 -05:00
Kristian Høgsberg 9b935c8239 Use '-' to separate words in file names
Eventually we will want more functionality in the shared library and we
will rename it at that point.  Perhaps we'll name it libnih, but for now
let's stick with libconfig-parser.
2011-12-08 12:44:27 -05:00
Renamed from shared/configparser.h (Browse further)