Skip to content

Repository files navigation

グロートピア (Gurotopia) : Lightweight & Maintained GTPS written in C/C++

Dockerfile


image

1. Requirements

2. Setup MSYS2

  • Locate your MSYS2 folder at C:\msys64, open ucrt64.exe, and run the following command:

    pacman -S --needed mingw-w64-ucrt-x86_64-{gcc,openssl} make

3. Compile

  • Open the project folder in Visual Studio Code.
  • Press Ctrl + Shift + B to start the build process.

4. Run

  • After compiling, press F5 to run the server!

Linux

1. Install Dependencies

  • Enter command associated with your distribution into the terminal to install nessesary tools.

    Arch

    sudo pacman -S base-devel openssl mariadb-libs

    Debian Ubuntu

    sudo apt-get update && sudo apt-get install build-essential libssl-dev libmariadb-dev

2. Compile

  • Navigate to the project's root directory in your terminal and run the make command:

    make -j$(nproc)

3. Run

  • Execute the compiled binary located in the main directory:

    ./main.out

macOS

Note

macOS builds are only tested on Intel (x86_64). Apple Silicon is not tested yet. include/enet/lib/libenet_macos.a is a universal (x86_64 + arm64) archive, so it should still link on Apple Silicon.

1. Install Dependencies

  • Install Homebrew or MacPorts, then run the matching command. Mixing is fine: MacPorts GCC with Homebrew OpenSSL and MariaDB uses the Homebrew compile command.

    Homebrew

    brew install gcc make openssl@3 mariadb-connector-c

    MacPorts

    sudo port install gcc15 gmake openssl3 mariadb-11.4

2. Compile

  • Apple's SDK does not include OpenSSL headers. Pass Homebrew or MacPorts paths on the make line. A plain make fails with openssl/ssl.h: No such file or directory. Use -lenet_macos; the default -lenet is a Linux library.

    Homebrew

    make -j$(sysctl -n hw.ncpu) \
      includes="-Iinclude -Ibuild/include -I$(brew --prefix openssl@3)/include" \
      libraries="-L$(brew --prefix openssl@3)/lib -L$(brew --prefix mariadb-connector-c)/lib -L./include/enet/lib -L./include/mysql/lib -lssl -lcrypto -lmariadb -lenet_macos"

    MacPorts

    gmake -j$(sysctl -n hw.ncpu) \
      includes="-Iinclude -Ibuild/include -I/opt/local/libexec/openssl3/include" \
      libraries="-L/opt/local/libexec/openssl3/lib -L/opt/local/lib/mariadb-11.4/mysql -L./include/enet/lib -L./include/mysql/lib -lssl -lcrypto -lmariadb -lenet_macos"

3. Run

  • Execute the compiled binary:

    ./main.out

Local Server Configuration

Note

To connect to your local server, you must modify your system's hosts file.

  • Windows: C:\Windows\System32\drivers\etc\hosts
  • Linux/macOS: /etc/hosts
127.0.0.1 www.growtopia1.com
127.0.0.1 www.growtopia2.com

About

グロートピア | Growtopia Private Server, GTPS

Topics

Resources

Stars

56 stars

Watchers

8 watching

Forks

Used by

Contributors

Languages