Windowed projects/mkdcppw/Help

De Wiki EELL.

Cette page n'est pas finie. Veuillez considérer le plan et le contenu comme incomplets et en préparation, temporaires et sujets à caution. Si vous souhaitez participer, il vous est recommandé de consulter sa page de discussion au préalable.

Screenshot mkdcppw 121215 :

Distribution debian

Sommaire

Others languages

Aide en français

First steps

Install the mkdcppw Ubuntu packages (Debian)

Downloads the packets

Install the packets

  • Click on the packet you just downloaded to open it in the software library, otherwise use the apt-get command.

Compile mkdcpp for other systems

Prerequisites to compile

# Utilities :
#
# To ompilation :
- gcc : gnu c compillator *****
- pkg-config : compilation 
- gtkmm 3 : libgtkmm-3.0-dev : *****
	Gtkmm is a C++ interface for the popular GUI library GTK+, API version 3.0. 
	Gtkmm provides a convenient interface for C++ programmers to create graphical user interfaces
	with GTK+'s flexible OO framework. Highlights include type safe callbacks, widgets extensible 
	using inheritance and over 180 classes that can be freely combined to quickly create complex 
	user interfaces.
	This package contains development files and examples, as well as a gtkmm-demo program.
- Gtk4 :
	Typelib file for libdbusmenu-gtk4 : gir1.2-dbusmenu-gtk-0.4
	library for passing menus over DBus-GTK+ version : libdbusmenu-gtk4
- Terminal, for the tests	
#
# To edit :
- AssoGiate, MIME editor
- Bluefish, multipurpose editor *****
- gmanedit, manual editor
- GIMP, image editor
#
# Internationalization utilities :
- gettext
- Poedit, po editor *****
- Po Gtranslator, po editor
You must have the super user right to use sudo or root.

Download the last compacted version of sources

Uncompress the downloaded file

  • "tar xvzf mkdcppw-0~120508.tar.gz ."

This decompression will create the build directory mkdcppw-0~120508.

Compile and install

  • Read the file README_FIRST. Here are the first lines of file :
# Makefile:
	Makfile is ready for packaging
	Please ferify Makefile before installation.
	$(DESTDIR) is used for packaging.
	for tests type this command "make -d install DESTDIR=tests"
	Thank you.
  • Read the file Makefile and edit this if necessary. Modify the directories macros if necessary.
  • Run the "Terminal" (Ctrl+Alt+T) and go to in the build directory.
  • type the command "make -d install DESTDIR=tests" This compilation will create all audit directories in the test directory.
  • When the compilation goes without error, run the command "./install" in the terminal to install the application.
You can optionally drag your executable to your desktop

Control of installation

  • In the konsole (Terminal) type the commande "mkcppw" and check the operation and display.

More: adapt this version in other languages

How to use mkdcppw

Coding the source files

Example of coding
/*D
        ExitError ()
 -----------------------------------------------------------------------------
 ACTION:
        En ligne de commande: Affiche l'erreur sur la konsole et met fin au
        programme CmapGpsu.

 SYNTAXE:
        // Directives de compilation et entêtes (headers) standards :
        #include "version.h"
        // Déclarations complémentaires publiques :
        #include "CmapGpsu.h"

        void ExitError( int iErr );

 PORTABILITE:
        // Pour ligne de commande ou Shell.
        Systèmes: Windows, Tous LINUX.
 
 DESCRIPTION:
        int iErr : Numéro d'erreur à transcrire en clair au terminal.

 VALEUR RETOURNÉE:
        Ne renvoie rien. (Quitte le programme CmapGpsu)

*/

/*H  // Fichier ExitError.cpp
     extern void ExitError( int iErr );
*/
The characters 'D' and 'H' are benchmark for the decoding with Option 't' (text only).
The comment characters /*, */, // and tracking characters are not trancribed in the décoding.
The character 'D' will decode the documentation of the function.
The character 'H' will allow to create the header file of the application.

Generate the documents

Click on the mkdcppw icon or, if mkdcppw is installed, run the command 'mkdcppw' in a terminal.
The terminal provides details on the progress of the application with the 'v' Option.

First step 
  • Select the source file.
  • Select the Options.
  • Choose Codes of selection.
  • Choose the target file extension.
  • Validate inputs.
Second step 
  • Run the extraction. Ctrl+R on keyboard.
The target file is writing in selected directory in the 'Target file name' widget.

Create a project file

A project file contains all the files an application's source, or all text file from an application.
This can be for example:
Project file CmapGpsu.prj :

CmapGpsu.txt
version.h
CmapGpsu.h
CmapGpsu.cpp
ExitError.cpp

C style (C, c++, php) decoding is enforced with mkdcppw, this regardless of the files extension in the project.

In a terminal (Ctrl+Alt+T) go to in your project directory.

A good way to create a project file is to use the command ls -1 *.* or (*.cc), which has the advantage of sorting the files in alphabetical order, and to avoid the binary files or Shell files without extension.
Warning : whith this command in a terminal or in file of Shell commands, -1 is the number 1 and not the character 'l' .

By a command in a Shell file, in the build directory, with all application files, to create the projet file application.prj :

#!/bin/bash
# file: makeprj
echo "Update the projet CmapGpsu"
ls -1 *.* > CmapGpsu.prj
clear
cat CmapGpsu.prj
echo ""
echo "Type 'Enter' <-/ to quit"
read keyboard # waiting just to examine.

Note that .prj and .pj extensions are recognized by mkdcppw as being project files.

With mkdcppw application

At the beginning, to view the actions, run the application via a terminal (or konsole). Ctrl+Alt+T

  1. Create empty project file :
    with the menu: New / Source file or with the keyboard: Maj+Ctrl+S. Select any text file and validate. In the widget Codes sélection leave blank or inoperative ASCII code. In the widget Target file name write the name of the project. Update the widgets, and Run. Paste in the print window should be empty, this is not very serious because you can empty the contents when you add files to the project.
  2. Add files in the project file :
    Load the project file with the menu New / Project file or with the keyboard Ctrl+A On doit voir s'afficher "Want you add files to this project ?". Click on OK to validate if not you delete all files in the project to renew it. From this moment, every time you click on New / Project file in menu, or on icon Fichier:Gtk-dnd-multiple.png you will add a file in the project. (In example: asm.c, cpp.c). You won't see in the terminal
    Note that terminal it had been enough to type ls -1 *.c > demo.prj

  3. To generate documents :
    Load the project file (demo.prj in example) on the menu New / Source file or on keyboard: Maj+Ctrl+S.
    In the widgets: specify the Options, the Codes selection, the Target file name (In example: demo.Header or demo.h). Update the seizures and Run.
Summary 
The source files can be :
- unique simple files to generate specific documentation
- project files with multiple sources files to create a large documentation. The project files are recognized by the application by theier extension .prj ou .pj
The creation of project files is complicated by the software method. We usually prefer to create the project file with a Text Editor, a Shell file, in a Makefile, or just with a konsole.

How to solve a problem

  1. Run mkdcppw in a terminal (or konsole) and try to solve the problem.
  2. If you are not ressolved the problem with the terminal try the forum. It is possible that you are victim of a bug.
  3. In the case of despair write us by email
Outils personnels