Skip to content

Commit

Permalink
adjust docs
Browse files Browse the repository at this point in the history
  • Loading branch information
Xavrax committed Jan 3, 2024
1 parent 8798c32 commit cffefab
Showing 1 changed file with 11 additions and 31 deletions.
42 changes: 11 additions & 31 deletions unreal/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,45 +7,25 @@ Our C-core SDK can be used together with [Unreal Engine](https://www.unrealengin
1. Clone this repository to the `<UnrealProject>/Source/` directory. We recommend that you place it inside the `ThirdParty` folder (create it, if necessary).

2. Compile the [desired option](https://www.pubnub.com/docs/sdks/c-core#hello-world) of the SDK. You can do it in the SDK directory like so:

- POSIX:

```sh
make -C <option> -f <architecture>.mk pubnub_<implementation>.a
```

- Windows:

```sh
nmake -f windows.mk
```

- Windows Universal Platform:
```sh
cmake . && make
```

```sh
nmake -f windows/uwp.mk
```

Windows builds everything at once. We are aware that our build system needs some love.
C-core offers some customization flags (e.g. shared library or using openssl). You can configure that as follow:

For example, to build the OpenSSL option, run the following script:
```sh
cmake . -DSHARED=ON -DOPENSSL=ON -DOPENSSL_ROOT_DIR={unreal engine location}/Engine/Source/ThirdParty/openssl/1.1.1/
```

```sh
make -C openssl -f posix.mk pubnub_sync.a
```

:warning: If you choose `openssl`, ensure that your OpenSSL library headers match the Unreal ones!

3. Adjust `PubNubModule/PubNubModule.Build.cs` with selected options by changing `option`, `architecture` and `implementation` with the same values you used for compilation.

> This is a temporary solution. We are aware that our build system needs some love.
3. Adjust `PubNubModule/PubNubModule.Build.cs` with selected options by changing `OpenSsl`, `StaticLink` and `LibPath` with the same values you used for compilation.

For example:

```csharp
private readonly string Option = "openssl"; // posix, windows, openssl
private readonly string Architecture = "posix"; // posix, windows
private readonly string string Implementation = "sync"; // sync, callback
private bool OpenSsl = false;
private bool StaticLink = false;
private string LibPath = "";
```

4. Finally, import the module into your project as follows:
Expand Down

0 comments on commit cffefab

Please sign in to comment.