add an option to build PyStand as a console based application #9
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
基于如下几点原因,GUI 版本的 PyStand.exe 不太适合封装一个 Python 命令行脚本(比如:https://github.com/myd7349/Ongoing-Study/blob/master/python/extract_columns.py ):
此外,命令行版本的 PyStand.exe 也更方便在 IDE 中调试的时候及时查看错误输出(比如:init_script 中的错误输出)。
本 PR 中新增一个 CMake option
PYSTAND_CONSOLE_BASED,只需要:即可将 PyStand.exe 编译为一个控制台应用程序。
值得讨论的一些事项:
PYSTAND_CONSOLE_BASED这个名字(抑或定义一个 PYSTAND_CONSOLE,或者 PYSTAND_GUI_BASED,并将 PYSTAND_GUI_BASED 默认为 ON);GetCommandLineW+CommandLineToArgvW(本 PR 尚未这样做);参考: