Windowed projects/mkdcppw/Help
De Wiki EELL.
JPL (discuter | contributions) m (→Generate the documents : Traduction effecteée) |
JPL (discuter | contributions) m (→Créer un fichier de projet : sauvegarde) |
||
Ligne 143 : | Ligne 143 : | ||
</gallery> | </gallery> | ||
- | ==== | + | ==== Create a project file ==== |
- | + | A project file contains all the files an application's source, or all text file from an application.<br/> | |
- | + | This can be for example:<br/> | |
- | <u> | + | <u>Project file '''CmapGpsu.prj''' :</u> |
<pre> | <pre> | ||
CmapGpsu.txt | CmapGpsu.txt | ||
Ligne 154 : | Ligne 154 : | ||
ExitError.cpp | ExitError.cpp | ||
</pre> | </pre> | ||
- | + | 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.<br/>'''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 [[:wikipedia:fr:Shell_Unix|Shell]] file''', in the build directory, with all application files, to create the <u>projet file '''application.prj''' :</u> |
<pre> | <pre> | ||
#!/bin/bash | #!/bin/bash |
Version du 4 janvier 2013 à 11:55
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 :
Sommaire |
Others languages
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 "Création ou mise à jour du projet CmapGpsu" ls -1 *.* > CmapGpsu.prj clear cat CmapGpsu.prj echo "" echo "Taper sur retour chariot <-/ pour quitter" read clavier # juste pour se donner le temps d'examiner le contenu
On intégrera évidemment le fichier de projet dans le projet, mais comme celui-ci n'aura pas de commentaire codé, cela n'a pas d'importance.
Notez que les extensions '.prj et '.pj' sont reconnus dans mkdcppw, comme étant des extensions de fichiers de projet.
- Avec l'application mkdcppw
Au début, afin de visualiser les actions il est conseillé de lancer l'application par l'intermédiaire d'un terminal (ou konsole) Ctrl+Alt+T
- Créer le fichier de projet vide :
Créer un fichier de projet vide au menu: Nouveau / Fichier source ou au clavier: Maj+Ctrl+S. Sélectionnez n'importe quel fichier texte et validez. Dans la fenêtre Code de sélection laisser vide ou mettre un code ASCII inopérant. Dans la fenêtre Nom du fichier cible écrivez le nom du projet. Valider les fenêtres, et exécutez. L'affichage dans la fenêtre d'impression devrait être vide, ceci dit ce n'est pas très grave car vous pouvez vider le contenu lorsque vous allez 'Ajouter' des fichiers dans le projet. - 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 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
- 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.