Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update build instructions and add missing config option #185

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 19 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,31 +16,46 @@ 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 <https://rustup.rs>)
2. install the API server binary with

```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))
Expand Down
3 changes: 2 additions & 1 deletion paradox.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Loading