Lade...
 

Beiträge zu fr_compil (gegenwärtige Version)

Prozess



Optionen




Version
Version Datum Nutzer
mEGa
Frank
mEGa
Seite anzeigen

Statistiken

Autor Wörter Leerraum Zeichen Druckbare Zeichen
Benutzt Gelöscht Benutzt Gelöscht Benutzt Gelöscht Benutzt Gelöscht
mEGa 921 (100.0%) 0 (0.0%) 583 (100.0%) 0 (0.0%) 10125 (100.0%) 0 (0.0%) 7346 (100.0%) 0 (0.0%)
Gesamt 921 (100.0%) 0 (100.0%) 583 (100.0%) 0 (100.0%) 10125 (100.0%) 0 (100.0%) 7346 (100.0%) 0 (100 %)

Seitenänderungen

Code source<a href="#Code_source" class="heading-link"><span class="icon icon-link link" ><img src="img/icons/link.png" alt="link"></span></a>




Cette page est une adaptation de l'ancien wiki



Inhaltsverzeichnis

  • <a href='#Code_source' class='link'>Code source</a>
    • <a href='#T_l_chargement' class='link'>Téléchargement</a>
    • <a href='#Compilation' class='link'>Compilation</a>
      • <a href='#Comment_compiler_' class='link'>Comment compiler?</a>
      • <a href='#Compiler_avec_GCC' class='link'>Compiler avec GCC</a>
      • <a href='#Compiler_avec_MS_Visual_C_Express' class='link'>Compiler avec MS Visual C Express</a>
    • <a href='#Contribution' class='link'>Contribution</a>
    • <a href='#Probl_mes' class='link'>Problèmes</a>


Téléchargement<a href="#T_l_chargement" class="heading-link"><span class="icon icon-link link" ><img src="img/icons/link.png" alt="link"></span></a>


Le code source de la dernière version peut être téléchargé en utilisant un client SVN comme cela:



  • Le login est "anon" et le password est vide
  • Instructions officielles (en): <a class="wiki external" target="_blank" title="External link" href="http://archive.forum.simutrans.com/topic/06046.0/index.html" rel="external nofollow">http://archive.forum.simutrans.com/topic/06046.0/index.html</a>
  • Topic sur la création d'un serveur officiel (en): <a class="wiki external" target="_blank" title="External link" href="http://archive.forum.simutrans.com/topic/06227.0/index.html" rel="external nofollow">http://archive.forum.simutrans.com/topic/06227.0/index.html</a>

Compilation<a href="#Compilation" class="heading-link"><span class="icon icon-link link" ><img src="img/icons/link.png" alt="link"></span></a>


(Avec les instructions incluses dans les sources)

Comment compiler?<a href="#Comment_compiler_" class="heading-link"><span class="icon icon-link link" ><img src="img/icons/link.png" alt="link"></span></a>


Librairies nécessaires

(Note: sur Ubuntu, Vous devez installer les versions -dev (ex: libsdl-dev) des librairies séparément.)

libz
<a target="_blank" class="wiki external" href="http://www.zlib.net/">http://www.zlib.net/<span class="icon icon-link-external external_link" ><img src="img/icons/external_link.gif" alt="link-external"></span></a> libpng <a target="_blank" class="wiki external" href="http://www.libpng.org/pub/png/">http://www.libpng.org/pub/png/<span class="icon icon-link-external external_link" ><img src="img/icons/external_link.gif" alt="link-external"></span></a> pour makeobj

libSDL and libSDL_mixer
<a target="_blank" class="wiki external" href="http://www.libsdl.org/">http://www.libsdl.org/<span class="icon icon-link-external external_link" ><img src="img/icons/external_link.gif" alt="link-external"></span></a> pou SDL

Allegro
<a class="wiki external" target="_blank" title="External link" href="http://www.talula.demon.co.uk/allegro/" rel="external nofollow">http://www.talula.demon.co.uk/allegro/</a> (ou <a target="_blank" class="wiki external" href="http://alleg.sourceforge.net/index.de.html">http://alleg.sourceforge.net/index.de.html<span class="icon icon-link-external external_link" ><img src="img/icons/external_link.gif" alt="link-external"></span></a>) pour Allegro

Pour vous faciliter la vie, vous pouvez suivre les instructions pour compiler OpenTTD. Un système configurer pour compiler openTTD peut aussi compiler simutrans sans problèmes.

Si vous voulez compiler sur une machine tournant sous windows, vous devez télécharger MS VC Express ou MingW. Ce dernier est facile à utiliser avec l'IDE DEV-C++ et de plus, faire l'installation des librairies additionnelles comme libz, libsdl et autre, est vraiment facile. Toutefois, compiler en ligne de commande est plus facile.

Pour tous les autres systèmes, il est recommandé d'obtenir les dernières versions de GCC et zlib, ainsi que la libpng et les librairies nécessaires pour le jeu. Pour les systèmes UNIX, vous pouvez utilisez des utilitaires comme apt-get ou yast.

Il est recommandé d'avoir toujours la version la plus récente du code source.

Compiler avec&nbsp;GCC<a href="#Compiler_avec_GCC" class="heading-link"><span class="icon icon-link link" ><img src="img/icons/link.png" alt="link"></span></a>


Go to Simutrans/sim. Allez dans le répertoire Simutrans/sim

Puis copiez le fichier sim/config.template dans le dossier sim/config.default et éditez le fichier. Vous pouvez spécifier: -La librairie d'affichage (gdi, allegro, sdl) -La profondeur des couleurs (en général 16) -Le système (vous devriez le savoir)

Il est recommandé de décommenter les ligne
Copy to clipboard
#DEBUG=1 et #OPTIMISE=1
(c'est à dire en enlevant le #).

Pour allegro ou libsdl, vous pourriez avoir besoin de définir le chemin du fichier de configuration.

Finalement tapez make. Si vous voulez un petit exécutable et que vous n'avez pas besoin des messages d'erreur, vous pouvez commenter la ligne
Copy to clipboard
#DEBUG=1
et lancer la commande strip sim resp. strip sim.exe après la compilation et l'édition des liens.

Pour les utilisateurs de système Windows: Pour débugger, Il est recommandé de démarrer drmingw -i dans un invite de commande. Vous devriez obtenir un historique d'appel avec toutes les erreurs dedans. gdb ne fonctionne pas très bien et il est difficile a utiliser avec une interface textuelle.

Compiler avec MS Visual C&nbsp;Express<a href="#Compiler_avec_MS_Visual_C_Express" class="heading-link"><span class="icon icon-link link" ><img src="img/icons/link.png" alt="link"></span></a>


Pour MS VC Express, vous devez inclure la zlib. Toute version compatible avec Visual C le fait. Vous pouvez regarder les instructions pour compiler OpenTTD. Il contient la libpng et la libz adaptées pour simutrans aussi:
<a target="_blank" class="wiki external" href="http://wiki.openttd.org/index.php/MicrosoftVisualCExpress">http://wiki.openttd.org/index.php/MicrosoftVisualCExpress<span class="icon icon-link-external external_link" ><img src="img/icons/external_link.gif" alt="link-external"></span></a>

Vous pouvez compiler sans la zlib, mais vous devez être sur d'avoir désactivé le support pour les sauvegardes compressées dans votre simuconf.tab. Par contre vous serez dans l'impossibilité de charger des sauvegardes compressées.

Pour debugger, vous devez avoir correctement définis le répertoire de travail, c'est à dire où le répertoire pak/ est situé, puis utiliser l'option en ligne de commande
Copy to clipboard
-use_repertoire_de_travail


Contribution<a href="#Contribution" class="heading-link"><span class="icon icon-link link" ><img src="img/icons/link.png" alt="link"></span></a>


Si vous voulez contribuer au développement, lisez le guide pour coder dans le répertoire sim/documentation/coding_styles.txt Vous pouvez aussi demander de l'aide ou des information sur le forum international.


Problèmes<a href="#Probl_mes" class="heading-link"><span class="icon icon-link link" ><img src="img/icons/link.png" alt="link"></span></a>


Compiler les sources sur une architecture 64bit (en):
<a target="_blank" class="wiki external" href="http://forum.simutrans.com/index.php/topic">http://forum.simutrans.com/index.php/topic<span class="icon icon-link-external external_link" ><img src="img/icons/external_link.gif" alt="link-external"></span></a>,5988.0.html

Traduction du wiki anglais, section source code.



Online Benutzer

24 Benutzer (alle) online

Neueste Forenbeiträge