{"id":6421,"date":"2014-03-13T11:53:05","date_gmt":"2014-03-13T10:53:05","guid":{"rendered":"http:\/\/www.mwanzo.fr\/traintrain.tm\/?p=6421"},"modified":"2014-12-13T13:48:33","modified_gmt":"2014-12-13T12:48:33","slug":"mise-a-jour-de-xtrkcad","status":"publish","type":"post","link":"https:\/\/www.mwanzo.fr\/traintrain.tm\/mise-a-jour-de-xtrkcad\/","title":{"rendered":"Mise \u00e0 jour de XTrkCad"},"content":{"rendered":"<p>Bonjour,<br>\nJe profite de mes vacances (et oui, ca m&#x2019;arrive&#x2026;) pour imaginer de nouveaux trac&#xE9;s pour mon futur r&#xE9;seau.<!--more--><br>\nAyant quelques difficult&#xE9;s avec une fonction de XTrkCad, je d&#xE9;cide de le mettre &#xE0; jour, ce qui m&#x2019;oblige &#xE0; le compiler sur ma machine (voir mon <a title=\"XTrkCad\" href=\"http:\/\/www.mwanzo.fr\/traintrain.tm\/xtrkcad\/\">pr&#xE9;c&#xE9;dent article<\/a> sur le sujet).<br>\nLes sources sont disponibles <a title=\"XTrkCAD Model RR Track Planner\" href=\"http:\/\/sourceforge.net\/p\/xtrkcad-fork\/xtrkcad\/ci\/default\/tree\/\" target=\"_blank\">ici<\/a>. Cliquer sur <strong>Download Snapshot<\/strong> pour avoir une archive au format .zip contenant les toutes derni&#xE8;res versions de chaque fichier.<br>\nJ&#x2019;ai d&#xFB; ensuite installer les biblioth&#xE8;ques <strong>webkit 1.0<\/strong>, qui ne sont pas install&#xE9;es par d&#xE9;faut dans <a class=\"lar-automated-link\" href=\"https:\/\/ubuntu-fr.org\/\" 7860 rel=\"nofollow\" target=\"_blank\">Ubuntu<\/a>. Pour cela, ouvrez le gestionnaire de paquets <strong>Synaptic<\/strong>, faites une recherche sur webkit, faites un clic-droit sur libwebkitgtk-1.0-0, puis <strong>S&#xE9;lectionner pour une installation<\/strong>.<br>\nLe compilateur <strong>ccmake<\/strong> n&#x2019;est pas pr&#xE9;sent lui non plus. Toujours dans <strong>Synaptic<\/strong>, proc&#xE9;dez de la m&#xEA;me fa&#xE7;on que pr&#xE9;c&#xE9;demment en cherchant ccmake et en installant cmake-curses-gui.<\/p>\n<ul>\n<li>D&#xE9;compressez l&#x2019;archive t&#xE9;l&#xE9;charg&#xE9;e dans <path>~\/src\/xtrkcad<\/path> (cr&#xE9;ez le r&#xE9;pertoire s&#x2019;il n&#x2019;existe pas).<\/li>\n<li>Ouvrez un terminal.<\/li>\n<li>Cr&#xE9;ez le r&#xE9;pertoire :<\/li>\n<\/ul>\n<p><code>mkdir ~\/build\/xtrkcad<\/code><\/p>\n<ul>\n<li>Placez vous dans ce r&#xE9;pertoire :<\/li>\n<\/ul>\n<p><code>cd ~\/build\/xtrkcad<\/code><\/p>\n<ul>\n<li>Lancez le compilateur :<\/li>\n<\/ul>\n<p><code> sudo ccmake ~\/src\/xtrkcad<\/code><\/p>\n<ul>\n<li>Appuyez sur&#xA0;<strong>c<\/strong> pour configurer la construction. Vous devriez voir 4 options &#xE0; configurer :<br>\nCMAKE_BUILD_TYPE<br>\nCMAKE_INSTALL_PREFIX<br>\nXTRKCAD_USE_GTK<br>\nXTRKCAD_USE_GTK_CAIRO<\/li>\n<li>S&#xE9;lectionnez CMAKE_BUILD_TYPE pour d&#xE9;finir le type de compilation. Entrez&#xA0;<strong>Debug<\/strong> pour une construction debug,&#xA0;<strong>Release<\/strong> pour une release, etc.<\/li>\n<li>S&#xE9;lectionnez CMAKE_INSTALL_PREFIX pour d&#xE9;finir le r&#xE9;pertoire d&#x2019;installation. Chez moi <path>\/opt\/xtrkcad<\/path>.<\/li>\n<li>S&#xE9;lectionnez XTRKCAD_USE_GETTEXT pour ajouter des traductions. Choisissez &#xAB;&#xA0;OFF&#xA0;&#xBB; pour la langue par d&#xE9;faut (English). R&#xE9;f&#xE9;rez-vous &#xE0; <a title=\"The XTrackCAD Wiki : Internationalization\" href=\"http:\/\/www.xtrkcad.org\/Wikka\/Internationalization\" target=\"_blank\">http:\/\/www.xtrkcad.org\/Wikka\/Internationalization<\/a> pour plus de d&#xE9;tails.<\/li>\n<li>S&#xE9;lectionnez XTRKCAD_USE_GTK pour d&#xE9;finir l&#x2019;interface utilisateur. Choisissez &#xAB;&#xA0;OFF&#xA0;&#xBB; pour Windows, &#xAB;&#xA0;ON&#xA0;&#xBB; pour les autres plate-formes.<\/li>\n<li>S&#xE9;lectionnez XTRKCAD_USE_GTK_CAIRO pour activer un meilleur rendu (antialiasing). Cette option n&#x2019;a pas d&#x2019;effet si vous utilisez le back-end GTK.<\/li>\n<li>S&#xE9;lectionnez XTRKCAD_USE_DOXYGEN pour activer la production de type, de fonction, de documentation depuis le code source. Doxygen doit &#xEA;tre activ&#xE9;.<br>\nN&#x2019;activez cette fonction que si vous voulez hacker le code.<\/li>\n<li>Si vous avez fait des changements dans ces options, appuyez de nouveau sur&#xA0;<strong>c<\/strong> pour les mettre &#xE0; jour.<\/li>\n<li>Appuyez sur&#xA0;<strong>g<\/strong> pour g&#xE9;n&#xE9;rer les fichiers makefiles de votre compilation.<\/li>\n<li>Compilez XTrkCad en faisant :<\/li>\n<\/ul>\n<p><code>$ make<\/code><\/p>\n<ul>\n<li>Installez-le :<\/li>\n<\/ul>\n<p><code>$ make install<\/code><\/p>\n<ul>\n<li>Utilisez le :<\/li>\n<\/ul>\n<p><code>$ \/opt\/xtrkcad\/bin\/xtrkcad<\/code><\/p>\n<p>Vous pouvez le rajouter dans le menu en tapant <strong>menu<\/strong> dans la recherche du menu.<br>\nS&#xE9;lectionnez <strong>Menu principal<\/strong>.<br>\nS&#xE9;lectionnez <strong>Autre<\/strong> (ou un autre menu si vous le souhaitez), cliquez sur <strong>Nouvel &#xE9;l&#xE9;ment<\/strong>. Mettez le nom que vous voulez et <file>\/opt\/xtrkcad\/bin\/xtrkcad<\/file> pour la commande. Vous trouverez un logo ici : <file>\/opt\/xtrkcad\/share\/xtrkcad<\/file>.<br>\nC&#x2019;est tout ! Amusez-vous bien avec cette derni&#xE8;re version de XtrkCad.<\/p>\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n","protected":false},"excerpt":{"rendered":"<p>Bonjour, Je profite de mes vacances (et oui, ca m&#x2019;arrive&#x2026;) pour imaginer de nouveaux trac&#xE9;s pour mon futur r&#xE9;seau.<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[23],"tags":[258,62,257,256,28,255,52],"class_list":["post-6421","post","type-post","status-publish","format-standard","hentry","category-informatique","tag-ccmake","tag-menu","tag-mise-a-jour","tag-synaptic","tag-ubuntu","tag-webkit","tag-xtrkcad"],"views":207,"_links":{"self":[{"href":"https:\/\/www.mwanzo.fr\/traintrain.tm\/wp-json\/wp\/v2\/posts\/6421","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.mwanzo.fr\/traintrain.tm\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.mwanzo.fr\/traintrain.tm\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.mwanzo.fr\/traintrain.tm\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/www.mwanzo.fr\/traintrain.tm\/wp-json\/wp\/v2\/comments?post=6421"}],"version-history":[{"count":0,"href":"https:\/\/www.mwanzo.fr\/traintrain.tm\/wp-json\/wp\/v2\/posts\/6421\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.mwanzo.fr\/traintrain.tm\/wp-json\/wp\/v2\/media?parent=6421"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.mwanzo.fr\/traintrain.tm\/wp-json\/wp\/v2\/categories?post=6421"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.mwanzo.fr\/traintrain.tm\/wp-json\/wp\/v2\/tags?post=6421"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}