87 Commits (master)

Author SHA1 Message Date
jath03 84861ef989 Fixing profile loading #1135 5 years ago
jath03 e4ec0fa46b Fixed GUI not starting when configuration flags are used 5 years ago
Alex Avance 5f5d50ffd8 Enable profile loading for gui and server 5 years ago
jath03 5c50cc2ca9 Stopped GUI from starting when only --server flag is set 5 years ago
Adam Honse a90edce03b Fix loading profiles from command line 5 years ago
Adam Honse 31e35884dd Add --config option where you can pass in a custom path for configuration files 6 years ago
Adam Honse ddfcd1caf9 Split CLI processing into pre- and post-detection functions and add --localconfig and --nodetect options 6 years ago
Adam Honse 128bfc7792 Move network clients to Resource Manager 6 years ago
Adam Honse f568253c51 Clean up more warnings 6 years ago
k1-801 8b8451017e Non-important warnings removed
Commit amended by Adam Honse <calcprogrammer1@gmail.com> due to merging from a different branch.
6 years ago
Adam Honse 634ec9f488 Wait on asynchronous device detection before performing CLI operations that require device list 6 years ago
Adam Honse 8667211180 Move console attachment to main and only perform if running in a terminal. (!102) 6 years ago
Adam Honse dee23ec52e Use synchronous mode update function in CLI 6 years ago
Adam Honse 25f9e2a110 Add --client command line argument for opening network clients 6 years ago
Adam Honse dfb2e52e7b Add --i2c-tools to help text with warning, set GUI flag if --i2c-tools is specified 6 years ago
Adam Honse 7d2877a8e9 Don't exit after loading a profile from the command line 6 years ago
Adam Honse 15ace9d094 Add flag to start application minimized to tray 6 years ago
Adam Honse 58aba0a147 Allow specifying --gui and --server together 6 years ago
Térence Clastres b79ff124e6 Replace Sleep() by std:🧵:sleep_for() 6 years ago
Adam Honse 60baf6d05f Remove duplicate line 6 years ago
Swyter cb9b22804a Implement human color parsing in the command-line by using the standardized CSS 3 subset, well known for styling. Interpret first as text to avoid problems like 'darkgreen' being picked up as 0xDA.
- Also, and make case insensitive by using the strcasecmp() function. Both for colors and modes. The only improvement I can think of is stripping whitespace beforehand.
  - Also, improve digit parsing by using `strtoul()`, previously only FF00FF worked, whereas now we can type things like 0xFF00ff or 0xff00ff.

For example; something like this should work: `OpenRGB.exe -c darkgreen,ff00ff,0xff0000,red,REd,teal,pink,gOLd,AAgoldo,magenta -m breathing`

(`AAgoldo` will throw a `Error: Unknown color: 'AAgoldo', skipping.`; and pick the next color instead, this is intended behavior)
6 years ago
Térence Clastres d2dfd03551 Use the default SDK port constant in the CLI 6 years ago
Térence Clastres f3bdee9bd2 CLI: Allow --mode flag to be case insensitive
Also fix handling when no argument passed
6 years ago
Térence Clastres 0286a5dd58 CLI: Add daemon/server mode 6 years ago
Térence Clastres b3cadbae5d Fix CLI
It was not changing the colors since e3e6c034 and had an overflow on
`options->devices.size()` since 0f4ddd16 causing options not to be applied

Second issue was a bit trickier as it was not reproducable when using a
debug build. It seemed like `std::vector<DeviceOptions> devices` had an
overflow. I saw a bunch of warnings regarding comparison with implicit
cast so I figured I'd fix that first and see if it makes a difference.
Turns out it did and fixed the issue.

While toying around, I also noticed that `throw` didn't seem to work,
causing crashes later in the program. It turns out the catch-all clause
`catch (...)` is not necessary matching a `throw NULL` expression as it
might be of type `int`. The solution is to use `thrown nullptr;`
instead.

Reference: https://en.cppreference.com/w/cpp/language/try_catch
6 years ago
Adam Honse eaa3b9a368 Add command line option to enable i2c tools 6 years ago
Adam Honse aa1ad8db85 Add zone resizing to CLI 6 years ago
Adam Honse fdbaf9bf63 Fix segfault in CLI 6 years ago
Adam Honse 08a1197b7e Fix arguments not parsing in CLI, add mode specific color support to CLI 6 years ago
Adam Honse 87a9ea5b14 Add some comments to the CLI code and clean up some warnings 6 years ago
Adam Honse 2b8d25559a Move help and version functions to the same place as the other arguments 6 years ago
Adam Honse 3db9189cbb Fix current device ID in CLI 6 years ago
Adam Honse a0c379e8c7 Add profile saving to command line 6 years ago
Adam Honse 0ae4964545 Clean up some of the CLI code and add option to load a profile from the command line 6 years ago
Adam Honse 69651b3f91 Load sizes for variable-size controllers in CLI mode 6 years ago
Adam Honse c7960c090a Add software version information to CLI 6 years ago
Stefan Reiter 71c650cd45 Add cli.cpp and make it build at least
Not confirmed working as of yet, but at least it builds and
--list-devices works.

Code originally taken from Sam Lewis (@sam-masaki on gitlab.com), see:
https://gitlab.com/CalcProgrammer1/OpenRGB/-/merge_requests/9
6 years ago