morg
b24f989dbc
Ignore pre-detection argument ( fixes #1300 )
2021-04-09 16:48:56 +02:00
Chris
501a1ff489
Updated parsers to allow GUI to run implicitly for -v, -vv and --print-
...
source options
* Added cfg_args counter for each in cli_pre_detection()
* Added each to the ignore options in ProcessOptions()
* Includes slight update to OptionHelp()
2021-03-28 22:27:27 +11:00
Chris
d926754745
Adding "--loglevel" to ignore list in cli::ProcessOptions
2021-03-28 00:55:40 -05:00
Chris
d65def0179
Fixing --help string for -p option
...
* Tweaked the profile mananger to allow to load profiles either with or
without the file extension
* Changed the --help string to reflect the change
2021-03-24 08:18:07 -05:00
k1-801
f1d6c2953d
Logger tweaks
...
Commit amended for code style and minor cleanup by Adam Honse <calcprogrammer1@gmail.com >
2021-03-23 20:20:52 -05:00
Chris
8492a8c76e
Prevent profiles loaded on startup from being overwritten
2021-03-23 12:47:27 -05:00
morg
e1faa783b6
Add new CLI option, separate auto-detect and auto-connect
2021-03-08 22:25:37 -06:00
Luca Lovisa
ed48c9634c
Fix cli profile mode loading
2021-03-01 23:14:36 +01:00
jath03
84861ef989
Fixing profile loading #1135
2021-02-26 08:17:44 -06:00
jath03
e4ec0fa46b
Fixed GUI not starting when configuration flags are used
2021-01-07 22:39:29 -08:00
Alex Avance
5f5d50ffd8
Enable profile loading for gui and server
2021-01-04 02:15:57 +00:00
jath03
5c50cc2ca9
Stopped GUI from starting when only --server flag is set
2020-12-26 03:20:10 -06:00
Adam Honse
a90edce03b
Fix loading profiles from command line
2020-12-05 13:42:43 -06:00
Adam Honse
31e35884dd
Add --config option where you can pass in a custom path for configuration files
2020-12-02 17:38:49 -06:00
Adam Honse
ddfcd1caf9
Split CLI processing into pre- and post-detection functions and add --localconfig and --nodetect options
2020-12-01 23:51:56 -06:00
Adam Honse
128bfc7792
Move network clients to Resource Manager
2020-09-22 12:17:54 -05:00
Adam Honse
f568253c51
Clean up more warnings
2020-09-02 18:25:58 -05:00
k1-801
8b8451017e
Non-important warnings removed
...
Commit amended by Adam Honse <calcprogrammer1@gmail.com > due to merging from a different branch.
2020-09-01 23:29:00 -05:00
Adam Honse
634ec9f488
Wait on asynchronous device detection before performing CLI operations that require device list
2020-08-07 23:01:20 -05:00
Adam Honse
8667211180
Move console attachment to main and only perform if running in a terminal. ( !102 )
2020-08-05 21:49:20 -05:00
Adam Honse
dee23ec52e
Use synchronous mode update function in CLI
2020-07-22 23:29:32 -05:00
Adam Honse
25f9e2a110
Add --client command line argument for opening network clients
2020-07-05 04:25:46 -05:00
Adam Honse
dfb2e52e7b
Add --i2c-tools to help text with warning, set GUI flag if --i2c-tools is specified
2020-06-28 21:41:00 -05:00
Adam Honse
7d2877a8e9
Don't exit after loading a profile from the command line
2020-06-28 11:21:56 -05:00
Adam Honse
15ace9d094
Add flag to start application minimized to tray
2020-06-28 02:30:23 -05:00
Adam Honse
58aba0a147
Allow specifying --gui and --server together
2020-06-28 02:18:28 -05:00
Térence Clastres
b79ff124e6
Replace Sleep() by std::thread::sleep_for()
2020-06-24 09:28:11 -05:00
Adam Honse
60baf6d05f
Remove duplicate line
2020-06-24 08:26:09 -05:00
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)
2020-06-23 23:15:10 -05:00
Térence Clastres
d2dfd03551
Use the default SDK port constant in the CLI
2020-06-23 23:10:41 -05:00
Térence Clastres
f3bdee9bd2
CLI: Allow --mode flag to be case insensitive
...
Also fix handling when no argument passed
2020-06-23 23:10:29 -05:00
Térence Clastres
0286a5dd58
CLI: Add daemon/server mode
2020-06-20 14:39:01 -05:00
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
2020-06-19 16:46:57 -05:00
Adam Honse
eaa3b9a368
Add command line option to enable i2c tools
2020-05-12 11:01:46 -05:00
Adam Honse
aa1ad8db85
Add zone resizing to CLI
2020-04-04 02:53:55 -05:00
Adam Honse
fdbaf9bf63
Fix segfault in CLI
2020-03-22 22:18:30 -05:00
Adam Honse
08a1197b7e
Fix arguments not parsing in CLI, add mode specific color support to CLI
2020-03-22 16:22:59 -05:00
Adam Honse
87a9ea5b14
Add some comments to the CLI code and clean up some warnings
2020-03-22 03:49:08 -05:00
Adam Honse
2b8d25559a
Move help and version functions to the same place as the other arguments
2020-03-22 01:48:57 -05:00
Adam Honse
3db9189cbb
Fix current device ID in CLI
2020-03-22 01:01:01 -05:00
Adam Honse
a0c379e8c7
Add profile saving to command line
2020-03-22 00:26:06 -05:00
Adam Honse
0ae4964545
Clean up some of the CLI code and add option to load a profile from the command line
2020-03-22 00:04:27 -05:00
Adam Honse
69651b3f91
Load sizes for variable-size controllers in CLI mode
2020-03-20 13:50:54 -05:00
Adam Honse
c7960c090a
Add software version information to CLI
2020-02-29 14:01:06 -06:00
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
2020-02-24 00:03:07 -06:00