evennia/docs/1.0-dev/Setup/Installation-Git.html
Evennia docbuilder action 7488061f2a Updated HTML docs.
2022-11-19 17:26:48 +00:00

321 lines
No EOL
25 KiB
HTML
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" /><meta name="generator" content="Docutils 0.17.1: http://docutils.sourceforge.net/" />
<title>Installing with GIT &#8212; Evennia 1.0-dev documentation</title>
<link rel="stylesheet" href="../_static/nature.css" type="text/css" />
<link rel="stylesheet" href="../_static/pygments.css" type="text/css" />
<script id="documentation_options" data-url_root="../" src="../_static/documentation_options.js"></script>
<script src="../_static/jquery.js"></script>
<script src="../_static/underscore.js"></script>
<script src="../_static/doctools.js"></script>
<script src="../_static/language_data.js"></script>
<link rel="shortcut icon" href="../_static/favicon.ico"/>
<link rel="index" title="Index" href="../genindex.html" />
<link rel="search" title="Search" href="../search.html" />
<link rel="next" title="Installing with Docker" href="Installation-Docker.html" />
<link rel="prev" title="Installation" href="Installation.html" />
</head><body>
<div class="related" role="navigation" aria-label="related navigation">
<h3>Navigation</h3>
<ul>
<li class="right" style="margin-right: 10px">
<a href="../genindex.html" title="General Index"
accesskey="I">index</a></li>
<li class="right" >
<a href="../py-modindex.html" title="Python Module Index"
>modules</a> |</li>
<li class="right" >
<a href="Installation-Docker.html" title="Installing with Docker"
accesskey="N">next</a> |</li>
<li class="right" >
<a href="Installation.html" title="Installation"
accesskey="P">previous</a> |</li>
<li class="nav-item nav-item-0"><a href="../index.html">Evennia 1.0-dev</a> &#187;</li>
<li class="nav-item nav-item-1"><a href="Setup-Overview.html" accesskey="U">Server Setup and Life</a> &#187;</li>
<li class="nav-item nav-item-this"><a href="">Installing with GIT</a></li>
</ul>
<div class="develop">develop branch</div>
</div>
<div class="document">
<div class="documentwrapper">
<div class="sphinxsidebar" role="navigation" aria-label="main navigation">
<div class="sphinxsidebarwrapper">
<p class="logo"><a href="../index.html">
<img class="logo" src="../_static/evennia_logo.png" alt="Logo"/>
</a></p>
<div id="searchbox" style="display: none" role="search">
<h3 id="searchlabel">Quick search</h3>
<div class="searchformwrapper">
<form class="search" action="../search.html" method="get">
<input type="text" name="q" aria-labelledby="searchlabel" />
<input type="submit" value="Go" />
</form>
</div>
</div>
<script>$('#searchbox').show(0);</script>
<h3><a href="../index.html">Table of Contents</a></h3>
<ul>
<li><a class="reference internal" href="#">Installing with GIT</a><ul>
<li><a class="reference internal" href="#summary">Summary</a></li>
<li><a class="reference internal" href="#virtualenv">Virtualenv</a></li>
<li><a class="reference internal" href="#linux-install">Linux Install</a></li>
<li><a class="reference internal" href="#mac-install">Mac Install</a></li>
<li><a class="reference internal" href="#windows-install">Windows Install</a></li>
</ul>
</li>
</ul>
<h4>Previous topic</h4>
<p class="topless"><a href="Installation.html"
title="previous chapter">Installation</a></p>
<h4>Next topic</h4>
<p class="topless"><a href="Installation-Docker.html"
title="next chapter">Installing with Docker</a></p>
<div role="note" aria-label="source link">
<!--h3>This Page</h3-->
<ul class="this-page-menu">
<li><a href="../_sources/Setup/Installation-Git.md.txt"
rel="nofollow">Show Page Source</a></li>
</ul>
</div><h3>Links</h3>
<ul>
<li><a href="https://www.evennia.com">Home page</a> </li>
<li><a href="https://github.com/evennia/evennia">Evennia Github</a> </li>
<li><a href="http://games.evennia.com">Game Index</a> </li>
<li>
<a href="https://discord.gg/AJJpcRUhtF">Discord</a> -
<a href="https://github.com/evennia/evennia/discussions">Discussions</a> -
<a href="https://evennia.blogspot.com/">Blog</a>
</li>
</ul>
<h3>Versions</h3>
<ul>
<li><a href="Installation-Git.html">1.0-dev (develop branch)</a></li>
<ul>
<li><a href="../0.9.5/index.html">0.9.5 (v0.9.5 branch)</a></li>
</ul>
</div>
</div>
<div class="bodywrapper">
<div class="body" role="main">
<section class="tex2jax_ignore mathjax_ignore" id="installing-with-git">
<h1>Installing with GIT<a class="headerlink" href="#installing-with-git" title="Permalink to this headline"></a></h1>
<p>This installs and runs Evennia from its sources. This is required if you want to contribute to Evennia itself or have an easier time exploring the code. See the basic <a class="reference internal" href="Installation.html"><span class="doc std std-doc">Installation</span></a> for
a quick installation of the library. See the <a class="reference internal" href="Installation-Troubleshooting.html"><span class="doc std std-doc">troubleshooting</span></a> if you run
into trouble.</p>
<div class="admonition important">
<p class="admonition-title">Important</p>
<p>If you are converting an existing game from a previous version, <a class="reference internal" href="Installation-Upgrade.html"><span class="doc std std-doc">see here</span></a>.</p>
</div>
<section id="summary">
<h2>Summary<a class="headerlink" href="#summary" title="Permalink to this headline"></a></h2>
<p>For the impatient. If you have trouble with a step, you should jump on to the
more detailed instructions for your platform.</p>
<div class="admonition warning">
<p class="admonition-title">Warning</p>
<p>Currently, these instructions will install latest (stable) Evennia, which is
the 0.9.5 version. To install 1.0-dev, you need to add a step <code class="docutils literal notranslate"><span class="pre">git</span> <span class="pre">checkout</span> <span class="pre">develop</span></code> between steps
3 and 4 below.</p>
</div>
<ol class="simple">
<li><p>Install Python and GIT. Start a Console/Terminal.</p></li>
<li><p><code class="docutils literal notranslate"><span class="pre">cd</span></code> to some place you want to do your development (like a folder
<code class="docutils literal notranslate"><span class="pre">/home/anna/muddev/</span></code> on Linux or a folder in your personal user directory on Windows).</p></li>
<li><p><code class="docutils literal notranslate"><span class="pre">git</span> <span class="pre">clone</span> <span class="pre">https://github.com/evennia/evennia.git</span></code> (a new folder <code class="docutils literal notranslate"><span class="pre">evennia</span></code> is created)</p></li>
<li><p><code class="docutils literal notranslate"><span class="pre">python3.11</span> <span class="pre">-m</span> <span class="pre">venv</span> <span class="pre">evenv</span></code> (a new folder <code class="docutils literal notranslate"><span class="pre">evenv</span></code> is created)</p></li>
<li><p><code class="docutils literal notranslate"><span class="pre">source</span> <span class="pre">evenv/bin/activate</span></code> (Linux, Mac), <code class="docutils literal notranslate"><span class="pre">evenv\Scripts\activate</span></code> (Windows)</p></li>
<li><p><code class="docutils literal notranslate"><span class="pre">pip</span> <span class="pre">install</span> <span class="pre">-e</span> <span class="pre">evennia</span></code></p></li>
<li><p><code class="docutils literal notranslate"><span class="pre">evennia</span> <span class="pre">--init</span> <span class="pre">mygame</span></code></p></li>
<li><p><code class="docutils literal notranslate"><span class="pre">cd</span> <span class="pre">mygame</span></code></p></li>
<li><p><code class="docutils literal notranslate"><span class="pre">evennia</span> <span class="pre">migrate</span></code></p></li>
<li><p><code class="docutils literal notranslate"><span class="pre">evennia</span> <span class="pre">start</span></code> (make sure to make a superuser when asked)</p></li>
</ol>
<p>Evennia should now be running and you can connect to it by pointing a web browser to
<code class="docutils literal notranslate"><span class="pre">http://localhost:4001</span></code> or a MUD telnet client to <code class="docutils literal notranslate"><span class="pre">localhost:4000</span></code> (use <code class="docutils literal notranslate"><span class="pre">127.0.0.1</span></code> if your OS does
not recognize <code class="docutils literal notranslate"><span class="pre">localhost</span></code>).</p>
</section>
<section id="virtualenv">
<h2>Virtualenv<a class="headerlink" href="#virtualenv" title="Permalink to this headline"></a></h2>
<p>A Python <a class="reference external" href="https://docs.python.org/3/library/venv.html">virtual environment</a> allows you to install Evennia in its own little folder, separate from the rest of the system. You also wont need any extra permissions. Its optional to use a virtualenv, but its highly recommended. Python supports this natively:</p>
<div class="highlight-none notranslate"><div class="highlight"><pre><span></span> python3.11 -m venv evenv (linux/mac)
python -m venv venv evenv (Windows)
</pre></div>
</div>
<blockquote>
<div><p>If you have older versions of Python installed on Windows, you should instead use <code class="docutils literal notranslate"><span class="pre">py</span></code> instead of <code class="docutils literal notranslate"><span class="pre">python</span></code> - the <code class="docutils literal notranslate"><span class="pre">py</span></code> launcher automatically selects the latest python version among those you installed.</p>
</div></blockquote>
<p>This will create a new folder <code class="docutils literal notranslate"><span class="pre">evenv</span></code> in your current directory.
Activate it like this:</p>
<p><code class="docutils literal notranslate"><span class="pre">source</span> <span class="pre">evenv/bin/activate</span></code> (Linux, Mac)
<code class="docutils literal notranslate"><span class="pre">evenv\Scripts\activate</span></code> (Windows)
<code class="docutils literal notranslate"><span class="pre">.\evenv\scripts\activate</span></code> (Windows with PS Shell, Git Bash etc)</p>
<p>The text <code class="docutils literal notranslate"><span class="pre">(evenv)</span></code> should appear next to your prompt to show that the virtual
environment is active. You <em>dont</em> need to actually be in or near the <code class="docutils literal notranslate"><span class="pre">evenv</span></code> folder for
the environment to be active.</p>
<blockquote>
<div><p>Remember that you need to re-activate the virtualenv like this <em>every time</em> you
start a new terminal/console to get access to the Python packages (notably the
important <code class="docutils literal notranslate"><span class="pre">evennia</span></code> program) you installed in the virtualenv!</p>
</div></blockquote>
</section>
<section id="linux-install">
<h2>Linux Install<a class="headerlink" href="#linux-install" title="Permalink to this headline"></a></h2>
<p>For Debian-derived systems (like Ubuntu, Mint etc), start a terminal and
install the requirements:</p>
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="n">sudo</span> <span class="n">apt</span><span class="o">-</span><span class="n">get</span> <span class="n">update</span>
<span class="n">sudo</span> <span class="n">apt</span><span class="o">-</span><span class="n">get</span> <span class="n">install</span> <span class="n">python3</span><span class="mf">.11</span> <span class="n">python3</span><span class="mf">.11</span><span class="o">-</span><span class="n">venv</span> <span class="n">python3</span><span class="mf">.11</span><span class="o">-</span><span class="n">dev</span> <span class="n">gcc</span>
</pre></div>
</div>
<p>You should make sure to <em>not</em> be <code class="docutils literal notranslate"><span class="pre">root</span></code> after this step, running as <code class="docutils literal notranslate"><span class="pre">root</span></code> is a
security risk. Now create a folder where you want to do all your Evennia
development:</p>
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="n">mkdir</span> <span class="n">muddev</span>
<span class="n">cd</span> <span class="n">muddev</span>
</pre></div>
</div>
<p>Next we fetch Evennia itself:</p>
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="n">git</span> <span class="n">clone</span> <span class="n">https</span><span class="p">:</span><span class="o">//</span><span class="n">github</span><span class="o">.</span><span class="n">com</span><span class="o">/</span><span class="n">evennia</span><span class="o">/</span><span class="n">evennia</span><span class="o">.</span><span class="n">git</span>
</pre></div>
</div>
<p>A new folder <code class="docutils literal notranslate"><span class="pre">evennia</span></code> will appear containing the Evennia library. This only
contains the source code though, it is not <em>installed</em> yet.</p>
<p>At this point its now optional but recommended that you initialize and activate a <a class="reference internal" href="#virtualenv"><span class="std std-doc">virtualenv</span></a>.</p>
<p>Next, install Evennia (system-wide, or into your active virtualenv). Make sure you are standing
at the top of your mud directory tree (so you see the <code class="docutils literal notranslate"><span class="pre">evennia/</span></code> folder, and likely the <code class="docutils literal notranslate"><span class="pre">evenv</span></code> virtualenv folder) and do</p>
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="n">pip</span> <span class="n">install</span> <span class="o">-</span><span class="n">e</span> <span class="n">evennia</span>
</pre></div>
</div>
<p>Test that you can run the <code class="docutils literal notranslate"><span class="pre">evennia</span></code> command.</p>
<p>Next you can continue initializing your game from the regular <a class="reference internal" href="Installation.html"><span class="doc std std-doc">Installation instructions</span></a>.</p>
</section>
<section id="mac-install">
<h2>Mac Install<a class="headerlink" href="#mac-install" title="Permalink to this headline"></a></h2>
<p>The Evennia server is a terminal program. Open the terminal e.g. from
<em>Applications-&gt;Utilities-&gt;Terminal</em>. <a class="reference external" href="https://blog.teamtreehouse.com/introduction-to-the-mac-os-x-command-line">Here is an introduction to the Mac
terminal</a>
if you are unsure how it works.</p>
<ul class="simple">
<li><p>Python should already be installed but you must make sure its a high enough version - go for
3.11.
(<a class="reference external" href="https://docs.python-guide.org/en/latest/starting/install/osx/">This</a> discusses how you may upgrade it).</p></li>
<li><p>GIT can be obtained with
<a class="reference external" href="https://code.google.com/p/git-osx-installer/">git-osx-installer</a> or via MacPorts <a class="reference external" href="https://git-scm.com/book/en/Getting-Started-Installing-Git#Installing-on-Mac">as described
here</a>.</p></li>
<li><p>If you run into issues with installing <code class="docutils literal notranslate"><span class="pre">Twisted</span></code> later you may need to
install gcc and the Python headers.</p></li>
</ul>
<p>After this point you should not need <code class="docutils literal notranslate"><span class="pre">sudo</span></code> or any higher privileges to install anything.</p>
<p>Now create a folder where you want to do all your Evennia development:</p>
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="n">mkdir</span> <span class="n">muddev</span>
<span class="n">cd</span> <span class="n">muddev</span>
</pre></div>
</div>
<p>Next we fetch Evennia itself:</p>
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="n">git</span> <span class="n">clone</span> <span class="n">https</span><span class="p">:</span><span class="o">//</span><span class="n">github</span><span class="o">.</span><span class="n">com</span><span class="o">/</span><span class="n">evennia</span><span class="o">/</span><span class="n">evennia</span><span class="o">.</span><span class="n">git</span>
</pre></div>
</div>
<p>A new folder <code class="docutils literal notranslate"><span class="pre">evennia</span></code> will appear containing the Evennia library. This only
contains the source code though, it is not <em>installed</em> yet.</p>
<p>At this point its now optional but recommended that you initialize and activate a <a class="reference internal" href="#virtualenv"><span class="std std-doc">virtualenv</span></a>.</p>
<p>Next, install Evennia (system-wide, or into your active virtualenv). Make sure you are standing
at the top of your mud directory tree (so you see the <code class="docutils literal notranslate"><span class="pre">evennia/</span></code>, and likely the <code class="docutils literal notranslate"><span class="pre">evenv</span></code> virtualenv
folder) and do</p>
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="n">pip</span> <span class="n">install</span> <span class="o">--</span><span class="n">upgrade</span> <span class="n">pip</span> <span class="c1"># Old pip versions may be an issue on Mac.</span>
<span class="n">pip</span> <span class="n">install</span> <span class="o">--</span><span class="n">upgrade</span> <span class="n">setuptools</span> <span class="c1"># Ditto concerning Mac issues.</span>
<span class="n">pip</span> <span class="n">install</span> <span class="o">-</span><span class="n">e</span> <span class="n">evennia</span>
</pre></div>
</div>
<p>Test that you can run the <code class="docutils literal notranslate"><span class="pre">evennia</span></code> command.</p>
<p>Next you can continue initializing your game from the regular <a class="reference internal" href="Installation.html"><span class="doc std std-doc">Installation instructions</span></a>.</p>
</section>
<section id="windows-install">
<h2>Windows Install<a class="headerlink" href="#windows-install" title="Permalink to this headline"></a></h2>
<blockquote>
<div><p>If you are running Windows10, consider using the <em>Windows Subsystem for Linux</em>
(<a class="reference external" href="https://en.wikipedia.org/wiki/Windows_Subsystem_for_Linux">WSL</a>) instead. Just set up WSL with an Ubuntu image and follow the Linux install instructions above.</p>
</div></blockquote>
<p>The Evennia server itself is a command line program. In the Windows launch
menu, start <em>All Programs -&gt; Accessories -&gt; command prompt</em> and you will get
the Windows command line interface. Here is <a class="reference external" href="https://www.bleepingcomputer.com/tutorials/windows-command-prompt-introduction/">one of many tutorials on using the Windows command line</a> if you are unfamiliar with it.</p>
<ul class="simple">
<li><p>Install Python <a class="reference external" href="https://www.python.org/downloads/windows/">from the Python homepage</a>. You will need to be a
Windows Administrator to install packages. Get Python <strong>3.11</strong>, usually
the 64-bit version (although it doesnt matter too much). <strong>When installing, make sure
to check-mark <em>all</em> install options, especially the one about making Python
available on the path (you may have to scroll to see it)</strong>. This allows you to
just write <code class="docutils literal notranslate"><span class="pre">python</span></code> (or possibly <code class="docutils literal notranslate"><span class="pre">py</span></code>) in any console without first finding where the <code class="docutils literal notranslate"><span class="pre">python</span></code>
program actually sits on your hard drive.</p></li>
<li><p>You need to also get <a class="reference external" href="https://git-scm.com/downloads">GIT</a> and install it. You can use the default install options but when you get asked to “Adjust your PATH environment”, you should select the second option “Use Git from the Windows Command Prompt”, which gives you more freedom as to where you can use the program.</p></li>
<li><p>Finally you must install the <a class="reference external" href="https://aka.ms/vs/16/release/vs_buildtools.exe">Microsoft Visual C++ compiler for Python</a>. Download and run the linked installer and install the C++ tools. Keep all the defaults. Allow the install of the “Win10 SDK”, even if you are on Win7 (not tested on older Windows versions). If you later have issues with installing Evennia due to a failure to build the “Twisted wheels”, this is where you are missing things.</p></li>
<li><p>You <em>may</em> need the <a class="reference external" href="https://pypi.python.org/pypi/pypiwin32">pypiwin32</a> Python headers. Install these only if you have issues.</p></li>
</ul>
<p>You can install Evennia wherever you want. <code class="docutils literal notranslate"><span class="pre">cd</span></code> to that location and create a
new folder for all your Evennia development (lets call it <code class="docutils literal notranslate"><span class="pre">muddev</span></code>).</p>
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="n">mkdir</span> <span class="n">muddev</span>
<span class="n">cd</span> <span class="n">muddev</span>
</pre></div>
</div>
<blockquote>
<div><p>Hint: If <code class="docutils literal notranslate"><span class="pre">cd</span></code> isnt working you can use <code class="docutils literal notranslate"><span class="pre">pushd</span></code> instead to force the
directory change.</p>
</div></blockquote>
<p>Next we fetch Evennia itself:</p>
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="n">git</span> <span class="n">clone</span> <span class="n">https</span><span class="p">:</span><span class="o">//</span><span class="n">github</span><span class="o">.</span><span class="n">com</span><span class="o">/</span><span class="n">evennia</span><span class="o">/</span><span class="n">evennia</span><span class="o">.</span><span class="n">git</span>
</pre></div>
</div>
<p>A new folder <code class="docutils literal notranslate"><span class="pre">evennia</span></code> will appear containing the Evennia library. This only
contains the source code though, it is not <em>installed</em> yet.</p>
<p>At this point its optional but recommended that you initialize and activate a <a class="reference internal" href="#virtualenv"><span class="std std-doc">virtualenv</span></a>.</p>
<p>Next, install Evennia (system wide, or into the virtualenv). Make sure you are standing
at the top of your mud directory tree (so you see <code class="docutils literal notranslate"><span class="pre">evennia</span></code>, and likely the <code class="docutils literal notranslate"><span class="pre">evenv</span></code> virtualenv folder when running the <code class="docutils literal notranslate"><span class="pre">dir</span></code> command). Then do:</p>
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="n">pip</span> <span class="n">install</span> <span class="o">-</span><span class="n">e</span> <span class="n">evennia</span>
</pre></div>
</div>
<p>Test that you can run the <code class="docutils literal notranslate"><span class="pre">evennia</span></code> command everywhere while your virtualenv (evenv) is active.</p>
<p>Next you can continue initializing your game from the regular <a class="reference internal" href="Installation.html"><span class="doc std std-doc">Installation instructions</span></a>.</p>
</section>
</section>
</div>
</div>
</div>
</div>
<div class="related" role="navigation" aria-label="related navigation">
<h3>Navigation</h3>
<ul>
<li class="right" style="margin-right: 10px">
<a href="../genindex.html" title="General Index"
>index</a></li>
<li class="right" >
<a href="../py-modindex.html" title="Python Module Index"
>modules</a> |</li>
<li class="right" >
<a href="Installation-Docker.html" title="Installing with Docker"
>next</a> |</li>
<li class="right" >
<a href="Installation.html" title="Installation"
>previous</a> |</li>
<li class="nav-item nav-item-0"><a href="../index.html">Evennia 1.0-dev</a> &#187;</li>
<li class="nav-item nav-item-1"><a href="Setup-Overview.html" >Server Setup and Life</a> &#187;</li>
<li class="nav-item nav-item-this"><a href="">Installing with GIT</a></li>
</ul>
<div class="develop">develop branch</div>
</div>
<div class="footer" role="contentinfo">
&#169; Copyright 2022, The Evennia developer community.
Created using <a href="https://www.sphinx-doc.org/">Sphinx</a> 3.2.1.
</div>
</body>
</html>