Skip to content

Commit 340781f

Browse files
committed
refactor to move instructions to technical
1 parent 9a28dc6 commit 340781f

File tree

5 files changed

+10
-105
lines changed

5 files changed

+10
-105
lines changed

SUMMARY.md

+2-1
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@
7373
* [Editing STServer.ini](guides/server-guide/linux-setup/editing-stserver.ini.md)
7474
* [Explaining bEnableModcheck](guides/server-guide/linux-setup/explaining-benablemodcheck.md)
7575
* [Port forwarding](guides/server-guide/linux-setup/port-forwarding.md)
76-
* [Build Docker server image](guides/server-guide/linux-setup/build-docker-image.md)
76+
7777
* [Server configuration parameters](guides/server-guide/server-configuration.md)
7878
* [Troubleshooting](guides/troubleshooting/README.md)
7979
* [Address Library error](guides/troubleshooting/address-library-error.md)
@@ -111,5 +111,6 @@
111111
## Technical documentation
112112

113113
* [Build guide](technical-documentation/build-guide/README.md)
114+
* [Build Docker server image](guides/server-guide/linux-setup/build-docker-image.md)
114115
* [Troubleshooting](technical-documentation/build-guide/troubleshooting.md)
115116
* [Overview](technical-documentation/overview.md)

guides/server-guide/linux-setup/README.md

+1-2
Original file line numberDiff line numberDiff line change
@@ -4,5 +4,4 @@
44

55
In this guide, Linux users have only one option: **Docker**. Docker is very simple to set up.
66

7-
### [Option 1: Docker setup](docker-setup.md)
8-
##### [Option 1a: Build Docker server image](build-docker-image.md)
7+
### [Option 1: Docker setup](docker-setup.md)

technical-documentation/build-guide/README.md

+4
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,10 @@ Until you've built and installed the Together UI, you will not have it in game (
5454

5555
Next, execute `pnpm deploy:develop` to build the development version. Alternatively, execute `pnpm deploy:production` to build the production version. Copy the folder `Code/skyrim_ui/dist/UI` over to `build/windows/x64/releasedbg` . Although not necessary, we recommend creating a symbolic link to the folder during development instead of duplicating to avoid having to copy over the folder after each build.
5656

57+
### Building the Server Container
58+
59+
See instructions [here](build-docker-image.md).
60+
5761
## Verifying
5862

5963
If everything worked as intended, a Tilted Reverse Console will pop up. Once loaded into a save, run the corresponding server executable (or script, if you created one). Press F3 to display the Dear ImGui debug UI on top of your game. You should now be able to connect in-game by using the UI in the top left corner; pressing RCTRL or F2 should free your mouse so that you're able to interact with the UI. Note that you must have the [Address Library](https://www.nexusmods.com/skyrimspecialedition/mods/32444?tab=files) mod manually installed to launch an instance of the game.

guides/server-guide/linux-setup/build-docker-image.md renamed to technical-documentation/build-guide/build-docker-image.md

+2-102
Original file line numberDiff line numberDiff line change
@@ -10,114 +10,14 @@ Below, we will be referring to your docker hub repository as `username/image_nam
1010

1111
## Gathering Requirements for Building Server Container
1212

13-
We only need `Dockerfile` and `Dockerfile.builder` in order to build the image. We have three options to retrieve these files, you only need to choose and follow the steps in one of them.
14-
15-
#### Option 1: Clone the TiltedEvolution Repository
16-
17-
This is the writer's preference, since it will always pull the latest Dockerfile and Dockerfile.builder, and it's simple. It does download the full repo, however, which includes files unecessary for this process.
13+
We only require Dockerfile and Dockerfile.builder to build the image, but we are going to clone the full repository. It does include files unecessary for this process, but it makes sure everything is up to date. Once this is done once, you can pull updates with `git fetch && git pull`.
1814

1915
1. Run the following command to clone the repository into ~/str:\
20-
`git clone https://github.com/tiltedphoques/TiltedEvolution.git ~/str`
21-
* We will not be building this project directly so we do not require the submodules/dependencies.
16+
`git clone --recursive https://github.com/tiltedphoques/TiltedEvolution.git ~/str`
2217
* If you encounter an error about login status, install gh `sudo apt install gh` and login `gh auth login` to your github account.
2318
2. Change directory ~/str:\
2419
`cd ~/str`
2520

26-
#### Option 2: Download just Dockerfile and Dockerfile.builder
27-
28-
This option does not download any unecessary files, though it is a few more commands and it links directly to the necessary files. If these file names change in the future, these links may break.
29-
30-
1. Make sure `curl` is installed:\
31-
`sudo apt update && sudo apt install curl`
32-
2. Make a directory to hold the files and change to it:\
33-
`mkdir ~/str && cd ~/str`
34-
3. Download `Dockerfile`:\
35-
`curl -fsSL https://raw.githubusercontent.com/tiltedphoques/TiltedEvolution/master/Dockerfile -o Dockerfile`
36-
4. Download `Dockerfile.builder`:\
37-
`curl -fsSL https://raw.githubusercontent.com/tiltedphoques/TiltedEvolution/master/Dockerfile.builder -o Dockerfile.builder`
38-
39-
#### Option 3: Copy and Paste
40-
41-
1. Make a directory to hold the files and change to it:\
42-
`mkdir ~/str && cd ~/str`
43-
2. Create the two files we need:\
44-
`touch Dockerfile Dockerfile.builder`
45-
3. Open Dockerfile for editing:\
46-
`nano Dockerfile`
47-
4. Copy the following contents into Dockerfile and save:
48-
```
49-
FROM username/multiarch-builder:latest as builder
50-
51-
ARG REPO=https://github.com/tiltedphoques/TiltedEvolution.git
52-
ARG BRANCH=master
53-
54-
WORKDIR /home/builder
55-
56-
ENV XMAKE_ROOT=y
57-
58-
RUN git clone --recursive -b ${BRANCH} ${REPO} ./str && \
59-
cd str && xmake config -m release -y && xmake -y && xmake install -o package -y
60-
61-
62-
# Building for x86_64
63-
FROM builder as amd64builder
64-
65-
RUN cp /usr/lib/x86_64-linux-gnu/libstdc++.so.6.0.30 /home/builder/libstdc++.so.6
66-
67-
68-
# Building for arm64/v8
69-
FROM builder as arm64builder
70-
71-
RUN cp /usr/lib/aarch64-linux-gnu/libstdc++.so.6.0.30 /home/builder/libstdc++.so.6
72-
73-
74-
# Intermediate image that has the library specific to our $TARGETARCH
75-
FROM ${TARGETARCH}builder as intermediate
76-
# If a user has built without buildx, attempt to save them
77-
RUN if [ "${TARGETARCH}" = "" ]; then export LIBFILE="/usr/lib/x86_64-linux-gnu/libstdc++.so.6.0.30"; if [ ! -e ${LIBFILE} ]; then export LIBFILE=/usr/lib/aarch64-linux-gnu/libstdc++.so.6.0.30; fi ; cp ${LIBFILE} /home/builder/libstdc++.so.6; fi
78-
79-
80-
# Build actual server image
81-
FROM ubuntu:22.04
82-
83-
COPY --from=intermediate /home/builder/str/package/lib/libSTServer.so /home/server/libSTServer.so
84-
COPY --from=intermediate /home/builder/str/package/bin/crashpad_handler /home/server/crashpad_handler
85-
COPY --from=intermediate /home/builder/str/package/bin/SkyrimTogetherServer /home/server/SkyrimTogetherServer
86-
87-
COPY --from=intermediate /home/builder/libstdc++.so.6 /home/server/libstdc++.so.6
88-
89-
WORKDIR /home/server
90-
ENTRYPOINT ["./SkyrimTogetherServer"]
91-
92-
EXPOSE 10578/udp
93-
```
94-
* Open Dockerfile.builder for editing:\
95-
`nano Dockerfile.builder`
96-
* Copy the following contents into Dockerfile.builder and save:
97-
```
98-
FROM ubuntu:22.04
99-
100-
WORKDIR /home/builder
101-
102-
RUN apt update && apt install \
103-
cmake \
104-
unzip \
105-
git \
106-
gcc-12 \
107-
g++-12 \
108-
build-essential \
109-
ca-certificates \
110-
curl \
111-
--no-install-recommends -y && \
112-
git clone --recursive https://github.com/xmake-io/xmake.git ./xmake && \
113-
cd xmake && \
114-
make build && \
115-
make install && \
116-
cd .. && rm -rf xmake/ && \
117-
update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-12 110 --slave /usr/bin/g++ g++ /usr/bin/g++-12 --slave /usr/bin/gcov gcov /usr/bin/gcov-12 && \
118-
rm -rf /var/lib/apt/lists/*
119-
```
120-
12121

12222
## Building the Multiarch Builder with Buildx
12323

technical-documentation/build-guide/troubleshooting.md

+1
Original file line numberDiff line numberDiff line change
@@ -16,3 +16,4 @@ you most likely didn't point xmake to vcpkg. This can be fixed by installing it
1616
xmake g --vcpkg="location"
1717
```
1818

19+
For other errors, you can reset xmake config and refresh xrepo repositories by deleting the ./.xmake/ folder and running the command `xrepo remove --all -y`

0 commit comments

Comments
 (0)