This is a 0-clause BSD-licensed, tiny hash library written in C and
widely available on both POSIX and Windows systems.
git-svn-id: https://svn.code.sf.net/p/speed-dreams/code/trunk@9539 30fe4595-0a0c-4342-8851-515496e4dcbd
Former-commit-id: 2bdfd5a8b16647266a18c55e870b0013e948d08d
Former-commit-id: d56649b829919db5d7bd0774f25560ffd822185c
Despite its ubiquity, OpenSSL is a huge and complex library from which
only a couple of small features (SHA256 computation and pseudorandom
number generation) were being used by the project.
Therefore, this commit replaces OpenSSL with (much) smaller
dependencies.
git-svn-id: https://svn.code.sf.net/p/speed-dreams/code/trunk@9538 30fe4595-0a0c-4342-8851-515496e4dcbd
Former-commit-id: a46f6f8b0effd71d48affdac401e50ce32d4b1a8
Former-commit-id: a12159f5551c3875bb266f6c0de55650003489ab
This function makes use of system-specific interfaces to generate
cryptographically secure pseudorandom numbers.
git-svn-id: https://svn.code.sf.net/p/speed-dreams/code/trunk@9537 30fe4595-0a0c-4342-8851-515496e4dcbd
Former-commit-id: 102329336b6055290791ee1ca7f5dd6b49e73d77
Former-commit-id: cc525465dc187bbcad98a6c9a6ec90f7132a7558
More portability functions shall be defined by future commits. Since it
is preferred to keep each function on its own source file, it is also
desirable to keep them on their own directories, based on the system
they were written for.
git-svn-id: https://svn.code.sf.net/p/speed-dreams/code/trunk@9536 30fe4595-0a0c-4342-8851-515496e4dcbd
Former-commit-id: 13a58045307b4e6fbe00925ee1b5aec2316d285a
Former-commit-id: c18046b698e099e2c67c1825955a92531209b14d
These casts were dangerous and not accepted by more modern compilers,
such as GCC 14. In fact, all of them could be trivially replaced with
safe and portable alternatives.
git-svn-id: https://svn.code.sf.net/p/speed-dreams/code/trunk@9535 30fe4595-0a0c-4342-8851-515496e4dcbd
Former-commit-id: ba9c39525f91274c60086272d12b3b9b6bf7a451
Former-commit-id: f13171db00171b7c9d190019cbe807829a56103d
Any references to Win32-specific symbols should be precluded with this
header file to avoid undefined reference errors.
git-svn-id: https://svn.code.sf.net/p/speed-dreams/code/trunk@9534 30fe4595-0a0c-4342-8851-515496e4dcbd
Former-commit-id: a32d06d62773b99b8878b9dbecb6425c2cf7fcf5
Former-commit-id: a16cf8bd4dcd47c1fc82904138b9daa8a9737931
Unfortunately,
AbstractColorChooserPanel.setColorTransparencySelectionEnabled was
introduced by Java 9, whereas Speed Dreams still targets Java 8 (aka
1.8).
Despite the more confusing GUI, which allows users to adjust
transparency, it returns the same Color to the caller regardless
transparency, so no regressions are introduced.
git-svn-id: https://svn.code.sf.net/p/speed-dreams/code/trunk@9533 30fe4595-0a0c-4342-8851-515496e4dcbd
Former-commit-id: 747030115c46ef36e4e9e644e8c1c04cc26ccf2c
Former-commit-id: 2e4e0df74521e4f16371d8832cdd6b4f6e3e34f1
Findminizip.cmake does not define MINIZIP_LIBRARY, but
minizip_LIBRARIES. Ideally, minizip::minizip should be used instead, but
that seems not to work for some unknown reason.
git-svn-id: https://svn.code.sf.net/p/speed-dreams/code/trunk@9531 30fe4595-0a0c-4342-8851-515496e4dcbd
Former-commit-id: c06a8fe688535315e10a1ece4175eda032d1b850
Former-commit-id: 053d6039517c16770d0b9a8994c72ba58f0c2da1
std::ios::binary holds equivalent semantics to fopen(3)'s 'b' flag.
Whereas POSIX systems would typically ignore this flag, Windows relies
on this flag to apply conversions to newline characters.
git-svn-id: https://svn.code.sf.net/p/speed-dreams/code/trunk@9529 30fe4595-0a0c-4342-8851-515496e4dcbd
Former-commit-id: e91037ffa80ddede63866f10012d9d8a5d0e67e5
Former-commit-id: 115f04a57001cf92fca5d3b27ce5e2b2c5fe4dd9
The following shell script was used:
while read f
do
sed -Ei 's/[[:space:]]+$//g' "$f"
done <<EOF
$(svn ls -R | grep \
-e '.\cpp$' \
-e '\.cmake$' \
-e '\.txt$' \
-e '\.cppcheck$' \
-e '\.frag$' \
-e '\.h$' \
-e '\.hpp$' \
-e '\.vert$' \
-e '\.xml$' \
-e '\.java$' \
-e '\.c$')
EOF
As a side effect, this has also converted some files from CRLF line
endings to LF.
File extensions such as .ac or .osg were intentionally left out because
those usually are very large files generated by tools.
git-svn-id: https://svn.code.sf.net/p/speed-dreams/code/trunk@9507 30fe4595-0a0c-4342-8851-515496e4dcbd
Former-commit-id: 6c1e5ab34415982ec77fc92a77e1b1c149518eca
Former-commit-id: c6cf9480ae7c1d2f9a999eb6c6b976eef8bae3ba
Otherwise, GfLocalDir and GfDataDir might be residing on different file
systems, and therefore rename(3) could fail with EXDEV ("Invalid
cross-device link").
git-svn-id: https://svn.code.sf.net/p/speed-dreams/code/trunk@9503 30fe4595-0a0c-4342-8851-515496e4dcbd
Former-commit-id: 7ffb92a15b0e36930c930f279d75e940d8083527
Former-commit-id: e0947c2dba73073af5b1be4b60469474b9fd6dea
Whenever an error occurs, libcurl expects a value different than size,
and not a negative value. This should fix signed-to-unsigned diagnostic
messages from some implementations.
git-svn-id: https://svn.code.sf.net/p/speed-dreams/code/trunk@9501 30fe4595-0a0c-4342-8851-515496e4dcbd
Former-commit-id: 328c49f1644e946096f78b581f2d3fac6b3eea7a
Former-commit-id: 3beaee432ff7f655b11aaa3f2c33f2600e86d9ae
This file was originally in C99 and (poorly) adapted to C++, which
caused some syntax errors as C++ holds different rules compared
to C99.
git-svn-id: https://svn.code.sf.net/p/speed-dreams/code/trunk@9494 30fe4595-0a0c-4342-8851-515496e4dcbd
Former-commit-id: d7020315ae5cd1d5657c44695ec321e15be7545f
Former-commit-id: 2a88f57ba6e41584074a6410edcecf39463f868a
This in-game download manager allows users to fetch assets, such as
cars, tracks or drivers, from a configurable list of servers following a
specific JSON schema.
Several smaller classes have been designed to assist the download
manager:
- entry: defines an entry in the assets lists and its state.
- thumbnail: defines a visible entry on the list, will always match
one entry.
- writebuf: allows dumping a file downloaded over HTTP{S} to memory.
- writefile: allows dumping a file downloaded over HTTP{S} to a file.
- unzip: a higher-level, C++ wrapper to minizip.
It was also required to implement a function that removed directories
recursively, namely rmdir_r. Since this is not portable accross POSIX
and Windows systems, their respective implementations have been provided
on src/libs/portability.
The following dependencies have been added:
- libcurl: HTTP{S} operations, already required by webserver.
- OpenSSL: hash calculation.
- minizip: zip extraction, it required its on Findminizip.cmake as it is
not provided by upstream CMake.
- zlib: required by minizip.
git-svn-id: https://svn.code.sf.net/p/speed-dreams/code/trunk@9490 30fe4595-0a0c-4342-8851-515496e4dcbd
Former-commit-id: 915908c54f5ea8d7f6926943b2fea670e9973bea
Former-commit-id: 9cb2a8874779f6b4d9d6201f3d8af8b29c067a13
The JSON schema provides a machine and human-readable specification of
the assets lists that implementors must follow so that Speed Dreams can
fetch them. An example JSON file has also been provided.
Run check-jsonschema(1) to test an assets JSON file. It can be
downloaded via `pip install check-jsonschema`.
git-svn-id: https://svn.code.sf.net/p/speed-dreams/code/trunk@9489 30fe4595-0a0c-4342-8851-515496e4dcbd
Former-commit-id: bff0b86104dfe3e88896e1d5bfcfa35be2008265
Former-commit-id: e830b70b32d944c24515452ebd76f0dfdb0a6860