mirror of
https://github.com/CPunch/Laika.git
synced 2024-11-25 05:50:15 +00:00
Created Compiling (markdown)
parent
3497c9610e
commit
0693e7319d
41
Compiling.md
Normal file
41
Compiling.md
Normal file
@ -0,0 +1,41 @@
|
||||
Laika uses CMake as it's build system and provides several definitions for your to mess around with.
|
||||
|
||||
| Definition | Description | Example |
|
||||
| ----------------- | ------------------------------------- | --------------------------------------------------------------------------------- |
|
||||
| LAIKA_PUBKEY | Sets CNC's public key | -DLAIKA_PUBKEY=997d026d1c65deb6c30468525132be4ea44116d6f194c142347b67ee73d18814 |
|
||||
| LAIKA_PRIVKEY | Sets CNC's private key | -DLAIKA_PRIVKEY=1dbd33962f1e170d1e745c6d3e19175049b5616822fac2fa3535d7477957a841 |
|
||||
| LAIKA_CNC_IP | Sets CNC's public ip | -DLAIKA_CNC_IP=127.0.0.1 |
|
||||
| LAIKA_CNC_PORT | Sets CNC's bind()'d port | -DLAIKA_CNC_PORT=13337 |
|
||||
| LAIKA_PERSISTENCE | Enables persistence for LaikaBot | -DLAIKA_PERSISTENCE=On |
|
||||
| LAIKA_OBFUSCATE | Enables string obfuscation for LaikaBot | -DLAIKA_OBFUSCATE=On |
|
||||
> these are all passed to `cmake -B <dir>`
|
||||
|
||||
### Linux
|
||||
|
||||
Simple run cmake to build the makefiles with your configuration.
|
||||
|
||||
```sh
|
||||
$ cmake -B build -DLAIKA_PERSISTENCE=On
|
||||
```
|
||||
|
||||
Now compile the project, the binaries will be in `./bin`
|
||||
|
||||
```sh
|
||||
$ cmake --build build
|
||||
```
|
||||
|
||||
### Windows
|
||||
|
||||
Windows also provides a cmake interface to generate .sln files for Visual Studio (if that's your thing). Just generate the .sln with
|
||||
|
||||
```batch
|
||||
> cmake -B winBuild -DLAIKA_PERSISTENCE=On -DLAIKA_OBFUSCATE=On -DCMAKE_BUILD_TYPE=MinSizeRel
|
||||
```
|
||||
|
||||
Now you can either open the .sln in `.\winBuild` and compile suing Visual Studio, or directly compile from the command line using:
|
||||
|
||||
```batch
|
||||
> cmake --build winBuild --config MinSizeRel
|
||||
```
|
||||
|
||||
Output binaries will be in `.\winbin`
|
Loading…
Reference in New Issue
Block a user