Adds Support for Command-Line on Windows (#3699)

* + cli support on windows

- removes the preprocessor macro that prevented arg
  parsing on Windows
- adds windows-cli.cpp as src for a wrapper exe
- adds flameshot-cli target into cmake when building
  on Windows
- updates README

* updates PR

+ support for unicode characters in cli args
+ additional clarification in README re: flameshot-cli
+ new workaround for spaces in _popen path; works with relative output paths

* fix EOL

* updated flameshot.exe path construction

avoids using the hard-coded length of flameshot-cli.exe

* fix whitespace (clang)
This commit is contained in:
Nicholas Morris
2025-05-31 12:39:02 -05:00
committed by GitHub
parent 134238b8eb
commit eefefe187a
4 changed files with 88 additions and 2 deletions

View File

@@ -184,7 +184,6 @@ int main(int argc, char* argv[])
return qApp->exec();
}
#if !defined(Q_OS_WIN)
/*--------------|
* CLI parsing |
* ------------*/
@@ -609,6 +608,5 @@ int main(int argc, char* argv[])
}
finish:
#endif
return 0;
}