Commit graph

146 commits

Author SHA1 Message Date
meloƞ a822fb47a0 fix up readme on building with MSVC (Visual Studio) 2024-05-01 18:44:22 +02:00
meloƞ 69692d7fd1 update readme on building with MSVC on windows 2024-04-08 20:54:26 +02:00
integer2bit 707240ed37 add windows installation with scoop 2024-03-27 10:25:45 +08:00
dobrykafe b9a0d14619 dont assume number of threads when using make 2024-02-02 18:21:52 +01:00
MrBlubberBut e7f28f7881
Update README.md
Clarify the build process :)
2023-12-26 13:36:40 -05:00
axel 9fc63582e1 Changes python -> python3 for Debian dependency 2023-11-08 12:26:09 +01:00
ChillerDragon 9de089b1a5 Remove note about it being neovim specific 2023-03-10 07:57:06 +01:00
ChillerDragon ea25fd94e3 Document vim and neovim syntax install 2023-03-09 17:00:30 +01:00
Dennis Felsing 4e86bf01b9 Describe some more cmake flags 2023-01-03 14:48:29 +01:00
Dennis Felsing b1dfe6f9a0 Instruct to use rustup/rustc-mozilla on older Debian/Ubuntu (fixes #6145) 2022-12-16 18:09:38 +01:00
heinrich5991 80f679d8a7 Remove duplicate rust mention from README Arch Linux packages
Fixes #6127.
2022-12-12 22:13:42 +01:00
Rafael Fontenelle d10c44805f
Replace cargo with rust for Arch in README
'rust' is the name of the package that provides cargo tool. Installing 'cargo' with work because rust is set with provides=cargo, but one might get confused for not finding a 'cargo' package installed in their system
2022-12-12 10:54:32 -03:00
Paul 352faa50eb
add cargo 2022-11-19 23:05:45 +02:00
def 07be2a7663 Add instructions for Rust on Linux/macOS 2022-11-06 23:17:20 +01:00
bors[bot] b21ba35225
Merge #5599
5599: Add support for Rust code in DDNet r=def- a=heinrich5991

The glue is done using the [cxx crate](https://cxx.rs/) on the Rust side.

As a proof-of-concept, only a small console command (`rust_version`) printing the currently used Rust version was added.

You can generate and open the Rust documentation using `DDNET_TEST_NO_LINK=1 cargo doc --open`.

You can run the Rust tests using `cmake --build <build dir> --target run_rust_tests`, they're automatically included in the `run_tests` target as well.

Rust tests don't work on Windows in debug mode on Windows because Rust cannot currently link with the debug version of the C stdlib on Windows: https://github.com/rust-lang/rust/issues/39016.

---

The stuff in `src/rust-bridge` is generated using
```
cxxbridge src/engine/shared/rust_version.rs --output src/rust-bridge/engine/shared/rust_version.cpp --output src/rust-bridge/engine/shared/rust_version.h
cxxbridge src/engine/console.rs --output src/rust-bridge/cpp/console.cpp --output src/rust-bridge/cpp/console.h
```

Co-authored-by: heinrich5991 <heinrich5991@gmail.com>
2022-11-06 21:40:48 +00:00
Edgar b67dcdc1e2 add vim syntax files for config files 2022-11-04 16:54:05 +01:00
Rafael Fontenelle cd14660307 Fix misspellings 2022-10-25 13:51:56 -03:00
Rafael Fontenelle 7eb1c656e8
Tell the default value in README for flags 2022-10-25 09:11:14 -03:00
heinrich5991 dcd76fd3e1 Add support for Rust code in DDNet
The glue is done using the [cxx crate](https://cxx.rs/) on the Rust
side.

As a proof-of-concept, only a small console command (`rust_version`)
printing the currently used Rust version was added.

You can generate and open the Rust documentation using
`DDNET_TEST_NO_LINK=1 cargo doc --open`.

You can run the Rust tests using `cmake --build <build dir> --target
run_rust_tests`, they're automatically included in the `run_tests`
target as well.

Rust tests don't work on Windows in debug mode on Windows because Rust
cannot currently link with the debug version of the C stdlib on Windows:
https://github.com/rust-lang/rust/issues/39016.

---

The stuff in `src/rust-bridge` is generated using
```
cxxbridge src/engine/shared/rust_version.rs --output src/rust-bridge/engine/shared/rust_version.cpp --output src/rust-bridge/engine/shared/rust_version.h
cxxbridge src/engine/console.rs --output src/rust-bridge/cpp/console.cpp --output src/rust-bridge/cpp/console.h
```
2022-10-19 23:46:06 +02:00
heinrich5991 38a07a2494 Sort dependencies alphabetically in README.md 2022-10-19 22:27:20 +02:00
Robert Müller 78a21aa6cd Add line break in README to fix code block
Code blocks marked with indentation only work when there is an empty line before them.
2022-10-11 17:41:47 +02:00
heinrich5991 edbbd1cf15 Add even better blame instructions 2022-10-11 14:09:24 +02:00
Paul 0e5735d98d
Fedora deps
there is no `libx264-devel` in fedora repos, its `x264-devel`
Also using `dnf` is better, i guess...
2022-10-11 09:55:25 +00:00
bors[bot] c2917d179d
Merge #5929
5929: add gentoo to readme r=def- a=edg-l

<!-- What is the motivation for the changes of this pull request? -->

<!-- Note that builds and other checks will be run for your change. Don't feel intimidated by failures in some of the checks. If you can't resolve them yourself, experienced devs can also resolve them before merging your pull request. -->

## Checklist

- [ ] Tested the change ingame
- [ ] Provided screenshots if it is a visual change
- [ ] Tested in combination with possibly related configuration options
- [ ] Written a unit test (especially base/) or added coverage to integration test
- [ ] Considered possible null pointers and out of bounds array indexing
- [ ] Changed no physics that affect existing maps
- [ ] Tested the change with [ASan+UBSan or valgrind's memcheck](https://github.com/ddnet/ddnet/#using-addresssanitizer--undefinedbehavioursanitizer-or-valgrinds-memcheck) (optional)


Co-authored-by: Edgar Luque <git@edgarluque.com>
2022-10-11 08:15:54 +00:00
Edgar 0bdc749e86 add gentoo to readme 2022-10-11 08:51:11 +02:00
Edgar 790b33d98c add instructions for better git blame on readme 2022-10-11 08:37:47 +02:00
Dennis Felsing 6b331e6e1f Add note in README about how to convert shallow to full clone 2022-10-10 17:36:25 +02:00
def f2c10eed6d Try code coverage (fixes #5873) 2022-09-25 13:21:06 +02:00
def c479230d71 Use new ddnet.org domain 2022-08-30 10:09:06 +02:00
heinrich5991 d29b22a96e Be upfront about completeness of the autogenerated code documentation 2022-06-25 02:21:54 +02:00
Dennis Felsing a6fa123532 Mention code browser in readme 2022-06-25 01:30:06 +02:00
Dennis Felsing 4c69912dd8 pnglite -> libpng in readme 2022-06-22 17:58:22 +02:00
bors[bot] b75289df35
Merge #4829 #5343 #5465
4829: Added map_replace_area tool r=def- a=sctt

Motivation:
sometimes mappers need to copy a certain area from a map to another (but also to a different position of the same map).
that's very time consuming on complex maps, as tiles and quads layers have to be manually copied one by one.

map_replace_area is designed to automatically replace all the tiles and quads from a specific area to another.
`Usage: map_replace_area <from_map> <from_x> <from_y> <to_map> <to_x> <to_y> <width> <height> <output_map>`

PoW screenshots attached below.

note: for the moment map_replace_area suppose that you are working on the same map  (that's what i needed), that means source and destination maps must have the same layers structure, or else an error is returned.
but i understand it might be useful to also work on totally different maps, in that case users must be able specify layers they want to consider by associating source map layers to destination map layers (by using a config file maybe).
i'm probably going to make another PR to add this enhancement in the future.

PoW:
![Screenshot from 2022-03-16 18-08-12](https://user-images.githubusercontent.com/3328841/158650515-17c31639-28f7-4e19-954a-b5734ee82703.png)
![Screenshot from 2022-03-16 18-08-43](https://user-images.githubusercontent.com/3328841/158650512-6e21f2b4-538f-4974-aaa2-2983551d24b4.png)
![Screenshot from 2022-03-16 18-11-50](https://user-images.githubusercontent.com/3328841/158650510-d00a05a9-a2e8-4df2-8674-0c80fd894f66.png)

5343: Add rcon and chat to integration test r=def- a=ChillerDragon

Add more action to the integration test script: chat messages, chat commands, rcon commands.
This unlocks more code coverage at runtime to catch asan issues.

It adds a very restrictive regex on the log format. But I am happy to maintain that in case changes to the log output happen.
The current version is already supporting heinrichs refactor https://github.com/ddnet/ddnet/pull/5036

Also ensure chat messages arrive in the correct format. Would have catched the following issues:
https://github.com/ddnet/ddnet/issues/5342
https://github.com/ddnet/ddnet/issues/5340
https://github.com/ddnet/ddnet/issues/5302
https://github.com/ddnet/ddnet/pull/5126

DEPENDS ON:

https://github.com/ddnet/ddnet/issues/5342
https://github.com/ddnet/ddnet/issues/5340

5465: Change from pnglite to libpng for PNG reading r=def- a=heinrich5991

This is desirable mainly because libpng is maintained and pnglite is
not. pnglite was last updated in 2007 (15 years ago) and probably has a
lot of security vulnerabilities.

libpng is an actively maintained library also used by browsers like
Firefox or Chromium, so it's less likely to contain security
vulnerabilities, also it's more likely to be packaged by Linux
distributions.

This also refuses to load images of types not supported by pnglite,
which allows us to think about backward compatibility while also
introducing libpng.

## Checklist

- [x] Tested the change ingame
- [ ] Provided screenshots if it is a visual change
- [ ] Tested in combination with possibly related configuration options
- [ ] Written a unit test if it works standalone, system.c especially
- [ ] Considered possible null pointers and out of bounds array indexing
- [ ] Changed no physics that affect existing maps
- [ ] Tested the change with [ASan+UBSan or valgrind's memcheck](https://github.com/ddnet/ddnet/#using-addresssanitizer--undefinedbehavioursanitizer-or-valgrinds-memcheck) (optional)


Co-authored-by: sctt <scottistefano91@gmail.com>
Co-authored-by: term <term@term.sinervis.pri>
Co-authored-by: f <scottistefano91@gmail.com>
Co-authored-by: heinrich5991 <heinrich5991@gmail.com>
Co-authored-by: ChillerDragon <ChillerDragon@gmail.com>
Co-authored-by: def <dennis@felsin9.de>
Co-authored-by: Jupeyy <jupjopjap@gmail.com>
2022-06-21 16:21:47 +00:00
Jupeyy 65ad57a448 Change from pnglite to libpng for PNG reading
This is desirable mainly because libpng is maintained and pnglite is
not. pnglite was last updated in 2007 (15 years ago) and probably has a
lot of security vulnerabilities.

libpng is an actively maintained library also used by browsers like
Firefox or Chromium, so it's less likely to contain security
vulnerabilities, also it's more likely to be packaged by Linux
distributions.
2022-06-21 13:37:14 +02:00
Dennis Felsing 79fb7b1f81 Update readme about ddnet-libs (fixes #5377) 2022-06-10 15:08:55 +02:00
def 9a89e58a16 Add lsan.supp for opengl leak (fixes #5296)
See also Jupeyy's explanation in
https://github.com/ddnet/ddnet/issues/4294 for why we want to ignore
this:

> sadly components have no OnDestruct on anything like that
> so aslong it doesn't actually leak it's just non destructed memory

So it's something we allocate once for the entire client lifetime from
my understanding.

=================================================================
==421461==ERROR: LeakSanitizer: detected memory leaks

Direct leak of 411760 byte(s) in 10 object(s) allocated from:
    #0 0x55eaf0c08a29 in malloc (/media/ddnet/integration_test/DDNet+0x736a29)
    #1 0x55eaf0de9f72 in CCommandProcessorFragment_OpenGL2::Cmd_CreateBufferObject(CCommandBuffer::SCommand_CreateBufferObject const*) /media/ddnet/src/engine/client/backend/opengl/backend_opengl.cpp:1898:25
    #2 0x55eaf0dd82f5 in CCommandProcessorFragment_OpenGL::RunCommand(CCommandBuffer::SCommand const*) /media/ddnet/src/engine/client/backend/opengl/backend_opengl.cpp
    #3 0x55eaf0f73229 in CCommandProcessor_SDL_GL::RunBuffer(CCommandBuffer*) /media/ddnet/src/engine/client/backend_sdl.cpp:246:20
    #4 0x55eaf0f70568 in CGraphicsBackend_Threaded::ThreadFunc(void*) /media/ddnet/src/engine/client/backend_sdl.cpp:75:25
    #5 0x55eaf0d679d7 in thread_run(void*) /media/ddnet/src/base/system.cpp:686:2
    #6 0x7f08b788c54c  (/usr/lib/libc.so.6+0x8c54c)

SUMMARY: AddressSanitizer: 411760 byte(s) leaked in 10 allocation(s).
2022-06-05 20:01:02 +02:00
def af610c2bbf Add ubsan.supp to README, add runtime suppression for json.c 2022-04-18 09:42:20 +02:00
Edgar 927f48f0fd
update new code docs location 2022-04-07 10:55:03 +02:00
Jupeyy 486e6bce41 Add comment about generating ddnet-libs for WebAssembly in the README
Fix typo
2022-03-26 07:51:51 +01:00
Jupeyy bb1ed45c3d Emscripten support 2022-03-25 12:42:18 +01:00
Dennis Felsing 747dc1b0ce Add note about gmock version (fixes #4853) 2022-03-23 09:07:11 +01:00
Jupeyy fbeba9eb5f Add Vulkan backend 2022-03-21 12:39:51 +01:00
Edgar 2e5e077348
add link to https://wiki.ddnet.tw/wiki/Development on readme 2022-03-17 18:04:55 +01:00
def 11c49ab75b Add instructions for videorecorder being default (fixes #4804) 2022-03-12 10:44:37 +01:00
bors[bot] e215aeb232
Merge #4768
4768: Videorecorder on by default (also for github builds) r=Jupeyy a=def-

<!-- What is the motivation for the changes of this pull request -->

## Checklist

- [ ] Tested the change ingame
- [ ] Provided screenshots if it is a visual change
- [ ] Tested in combination with possibly related configuration options
- [ ] Written a unit test if it works standalone, system.c especially
- [ ] Considered possible null pointers and out of bounds array indexing
- [ ] Changed no physics that affect existing maps
- [ ] Tested the change with [ASan+UBSan or valgrind's memcheck](https://github.com/ddnet/ddnet/#using-addresssanitizer--undefinedbehavioursanitizer-or-valgrinds-memcheck) (optional)


Co-authored-by: Dennis Felsing <dennis@felsin9.de>
2022-03-02 08:02:32 +00:00
Dennis Felsing c92423362e Videorecorder on by default (also for github builds) 2022-03-01 22:56:24 +01:00
bors[bot] d21232148f
Merge #4749
4749: Fix test run instructions r=Jupeyy a=def-

As reported by ReiTW

<!-- What is the motivation for the changes of this pull request -->

## Checklist

- [ ] Tested the change ingame
- [ ] Provided screenshots if it is a visual change
- [ ] Tested in combination with possibly related configuration options
- [ ] Written a unit test if it works standalone, system.c especially
- [ ] Considered possible null pointers and out of bounds array indexing
- [ ] Changed no physics that affect existing maps
- [ ] Tested the change with [ASan+UBSan or valgrind's memcheck](https://github.com/ddnet/ddnet/#using-addresssanitizer--undefinedbehavioursanitizer-or-valgrinds-memcheck) (optional)


Co-authored-by: Dennis Felsing <dennis@felsin9.de>
2022-03-01 14:58:01 +00:00
Edgar b96379bbce
ups 2022-02-21 17:58:24 +01:00
Edgar 7889b2ed77
Update README.md 2022-02-21 11:18:57 +01:00
Dennis Felsing 8787bbc2ce Fix test run instructions
As reported by ReiTW
2022-02-21 09:46:05 +01:00