A USB ambient light sensor board with a user-space driver to adaptively control monitor brightness with the MCSS (Monitor Control Command Set).
 
 
 
 
Go to file
BlackMark 0612d48203 Remove editor config for shader code 2020-06-26 13:45:44 +02:00
AdaptiveBrightness Remove deprecated resource attribute 2020-06-26 13:28:47 +02:00
cmake Add cmake support 2020-06-26 13:27:00 +02:00
.clang-format Add qt example 2020-06-21 17:52:18 +02:00
.editorconfig Remove editor config for shader code 2020-06-26 13:45:44 +02:00
.gitattributes Add qt example 2020-06-21 17:52:18 +02:00
.gitignore Add cmake support 2020-06-26 13:27:00 +02:00
AdaptiveBrightness.sln Add qt example 2020-06-21 17:52:18 +02:00
CMakeLists.txt Add cmake support 2020-06-26 13:27:00 +02:00
LICENSE Initial commit 2020-06-21 17:49:48 +02:00
README.md Skip building webengine 2020-06-26 11:14:27 +02:00

README.md

AdaptiveBrightness

Build and deployment instructions

Windows

Prerequisites

  • Visual Studio 2019
  • Qt Visual Studio Tools
  • Qt Library

Build steps

Open the sln and build.

Deployment steps for shared library

The example here is for deploying an x64 Release build, but other build work analogously.

Start a x64 Native Tools Command Prompt for VS 2019:

> cd %QTDIR%\msvc2019_64\bin
> set PATH=%PATH%;%CD%
> cd %DEV%\AdaptiveBrightness\AdaptiveBrightness
> windeployqt --no-system-d3d-compiler ..\x64\Release\AdaptiveBrightness.exe

Deployment steps for statically linked library

Qt does not provide a statically built library, so this has to be built by hand. The Qt installer for Windows also installs the Qt sources which can be used to build the static library.

The following batch script sets up the build environment for an x64 build:

REM Set up Microsoft Visual Studio 2017, where <arch> is amd64, x86, etc.
CALL "C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\VC\Auxiliary\Build\vcvarsall.bat" amd64
SET _ROOT=%QTDIR%\Src_x64
SET PATH=%_ROOT%\qtbase\bin;%_ROOT%\gnuwin32\bin;%PATH%
REM Uncomment the below line when using a git checkout of the source repository
REM SET PATH=%_ROOT%\qtrepotools\bin;%PATH%
SET _ROOT=

Then navigate to the source directory and configure the build system:

> configure -opensource -confirm-license -nomake examples -nomake tests -skip webengine -static -static-runtime -debug-and-release -mp -prefix %QTDIR%\msvc2019_64_static

And build and install:

> nmake
> nmake install

Linux

Prerequisites

Assumes Debian Buster: sudo apt install qt5-default libqt5serialport5-dev

Build steps

$ qmake CONFIG+=release # or CONFIG+=debug
$ make

Deployment

Executable will run on any environment with the same architecture and installed libraries.