Command Line Arguments - dylondark/cob-taylor-games GitHub Wiki
The application has several possible command line (CLI) arguments that change its behavior. This page documents them.
-
Open the project in Qt Creator.
-
Navigate to the Projects tab on the left hand side of the window. Then click Run for your current kit in the Build and Run section.
- Then in the Command line arguments box you can type in your arguments.
Anything you type here is equivalent to running the following in the terminal: /path/to/buildfolder/cob-taylor-games <arguments>
. So if you have -w
typed in the box the actual run command Qt Creator uses would look like /path/to/buildfolder/cob-taylor-games -w
.
These are the command line arguments that are currently supported.
Specify a custom path for where the application should look for its files. Overrides the default location which is the same folder that the executable is located in. This is usually necessary to have if you are on Mac.
Usage: -p <file path>
Example: -p "/home/dylon/Documents/work stuff/taylor project/build-cob-taylor-games-Desktop-Debug"
NOTE: It is not recommended to use this to point the program to your project folder. It may seem convenient to do this rather than maintaining a copy because the project folder already contains all of the necessary game files for whatever branch you're on, but if the program makes any changes to the files then they will be reflected in your git repository (and may accidentally be committed). The files in the project repository are intended to be the reference base files and should not be changed by the program.
Show the games in their own separate windows instead of overlaying them on top of the main menu in the main window. This usually provides better performance for the games at the cost of sometimes being more inconvenient to work with (which is why the kiosk machine uses it but it is not the default).
Usage: -w
Arguments can be combined by specifying them one after the other (in no particular order). For instance -w -p "/home/dylon/Documents/work stuff/taylor project/build-cob-taylor-games-Desktop-Debug"
is valid and -p "/home/dylon/Documents/work stuff/taylor project/build-cob-taylor-games-Desktop-Debug" -w
is also valid. However, combining arguments into one switch like -pw "/home/dylon/Documents/work stuff/taylor project/build-cob-taylor-games-Desktop-Debug"
is NOT valid.
Arguments are defined in the CliParser
namespace declared in cliparser.h/.cpp. You can create new functions in that namespace to add more arguments. See Program Structure for additional information.