Line 128: |
Line 128: |
| ''For Windows:'' | | ''For Windows:'' |
| | | |
− | {{ToTranslate}}
| |
| If you work on Windows, another method (not so nice than previous) is also possible. Install the open source compare tools called Winmerge (this tool is able to build patch with format ''diff -Naur''). Then compare with WinMerge the reference file and modified file and choose in menu ''"Tools - Generate patch"''. Add an output filename like ''"mypatch.patch"'', click on box ''"Append"'' and hcoose option ''"Format Unified"''. Then click on ''"Ok"''. | | If you work on Windows, another method (not so nice than previous) is also possible. Install the open source compare tools called Winmerge (this tool is able to build patch with format ''diff -Naur''). Then compare with WinMerge the reference file and modified file and choose in menu ''"Tools - Generate patch"''. Add an output filename like ''"mypatch.patch"'', click on box ''"Append"'' and hcoose option ''"Format Unified"''. Then click on ''"Ok"''. |
| Eventually restart for each modified file. | | Eventually restart for each modified file. |
| Finally, you will get a file ''mypatch.patch'' that contains all changes with goode format. | | Finally, you will get a file ''mypatch.patch'' that contains all changes with goode format. |
| | | |
− | '''Apply a patch''' | + | * '''Apply a patch''' |
− | Si votre patch n'a pas encore été appliqué, mais que vous souhaitez de votre coté l'appliquer sur votre serveur linux fraichement mis à jour depuis la CVS, cela est possible grace à l'utilitaire patch.
| + | If you want to apply a patch file on an old version to have a new one modified by the path file, this is possible with the '''patch''' tool. |
− | En admettant que vous avez créé votre patch à partir du répertoire htdocs de votre copie locale du cvs modifiée par vos soins, et que vous avez envoyé votre patch (monfichier.patch) sur le serveur dans le dossier patchs situé au meme niveau que votre dossier htdocs distant, la commande suivante devrait faire l'affaire (executée depuis le dossier patchs):
| + | Imagine you have on non modified version somewhere on a server. Put you patch file into the root directory. Go into this root directory then launch the command: |
− | patch -u -p0 -d ../htdocs < monfichier.patch | + | patch -u -p0 -d . < mypatch.patch |
− | <nowiki>Pour information: -p0 permet d'utiliser le chemin entier tel que mentionné dans le fichier de patch (-pn en retire les n premiers niveau de l'arborescence) | + | <nowiki>For information: -p0 is to use full path of files defined in patch file to locate them on your disk (-pn will remove the n first levels of directories) |
− | -d permet de préciser le chemin relatif vers le dossier htdocs à patcher. | + | -d define the relative path do directory to patch. |
− | < permet de donner le chemin vers le fichier source à utiliser (le patch en mode unifié) | + | < is to provide source file name to use (patch must have format previsouly defined) |
− | -u permet de préciser que le patch est en mode unifié</nowiki> | + | -u is to tell that patch has unified format</nowiki> |
| | | |
| = How to package and deploy a module = | | = How to package and deploy a module = |