c# win-bright
An application implemented in GTKMM4 for controlling brightness in Windows
Desktops at software level by adjusting GammaRamp values.
Refer issues for more detail on current and resolved issues
To run this project, some things need to be setup.
If you are using a proxy server, then type the following commands on the MSYS2 terminal by replacing the placeholders (on first line only) with your proxy details.
export HTTP_PROXY="username:[email protected]:port"
export HTTPS_PROXY=$HTTP_PROXY
export http_proxy=$HTTP_PROXY
export https_proxy=$HTTP_PROXY
-
Install MSYS2
-
Open MSYS2 and run
pacman -Syu
-
Open MSYS2 and run
pacman -Syu
again. -
Open MSYS2 and run the following commands one by one:
For x64 compiler and builds
pacman -S --needed base-devel mingw-w64-x86_64-toolchain pacman -S pkgconf pacman -S mingw-w64-x86_64-gtk4 pacman -S mingw-w64-x86_64-gtkmm-4.0 pacman -S pkgconf
For x32 compiler and builds
pacman -S --needed base-devel mingw-w64-i686-toolchain pacman -S pkgconf pacman -S mingw-w64-i686-gtk4 pacman -S mingw-w64-i686-gtkmm-4.0 pacman -S pkgconf
-
Add the follwing to path on your system.
For x32 bit
C:\msys64\mingw32\bin
For x64 bit
C:\msys64\mingw64\bin
-
Open Compiler Settings.
-
Setup mingw compiler from msys2 as default compiler in codeblocks.
C:\msys64\mingw32
for x32 bit andC:\msys64\mingw64
for x64 bit
Option 1: Cloning the master branch.
Clone the master branch and open the win-bright.cbp file with codeblocks.
Option 2: Creating a new project.
-
Create a C++ console application project in codeblocks.
Give any title to the project.
-
Setup project build options. Right click the project name in Workspace pane.
Click on Other Compiler Options and paste the following code:
`pkgconf --cflags gtk4` `pkgconf --cflags glib-2.0` `pkgconf --cflags glibmm-2.68` `pkgconf --cflags gtkmm-4.0` `pkgconf --cflags gdkmm-2.4`
Click on Linker Settings and paste the following code, and click OK:
`pkgconf --libs gtk4` `pkgconf --libs glib-2.0` `pkgconf --libs glibmm-2.68` `pkgconf --libs gtkmm-4.0` `pkgconf --libs gdkmm-2.4` -static-libgcc -static-libstdc++ -mwindows
For working with vscode, all above setup should be done. After that, install C/C++ Extension Pack. Once installed, the setup will be done automatically as all the required setup files are present already in the .vscode folder.
Select GTK: Build executable option in run options.
And the project files will be created in obj (as main.o file) and bin (as main.exe file) folders.
VSCode is just helpful for writing code as its better than Code::Blocks in terms of syntax highlighting and autocomplete.
Executables can also be created using Code::Blocks build and run method which is recommended over the vscode building.
Visit the releases page for downloading the latest version or view release notes.