Commit graph

396 commits

Author SHA1 Message Date
Corantin H 2e1d44dc23 Use realpath when comparing paths 2024-01-07 17:47:42 +01:00
Robert Müller b352545621 Improve integration test script
Fix valgrind errors not being detected as failures when the tests otherwise finish, as the valgrind results are printed to stderr and not to the logfiles. Additionally, valgrind failures were not being detected because the error summary is not printed to stderr immediately but only after some time when valgrind has processed the summary.

Find random unused port to bind to by opening a socket on port 0 and closing it immediately. This gives a port that will very likely be unused because the system cycles through all ports before reusing old ones obtained this way.

Add `wait_for_launch` function to reduce duplicate code. Wait for server to launch before starting clients.

Improve log messages.
2023-12-02 18:33:46 +01:00
Robert Müller 42b952bc6c Move config variables to config_variables.h, remove variables.h
The contents of `variables.h` are moved to `config_variables.h` instead of being included with the preprocessor. The file `variables.h` is removed, so all config variables can be found in a single file instead of being spread over two files without any clear structure. The original declaration order of config variables is preserved. The unnecessary header guard `GAME_VARIABLES_H` from `variables.h` is removed, as the comment `// This file can be included several times.` already serves the same purpose of silencing the header guard check.

A comment is added at the end of `config_variables.h` to mark the location where modders should ideally declare all of their own config variables to avoid merge conflicts with us in the future.

Closes #7472.
2023-11-25 16:40:55 +01:00
Robert Müller db17539652 Rewrite unused header style check shell script in Python
As the shell script is pretty slow, taking roughly 84 seconds in the CI, whereas the equivalent Python script takes only 1 second.
2023-10-14 15:21:28 +02:00
Robert Müller 1604784669 Improve Windows pipe (FIFO) support
Use `WaitForPipeDrain` to deterministically wait for the pipe to drain instead of using `Start-Sleep`.

Use `Dispose` instead of `Close` to properly flush and close the pipe stream.

Add error handling for connection timeout and I/O errors.

Handle `ERROR_BROKEN_PIPE` separately when peeking at pipe, as this happens when the pipe is disconnected immediately after connecting it or after reading the previous message.

Don't ignore `ERROR_BAD_PIPE` anymore, as the pipe should never be in a disconnected (i.e. bad) state at this point of the function.
2023-09-05 19:15:09 +02:00
heinrich5991 ee21fde231 Make default server start a little less noisy
Spam like the following is now hidden by the default config file:
```
[2022-06-16 01:55:22][console]: moderator access for 'left' is now enabled
[2022-06-16 01:55:22][console]: helper access for 'left' is now enabled
[2022-06-16 01:55:22][console]: user access for 'left' is now disabled
```

Also, the following were already converted to debug messages by #5904.
```
[2022-06-16 01:57:05][datafile]: loading data index=88 size=6159 uncompressed=875088
[2022-06-16 01:57:05][datafile]: loading data index=89 size=1481 uncompressed=972400
[2022-06-16 01:57:05][datafile]: loading data index=90 size=7199 uncompressed=972400
```
2023-07-24 23:43:44 +02:00
Robert Müller aa817a810b Increase wait times in integration test to reduce flakiness 2023-07-15 11:30:50 +00:00
Dennis Felsing b791718c24 Try to fix #6773 again 2023-07-07 14:45:37 +02:00
Dennis Felsing 222e12a140 Increase waiting times for client in valigrind (fixes #6773) 2023-06-27 11:08:34 +02:00
Dennis Felsing b794c00a20 Disable sound in integration tests
Seems like the CI workers don't have (virtual) sound cards, puts out
useless errors
2023-06-27 11:08:13 +02:00
Robert Müller 4dd647b521 Add script to check for unused config variables to CI
Add `scripts/check_config_variables.py` which checks if config variables defined in `src/game/variables.h` and `src/engine/shared/config_variables.h` are unused.
2023-06-01 20:25:41 +02:00
Robert Müller cde1143528 Regenerate key lists with latest SDL version
Update `SDL_scancode.h` which is used by `gen_keys.py` to generate the list of keys enum (`keys.h`) and the list of key names (`keynames.h`) and regenerate the lists.

This adds support for 6 uncommonly used keys (audiorewind, audiofastforward, softleft, softright, call, endcall).
2023-05-30 23:39:47 +02:00
Robert Müller cddbc78592 Add RFC 3066 language tags to language index
Add RFC 3066 language tags to language index in order to identify the language to select when first starting the game based on the user's locale.

Multiple language tags can be specified per entry separated with a semicolon, as some languages have different tags that do not share a unique prefix (e.g., Simplified and Traditional Chinese).
2023-03-21 21:17:40 +01:00
heinrich5991 bb086b8393 scripts/git_revision.py: Allow to pass in the git shortrev
Use the `DDNET_GIT_SHORTREV_HASH` variable for this. This allows builds
that do not use `git` to still have this kind of version information.
2023-03-19 18:02:04 +01:00
heinrich5991 c645c6fd72 scripts/git_revision.py: Remove unused backcompat
Compatibility with Python 3.2 and lower was already removed earlier.
2023-03-19 18:01:51 +01:00
Robert Müller 1f3f211f40 Streamline parse_drmingw.sh
- Also handle newer Dr.Mingw trace format where relative addresses are already resolved, as some crash logs may not contain the list of module addresses and versions.
- Add more parameters to `addr2line` invocation to print addresses, pretty-print, print function names, demangle, and resolve inlined functions.
- Strip absolute prefix of source paths, so the paths all starts at `src/`, to improve readability.
2023-03-12 18:02:54 +01:00
Robert Müller a76fb9b99a Replace all usages of C standard headers with C++ headers 2023-03-01 19:26:51 +01:00
Robert Müller cf4da09ce9 Check in CI that no C standard headers are used
Add `scripts/check_standard_headers.sh` to check that no C standard header is included in our code. The script prints an error message for every C header used as well as the corresponding C++ header that should be used instead.

The script is added to the style checking CI.
2023-03-01 19:26:51 +01:00
Dennis Felsing 5ee7ffa33f Fix twlang decode to handle context lines properly
Context line is always one line above. If we don't do this we end up
with empty [Graphics] context lines in the translation files.
2023-02-25 10:40:33 +01:00
Robert Müller 7eb5966f6f Implement FIFO on Windows using Named Pipes
Reimplement the Linux FIFO file server and client controls on Windows by using Named Pipes.

The DDNet server/client acts as a named pipe server and receives messages.
Messages can be posted to the named pipe server by connecting to it as a client.
The named pipe client can for instance be controlled from the command line with PowerShell.

The PowerShell script `scripts/send_named_pipe.ps1` is added for this purpose.
For example the PowerShell command `./send_named_pipe.ps1 "testpipe" "echo a"` sends the command `echo a` to the pipe named `testpipe`.
Multiple commands can be sent at the same time by separating them with semicolons or newlines.
2023-01-21 11:13:02 +01:00
Robert Müller 1eaa88b236 Handle ordinal joystick hat keys as combined cardinal hat keys
Instead of considering diagonal hat inputs (e.g. up-left) as separate keys, consider them as inputs for both cardinal directions (e.g. up and left) at the same time.

This improves input with gamecontrollers that map the D-Pad to a joystick hat, as it was impossible with the previous handling to move with hat-left/right and jump with hat-up at the same time.

This means that diagonal hat buttons can no longer be used in binds, because they are no longer considered distinct buttons. It's unlikely that they would ever be useful in this game, as real joystick POV hats would not be used anyway.

Closes #6120.
2022-12-17 17:18:01 +01:00
Zwelf 60b4708f67 Improve move_sqlite script to adapt timezone
This change does some more stuff:

* change the filename to include the time with seconds to be able to run
  the script easier more often
* Fix that _backup tables are only moved after 1h and not immidiately in
  UTC+1
* Add a parameter to configure the number of minutes the backup
* Add parameter to change timestamps to be in localtime
* consider the timeout in num_transfer calculation
* remove rows in _backup tables to not print in them in the log
* rename tables to TABLES, because it is meant to be a constant
2022-12-14 18:35:01 +01:00
Jupeyy dff876d58c Add Localizable hint 2022-12-13 17:53:32 +01:00
Dennis Felsing f4517c1c1d Adapt move_sqlite.py script to _backup tables 2022-12-08 10:25:46 +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
Rafael Fontenelle cd14660307 Fix misspellings 2022-10-25 13:51:56 -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
Robert Müller ec5d5d0fb9 Fix parse_drmingw.sh not finding module offset on Linux systems
The end anchor is removed from the grep RegEx, as it's not necessary and as it doesn't work on Linux systems when the crash log uses Windows line endings.
2022-10-18 18:36:57 +02:00
Robert Müller fb317779fc Support unicode with ExcHndl, use upstream module offsets, handle errors
Update Dr. Mingw (ExcHndl) to 0.9.8.

Use the new `ExcHndlSetLogFileNameW` function to set the exception log file name using wide characters, to support paths containing unicode.

It's not necessary to call `ExcHndlInit` explicitly after loading `exchndl.dll`, as the `DllMain` will already initialize the exception handler when the DLL is loaded.
Module offsets are supported by upstream ExcHndl now, so we don't need to provide our own version that supplies the module offset to `ExcHndlInit` anymore.
Upstream ExcHndl will also resolve the source code lines for addresses automatically, when the executable is build with debug information.

Handle the cases that the exception handling module cannot be loaded and that the `ExcHndlSetLogFileNameW` function cannot be found in the module.

Update `scripts/parse_drmingw.sh`:

- Parse both old and new module offsets.
- Use tabs instead of spaces consistently.
- Reset the ANSI color after printing colored messages.
2022-10-12 21:11:35 +02:00
Dennis Felsing ba1777c9b1 Update move_sqlite.py to use sqlite3mysql
https://github.com/techouse/sqlite3-to-mysql/

Better method than text file with manual seds
2022-09-21 23:30:33 +02:00
heinrich5991 9b4371f18f Change log format
Remove square brackets to reduce the amount of space used.

Add log level indicator. The position between timestamp and system was
chosen because it is at a fixed position (unlike after the system) but
the log still remains naively sortable (which wouldn't happen if we were
to place it in front of the timestamp.

Before:
```
[2022-04-29 15:25:37][engine]: running on unix-linux-amd64
[2022-04-29 15:25:37][engine]: arch is little endian
[2022-04-29 15:25:37][storage]: added path '$USERDIR' ('/path/to/home/.teeworlds')
[2022-04-29 15:25:37][storage]: added path '$DATADIR' ('data')
[2022-04-29 15:25:37][storage]: added path '$CURRENTDIR' ('/path/to/ddnet')
[2022-04-29 15:25:37][host_lookup]: host='localhost' port=0 1
[2022-04-29 15:25:37][host_lookup]: host='localhost' port=0 2
[2022-04-29 15:25:37][console]: executing 'autoexec_server.cfg'
```

After:
```
2022-04-29 15:25:37 I engine: running on unix-linux-amd64
2022-04-29 15:25:37 I engine: arch is little endian
2022-04-29 15:25:37 I storage: added path '$USERDIR' ('/path/to/home/.teeworlds')
2022-04-29 15:25:37 I storage: added path '$DATADIR' ('data')
2022-04-29 15:25:37 I storage: added path '$CURRENTDIR' ('/path/to/ddnet')
2022-04-29 15:25:37 I host_lookup: host='localhost' port=0 1
2022-04-29 15:25:37 I host_lookup: host='localhost' port=0 2
2022-04-29 15:25:37 I console: executing 'autoexec_server.cfg'
```
2022-09-14 19:37:55 +02:00
Robert Müller 0bde042c11 Always print warnings/failures in integration test
This makes it easier to debug issues when they appear in the CI.
2022-08-28 16:22:16 +02:00
Robert Müller 6bd1e96aa7 Add demo recorder/player to integration test
- record and playback client demo
- record and playback server demo
2022-08-26 20:58:08 +02:00
Dennis Felsing 06a971bcd1 Fix rest of pylint manually 2022-07-27 09:37:25 +02:00
Dennis Felsing 9f8e97fbeb Run flynt -a 2022-07-27 09:37:24 +02:00
Dennis Felsing cfdb4646d1 Update scripts/check_identifiers.py
Co-authored-by: heinrich5991 <heinrich5991@gmail.com>
2022-07-27 09:37:24 +02:00
def 7379a64004 [WIP] Require Python 3.6 (f-strings) and fix pylints
So far only done scripts directory, will do the rest if this is
considered good
2022-07-27 09:37:24 +02:00
ChillerDragon f238c55013 Fix integration tests hanging on crashes
When the client or server crash the fifo will be dead
then the cleanup command hangs at

	echo "quit" > client1.fifo

because the fifo is not responding and thus it is stuck there.
which causes the user to probably ctrl+c at some point
which then avoids client2 to be quit which might not have crashed

So this commit checks if a fail_client1.txt file exits and if it crashed
already it will skip the call to the broken fifo
2022-07-13 17:03:41 +02:00
ChillerDragon 28c4a8a346 Sort CI logs before diff to fix race condition
Logging to file and to stdout might order differently
due to multiple threads
2022-06-28 16:26:40 +02:00
def b1d1bb6739 Don't register integration test servers
Also print out more of the diff
2022-06-26 08:59:44 +02:00
bors[bot] 937a9cc0e2
Merge #5495
5495: Fix Android build r=heinrich5991 a=Jupeyy

- Video recorder off
- small fix in logger.cpp

Tested on Java-17

## 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: Jupeyy <jupjopjap@gmail.com>
2022-06-25 08:54:11 +00:00
Jupeyy a22a8dce1c Fix Android build 2022-06-25 10:43:24 +02:00
Dennis Felsing 0081e99fc7 integration test: print log diff for easier result check 2022-06-25 01:39:59 +02:00
ChillerDragon c951a3cb89 Add logfiles and map changes to integration test
Cover map change
Cover logfiles
Ensure client1 always connects first
2022-06-23 15:52:28 +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
ChillerDragon bc243952bd Increase client boot timeout for integration test 2022-06-21 01:15:06 +02:00
ChillerDragon afd4504f96 Fix integration argument parsing 2022-06-17 23:14:13 +02:00
Robert Müller 8757b1f41e Add joystick support to engine 2022-06-13 20:40:36 +02:00
def 23af9ef448 Tell what has to be changed in check_header_guards.py
Example:

Wrong header guard in src/game/bezier.h, is: #ifndef GAAME_BEZIER_H, should be: #ifndef GAME_BEZIER_H
2022-06-12 12:34:21 +02:00
def 5768e52a13 Minor fixes 2022-06-07 00:33:01 +02:00
Robert Müller f500ced16e Port scripts/gen_keys.py to Python 3, add missing NOLINT comment 2022-06-06 22:14:05 +02:00
def 442ae7dc13 Make it easier to run integration tests
Entire worflow is now:

mkdir san
cd san
CC=clang CXX=clang++ CXXFLAGS="-fsanitize=address,undefined -fsanitize-recover=address,undefined -fno-omit-frame-pointer" CFLAGS="-fsanitize=address,undefined -fsanitize-recover=address,undefined -fno-omit-frame-pointer" cmake -DCMAKE_BUILD_TYPE=RelWithDebInfo -GNinja ..
ninja run_integration_tests
2022-06-06 18:53:59 +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
ChillerDragon 44a79d5783 Add chat and rcon to integration test 2022-06-05 19:26:39 +02:00
ChillerDragon eebabaaf82 Fix indent 2022-06-05 19:26:22 +02:00
heinrich5991 b0fcda57c2 Fix integration test waiting for client to close
As described in #5295, the integration test script waits for the client
to close before launching the next one. I don't know what causes this,
but disabling full-screen mode works around the issue.

I don't know if this is okay. @ChillerDragon?

Fixes #5295.
2022-06-02 01:47:10 +02:00
def b3d8e05e00 Add valgrind to integration test 2022-05-26 23:52:29 +02:00
Dennis Felsing e3116217de test -> integration_test 2022-05-26 01:34:18 +02:00
Dennis Felsing 68bcd21eff asan+ubsan clean 2022-05-26 01:22:14 +02:00
ChillerDrgon 05efc25f32 Add integration test script and coverage map 2022-05-26 00:37:45 +02:00
Dennis Felsing 1158bbfbc5 Don't assume script name/path 2022-05-23 17:10:19 +02:00
Chairn 76e6d0b120 Fix pylint error 2022-05-07 01:21:58 +02:00
Chairn 0cd61e6ae1 Added header guard exception 2022-05-07 01:08:51 +02:00
Chairn 5925181acc Updated unicode script generation 2022-05-06 20:31:24 +02:00
def cd87fc1ef7 Fix move_sqlite (fixes #4902) 2022-03-28 00:35:39 +02:00
Jupeyy bb1ed45c3d Emscripten support 2022-03-25 12:42:18 +01:00
Jupeyy e02ebca2c9 Rename lib generation scripts 2022-03-25 11:46:32 +01:00
Jupeyy fbeba9eb5f Add Vulkan backend 2022-03-21 12:39:51 +01:00
Dennis Felsing af36070c91 Update ddnet-libs, fix shellcheck 2022-02-24 10:51:31 +01:00
Jupeyy 8bed1c7267 Add module offset 2022-02-24 10:45:58 +01:00
heinrich5991 1820a0e168 Add some checksum functions to the client
Let's see if it works out, if not, we can revert it.
2022-01-31 21:31:26 +01:00
Jupeyy 55a1406641 Further android build fixes 2022-01-20 11:04:47 +01:00
Jupeyy 4bcddc8dae fix android curl cmake flags 2022-01-19 10:44:48 +01:00
def fec20679f1 Create custom look for DMG using dmgbuild
(nice background image still missing)
2021-12-26 00:24:55 +01:00
def 052502a3d1 Fix local shellcheck warnings in android/files/build.sh
In ./scripts/android/files/build.sh line 3:
[ x"$1" == x ] && {
  ^---^ SC2268 (style): Avoid x-prefix in comparisons as it no longer serves a purpose.

Did you mean:
[ "$1" == "" ] && {
2021-12-21 17:52:06 +01:00
def 28ac9396cc Support libfat directory for macOS, use arm64 libs (fixes #3250)
Builds and runs successfully with:
  cmake -DCMAKE_BUILD_TYPE=Release -GNinja -DPREFER_BUNDLED_LIBS=ON -DCMAKE_OSX_ARCHITECTURES="arm64;x86_64"
  ninja package_dmg

Tested successfully with native arm64 and rosetta

No discord support for universal binary
2021-12-20 00:17:38 +01:00
Jupeyy b216b6744a Add Android build scripts 2021-08-24 12:18:20 +02:00
heinrich5991 1f68e11445 Mark the inverted exclamation mark as confusable with i
They look pretty much the same in our font, but for some reason, the
inverted exclamation mark doesn't have confusables.
2021-07-27 02:43:04 +02:00
heinrich5991 707e13ff7a Update confusables_data.h to Unicode 13.0.0 2021-07-27 02:41:55 +02:00
def f867d9c2ac Only use correct clang-format version 2021-04-17 20:24:57 +02:00
def 8fc1fe3811 Retry hdiutil create if it fails (fixes #3711) 2021-03-16 17:56:36 +01:00
def 387b8ef51d Fix dmg.py
Traceback (most recent call last):
  File "/home/deen/isos/ddnet/ddnet-source/scripts/dmg.py", line 106, in <module>
    main()
  File "/home/deen/isos/ddnet/ddnet-source/scripts/dmg.py", line 103, in main
    dmg.create(volume_name=args.volume_name, directory=args.directory, dmg=args.output, symlinks=symlinks)
  File "/home/deen/isos/ddnet/ddnet-source/scripts/dmg.py", line 59, in create
    self._create_hfs(hfs, volume_name, output_size)
  File "/home/deen/isos/ddnet/ddnet-source/scripts/dmg.py", line 42, in _create_hfs
    with open(hfs, 'wb') as f:
TypeError: expected str, bytes or os.PathLike object, not tuple
2021-03-04 10:01:22 +01:00
Edgar 6e76c46c4c
Fix Insecure temporary file 2021-03-01 09:14:25 +01:00
def 13a8dfa307 Add pylint
and fix occurences
2020-12-09 10:40:28 +01:00
def 1dcc1e4026 Run shellcheck over check_dilate.sh 2020-12-08 15:02:16 +01:00
def 0822f9cecd Add check_dilate 2020-11-24 11:15:24 +01:00
def 5b24e95b29 Check translations in github, check formatting strings, fix 2020-11-12 08:57:20 +01:00
heinrich5991 091db3df32 Add scripts to detect variable name style violations
Currently very user-unfriendly, call like this:

```
env CXXFLAGS="-I<builddir>/src -I<includedir_lib1> -I<includedir_lib2> …" python scripts/extract_identifiers.py src/game/**.cpp src/engine/client/**.cpp src/engine/server/**.cpp src/engine/shared/**.cpp > identifiers
python scripts/check_identifiers.py < identifiers
```
2020-11-08 17:13:13 +01:00
def 06b534c07d Create fallback wordlist in sourcecode (fixes #3206) 2020-11-03 17:01:16 +01:00
heinrich5991 8427e99672 Don't run the style fixer for generated files
Fixes #2962.
2020-10-02 19:30:05 +02:00
def 2e8e19290e fix_style.py: Ignore generated key headers 2020-09-26 21:50:13 +02:00
heinrich5991 678b2b15c3 Change fix_style.py script to unconditionally format everything 2020-09-26 21:41:24 +02:00
def 2d8a1ee2b7 Make fix_style.py look at files, not lines 2020-09-26 21:41:20 +02:00
def 3daa798639 Implement script/languages support for contexts 2020-09-15 10:30:49 +02:00
heinrich5991 b235637713 Find the common ancestor for the style checking
This allows the style checker to only look at the changes done in the
current branch, and not the other commits that were done in the base
branch.
2020-09-11 00:57:03 +02:00
def ecdf648930 Make fix_style executable 2020-09-10 22:58:30 +02:00
heinrich5991 df46ff8557 Add a tools to fix the style of new pull requests 2020-09-10 04:11:58 +02:00
def 63f6ecd19d Ignore duplicate records when inserting (fixes #2636) 2020-08-29 08:26:03 +02:00
Zwelf ca24611c0c Do not recommend to deleting ddnet-server.sqlite database
as it might be still in use or there might be even new ranks added to the database
2020-08-12 23:38:09 +02:00
Zwelf 9848b3c759 SQLite transfer script: Warn if database does not exist yet and handle partially created sqlite tables 2020-08-12 23:38:09 +02:00