485 Commits

Author SHA1 Message Date
Tixx
fa8627a22b
Fix recv return type and better download error handling (#178)
Fixes the recv return value type. This PR corrects the recv return value
type from `int32_t` to `int`. Casting the return value from `int` to
`int32_t` (Currently the case, changed by this pr) would in some cases,
if the transmitted packet was large enough, flip the value causing it to
be a high negative number, which recv will never return. This happens
frequently when downloading big mods over a fast connection.

---

By creating this pull request, I understand that code that is AI
generated or otherwise automatically generated may be rejected without
further discussion.
I declare that I fully understand all code I pushed into this PR, and
wrote all this code myself and own the rights to this code.
2025-03-29 20:18:19 +01:00
Tixx
dd5256ae22
Increase download speed calculation precision 2025-03-29 00:19:25 +01:00
Tixx
e24cbf61bb
Only fail on socket error or connection closed 2025-03-29 00:19:24 +01:00
Tixx
472e2d16b6
Fix recv return type and better download error handling 2025-03-29 00:19:24 +01:00
Tixx
ad7177bec8
Include chrono (#176)
By creating this pull request, I understand that code that is AI
generated or otherwise automatically generated may be rejected without
further discussion.
I declare that I fully understand all code I pushed into this PR, and
wrote all this code myself and own the rights to this code.
2025-03-23 22:38:20 +01:00
Tixx
a4005c5876
Include chrono 2025-03-15 23:06:49 +01:00
Tixx
a3ad6f8700
Properly handle the futures (#172)
This PR makes it so that the std::async calls are actually asynchronous.

---

By creating this pull request, I understand that code that is AI
generated or otherwise automatically generated may be rejected without
further discussion.
I declare that I fully understand all code I pushed into this PR, and
wrote all this code myself and own the rights to this code.
2025-03-08 22:29:08 +01:00
Tixx
d3bddb0203
Properly handle the future 2025-02-23 22:04:15 +01:00
Tixx
9e93fa35fa
Bump version v2.4.0 2025-01-21 22:36:40 +01:00
Tixx
8373a70c4b
Mod download improvements (#162)
This PR adds multiple features relating to mod downloads.
1. With this PR the launcher will convert old style mods (without hash)
to new style mods (with hash). This is so people don't have to
re-download all of their mods after joining a server which was
previously on a version below 3.6.0
2. This PR will save the last used date of mods in a JSON file in the
caching directory. This will allow for smart deletion of cached mods

---

By creating this pull request, I understand that code that is AI
generated or otherwise automatically generated may be rejected without
further discussion.
I declare that I fully understand all code I pushed into this PR, and
wrote all this code myself and own the rights to this code.
2025-01-18 22:56:33 +01:00
Tixx
d52a791dd9
Create mods.json if its missing 2025-01-18 22:29:49 +01:00
Tixx
08a6f9a093
Log current and backend version (#169)
By creating this pull request, I understand that code that is AI
generated or otherwise automatically generated may be rejected without
further discussion.
I declare that I fully understand all code I pushed into this PR, and
wrote all this code myself and own the rights to this code.
2025-01-18 21:13:54 +01:00
Tixx
e5e40e186b
Server info (#161)
Adds an `I` packet to the core handler, which allows the mod to use the
newly added [information packet
](https://github.com/BeamMP/BeamMP-Server/pull/382) in the server.
Usage:
Mod sends `I0.0.0.0:0000` and the launcher will send either
`I0.0.0.0:0000;` back if something went wrong, or `I0.0.0.0:0000;{Server
information JSON}` if it succeeded.

---

By creating this pull request, I understand that code that is AI
generated or otherwise automatically generated may be rejected without
further discussion.
I declare that I fully understand all code I pushed into this PR, and
wrote all this code myself and own the rights to this code.
2025-01-18 20:52:44 +01:00
Tixx
bfbff52cb1
Log current and backend version 2025-01-12 23:17:23 +01:00
Tixx
8d4ba6f158
Implement size header for info packet 2025-01-12 16:57:33 +01:00
Tixx
a5d450b680
Raise buffer and remove timeout 2025-01-11 22:13:12 +01:00
Tixx
f4e985976f
Strip packet letter in log 2025-01-11 21:55:08 +01:00
Tixx
db9ec53a6e
Up curl connection timeout to 2 minutes (#160)
In some cases it can take longer than 10 seconds to connect to the
backend, so in this PR I've raised the limit to 2 minutes.

---

By creating this pull request, I understand that code that is AI
generated or otherwise automatically generated may be rejected without
further discussion.
I declare that I fully understand all code I pushed into this PR, and
wrote all this code myself and own the rights to this code.
2025-01-11 21:54:35 +01:00
Tixx
f9b2edd410
Better curl debug (#165)
This PR makes it so the launcher logs curl's error description.

---

By creating this pull request, I understand that code that is AI
generated or otherwise automatically generated may be rejected without
further discussion.
I declare that I fully understand all code I pushed into this PR, and
wrote all this code myself and own the rights to this code.
2025-01-11 21:51:13 +01:00
Tixx
333a95262b
Check port and timeout recv 2025-01-11 21:50:39 +01:00
Tixx
e53885a8a8
Raise http get timeout to 2 minutes 2025-01-11 21:45:06 +01:00
Tixx
c22ea1e85d
Fix typo in README.md (#166)
Fix non-critical typo in README:md

---

By creating this pull request, I understand that code that is AI
generated or otherwise automatically generated may be rejected without
further discussion.
I declare that I fully understand all code I pushed into this PR, and
wrote all this code myself and own the rights to this code.
2025-01-08 16:41:24 +01:00
O1LER
f8ea9bd8a3
Fix typo in README.md 2025-01-08 16:38:29 +01:00
Tixx
ad8eab3d66
Log error buffer 2024-12-29 16:39:56 +01:00
Tixx
e880da5cf9
Up curl connection timeout to 2 minutes 2024-12-25 00:54:19 +01:00
Tixx
d14b64c652
Fix linux build 2024-12-25 00:07:13 +01:00
Tixx
649514ca1a
Save mod usage date 2024-12-24 13:53:50 +01:00
Tixx
a8a4dfb77c
Fixed GameDir location issues. (#152)
I couldn't launch the game without this.

---

By creating this pull request, I understand that code that is AI
generated or otherwise automatically generated may be rejected without
further discussion.
I declare that I fully understand all code I pushed into this PR, and
wrote all this code myself and own the rights to this code.
2024-12-23 23:00:47 +01:00
Tixx
7149075d53
Implement core server information packet 2024-12-22 23:56:29 +01:00
Tixx
c485fba26b
Change an easily confusable warning to debug 2024-12-22 12:13:59 +01:00
Tixx
d35567dd47
Look for new mods in the old format 2024-12-22 12:07:25 +01:00
Winos
f2b86cd5a0 Improved error handling as requested. 2024-12-16 09:10:54 -03:00
Tixx
3e7d16a8e8
Update Check for Game Files on Native Linux (#92)
Beforehand, the launcher would check only if the game directory existed.
This would lead to an error if the game was moved through Steam since
Steam leaves the BeamNG.Drive directory behind. Now it checks for to see
if integrity.json is inside. I also removed some commented out code I
seem to have left behind when I was porting it.

I agree to this code (and the whole port to native Linux since the #63
was locked and I couldn't agree there) being licensed under AGPL 3.
2024-12-14 20:47:58 +01:00
Tixx
03748d096f
Switch to AGPL-3.0 (#86)
LOCKED until:
- [ ] Review each individual file for third party licenses
- [ ] Implement AGPL headers into each file
- [ ] Get confirmation from all contributors/copyright owners to make
the license change
- [ ] Eventually figure out bits of code of contributors that either
dont agree to the license change or that are unresponsive
2024-12-14 20:44:20 +01:00
Tixx
096d07fe9b
Update build instructions (#156)
Update build instructions

Adresses both #155 and #153 

---

By creating this pull request, I understand that code that is AI
generated or otherwise automatically generated may be rejected without
further discussion.
I declare that I fully understand all code I pushed into this PR, and
wrote all this code myself and own the rights to this code.
2024-12-14 18:19:06 +01:00
O1LER
e7a0325e70 Add vcpkg to einstructions 2024-12-11 14:08:36 +01:00
PoorPockets McNewHold
7f627aaf92
Add missing vcpkg package for Fedora
```
BeamMP-Launcher on  master via △ v3.30.5 
 ❯ sudo dnf group info "Development Tools" 
Dernière vérification de l’expiration des métadonnées effectuée il y a 0:48:01 le mer. 11 déc. 2024 08:39:18.
Groupe : Outils de développement
 Description : Ces outils comprennent des outils de développement principaux comme git et cvs.
 Paquets obligatoires :
   gettext
 Paquets par défaut :
   diffstat
   doxygen
   git
   patch
   patchutils
   subversion
   systemtap
 Paquets optionnels :
   buildbot
   colordiff
   cvs
   cvs2cl
   cvsps
   darcs
   dejagnu
   expect
   gambas3-ide
   git-annex
   git-cola
   git2cl
   gitg
   gtranslator
   highlight
   lcov
   manedit
   meld
   monotone
   myrepos
   nemiver
   qgit
   quilt
   rapidsvn
   rcs
   robodoc
   scanmem
   subunit
   svn2cl
   tig
   tortoisehg
   translate-toolkit
   utrac
```
vcpkg isn't part of the Development Tools group on Fedora.
2024-12-11 09:28:56 +01:00
Winos
63aee03969 Update BeamNG.cpp
As requested:
- Changed 'string' variables that referred to paths to 'filesystem'.
- Added error log for when a valid 'GameDir' isn't found.

Also readded error log for when 'libraryfolders.vdf' is missing for better contextualization for the 'basic_string::_M_replace_aux' error (the code doesn't reach the GameDir segment when that file is not found).
2024-12-10 20:10:07 -03:00
Tixx
46e6fda26e
Update license header 2024-12-07 11:26:09 +01:00
Lion Kortlepel
87c7edf404
fixup readme 2024-12-07 11:12:18 +01:00
Lion
f4fcbd63f5
Update README.md 2024-12-07 11:11:28 +01:00
Lion
7f1072b7c2
Create LICENSE 2024-12-07 11:10:51 +01:00
Winos
89327b8e20
Update src/Security/BeamNG.cpp
Co-authored-by: Tixx <83774803+WiserTixx@users.noreply.github.com>
2024-12-06 15:03:25 -03:00
Winos
ebf1579ce4
Update src/Security/BeamNG.cpp
Co-authored-by: Tixx <83774803+WiserTixx@users.noreply.github.com>
2024-12-06 15:03:19 -03:00
Winos
a06470cb70
Update src/Security/BeamNG.cpp
Co-authored-by: Tixx <83774803+WiserTixx@users.noreply.github.com>
2024-12-06 15:02:07 -03:00
Winos
80a3feb349
Update src/Security/BeamNG.cpp
Co-authored-by: Tixx <83774803+WiserTixx@users.noreply.github.com>
2024-12-06 15:02:00 -03:00
Tixx
f2166ff8c6
Add linux building instructions (#149)
- Do we need to mention that vcpkg should be installed in the first
place?
- Do we need to specify what the difference between release and debug
builds is?
- Are there any other prerequisites for building on windows?

---

By creating this pull request, I understand that code that is AI
generated or otherwise automatically generated may be rejected without
further discussion.
I declare that I fully understand all code I pushed into this PR, and
wrote all this code myself and own the rights to this code.
2024-12-06 17:34:05 +01:00
Winos
ec1a09bbcb Fixed GameDir localization issues.
I couldn't launch the game without this.
2024-12-05 03:56:13 -03:00
Tixx
811fe41afb
Update CMakeLists.txt to fix linux compilation (#151)
Fixed the Cmake lists file so it properly detects linux-based systems.
thats all. :3

By creating this pull request, I understand that code that is AI
generated or otherwise automatically generated may be rejected without
further discussion. I declare that I fully understand all code I pushed
into this PR, and wrote all this code myself and own the rights to this
code.
2024-12-03 13:30:15 +01:00
FirewallDaProtogen
c518a036ed
Update CMakeLists.txt 2024-12-03 03:51:32 -05:00