Commit graph

5123 commits

Author SHA1 Message Date
xavi92
f7dd89b2ad cmake: Add Findrhash.cmake
git-svn-id: https://svn.code.sf.net/p/speed-dreams/code/trunk@9540 30fe4595-0a0c-4342-8851-515496e4dcbd

Former-commit-id: 95341c293c88b1d8d45e351336983b3b152b238d
Former-commit-id: c834c4137793fb5d7e4e22ede64bf02c4e8686d0
2024-08-12 23:59:58 +00:00
xavi92
5e72503eb1 3rdParty-devel: Add rhash
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
2024-08-12 23:59:12 +00:00
xavi92
3185eb2d02 legacymenu: Replace OpenSSL with rhash + portability::rand
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
2024-08-12 23:57:54 +00:00
xavi92
41fbb17289 portability: Add portability::rand
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
2024-08-12 23:57:10 +00:00
xavi92
3636ee6097 portability: Move sources to their own directories
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
2024-08-12 23:56:21 +00:00
xavi92
171a1d1ea4 tgfclient: Do not cast integers to pointers
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
2024-08-12 21:41:58 +00:00
xavi92
9b5aa6ad58 Add missing #include <windows.h>
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
2024-08-12 21:40:51 +00:00
xavi92
ef21cb35d7 trackeditor: Do not disable transparency panel
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
2024-08-11 15:40:48 +00:00
xavi92
4822aa7866 trackeditor: Replace use of isBlank()
isBlank() was introduced by Java 11. However, Speed Dreams still
requires Java 8 (aka 1.8).


git-svn-id: https://svn.code.sf.net/p/speed-dreams/code/trunk@9532 30fe4595-0a0c-4342-8851-515496e4dcbd

Former-commit-id: 07bedd81d76ea78bfe06c37ade02ef5abff4962d
Former-commit-id: e5d12ce350800abfb26c804597b8806e9519a937
2024-08-11 15:40:11 +00:00
xavi92
6f1afb68b6 thirdpartydeps.cmake: Fix wrong reference to minizip
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
2024-08-09 10:06:24 +00:00
xavi92
765250191a downloadsmenu.cpp: Fix a couple of memory leaks
git-svn-id: https://svn.code.sf.net/p/speed-dreams/code/trunk@9530 30fe4595-0a0c-4342-8851-515496e4dcbd

Former-commit-id: 201ea18b8162c42baf82389f3128606055aa4c74
Former-commit-id: cd8d9bea7ec9ef4fa426e9b64dbbf03db4b0e04a
2024-08-08 23:23:42 +00:00
xavi92
c43b0f8db7 downloadsmenu.cpp: Fix missing std::ios::binary
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
2024-08-08 23:23:09 +00:00
xavi92
d893a9a41d Add documentation about the download manager
git-svn-id: https://svn.code.sf.net/p/speed-dreams/code/trunk@9528 30fe4595-0a0c-4342-8851-515496e4dcbd

Former-commit-id: 4640dfcf3561bd0cc2be1816780ccf7f6a7cff30
Former-commit-id: 1e5191eefcd294651d597082ab5a62e539bf10dd
2024-08-08 23:21:57 +00:00
iobyte
a8134a1491 fix downloaded data corruption on windows
git-svn-id: https://svn.code.sf.net/p/speed-dreams/code/trunk@9526 30fe4595-0a0c-4342-8851-515496e4dcbd

Former-commit-id: 721848819c0a8a059f3d75f3ca53522e724d8ce0
Former-commit-id: b9305e143d28936522ea88635c485b7dba70e369
2024-08-05 14:28:34 +00:00
iobyte
8b191adc24 fix for FindCJSON.cmake from Joe
git-svn-id: https://svn.code.sf.net/p/speed-dreams/code/trunk@9525 30fe4595-0a0c-4342-8851-515496e4dcbd

Former-commit-id: db9300ec7995fb4c3e510d9b15ff466fc541971b
Former-commit-id: c64f88857c9c9f09752e89cc8aca1702898b8980
2024-08-04 17:38:07 +00:00
iobyte
de681128e2 more windows build work
git-svn-id: https://svn.code.sf.net/p/speed-dreams/code/trunk@9524 30fe4595-0a0c-4342-8851-515496e4dcbd

Former-commit-id: 692a5d4cc221908ddaed30eb3dfa80abfb7079e6
Former-commit-id: eae44d17673ae4d2cbaf4580c3ac0619255ce757
2024-08-04 16:18:22 +00:00
iobyte
52efa58485 3rdParty: don't build minizip as a dll and fix debug build
git-svn-id: https://svn.code.sf.net/p/speed-dreams/code/trunk@9523 30fe4595-0a0c-4342-8851-515496e4dcbd

Former-commit-id: 98c1d366b1e8ebf103d41a457d4625558c60366f
Former-commit-id: 0729a041a503f2794fb011ac55b5b64fd168e574
2024-08-04 00:11:20 +00:00
iobyte
b9aa8caae3 remove ZEXPORT because zlib defines it
git-svn-id: https://svn.code.sf.net/p/speed-dreams/code/trunk@9522 30fe4595-0a0c-4342-8851-515496e4dcbd

Former-commit-id: cc1280832c711d4292c1032c96c0afbc215dbefc
Former-commit-id: f8b27dff8292c8540704d421d8221e17c9fd232b
2024-08-02 21:33:05 +00:00
iobyte
7abebdfb3a build minizip as shared lib
git-svn-id: https://svn.code.sf.net/p/speed-dreams/code/trunk@9521 30fe4595-0a0c-4342-8851-515496e4dcbd

Former-commit-id: 0992f287fc48d82b7fee98d505ca0f25ef21a160
Former-commit-id: dc1fbfe6b045883c1c0f859cd26733e3e4a8d9cd
2024-08-01 22:21:45 +00:00
iobyte
7485c7fea2 add minizip include directory
git-svn-id: https://svn.code.sf.net/p/speed-dreams/code/trunk@9520 30fe4595-0a0c-4342-8851-515496e4dcbd

Former-commit-id: 3ecb44e0fd21db6bac37dc675d279068e954b562
Former-commit-id: d156be591950790e15a01ac5fc61db002d2871a9
2024-07-31 23:31:21 +00:00
xavi92
22028f851b INSTALL.txt: Add new dependencies
git-svn-id: https://svn.code.sf.net/p/speed-dreams/code/trunk@9519 30fe4595-0a0c-4342-8851-515496e4dcbd

Former-commit-id: 716923bec72b65be8f4b6cb192157ed33945e117
Former-commit-id: f40ea81ca7737b9496564caeec26b9ad472233d0
2024-07-31 22:41:00 +00:00
xavi92
c3c9d2f259 INSTALL.txt: Add missing ending newline
git-svn-id: https://svn.code.sf.net/p/speed-dreams/code/trunk@9518 30fe4595-0a0c-4342-8851-515496e4dcbd

Former-commit-id: 480729c47a8ad24384ea93dd33da64a7b2a652b0
Former-commit-id: adca021035caeed351155f6fe00277a8da9c7279
2024-07-31 22:40:23 +00:00
xavi92
e18245c29e eventloop.c: Update member initialiser list
git-svn-id: https://svn.code.sf.net/p/speed-dreams/code/trunk@9517 30fe4595-0a0c-4342-8851-515496e4dcbd

Former-commit-id: eb14aaac6d94368516ba02b374e8e38ca994b717
Former-commit-id: 05b5e33c1fb0df9a4d339ecf5ebd0300c1290bb5
2024-07-31 22:04:14 +00:00
iobyte
61bd378a68 add FindcJSON.cmake
git-svn-id: https://svn.code.sf.net/p/speed-dreams/code/trunk@9516 30fe4595-0a0c-4342-8851-515496e4dcbd

Former-commit-id: 35b9ac5c374c32c9424b2b67a9837adbbe1316e8
Former-commit-id: 622ebf17bcd80adf777f4317bf5e6e572fd4d8da
2024-07-31 14:26:04 +00:00
iobyte
81fce0966e add cJSON and minizip to thirdpartydeps.cmake
git-svn-id: https://svn.code.sf.net/p/speed-dreams/code/trunk@9515 30fe4595-0a0c-4342-8851-515496e4dcbd

Former-commit-id: 5f4a5f51923ea856e8bc54989ac4d8ac1e9a478f
Former-commit-id: 035caa02e3af984140911cf92620990212af27a6
2024-07-31 14:04:58 +00:00
iobyte
dc412e624e fix minizip build
git-svn-id: https://svn.code.sf.net/p/speed-dreams/code/trunk@9514 30fe4595-0a0c-4342-8851-515496e4dcbd

Former-commit-id: d882b435174abe845c18e024b30678cdee7017de
Former-commit-id: ee13725326a72ad62cdc3469ba630f8decc0bdad
2024-07-31 03:36:00 +00:00
iobyte
8217fa0031 displayconfig: add some more monitor refresh rates
git-svn-id: https://svn.code.sf.net/p/speed-dreams/code/trunk@9513 30fe4595-0a0c-4342-8851-515496e4dcbd

Former-commit-id: 4b4a0bad723f1236ff822d9c7c3d276cee79f701
Former-commit-id: 33e4aceee9ed88dc656706b05df727eabb88a091
2024-07-31 03:25:52 +00:00
iobyte
276b612e8c 2rdParty: update SDL2 to latest version
git-svn-id: https://svn.code.sf.net/p/speed-dreams/code/trunk@9512 30fe4595-0a0c-4342-8851-515496e4dcbd

Former-commit-id: 7f587000a536e8be5f84b7c95489c455d5e5263d
Former-commit-id: ef5194e0ac31c41c12a2de077956513769f1abac
2024-07-31 03:23:53 +00:00
iobyte
02274c89c7 fix checks.cmake
git-svn-id: https://svn.code.sf.net/p/speed-dreams/code/trunk@9511 30fe4595-0a0c-4342-8851-515496e4dcbd

Former-commit-id: 55c34f8296c7ae2840187dce3de63487269f865c
Former-commit-id: b6791f3e00792155e8cc32844f88e377f57da33a
2024-07-31 01:14:47 +00:00
iobyte
d7262c6526 fix Windows eventloop crash
git-svn-id: https://svn.code.sf.net/p/speed-dreams/code/trunk@9510 30fe4595-0a0c-4342-8851-515496e4dcbd

Former-commit-id: 50f2810b869040a5343e3b322cbd8f3dbcc09cc1
Former-commit-id: 6e4960da072b9cc99bf3540561bb15fe853f9e70
2024-07-31 01:03:57 +00:00
xavi92
e06a519365 Remove trailing newlines
The following shell script was used:

while read f
do
	sed -i -e :a -e '/^\n*$/{$d;N;};/\n$/ba' -- "$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


git-svn-id: https://svn.code.sf.net/p/speed-dreams/code/trunk@9509 30fe4595-0a0c-4342-8851-515496e4dcbd

Former-commit-id: aac7ab5702079417cb16ca2fa291be07033ea549
Former-commit-id: f0286e4119f166d7b78f9d13ff2ea04ffaa95c67
2024-07-30 22:17:48 +00:00
xavi92
665996fd28 Convert all files with dos2unix
Some files were written with UTF-8 with BOM encoding. Now, all files
should be UTF-8 only.

The following shell script was used:

while read f
do
	dos2unix -- "$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


git-svn-id: https://svn.code.sf.net/p/speed-dreams/code/trunk@9508 30fe4595-0a0c-4342-8851-515496e4dcbd

Former-commit-id: 0b59a439a39e5c8a3be0d34b1a080038468c53e2
Former-commit-id: c15cc27f94228ae27cd2f712505c6bdd0cf15e30
2024-07-30 22:04:12 +00:00
xavi92
6d7ca06e02 String trailing whitespaces
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
2024-07-30 21:45:07 +00:00
iobyte
660e32020e remove cmake find_package curl
git-svn-id: https://svn.code.sf.net/p/speed-dreams/code/trunk@9506 30fe4595-0a0c-4342-8851-515496e4dcbd

Former-commit-id: f3d91e2c6001bad1c7c14b425501cff370444cdb
Former-commit-id: 13f7986fd6c31076c8664c245e74c3f8e481ea68
2024-07-25 14:04:52 +00:00
iobyte
67eeffab05 3rdParty: update to latest versions
git-svn-id: https://svn.code.sf.net/p/speed-dreams/code/trunk@9505 30fe4595-0a0c-4342-8851-515496e4dcbd

Former-commit-id: 4cdeec75c469767c162f0d2159b2e3aed8fa6a7a
Former-commit-id: cdc7c20aea5ae9faae2ea29573fd6d03b867c5b3
2024-07-25 12:43:03 +00:00
iobyte
61b4ceeade legacymenu: add curl dependency
git-svn-id: https://svn.code.sf.net/p/speed-dreams/code/trunk@9504 30fe4595-0a0c-4342-8851-515496e4dcbd

Former-commit-id: 32e4de10af2320cb9fea044b604f679a66ed7d21
Former-commit-id: 9ab4718317c7a596e0031446f89b44c36eba95ec
2024-07-24 20:57:04 +00:00
xavi92
e785f426d2 downloadsmenu.cpp: Extract asset on data directory
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
2024-07-24 16:22:20 +00:00
xavi92
0cc87184ea downloadsmenu.cpp: Fix typo
git-svn-id: https://svn.code.sf.net/p/speed-dreams/code/trunk@9502 30fe4595-0a0c-4342-8851-515496e4dcbd

Former-commit-id: eb7f37d7d005d33a87be913d984582472909fcf4
Former-commit-id: 1cd69820252ff46f776beaea4b2abe2627578b20
2024-07-24 16:11:41 +00:00
xavi92
7135e836d6 downloadsmenu.cpp: Fix wrong return value
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
2024-07-24 16:11:08 +00:00
iobyte
9f566208e7 fix protability rmdir_r link error
git-svn-id: https://svn.code.sf.net/p/speed-dreams/code/trunk@9500 30fe4595-0a0c-4342-8851-515496e4dcbd

Former-commit-id: c054513c48a9d6c4e57296b3e601f399772ffe28
Former-commit-id: 9711139713547b129c6374b95cbcc25b24d0a892
2024-07-24 00:08:03 +00:00
iobyte
53c321cfad fix curl header file compile error
git-svn-id: https://svn.code.sf.net/p/speed-dreams/code/trunk@9499 30fe4595-0a0c-4342-8851-515496e4dcbd

Former-commit-id: 1124f22f0c2dfdd30e774d022801073f1d7761d4
Former-commit-id: 2fbd6bd193ae97328a2e0351ac3ea78ca53237d5
2024-07-24 00:05:48 +00:00
iobyte
e520583509 legacymenu: add missing include files to CMakeLists.txt
git-svn-id: https://svn.code.sf.net/p/speed-dreams/code/trunk@9498 30fe4595-0a0c-4342-8851-515496e4dcbd

Former-commit-id: facfa6d8b23c669e6232c697465c6e0c190c1f5b
Former-commit-id: 8e836f44b3c2db85d0a5764d0d1373122f2399de
2024-07-22 18:19:31 +00:00
iobyte
7782ac66c6 portability: fix windows build
git-svn-id: https://svn.code.sf.net/p/speed-dreams/code/trunk@9497 30fe4595-0a0c-4342-8851-515496e4dcbd

Former-commit-id: 12629e2498a827919084b3a953a2ed4db51ff1b0
Former-commit-id: 242b719aff3a589bbfd277fd4dc9bcbfea72d38d
2024-07-22 16:36:09 +00:00
iobyte
e3c6a0d4a2 3rdParty: add zlib dependency for minizip
git-svn-id: https://svn.code.sf.net/p/speed-dreams/code/trunk@9496 30fe4595-0a0c-4342-8851-515496e4dcbd

Former-commit-id: 3069823fa03db7bc9959476a5a895765e468d3e4
Former-commit-id: 63a982d56e9960444d10761fea5ccf654c8ea77e
2024-07-22 16:09:56 +00:00
iobyte
07522bc4b8 3rdParty: fix cmake file
git-svn-id: https://svn.code.sf.net/p/speed-dreams/code/trunk@9495 30fe4595-0a0c-4342-8851-515496e4dcbd

Former-commit-id: 3f51ae1e738c910221d62f8f47bba70800630d23
Former-commit-id: 3eb5b6967938117af3609cf778c64e25b8cfa338
2024-07-20 19:16:57 +00:00
xavi92
5ee1a1adcf win32.cpp: Fix syntax errors
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
2024-07-19 15:17:40 +00:00
iobyte
b433af1e9a 3rdParty: add minizip and cjson
git-svn-id: https://svn.code.sf.net/p/speed-dreams/code/trunk@9493 30fe4595-0a0c-4342-8851-515496e4dcbd

Former-commit-id: 3a1a0eb230a4a0f44c0a2e2523e60eb2209ed826
Former-commit-id: f4fd83e6fdebd8deb4fc1265c9829c351673ef2f
2024-07-19 14:37:01 +00:00
iobyte
6ccba70934 update to latest curl
git-svn-id: https://svn.code.sf.net/p/speed-dreams/code/trunk@9491 30fe4595-0a0c-4342-8851-515496e4dcbd

Former-commit-id: e59fe8152280e4c58f0bea1c659abd54356abc6e
Former-commit-id: b09e9078acbb1c7121c895661c71cebcaa08fa1d
2024-07-16 20:48:42 +00:00
xavi92
4dd8b822e6 Implement in-game download manager
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
2024-07-15 03:27:16 +00:00
xavi92
afe8b2fa8b Add JSON schema and example for assets lists
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
2024-07-15 03:07:48 +00:00