update wiki

This commit is contained in:
Basile Burg 2016-04-24 00:10:57 +02:00
parent 06cb06cdfa
commit 23ae3b3720
3 changed files with 0 additions and 159 deletions

View File

@ -53,6 +53,4 @@ __________
**Tutorials**
* [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)
* [using the library manager](https://github.com/BBasile/Coedit/wiki#introduction-to-the-library-manager)

View File

@ -1 +0,0 @@
- tuto are obsolete.

View File

@ -964,73 +964,6 @@ However save it somewhere. In the project inspector, the source path will be dis
- You can now compile the project.
![](https://raw.githubusercontent.com/BBasile/CoeditWikiData/master/tut1_6.png)
## 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.
![](https://raw.githubusercontent.com/BBasile/CoeditWikiData/master/tut3_1.png)
- 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\*`**
![](https://raw.githubusercontent.com/BBasile/CoeditWikiData/master/tut3_2.png)
- still in this category, open the **ImportStringPaths** editor add **`<path_to>\harbored-mod\strings`** .
![](https://raw.githubusercontent.com/BBasile/CoeditWikiData/master/tut3_3.png)
- 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:
![](https://raw.githubusercontent.com/BBasile/CoeditWikiData/master/tut3_4.png)
- 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.
![](https://raw.githubusercontent.com/BBasile/CoeditWikiData/master/tut3_5.png)
- 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.
![](https://raw.githubusercontent.com/BBasile/CoeditWikiData/master/tut3_6.png)
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.
![](https://raw.githubusercontent.com/BBasile/CoeditWikiData/master/tut3_7.png)
[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
In this tutorial, we'll see that a Coedit runnable module can
@ -1134,92 +1067,3 @@ sent as input.
![](https://raw.githubusercontent.com/BBasile/CoeditWikiData/master/tut4_2.png)
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.
![](https://raw.githubusercontent.com/BBasile/CoeditWikiData/master/tut5_1.png)
In the project configuration widget, select the **output** category
and set the **binaryKind** to **staticlib**.
![](https://raw.githubusercontent.com/BBasile/CoeditWikiData/master/tut5_2.png)
Still in this widget, select the category **Paths** and define the outputFilename
to **`<apath>\libdparse`**.
![](https://raw.githubusercontent.com/BBasile/CoeditWikiData/master/tut5_3.png)
In the menu **Project** click **Compile project**.
![](https://raw.githubusercontent.com/BBasile/CoeditWikiData/master/tut5_4.png)
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).
![](https://raw.githubusercontent.com/BBasile/CoeditWikiData/master/tut5_5.png)
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).
![](https://raw.githubusercontent.com/BBasile/CoeditWikiData/master/tut5_6.png)
Select the **Output** category and sets the **outputFilename**.
In the menu **Project** click **Compile project**.
**dfmt** is now build.
![](https://raw.githubusercontent.com/BBasile/CoeditWikiData/master/tut5_7.png)
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).
![](https://raw.githubusercontent.com/BBasile/CoeditWikiData/master/tut5_8.png)
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.
![](https://raw.githubusercontent.com/BBasile/CoeditWikiData/master/tut5_9.png)