DevAssistant is used for improving development efficiency, with good project architecture and multi-platforms compatibility.
The tool is designed with pluggable APP and scripts. The overview is as follows:
- App : UI tools for DevAssistant, which is pluggable.
- plugins : plugin script modules for App, which supports custom extension. Read plugins for more detail.
UI-Application project for DevAssistant, which is initialize generated by plugins/project/run.py and extension is depends on plugins!
App will check and load all the plugins modules at start! Read plugins for more detail.
plugins is identifiable script modules for App, which supports custom extension.
The developing modules is refer to List.
plugins:
|- project: project script modules for DevAssistant.
|- module: module management for project. Including add sub module for Group.
|- template: templates for module.
|- cmake: module cmake for different module type.
|- code: code template for module. eg. module header and class.
|- project: initialize generatation for project, which depends on [module] and [pytool].
|- build: scipts for build project.
|- cmake: cmake scripts. [https://github.com/coder4869/cmake-toolchains] for more.
|- template: templates for project. eg. Project CMakeLists.txt, Group-Module cmake etc.
|- project.json: json for init app template project.
|- run.py: python script for project usage.
|- pytool: universal python tools for project.
|- visual-studio: VS script tools.
|- vs-cmake: TODO::Designed for converting VS project(module) to CMake project(module).
|- xcode: XCode script tools.
|- xcodeproj: xcodeproj based CMake project auto fixing ruby script.Custom project is depends on plugins/project/project.json. The format and rules as following:
- format:
{
"proj_name" : "Project Name",
"dir_proj" : "path/to/project/root/dir/",
"options": {
"WITH_QT" : "ON",
"WITH_PY" : "ON"
},
"dir_codes":[
{
"group" : "QtAPP", // Qt Based App Group
"group_dir" : "/src/app",
"modules": [
{
"module" : "APP_NAME",
"option" : "ON",
"gen_lib" : "NO",
"deps" : [ // Deps Modules From other group
"QtProject",
"CCoreKit"
]
}
]
},
{
"group" : "QtKit", // Qt Based Modules (Not App) Group
"group_dir" : "/src/qtmodules",
"modules": [
{
"module" : "QtProject",
"option" : "ON",
"gen_lib" : "YES",
"deps" : [
"CCoreKit"
]
}
]
},
{
"group" : "Kit", // Modules (Not App) Without Qt Depends Group
"group_dir" : "/src/kits",
"modules": [
{
"module" : "CCoreKit",
"option" : "ON",
"gen_lib" : "YES",
"deps" : [ ]
}
]
},
{
"group" : "Lib",
"group_dir" : "/deps",
"modules": [
{
"module" : "CLog",
"option" : "ON"
}
]
}
],
"dir_help": {
"conf" : "conf",
"scripts" : "scripts",
"tools" : "tools",
"doc" : "doc"
}
}- Rules for custom
project.json:- Composition
- [Required]-
proj_name: project_name, same to generatedAPP_NAME. - [Required]-
dir_proj: location for generated project. - [Optional]-
options: project shared options, start withWITH_. e.g.WITH_QTfor Qt,WITH_PYfor Python. - [Required]-
dir_codes: source codes and libs for project. Generally contains of a list module groups! For each module group:- [Required]-
group: group type. Value is Optional:QtAPP, APP, QtKit, Kit, Lib.- [Optional]-
QtAPP: application modules for Qt. - [Optional]-
APP: normal application modules without QT. Only one ofAPPorQtAPPisONat once running. - [Optional]-
QtKit: none application modules for Qt. e.g.QtSDKetc. - [Optional]-
Kit: none application normal modules without QT. e.g. none qtSDKetc. - [Optional]-
Lib: third-party libs for applications. Including headers and libs. - Note: each group has one
${path/of/group_dir}.cmake, which is a summary of group modules.
- [Optional]-
- [Required]-
group_dir: group relative dir path for project. - [Required]-
modules: module list with same group type. For each module:- [Required]-
module: module name.Qtprefix is recommended for Qt module. - [Required]-
option: module isONorOFFfor application integration. - [Optional]-
gen_lib: default isNO, not avaliable for groupLibtype.- Note: When
gen_libisYES, default isstaticlib for WIN,sharedfor Linux and macOS.
- Note: When
- [Optional]-
deps: kits dependency forQtKitorKitgroup type. - Note: each module has one
${module}.cmake, which is a summary of module resources, create lib withadd_library()whengen_libisYES.
- [Required]-
- [Required]-
- [Required]-
dir_help:- [Required]-
conf: Fixed! config files for application. eg.project.jsonetc. - [Required]-
scripts: Fixed! scripts for application. eg.build,cmakeetc. - [Optional]-
tools: extra tools for application. eg.tolua++etc. - [Optional]-
doc: application documents. - [Optional]-
res: for none-application resources. - other self-defined dir.
- [Required]-
- [Required]-
- Keyword Convention:
- No limition for
Upper-CaseorLower-Case. Qtprefix is recommended for Qt module.
- No limition for
- Composition
- TODO
-
Shared for Windows and MacOS and Linux
-
For MacOS Special
- XCode
-
For Windows Special
- Visual Studio use VS2019 as default
- qt-vsaddin
- Visual Assist
-
Notes
- Install dir config script for
Qtandpythonandxcodeetc. inplugins/project/project/build/:run_unix.shfor mac and linuxrun_win.batfor windows
- Install dir config script for
-
1.Write
plugins/project/project.jsonaccording to custom project. -
2.Generate project by
plugins/project/run.pyscript.- run
python3 run.py --type projectin dirplugins/project.
- run
-
3.Check options in
${Project_Dir}/CMakeLists.txt. e.g.platform options:MODULE options:XCODE_DEVELOPMENT_TEAMfor apple- ...
-
4.Check options in build script(in dir
${Project_Dir}/scripts/build). E.g.- For Qt Project:Check Qt-Path in
run_win.batandrun_unix.sh. - For VS project:Check vs-bin path and
CMAKE_BUILD_TYPEinrun_win.bat. - For XCode project:Check XCode default config(
XCode->Preferences->Locations->Command Line Tools) andCMAKE_BUILD_TYPE(inrun_unix.sh).
- For Qt Project:Check Qt-Path in
-
5.Open project by build script(in dir
${Project_Dir}/scripts/build). e.g.- For linux and macos:
bash ${Project_Dir}/scripts/build/run_unix.sh. - For windows: run
.\scripts\build\run_win.batin${Project_Dir}dir.
- For linux and macos:
[dir] Project
|- [dir] deps(third-party-libs)
|- [file] deps.cmake
|- [dir] lib1
|- [file] lib1.cmake
|- [file] xxx.h/xxx.a
|- [dir] lib2
|- [file] lib2.cmake
|- [file] xxx.h/xxx.a
|-[dir] src
|- [dir] group1
|- [file] group1.cmake
|- [dir] module1
|- [file] module1.cmake
|- [file] module1.h
|- [file] xxx.h/xxx.cpp
|- [dir] Forms # Qt ui Forms
|- [dir] Res # Module Resources
|- [dir] pimp # Private Implement
|- ...
|- [dir] module2
|- ...
|- [dir] group2
|- ...
|- [dir] conf
|- [file] project.json # project init json
|- [dir] scripts
|- [dir] build
|- [file] run_arm.sh
|- [file] run_unix.sh
|- [file] run_win.bat
|- [dir] cmake
|- ...(others)
|- [file] CMakeLists.txt- For VS project:
- Select App project(
e.g. DevAssistant) andSet As StartUp Projectin vs.
- Select App project(
- For XCode project:
- Select App project scheme(
e.g. DevAssistant) and run it directly.
- Select App project scheme(
- Open target Project and Run
installchild target.installfor Visual Studio is inCMakePredefinedTargetsinstallfor XCode is in scheme list.
- Open build dir(
build_win for windows, build_unix for macos and linux);includedir is exported headerslibdir is exported libsDebugor Release is Application.
- Short Term
Appdevelop.- CMake supports for other platforms.
- module add class script function.
- Medium Term:
- VS project(module) to CMake project(module) converting scripts.
- Module auto migrate scripts.
- Long Term:
- dev some easy integration kits for online download.
- module downloads as needs!