AppWizard IRC Discussion
Alexander Dymo
cloudtemple at mksat.net
Sun May 9 22:52:03 UTC 2004
Here is my opinion on that issue.
--
Alexander Dymo
ICST Department, National University of Shipbuilding, Mykolayiv, Ukraine
-------------- next part --------------
My thoughts about appwizard and Co.
1. Appwizard functioning.
1.1 Application templates should be tar.bz2 files.
1.2 Archive with apptemplate should contain the directory structure and all files of a template.
1.3 To create an application, appwizard should process trough following steps (using appwizard's c++ code, not perl):
1.3.1 Unbzip and untar archive to project destination directory.
1.3.2 Process apptemplate postprocessing steps:
1.3.2.1 Create source file templates in $projectdir/templates (take into account global filecreate settings, project specific settings and license headers selected in appwizard page.
1.3.2.2 Read apptemplate description file (in xml format) that each apptemplate should have.
1.3.2.4 Perform actions defined in xml file for each file in a apptemplate directory (tag <each>). Ignore files listed in <ignore> and in other tags with exclude_each_actions="no" attribute.
1.3.2.5 Seek for <extention> tags in xml file and perform actions defined for files with that extention. Ignore files listed in <ignore> and in other tags with exclude_extention_actions="yes" attribute.
1.3.2.6 Seek for <file> tags in xml file and perform actions defined for that files.
1.4 Actions that can be executed with appwizard:
1.4.1 "replace variables" - we do this now but using perl, we need to do this using appwizard.
1.4.2 "add license headers" - put a license header in each file which is applicable for the action.
1.4.3 "execute shell script code" - template can execute some shell scripts (even perl) if it is really necessary.
1.4.4 "execute javascript code" - !dream! template can specify kjs code that can be executed during template instantiation. I refer to the additional gui wizards here that will be run after completing appwizard.
1.4.5 "execute ruby code" - the same as 1.4.3 but with ruby (i like it more than javascript ;)
1.4.6 many other actions ...
2. Appwizard ui.
2.1 UI should have following tabs:
2.1.1 General tab like we have now.
2.1.2 General tab should also contain:
2.1.2.1 Template profile selection box
2.1.2.2 Documentation profile selection box (predefined profiles for "qt programming", "kde programming", "linux gui programming", etc. and "custom").
2.1.2 File template and file license header edition tab (we have now file template tab).
2.2 VCS wizard should be available separatelly (I agree with Sascha Cunz) but appwizard should have additional widget (in General tab):
2.2.1 A widget to select a vcs plugin to load.
2.3 Appwizard should write a special tag like <vcs_load name="cvs" action="create_repository"/> or <vcs_load name="cvs" action="import_from_repository"/>.
2.4 During project load, <vcs_load> tag should be checked, the necessary vcs plugin should be loaded (this means that vcs plugins won't be even in the project scope, they are under the project scope). That vcs plugin should check for action and handle it.
3. Template profiles.
3.1 Template profile should determine the whitelist of project and global scope plugins to load (this means that I agree with Jens).
3.1.1 Template profile file format: xml (this means that I do not agree with Jens :) )
3.1.2 For clarity, global and project scope plugins should be listed in the same place (may be not in the same tree view, but in the same dialog box).
3.1.3 Template profile should have it's own plugin selection widget (again, with project and global scope plugins).
FAQ:
1. What is apptemplate description file in xml format:
example:
<template>
<sources>
<file name="weird.cpp" exclude_extention_actions="yes" exclude_each_actions="no">
<action name="doSmth">use this text</action>
</file>
<extention ext="cpp" exclude_each_actions="no">
<action name="add license header" />
</extention>
<each>
<action name="replace variables" />
</each>
<ignore>
<file>doc/my1.txt</doc>
</ignore>
<sources>
<profile>C++</profile>
<docprofile>"kde programming"</docprofile>
</template>
Usual xml file for a cpp project would look like:
<template>
<sources>
<extention ext="cpp" exclude_each_actions="no">
<action name="add license header" />
</extention>
<extention ext="h" exclude_each_actions="no">
<action name="add license header" />
</extention>
<each>
<action name="replace variables" />
</each>
<sources>
<profile>C++</profile>
<docprofile>"kde programming"</docprofile>
</template>
2. Deadline for any changes described here:
30.06.2004 - a KDE 3.3 beta 1 date.
HOWTO:
1. How to add a license header into the file:
A way to add a license header to .ui file differs from a way to add a license header to .cpp. So appwizard should probably query for plugins that can add a license header to a file with given extention. Such plugins should probably be the part of filecreate part. This of course means overhead charges, so for the beginning, apptemplate should be at least able to add license files to usual text files.
2. How documentation profile works:
Each documentation catalog (an toplevel item in the documentation tree) has the profile string acossiated. Such string is determined automatically by an documentation plugin and user can change it laterly.
Each kdeveloptoc file will have an <profile> tag in it. We supply .toc files and can specify the profile.
Each documentation catalog without an explicit profile setting is considered to be in any profile.
User will have profile selection combo at the "contents" tab of documentation view
User will be able to configure each documentation profile individually (I refer to "toc", "index" and "search" settings currently available at documentation plugin). Additional "include in profile" check box will be available for each documentation profile.
More information about the KDevelop-devel
mailing list