mirror of https://gitlab.com/basile.b/dexed.git
update wiki
This commit is contained in:
parent
06cb06cdfa
commit
23ae3b3720
|
@ -53,6 +53,4 @@ __________
|
||||||
**Tutorials**
|
**Tutorials**
|
||||||
|
|
||||||
* [a project from scratch](https://github.com/BBasile/Coedit/wiki#new-project-flow)
|
* [a project from scratch](https://github.com/BBasile/Coedit/wiki#new-project-flow)
|
||||||
* [harbored-mod as a tool](https://github.com/BBasile/Coedit/wiki#integration-of-the-documentation-generator-harbored-mod-to-coedit)
|
|
||||||
* [runnable command interpreter](https://github.com/BBasile/Coedit/wiki#using-a-runnable-module-as-an-interactive-command-interpreter)
|
* [runnable command interpreter](https://github.com/BBasile/Coedit/wiki#using-a-runnable-module-as-an-interactive-command-interpreter)
|
||||||
* [using the library manager](https://github.com/BBasile/Coedit/wiki#introduction-to-the-library-manager)
|
|
||||||
|
|
|
@ -1 +0,0 @@
|
||||||
- tuto are obsolete.
|
|
156
wiki/wiki.txt
156
wiki/wiki.txt
|
@ -964,73 +964,6 @@ However save it somewhere. In the project inspector, the source path will be dis
|
||||||
- You can now compile the project.
|
- You can now compile the project.
|
||||||

|

|
||||||
|
|
||||||
## Integration of the documentation generator *harbored-mod* to Coedit
|
|
||||||
|
|
||||||
[Harbored-mod][harbMain] is a documentation generator for the D documentation comments ([DDoc][dlangDDoc]).
|
|
||||||
|
|
||||||
This tutorial will cover, from A to Z the integration of this tool to the Coedit [custom tools][wikiCustTools].
|
|
||||||
|
|
||||||
####Prepare the Coedit Project to build harbored
|
|
||||||
|
|
||||||
- [Clone][harbGit] harbored-mod repository and its sub modules.
|
|
||||||
- Open Coedit and initialize a new project. Start by adding the **src/** folder to the project files.
|
|
||||||
|
|
||||||

|
|
||||||
|
|
||||||
- To add the submodules, got to the *project configuration widget*, click to select the **Paths** category, then in the **extraSources** editor add the three submodules source path with an asterisk:
|
|
||||||
- **`<path_to>\harbored-mod\libdparse\src\*`**
|
|
||||||
- **`<path_to>\harbored-mod\libddoc\src\*`**
|
|
||||||
- **`<path_to>\harbored-mod\dmarkdown\source\*`**
|
|
||||||
|
|
||||||

|
|
||||||
|
|
||||||
- still in this category, open the **ImportStringPaths** editor add **`<path_to>\harbored-mod\strings`** .
|
|
||||||
|
|
||||||

|
|
||||||
|
|
||||||
- Go to the **output** category. Set the **outputKind** to **executable** and tweak the other code generation options as you wish (inlining, optimizations, etc.)
|
|
||||||
- In the menu **Project**, click to save. It's recommended to save it out of the repository structure, otherwise you risk not to be able to pull future project commits.
|
|
||||||
- finally, go back to the *project configuration widget*, click to select the **Paths** category, and set the **outputFilename** field according to your needs, e.g: **`<CPP>\bin\harbored.exe`**, using the *CurrentProjectPath* [symbolic string][lnk_sym].
|
|
||||||
- You can check what will be passed to DMD by clicking in the menu **Project**, **view project command line** and you should get something similar to this:
|
|
||||||
|
|
||||||

|
|
||||||
|
|
||||||
- save again the project and in the menu **Run** click **Compile project** .
|
|
||||||
|
|
||||||
Harbored-mod is now build.
|
|
||||||
|
|
||||||
####Add harbored as a Coedit custom tool.
|
|
||||||
|
|
||||||
We'll define *harbored* as a tool designed to generate the documentation of a Coedit project.
|
|
||||||
|
|
||||||
- in the menu **Windows**, click on **Tools editor**
|
|
||||||
- click on the icon **application +** to add a new item
|
|
||||||
- set the field **toolAlias** to **harbored doc project** or something similar.
|
|
||||||
|
|
||||||

|
|
||||||
|
|
||||||
- set the field **executable** to the executable we've just build.
|
|
||||||
If its can be solved by the system environment variables then simply type the executable name.
|
|
||||||
- click to open the **Parameters** editor.
|
|
||||||
- as a first parameter type **`-o<CPP>\doc`**. Harbored-mod will output the documentation to **`<the path where the project is saved>\doc`**.
|
|
||||||
This field can be tweaked according to your needs. In the screen capture it's set to a common documentation folder with the `<CPN>` sym-string
|
|
||||||
(with this parameter, the documentation is output to a distinct folder named as the project that's generated.)
|
|
||||||
- on a new line type **`<CPFS>`** (*CurrentProjectFiles*). When running the tool, this symbol will be expanded to a set of parameters,
|
|
||||||
each one representing a file of the project, for each of them, harbored-mod will generate the documentation.
|
|
||||||
|
|
||||||

|
|
||||||
|
|
||||||
Open the project created in the previous section (or any other project).
|
|
||||||
Back to the **Tools editor** widget, select the item we've just defined
|
|
||||||
and click on the **application flash** icon to run the tool and check what's been generated.
|
|
||||||
|
|
||||||

|
|
||||||
|
|
||||||
[harbMain]:https://github.com/kiith-sa/harbored-mod
|
|
||||||
[harbGit]:https://github.com/kiith-sa/harbored-mod.git
|
|
||||||
[dlangDDoc]:http://dlang.org/ddoc.html
|
|
||||||
[wikiCustTools]:https://github.com/BBasile/Coedit/wiki#custom-tools-widget
|
|
||||||
|
|
||||||
## Using a runnable module as an interactive command interpreter
|
## Using a runnable module as an interactive command interpreter
|
||||||
|
|
||||||
In this tutorial, we'll see that a Coedit runnable module can
|
In this tutorial, we'll see that a Coedit runnable module can
|
||||||
|
@ -1134,92 +1067,3 @@ sent as input.
|
||||||

|

|
||||||
|
|
||||||
To finish type "exit" and press <kbd>ENTER</kbd>.
|
To finish type "exit" and press <kbd>ENTER</kbd>.
|
||||||
|
|
||||||
|
|
||||||
## Introduction to the library manager
|
|
||||||
|
|
||||||
In this tutorial, we'll see how to use the library manager.
|
|
||||||
|
|
||||||
### Let's build a static library
|
|
||||||
|
|
||||||
We'll add a new item to the [_libman_][lnk_widg_lib], we choose the library
|
|
||||||
[**libdparse**](https://github.com/Hackerpilot/libdparse). It's a lexer and an AST builder for the D language.
|
|
||||||
|
|
||||||
Clone the repository. Start a new project.
|
|
||||||
Add the folder **`<path to libdparse>\src\std`**
|
|
||||||
using the project inspector. Save the project where you wish to.
|
|
||||||
The project inspector should now display the relative source filenames.
|
|
||||||
|
|
||||||

|
|
||||||
|
|
||||||
In the project configuration widget, select the **output** category
|
|
||||||
and set the **binaryKind** to **staticlib**.
|
|
||||||
|
|
||||||

|
|
||||||
|
|
||||||
Still in this widget, select the category **Paths** and define the outputFilename
|
|
||||||
to **`<apath>\libdparse`**.
|
|
||||||
|
|
||||||

|
|
||||||
|
|
||||||
In the menu **Project** click **Compile project**.
|
|
||||||
|
|
||||||

|
|
||||||
|
|
||||||
The static library is build. We'll add it to the [_libman_][lnk_widg_lib].
|
|
||||||
Start by adding a new item (icon add).
|
|
||||||
Click on to select the library file produced previously (icon brick).
|
|
||||||
The alias will be set automatically to the library file name, without its extension.
|
|
||||||
|
|
||||||
Click to select the path to the sources.
|
|
||||||
Select **`<path to libdparse>\src`**,
|
|
||||||
(since the identifier **std** is part of the module names, it must not be included).
|
|
||||||
|
|
||||||

|
|
||||||
|
|
||||||
The item is now handled by Coedit.
|
|
||||||
|
|
||||||
### Let's build a program using the lib
|
|
||||||
|
|
||||||
Clone the repository [**dfmt**](https://github.com/Hackerpilot/dfmt).
|
|
||||||
D formatter is a D source code formatter based on **libdparse**,
|
|
||||||
hence the prefect candidate to demonstrate how the [_libman_][lnk_widg_lib] is working.
|
|
||||||
|
|
||||||
Start a new project. Add the folder **`<path to dfmt>\src`** using the project inspector.
|
|
||||||
Save the project where you wish to.
|
|
||||||
The project inspector should now display the relative source filenames.
|
|
||||||
|
|
||||||
In the project configuration widget, select the **General** category,
|
|
||||||
click to open the **libraryAliases** editor. Type **libdparse** (this is the alias defined previously).
|
|
||||||
|
|
||||||

|
|
||||||
|
|
||||||
Select the **Output** category and sets the **outputFilename**.
|
|
||||||
|
|
||||||
In the menu **Project** click **Compile project**.
|
|
||||||
**dfmt** is now build.
|
|
||||||
|
|
||||||

|
|
||||||
|
|
||||||
Using the **libraryAlias** has avoided to specify manually the import path (-I...)
|
|
||||||
as well as the additional source (the _libdparse.lib_).
|
|
||||||
|
|
||||||
### Completion and runnable
|
|
||||||
|
|
||||||
In the **File** menu click **New runnable module**.
|
|
||||||
type import **std.d** and hit <kbd>CTRL</kbd> + <kbd>SCPACE</kbd> to invoke the completion.
|
|
||||||
[DCD][lnk_dcd], automatically aware of _libdparse_, will propose the item **lexer**,
|
|
||||||
which matches to one of the module of the library (the D language lexer).
|
|
||||||
|
|
||||||

|
|
||||||
|
|
||||||
Click to validate the completion, add the final semicolon.
|
|
||||||
You can also duplicate the code sample from the screen capture but this is optional because
|
|
||||||
the point here is only to show that the `import` is automatically handled by the software.
|
|
||||||
|
|
||||||
In the **File** menu, click **Compile and run file**.
|
|
||||||
|
|
||||||
The operation is successful because _Coedit_ exposes
|
|
||||||
all the [_libman_][lnk_widg_lib] entries to _DMD_ when compiling a _runnable_ module.
|
|
||||||
|
|
||||||

|
|
Loading…
Reference in New Issue