[client] added configuration file loading support

the client now will look for a configuration file in the following
locations by default.

* /etc/looking-glass.conf
* ~/.looking-glass.conf

All configuration files are loaded and may override values specified by
any prior configuration files loaded.

Sample Config:

    global:
    {
      fullScreen=false;
      showFPS=true;
      x=0;
      y=0;
      w=800;
      h=600;
    }

    OpenGL:
    {
      mipmap="false";
    }
This commit is contained in:
Geoffrey McRae
2017-12-28 19:55:13 +11:00
parent 59fa025292
commit 40bfdcdf8c
3 changed files with 182 additions and 11 deletions

View File

@@ -6,7 +6,7 @@ CFLAGS += -ffast-math
CFLAGS += -fdata-sections -ffunction-sections
LDFLAGS += -Wl,--gc-sections
LIBS = sdl2 SDL2_ttf gl glu libssl openssl spice-protocol fontconfig x11
LIBS = sdl2 SDL2_ttf gl glu libssl openssl spice-protocol fontconfig x11 libconfig
CFLAGS += $(shell pkg-config --cflags $(LIBS))
LDFLAGS += $(shell pkg-config --libs $(LIBS))
BUILD ?= .build