1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-11-29 23:07:48 +02:00

Enable rule to enforce specifying language for code blocks

This commit is contained in:
Ivan Savenko
2024-12-05 20:39:29 +00:00
parent 7543635847
commit 53d4afdae5
16 changed files with 41 additions and 44 deletions

View File

@@ -22,7 +22,7 @@ The following instructions apply to **v1.2 and later**. For earlier versions the
Clone <https://github.com/vcmi/vcmi> with submodules. Example for command line:
```
```sh
git clone --recurse-submodules https://github.com/vcmi/vcmi.git
```
@@ -42,7 +42,7 @@ Conan must be aware of the NDK location when you execute `conan install`. There'
- the easiest is to download NDK from Conan (option 1 in the docs), then all the magic happens automatically. On the step where you need to replace **PROFILE**, choose *android-**X**-ndk* where ***X*** is either `32` or `64`.
- to use an already installed NDK, you can simply pass it on the command line to `conan install`: (note that this will work only when consuming the pre-built binaries)
```
```sh
conan install -c tools.android:ndk_path=/path/to/ndk ...
```

View File

@@ -70,7 +70,7 @@ And put it into build directory. Then run `nix-shell` before running any build c
We recommend the following directory structure:
```
```text
.
├── vcmi -> contains sources and is under git control
└── build -> contains build output, makefiles, object files,...
@@ -97,7 +97,7 @@ See [CMake](CMake.md) for a list of options
### Trigger build
```
```sh
cmake --build . -j8
```

View File

@@ -12,7 +12,7 @@
Clone <https://github.com/vcmi/vcmi> with submodules. Example for command line:
```
```sh
git clone --recurse-submodules https://github.com/vcmi/vcmi.git
```
@@ -36,9 +36,8 @@ There're a few [CMake presets](https://cmake.org/cmake/help/latest/manual/cmake-
Open terminal and `cd` to the directory with source code. Configuration example for device with Conan:
```
cmake --preset ios-device-conan \
-D BUNDLE_IDENTIFIER_PREFIX=com.MY-NAME
```sh
cmake --preset ios-device-conan -D BUNDLE_IDENTIFIER_PREFIX=com.MY-NAME
```
By default build directory containing Xcode project will appear at `../build-ios-device-conan`, but you can change it with `-B` option.
@@ -61,7 +60,7 @@ You must also install game files, see [Installation on iOS](../players/Installat
### From command line
```
```sh
cmake --build <path to build directory> --target vcmiclient -- -quiet
```

View File

@@ -15,7 +15,7 @@
Clone <https://github.com/vcmi/vcmi> with submodules. Example for command line:
```
```sh
git clone --recurse-submodules https://github.com/vcmi/vcmi.git
```

View File

@@ -4,12 +4,12 @@
* Enables debug info and disables optimizations
* `-D CMAKE_EXPORT_COMPILE_COMMANDS=ON`
* Creates `compile_commands.json` for [clangd](https://clangd.llvm.org/) language server. For clangd to find the JSON, create a file named `.clangd` with this content
```
```text
CompileFlags:
CompilationDatabase: build
```
and place it here:
```
```text
.
├── vcmi -> contains sources and is under git control
├── build -> contains build output, makefiles, object files,...

View File

@@ -126,7 +126,7 @@ In these examples only the minimum required amount of options is passed to `cmak
### Use our prebuilt binaries to build for macOS x86_64 with Xcode
```
```sh
conan install . \
--install-folder=conan-generated \
--no-imports \
@@ -143,7 +143,7 @@ cmake -S . -B build -G Xcode \
If you also want to build the missing binaries from source, use `--build=missing` instead of `--build=never`.
```
```sh
conan install . \
--install-folder=~/my-dir \
--no-imports \
@@ -158,7 +158,7 @@ cmake -S . -B build \
### Use our prebuilt binaries to build for iOS arm64 device with custom preset
```
```sh
conan install . \
--install-folder=~/my-dir \
--no-imports \
@@ -205,7 +205,7 @@ ubuntu
Next steps are identical both in WSL and in real Ubuntu 22.04
```bash
```sh
sudo pip3 install conan
sudo apt install cmake build-essential
sed -i 's/x86_64-w64-mingw32/i686-w64-mingw32/g' CI/mingw-ubuntu/before-install.sh

View File

@@ -65,7 +65,7 @@ TODO **In near future Lua API may change drastically several times. Information
#### Low level events API
``` Lua
```lua
-- Each event type must be loaded first
local PlayerGotTurn = require("events.PlayerGotTurn")

View File

@@ -6,7 +6,7 @@ For implementation details see files located at `lib/network` directory.
VCMI uses connection using TCP to communicate with server, even in single-player games. However, even though TCP is stream-based protocol, VCMI uses atomic messages for communication. Each message is a serialized stream of bytes, preceded by 4-byte message size:
```
```cpp
int32_t messageSize;
byte messagePayload[messageSize];
```
@@ -37,7 +37,7 @@ For implementation details see:
In case of global lobby, message payload uses plaintext json format - utf-8 encoded string:
```
```cpp
int32_t messageSize;
char jsonString[messageSize];
```