QTCWizrd converts your existing project into a custom wizard for Qt Creator. They are displayed in the New dialog that opens when you choose File > New File or Project.
$ cd existing_project
$ qtcwizard init
generator.json created
wizard.json created
# Edit generator.json and wizard.json for customization
$ qtcwizard install
# Launch Qt Creator, choose File > New File or Project > Application > Example Project.
cd qtcwizard
npm install -g
cd example
qtcwizard install
- e-fever-codebase/Qt-Quick-Unit-Test at master · e-fever/e-fever-codebase
- e-fever-codebase/Qt-Qml-Library-Project at master · e-fever/e-fever-codebase
$ qtcwizard
Usage: qtcwizard [options] [command]
Options:
-V, --version output the version number
-C, --chdir <path> change the working directory
-h, --help output usage information
Commands:
init create default generator.json and wizard.json
generate <output> generate Qt Creator Wizard Project to the output folder
install install this wizard to the Qt Creator
The wizard.json file contains sections that specify information about the wizard, variables that you can use, wizard pages, and generators for creating files. You have to input the required information by yourself except the generators
property. It will be filled by qtcwizard automatically.
Reference: Adding JSON-Based Wizards | Qt Creator Manual
The generator.json file describes what files should be to the installed, how to substitute its content. qtcwizard relies on that information to generate the content of generators
property in the wizard.json file.
{
"ignoreFilePattern": ["\\.swp$", "\\.DS_Store$"], // Ignore those files. They will not be copied.
"rules": [
{
"pattern": "project1.pro", // Apply the rule if the file path match the pattern (RegExp).
"path": [ // Substitute the path
{
"find": "project1.pro",
"replace": "%{ProFileName}",
"openAsProject": true // This file should be opened by Qt Creator upon creation
}
]
},
{
"pattern": ".*",
"content": [ // Substitute the content
{
"find": "\\\\", // Find "\" (RegExp)
"replace": "\\\\" // Replace by "\\"
}
]
}
]
}