From 499adb05386dfdc9e4b239a309eb9259c8b75fac Mon Sep 17 00:00:00 2001 From: Darryl Pogue Date: Mon, 5 Aug 2024 17:40:48 -0700 Subject: [PATCH] Update building/running instructions for macOS --- building.html | 56 ++++++++++++++++++++++++++++++++++++++++++--------- running.html | 28 +++++++++++++++----------- 2 files changed, 63 insertions(+), 21 deletions(-) diff --git a/building.html b/building.html index 8a13d59f85..facc05528d 100644 --- a/building.html +++ b/building.html @@ -27,8 +27,8 @@

Plasma

Building

-

Currently, the complete game client can only be built for Windows, using Visual Studio.

-

By default these steps will compile a client targeting your machine architecture. It is possible to build a 64-bit game client, but only the 32-bit (x86) client is officially supported.

+

Currently, the complete game client can only be built for Windows (using Visual Studio) and macOS (using Xcode). Several tools can be built for Linux, but not a complete game client.

+

By default these steps will compile a client targeting your machine architecture. It is possible to build a 64-bit game client, but only the 32-bit (x86) Windows client is officially supported.

Library Dependencies

@@ -151,11 +151,49 @@

Building on Windows

-

Building on macOS & Linux

+

Building on macOS

-

Linux and macOS are not officially supported targets, and the game client does not compile. However, several of the tools can be built and run.

+

Compiling on macOS requires macOS version 10.14 or newer, and the Xcode build system. Xcode is available as a free download from the App Store.

-

You will need to ensure all the required dependencies are available. On macOS, a Homebrew bundle file is included in the repository, which can be installed by running brew bundle. You can also use vcpkg on these platforms for automatically managing dependencies.

+

We strongly encourage using vcpkg to automatically build dependencies, however this requires some tools be manually installed in advance. The required tools are CMake, nasm, and pkg-config, and can be installed using common package managers such as Homebrew or MacPorts.

+ +

For Homebrew users who wish to manage all dependencies, a Homebrew bundle file is included in the repository, which can be installed by running brew bundle after cloning the project.

+ +
    +
  1. +

    Clone the repository from GitHub, including all submodules, using a git client. On the command line, this can be done by executing the following:
    + git clone --recurse-submodules https://github.com/H-uru/Plasma.git

    +
  2. + +
  3. +

    In the folder where you cloned the repository, run CMake to create a build folder:
    + cmake -G Xcode -DUSE_VCPKG=ON -B build -S .

    +

    This assumes you wish to use vcpkg to build dependencies. Leave off the USE_VCPKG flag to manage dependencies yourself.

    +
  4. + +
  5. +

    Compile the project with the following command:
    + cmake -B build --config RelWithDebInfo

    +
  6. + +
  7. +

    Install the resulting tools with the following command:
    + cmake -B build --target install --config RelWithDebInfo

    +
  8. + +
  9. +

    The client will be built and installed into the build/install/client subfolder of where you cloned the repo.

    +

    The client output folder will be referred to as your “MOUL-OS” folder in the instructions on Running Plasma.

    +
  10. +
+ +

You can also open the project in the Xcode IDE by opening the build/Plasma.xcodeproj file.

+ +

Building on Linux

+ +

Linux and other UNIX-like operating systems are not officially supported targets, and the game client does not compile. However, several of the tools can be built and run.

+ +

You will need to ensure all the required dependencies are available. You can also use vcpkg on these platforms for automatically managing dependencies.

  1. @@ -165,19 +203,19 @@

    Building on macOS & Linux

  2. In the folder where you cloned the repository, run CMake to create a build folder:
    - cmake --builddir build -S .

    + cmake -DCMAKE_BUILD_TYPE=RelWithDebInfo -B build -S .

    If you want to use vcpkg to automatically build dependencies, enable the USE_VCPKG option:
    - cmake -D USE_VCPKG=ON --builddir build -S .

    + cmake -DCMAKE_BUILD_TYPE=RelWithDebInfo -DUSE_VCPKG=ON -B build -S .

  3. Compile the project with the following command:
    - cmake --builddir build --config RelWithDebInfo

    + cmake -B build

  4. Install the resulting tools with the following command:
    - cmake --install build --config RelWithDebInfo

    + cmake -B build --target install

  5. diff --git a/running.html b/running.html index 4e93bd064d..91a4f5a78a 100644 --- a/running.html +++ b/running.html @@ -35,14 +35,17 @@

    Running

    You should never use a custom-built client with servers that are not explicitly intended for testing. Newer features in the client code might be incompatible with those servers and could break the game for other players or result in permanent player data corruption.

    - -

    Running on Windows

    +

    Before running the client, you will need to do the following:

    1. Copy the folders avi, dat, and sfx from your existing MOULa installation to the MOUL-OS folder.

    2. Get the appropriate server.ini file for the server you will be connecting to.

    3. +
    +

    Running on Windows

    + +
    1. Create a shortcut in the MOUL-OS folder to the compiled plClient.exe.

    2. Edit the shortcut’s properties, and after the final quotation mark in the Target field, add /LocalData.
      Also, change the Start in field to the path of your MOUL-OS folder.

    3. @@ -55,11 +58,7 @@

      Running in Visual Studio (for debugging)

      Follow these instructions if you wish to be able to debug using a single content folder from inside Visual Studio.

      -
        -
      1. Copy the folders avi, dat, and sfx from your existing MOULa installation to the MOUL-OS folder.

      2. - -
      3. Get the appropriate server.ini file for the server you will be connecting to.

      4. - +
        1. Open the Plasma folder in Visual Studio.

        2. Switch to CMake Targets View in the Solution Explorer.

        3. @@ -72,14 +71,19 @@

          Running in Visual Studio (for debugging)

        -