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. Ajouter des fichiers dans le fichier de projet:
    Charger le fichier de projet au menu Nouveau / Fichier de projet ou au clavier Ctrl+A On doit voir s'afficher "Voulez-vous ajouter des fichiers à ce projet ?". Cliquez sur valider sinon vous allez vider le projet de son contenu et le recréer. À partir de ce moment chaque fois que vous cliquez sur Nouveau / Fichier de projet dans le menu, ou sur l'icône Fichier:Gtk-dnd-multiple.png vous allez ajouter un fichier dans le projet. (Dans l'exemple: asm.c, cpp.c). Vous ne le verrez que sur le terminal
    Notez qu'à la console il eut suffi de taper ls -1 *.c > demo.prj

  3. Pour générer la documentation :
    Chargez le fichier de projet (demo.prj dans l'exemple) au menu Nouveau / Fichier source ou au clavier: Maj+Ctrl+S.
    Dans les fenêtres: précisez les Options, le Code de sélection, le Nom du fichier cible (Dans l'exemple demo.Header ou demo.h). Mise à jour des saies et Exécuter.
Résumé 
Les fichiers source peuvent être :
- des fichiers simples pour une documentation spécifique
- des fichiers de projet composés de fichier sources pour une documentation plus large. Les fichiers de projet sont reconnus par leur extension .prj ou .pj
La création de fichiers de projet est assez compliquée avec l'application mkdcppw, on préfère habituellement créer le fichier de projet avec un éditeur, avec un fichier shell, dans le Makefile, ou tout simplement à la 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