diff --git a/README.md b/README.md index 62036ef..08e1837 100644 --- a/README.md +++ b/README.md @@ -16,7 +16,13 @@ This project was generated with [Angular CLI](https://github.com/angular/angular Generally, LU-Explorer needs a datasource, which is provided by the [Paradox Server](https://github.com/xiphoseer/lu-res-api-server). That server provides the data from the game database to the web interface, which makes it a core component of this app. -This needs a `paradox.toml` config file in the working directory – a minimal example is provided [here](https://github.com/Xiphoseer/lu-explorer/blob/main/paradox.toml). The most important part is to point the `explorer_spa` key to the `docs` folder in this repo and the `cdclient` and `locale` key to a copy of `CDClient.fdb` and `locale.xml` respectively. +This needs a `paradox.toml` config file in the working directory – a minimal example is provided [here](/paradox.toml). The most important part is to point the `explorer_spa` key to the `dist` folder in this repo, which is already done by default, alongside setting up a few other settings: +Next you will want to change the config options `res`, `cdclient`, `locale`, `sqlite` and `versions` to point at the correct locations. +- `res` will need to point at the `res` directory of a LEGO Universe client `/path/to/LEGO/Universe/client/res` +- `cdclient` will need to point to the file `cdclient.fdb` which is located in your LEGO Universe client in `/path/to/LEGO/Universe/client/res/` +- `locale` will need to point to the file `locale.xml` which is located in your LEGO Universe client in `/path/to/LEGO/Universe/client/locale/` +- `sqlite` will need to point to a sqlite representation of `cdclient.fdb` which can be done using [fdb to sqlite by Majo](https://fdb.lu-dev.net/) +- `versions` is not required and must be removed from [paradox.toml](/paradox.toml) if you are using an unpacked client. If you are using a packed client, this should point to the versions folder `/path/to/LEGO/Universe/versions/` 1. install `npm` and `cargo` (via ) 2. install the API server binary with @@ -24,23 +30,32 @@ This needs a `paradox.toml` config file in the working directory – a minimal e ```shell $ cargo install --git https://github.com/Xiphoseer/lu-res-api-server.git --branch main ``` -3. Then, clone this repo and create `lu-res` and `client` folders next to it +3. Then, clone this repo and create `lu-res` folder next to it ```shell $ git clone https://github.com/Xiphoseer/lu-explorer.git - $ mkdir lu-res client + $ mkdir lu-res ``` -4. Put at least `locale/locale.xml` and `res/cdclient.fdb` from an LU client into this `client` folder +4. Ensure `res`, `cdclient`, `locale`, `sqlite` and `versions` are pointing at the correct folders/files 5. You can now build the `lu-explorer` web-app continuously with ```shell $ cd lu-explorer $ npm install $ ng build --watch ``` + Note: you will need to use the following if ng does not work + ```shell + $ npm run ng build --watch + ``` 6. Finally, run the API server, which will also serve the web-app ```shell $ RUST_LOG=info paradox-server ``` + If on PowerShell or Command Prompt, the environment variable will need to be set separately through the `set` call. + ```shell + $ set RUST_LOG=info + $ paradox-server + ``` For now, you need to restart that server whenever you change the `lu-explorer` source. ([Issue #1](https://github.com/Xiphoseer/lu-res-api-server/issues/1)) diff --git a/paradox.toml b/paradox.toml index d40350f..e60ffd5 100644 --- a/paradox.toml +++ b/paradox.toml @@ -10,4 +10,5 @@ lu_res_cache = "../lu-res" lu_json_cache = "../lu-json" cdclient = "../client/res/cdclient.fdb" locale = "../client/locale/locale.xml" -explorer_spa = "docs" +explorer_spa = "dist" +sqlite = "../client/res/cdclient.sqlite"