Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

docs: update docs and build.sh #2269

Merged
merged 1 commit into from
Dec 15, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,9 @@ Before your start make sure that your system meets the conditions:
* Windows 7 or higher *([Windows 10](https://www.microsoft.com/en-us/software-download/windows10) is recommended)*
* [Visual Studio 2022](https://visualstudio.microsoft.com/downloads/). 2019 and earlier are not supported.
* .NET Framework SDK at 4.6.0 or higher *(Visual Studio Installer -> .NET desktop development)*
* Python 3.9.x 64bit or 32bit *(Visual Studio Installer -> Idividual components -> search for python)*
* Python 3.9.x 64bit or 32bit
* Install option 1: https://www.python.org/downloads/windows/
* Install option 2: Visual Studio Installer -> Individual components -> search for 'python'

### Linux

Expand All @@ -42,8 +44,6 @@ and it can be tricky to get Skyrim itself to work with non-ASCII text, for examp
* Alpine Linux doesn't work
* Arch-based distros also [won't be able to run the server](https://github.com/chakra-core/ChakraCore/issues/6613)
* Clang 15 *(GCC is not supported)*: `sudo apt install clang-15`
* Python 2 (not 3.x! It is needed to build ChakraCore. Don't worry, it won't conflict with Python 3):
`sudo apt install python2`
* Make sure that your NodeJS and CMake are fresh enough:
* You can use [`nvm`](https://github.com/nvm-sh/nvm) or [Nodesource's apt repositories](https://github.com/nodesource/distributions) to install fresh Node
* The simpliest way to install fresh CMake is to download a `.tar.gz` from [CMake download page](https://cmake.org/download/),
Expand Down
11 changes: 8 additions & 3 deletions build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@ export CMAKE_CXX_COMPILER="$CXX"
export CMAKE_MAKE_PROGRAM="ninja"

# Some build dependencies require some strange stuff.
# For example, Chakra needs Python 2 installed with `python` name.
# Some other deps won't work if we can't call clang without exact version.
# It's better to make compatibility aliases than breaking main system's root.
export SKYMP_COMPAT_BIN="$PWD/build/skymp_compat/bin"
Expand All @@ -37,13 +36,13 @@ fi

if [ ! -d "$SKYMP_COMPAT_BIN" ]; then
mkdir -pv "$SKYMP_COMPAT_BIN"
ln -s "`which python2`" "$SKYMP_COMPAT_BIN/python"
ln -s "$CC" "$SKYMP_COMPAT_BIN/clang"
ln -s "$CXX" "$SKYMP_COMPAT_BIN/clang++"

echo "Set up compatibility path for build."
fi

# TODO reverse the order or use [[ ]] ?
if [ "$1" = "--configure" ]; then
shift && \
cd build && \
Expand All @@ -53,12 +52,18 @@ elif [ "$1" = "--build" ]; then
cd build && \
exec cmake --build . "$@"
elif [ "$1" = "--clean" ]; then
eecho "NOTE: --clean was deprecated, please use --clean-cpp or --clean-node"
eecho "Proceeding with cleaning cpp build data"
exec rm -rf build/
elif [ "$1" = "--clean-cpp" ]; then
exec rm -rf build/
elif [ "$1" = "--clean-node" ]; then
echo not implemented yet, TODO delete node_modules dirs
else
eecho "Usage:"
eecho " ./build.sh --configure <cmake args...>"
eecho "OR"
eecho " ./build.sh --build <cmake args...>"
eecho "OR"
eecho " ./build.sh --clean"
eecho " ./build.sh --clean-<cpp|node>"
fi
2 changes: 1 addition & 1 deletion docs/docs_cmake_workflow.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

Our build system is CMake-based. This document describes some caveats of our CMake code and guides you in making changes in CMake parts of the codebase.

When you switch between commits, you should run `cmake .. ` in the `build` directory. This action is called "CMake re-generation".
When you switch between commits, you should run `cmake ..` in the `build` directory. This action is called "CMake re-generation".

Only `Visual Studio 16 2019` generator is supported on Windows.

Expand Down
4 changes: 2 additions & 2 deletions docs/docs_deploy.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
A GitHub actions job is configured for deploying server from a git branch.
This guide shows how to set it up.

## GitHub prereqeusties
## GitHub prerequisites

* You should own the repository you want to deploy from. Fork of our main repo
[skyrim-multiplayer/skymp](https://github.com/skyrim-multiplayer/skymp) should work.
Expand All @@ -22,7 +22,7 @@ This guide shows how to set it up.
to the runner when a workflow is triggered from a forked repository.


## Server prereqeusties
## Server prerequisites

* Ubuntu 22.04 (other distros should also work, but not tested)
* Accessible from the Internet with open ports
Expand Down
Loading