Skip to content

Commit

Permalink
documentation: add new linux build instructions
Browse files Browse the repository at this point in the history
- building with luajit and the new dependencies
  • Loading branch information
ihm-tswow authored Aug 9, 2021
1 parent 330c323 commit 8386c9d
Showing 1 changed file with 40 additions and 6 deletions.
46 changes: 40 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -95,27 +95,61 @@ directory containing noggit.exe, i.e. `CMAKE_INSTALL_PREFIX` configured.
* If using scripting, you will also need to copy `<Lua-install>/src/lua51.dll` to `CMAKE_INSTALL_PREFIX`

## Linux ##

These instructions assume a working directory `<Linux-Build>`, for example `/home/myuser/`

### Dependencies ###

On **Ubuntu** you can install the building requirements using:

```bash
sudo apt install freeglut3-dev libboost-all-dev qt5-default libstorm-dev
sudo apt install freeglut3-dev libboost-all-dev qt5-default libsdl2-dev libbz2-dev
```

### LuaJIT ###

From `<Linux-Build>`, build luajit using:
```bash
git clone https://luajit.org/git/luajit.git
cd luajit
make
cd ..
```

`<Linux-Build>/luajit` should now exist.

### Build Noggit ###

From `<Linux-Build>`, clone Noggit3 (change repo as needed):
```bash
git clone https://github.com/wowdev/noggit3
```

Compile and build using:
`<Linux-Build>/noggit3` should now exist.

From `<Linux-Build>`, compile and build using the following commands.
Note that `<Linux-Build>` should be written as the **full** path in the commands below.
For example: `cmake -DLUA_LIBRARIES=/home/myuser/luajit/src/libluajit.so -DLUA_INCLUDE_DIR=/home/myuser/luajit/src ../noggit3`

```bash
mkdir build
cd build
cmake ..
cmake -DLUA_LIBRARIES=<Linux-Build>/luajit/src/libluajit.so -DLUA_INCLUDE_DIR=<Linux-Build>/luajit/src ../noggit3
make -j $(nproc)
```

Instead of `make -j $(nproc)` you may want to pick a bigger number than
`$(nproc)`, e.g. the number of `CPU cores * 1.5`.

If the build pass correctly without errors, you can go into build/bin/
and run noggit. Note that `make install` will probably work but is not
tested, and nobody has built distributable packages in years.
From `<Linux-Build>/build`, if the build pass correctly without errors, you can finish the installation using:
```bash
cp -r ../noggit3/scripts ./bin/scripts
cp ../luajit/src/libluajit.a ./bin/libluajit.a
```

You can now go into `<Linux-Build>/build/bin` and run noggit.

Note that `make install` will probably not work.

# Building the Scripting documentation #
To generate the scripting API documentation, install any new version of Node.js and run:
Expand Down

2 comments on commit 8386c9d

@bloerwald
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copying the .a file won’t do anything at all. You probably wanted to suggest copying the .so? Even that sounds dubious.

@ihm-tswow
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

rofl, guess I accidentally did the system install and it just incidentally worked. fixing tonight

Please sign in to comment.