1
Fork 0
mirror of https://github.com/redstrate/Kawari.git synced 2025-04-22 07:27:44 +00:00

Build with Oodle on the CI

This makes it possible to use Kawari easily without compilation. You
still need to acquire Oodle yourself since we build with the shared
library version of Oodle.

The USAGE instructions is modified accordingly.
This commit is contained in:
Joshua Goins 2025-03-22 20:22:48 -04:00
parent 5214d757e8
commit d6137b62d6
3 changed files with 42 additions and 7 deletions

View file

@ -30,22 +30,49 @@ jobs:
~/.cargo/git/db/
target/
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
- uses: robinraju/release-downloader@v1
if: runner.os == 'Linux'
with:
repository: 'WorkingRobot/OodleUE'
fileName: 'gcc.zip'
latest: true
extract: true
- if: runner.os == 'Linux'
run: |
mkdir oodle
cp lib/Release/liboodle-network-shared.so oodle/
- uses: robinraju/release-downloader@v1
if: runner.os == 'Windows'
with:
repository: 'WorkingRobot/OodleUE'
fileName: 'clang-cl.zip'
latest: true
extract: true
- if: runner.os == 'Windows'
run: |
mkdir oodle
cp ar/Release/oodle-network-shared.lib oodle/
- name: Build
run: cargo build --release --verbose --no-default-features
run: cargo build --release --verbose
- name: Run clippy
run: cargo clippy --no-default-features
run: cargo clippy
- name: Run tests
run: cargo test --verbose --no-default-features
run: cargo test --verbose
- name: Archive artifacts
uses: actions/upload-artifact@v4
with:
name: ${{ runner.os }}-package
path: |
LICENSE
USAGE.md
README.md
Caddyfile
target/release/kawari-admin*
target/release/kawari-frontier*
target/release/kawari-lobby*
target/release/kawari-login*
target/release/kawari-patch*
target/release/kawari-web*
target/release/kawari-world*
!target/release/*.d
if-no-files-found: error

View file

@ -9,13 +9,22 @@ Kawari is designed to be easy to run, with the goal of being accessible to anyon
**Kawari requires that you have an active subscription**, and are in possession of a legitimate copy of the game. Kawari is not related or affiliated to SqEx, and by using it you are in explicit violation of the User Agreement (_Limitation 2.4_.)
## Prerequisites
* Windows or Linux
* Copy of the game updated to the supported game version (see README)
* Oodle Network Compression (can be obtained from [here](https://github.com/WorkingRobot/OodleUE), place static library (`.a`) into `oodle` directory)
* Oodle Network Compression (can be obtained from [here](https://github.com/WorkingRobot/OodleUE)
## Download Artifact
Windows and Linux artifacts are built on every commit, under [Github Actions](https://github.com/redstrate/Kawari/actions). You will have to download the Oodle Network `.dll` (Windows) or `.so` (Linux) yourself however.
## Building
Build Kawari with `cargo build`. If you're building with Oodle support, place the `.so` (Linux) or `.lib` (Windows) into the `oodle` directory when building. The library must be named "oodle-network-shared".
## Setup
Build Kawari with `cargo build`. Afterwards, create a `config.yaml` in the current directory. Currently the minimal config you need to run most services looks like this:
Afterwards, create a `config.yaml` in the current directory. Currently the minimal config you need to run most services looks like this:
```yaml
game_location: pathtogamedir

View file

@ -1,8 +1,7 @@
use std::{ffi::c_void, ptr::null};
// TODO: add support for windows?
#[cfg(feature = "oodle")]
#[link(name = "oo2netlinux64")]
#[link(name = "oodle-network-shared")]
unsafe extern "C" {
pub fn OodleNetwork1TCP_State_Size() -> isize;
pub fn OodleNetwork1_Shared_Size(htbits: i32) -> isize;