df_st_guide 0.3.0-development-2

Command line interface for Dwarf Fortress Legends
<!DOCTYPE html>
<html lang="en" dir="ltr">

<head>
  <meta charset="utf-8">
  <title>DF Storyteller</title>

  <link rel="apple-touch-icon" sizes="57x57" href="favicon/apple-icon-57x57.png">
  <link rel="apple-touch-icon" sizes="60x60" href="favicon/apple-icon-60x60.png">
  <link rel="apple-touch-icon" sizes="72x72" href="favicon/apple-icon-72x72.png">
  <link rel="apple-touch-icon" sizes="76x76" href="favicon/apple-icon-76x76.png">
  <link rel="apple-touch-icon" sizes="114x114" href="favicon/apple-icon-114x114.png">
  <link rel="apple-touch-icon" sizes="120x120" href="favicon/apple-icon-120x120.png">
  <link rel="apple-touch-icon" sizes="144x144" href="favicon/apple-icon-144x144.png">
  <link rel="apple-touch-icon" sizes="152x152" href="favicon/apple-icon-152x152.png">
  <link rel="apple-touch-icon" sizes="180x180" href="favicon/apple-icon-180x180.png">
  <link rel="icon" type="image/png" sizes="192x192" href="favicon/android-icon-192x192.png">
  <link rel="icon" type="image/png" sizes="32x32" href="favicon/favicon-32x32.png">
  <link rel="icon" type="image/png" sizes="96x96" href="favicon/favicon-96x96.png">
  <link rel="icon" type="image/png" sizes="16x16" href="favicon/favicon-16x16.png">
  <link rel="manifest" href="manifest.json">
  <meta name="msapplication-TileColor" content="#ffffff">
  <meta name="msapplication-TileImage" content="favicon/ms-icon-144x144.png">
  <meta name="theme-color" content="#9e2b25">
  <link href="main.css" media="screen" rel="stylesheet" />
  <link href="icon/css/materialdesignicons.min.css" rel="stylesheet" />
</head>

<body>
  <div class="main">
    <div class="sidebar">
      <section class="info">
        <a href="/"><img id="logo" src="logo.svg" /></a>
        <h1>Welcome to Dwarf Fortress Storyteller</h1>
        <div class="info-icons">
          <a href="https://gitlab.com/df_storyteller/df-storyteller" title="GitLab" target="_blank">
            <span class="mdi mdi-gitlab"></span>
          </a>
          <a href="https://discord.gg/aAXt6uu" title="Discord" target="_blank">
            <span class="mdi mdi-discord"></span> Need help?
          </a>
          <a href="https://dfstoryteller.com" title="Our Website" target="_blank">
            <span class="mdi mdi-earth"></span> Website
          </a>
          <a href="https://gitlab.com/df_storyteller/df-storyteller/issues" title="Report a bug" target="_blank">
            <span class="mdi mdi-bug"></span> Report Bug
          </a>
        </div>

        <footer>
          <p>DF Storyteller was created under the
            <a href="https://choosealicense.com/licenses/agpl-3.0/" target="_blank">AGPLv3 license</a>.<br />
          </p>
        </footer>
      </section>
    </div>

    <div class="content">

      <section>
        <h2>Database on Linux</h2>
        <p>
          It looks like you are using Linux, if not go to the
          <a href="database_windows.html">Windows</a> or
          <a href="database_macos.html">macOS</a> page.
        </p>
        <p>
          There are 2 options for databases, Postgres and SQLite.
          Look in the sections below for the right configuration.
        </p>
        <h3>SQLite</h3>
        <p>
          To install SQLite you need the following packages:
          <code>sqlite3</code>
        </p>
        <p>
          You can install them using you default package manager:
        <pre>
# on Ubuntu/Debian
sudo apt-get install sqlite3

# on OpenSUSE
sudo zypper install libsqlite3-0 sqlite3

# on Fedora
sudo dnf install sqlite3x
</pre>
        </p>
        <h3>Postgres</h3>
        <p>
          To install PostgreSQL you need to install the package:
          <code>postgresql</code>
          This will install the latest version of postgresql available for your system.
        <pre>
# Ubuntu/Debian
sudo apt-get install postgresql
</pre>
        </p>
        <h3>Build from source</h3>
        <p>
          If you want to build DF Storyteller from source you need to install
          both SQLite and Postgres including there development packages.
        </p>
        <pre>
# Ubuntu/Debian
sudo apt-get install libsqlite3-dev sqlite3 postgresql libpq-dev

# OpenSUSE (TODO: correct?)
sudo zypper install sqlite3-devel libsqlite3-0 sqlite3 postgresql-server libpq-devel

# Fedora (TODO: correct?)
sudo dnf install libsqlite3x-devel sqlite3x postgresql-server libpq-devel
</pre>
        To view the databases you can use <code>sqlitebrowser</code> and <code>pgadmin4</code>.
        <pre>
# Ubuntu/Debian
sudo apt-get install sqlitebrowser pgadmin4
</pre>
        <p>
          To compile Rust code you need the Rust compiler.
          For more info: <a href="https://www.rust-lang.org/tools/install" target="_blank">Install Rust</a>
          We will then use Cargo to build the code. Cargo is the default build tool that is included with Rust.
          You are going to need the nightly toolchain, but cargo should automatically detect this.
          You can also install it using:
          <code>rustup toolchain install nightly</code>
        </p>
        <h4>Start building</h4>
        <p>
          To start building the application from source use the following code.
          During the build process below you should not get any warnings or errors.
          It you do, please <a href="https://gitlab.com/df_storyteller/df-storyteller/-/issues" target="_blank">
            open an issue</a>.
        </p>
        <pre>
# If you don't have git installed `apt-get install git`
# Clone git repo
git clone git@gitlab.com:df_storyteller/df-storyteller.git

# Move into the repo folder
cd ./df-storyteller

# Compile the code. 
# NOTE: This will max out all your cpu cores, use `--jobs 5` to only build 5 things at once or what number you want.
# The build process can take from 11 min (on 8 thread) up to 50 min (on 1 thread).
cargo build --release

# After the process is finished you can find the binary in:
# /target/release/df_storyteller
# or /target/release/df_storyteller_sqlite

# --Optional:--
# By default it will build the SQLite version.
# to build the Postgres version use:
cargo build --release --manifest-path df_st_cli/Cargo.toml --no-default-features --features "postgres" --bin df_storyteller_postgres

# This will build the postgres version in:
# /target/release/df_storyteller_postgres
</pre>
        <p>
          If you are stuck there are also Docker files in the <code>./docker/</code> folder
          these include commands to install the container, they might help you.
        </p>
        <div class="info-icons">
          <a href="config.html" title="Next">
            <span class="mdi mdi-play"></span> Next step
          </a>
        </div>
      </section>

    </div>
  </div>
</body>

</html>