Read default command line arguments from text file in exe directory
#2,571 opened on Oct 23, 2023
Repository metrics
- Stars
- (18,674 stars)
- PR merge metrics
- (Avg merge 1d 11h) (9 merged PRs in 30d)
Description
Description
Ability to provide default command line arguments for portable launch
Who's implementing?
- Someone who can build it from source and write some cpp code
The problem
I am launching chromium exe with specific parameters, including --user-data-dir etc. I would like to provide these parameters in a text file so it would be possible to just launch exe file and it would use parameters from the file. Also, there should be a way to provide a relative path in this file for user-data-dir
Possible solutions
When app starts, check if a file with specific name exists in exe directory, read it and append to arguments. For --user-data-dir value, additionally check if it is absolute path or relative to exe dir or cwd, exists or not and expand it to existing path. Path, relative to exe_dir should have priority over cwd, (if it exists). The goal is to make thumbdrive edition of application. Possibly, add the same resolve procedure for other similar flags, that are useful for making portable setup. File could be named command_line_arguments.txt It will also solve some issues on windows, related to pinning exe to taskbar, making shortcut to exe, registering exe as default handler for files and protocols.
Alternatives
No response
Additional context
No response