Commit Graph
100 Commits
Author SHA1 Message Date
TixxandSaltySnail c89afdf477 Check
Co-authored-by: SaltySnail <51403141+SaltySnail@users.noreply.github.com>
2025-06-24 22:17:14 +02:00
TixxandSaltySnail 9d44146224 Regex assert
Co-authored-by: SaltySnail <51403141+SaltySnail@users.noreply.github.com>
2025-06-24 22:16:17 +02:00
TixxandSaltySnail a5c02217fa Update ini parse check formatting
Co-authored-by: SaltySnail <51403141+SaltySnail@users.noreply.github.com>
2025-06-20 23:04:07 +02:00
Tixx 303fc55d94 Fix syntax error 2025-06-19 18:13:46 +02:00
Tixx 5f1e7c6409 Fix resources dir log message for linux 2025-06-19 18:07:59 +02:00
Tixx 8025c0884f Fix download path generation 2025-06-19 17:56:59 +02:00
Tixx 51d096deac Check if BeamMP.zip exists before hashing 2025-06-08 14:01:48 +02:00
Tixx 9c53f86593 Convert GetGamePath() to fs::path 2025-06-08 14:01:23 +02:00
Tixx e0257e9526 Update NewSyncResources logs to use wstring 2025-06-08 13:51:16 +02:00
Tixx 8b96ffb098 Fix .git folder check and GetGamePath() 2025-06-08 13:45:09 +02:00
Tixx 6c740e2562 Fix merge 2025-06-08 13:34:15 +02:00
Tixx 06c741edc5 Fix wstring for windows and add crossplatform code for fs strings 2025-06-08 13:34:15 +02:00
Tixx 5e448dc34f Switch to wstring for paths on windows 2025-06-08 13:34:15 +02:00
Tixx 676084f283 Implement DeleteDuplicateMods option (#190)
Adds `DeleteDuplicateMods` option to the launcher config which, well,
deletes mods with the same name if their hashes mismatch. Useful for
development where client mod hashes can frequently change.

---

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-06-08 12:56:23 +02:00
TixxandSaltySnail a8cd208208 Make duplicate mod detection more readable
Co-authored-by: SaltySnail <51403141+SaltySnail@users.noreply.github.com>
2025-06-08 12:37:35 +02:00
Tixx 2529146d5a Implement DeleteDuplicateMods option 2025-06-08 12:37:32 +02:00
Tixx 8d641f326d Check if unpacked BeamMP has a .git folder before deleting it (#193)
This PR makes it so that the launcher will first check for the presence
of a .git folder before deleting the unpacked BeamMP directory.
This is useful when you're working on the BeamMP mod and you
accidentally start the launcher without dev mode. (This has happened to
me more times than I would like to admit.)

---

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-06-07 20:07:23 +02:00
Tixx 5af9f5da36 Show cached mods in download progress (#189)
This PR adds cached mods to the "Loading resources" pop-up in-game and
makes it so that the count is actually right.
This PR also fixes the mod protection message because for some reason I
forced it to be always off 😁.

---

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-06-07 20:05:52 +02:00
Tixx baba0ad026 Check if unpacked BeamMP has a .git folder before deleting it 2025-06-07 17:50:20 +02:00
Tixx b1ebcfc18d Fix mod protection message 2025-05-27 22:12:07 +02:00
Tixx 187ef3b24f Show cached mods being loaded in download progress 2025-05-27 22:09:52 +02:00
Tixx 943889d588 Fix mod downloading progress 2025-05-27 22:08:50 +02:00
Tixx edbd99f389 Added CLI argument for user-path (#148)
Simple addition to the CLI args. It could probably do with some
validation, ie; making sure it ends in a slash.

cc: @WiserTixx
2025-05-05 23:47:11 +02:00
Tixx 0341d401e7 Download check (#184)
This PR makes it so that the mod hash and download confirmation are
verified before proceeding.

---

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-05-05 23:46:32 +02:00
Tixx da84d62391 Notify user about missing protected mods (#183)
Launcher implementation for
https://github.com/BeamMP/BeamMP-Server/pull/430. This PR checks if mods
are protected, and if a mod is missing the launcher will notify the user
about it and give them instructions on how to resolve it.

---

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-05-05 23:46:14 +02:00
Tixx cc6167cd2e Bump version 2025-05-03 22:20:55 +02:00
Tixx d3263acead Log corrupted download confirmation 2025-05-01 20:54:28 +02:00
Tixx 4de0bc9a40 Check download confirmation packet 2025-05-01 20:47:16 +02:00
Tixx 25a1061700 Verify mod hash after downloading 2025-05-01 20:42:01 +02:00
Tixx f193c25de6 Switch to using INI parser for startup.ini file 2025-04-27 23:35:39 +02:00
Tixx efe9f5b614 Add INI parser and function to expand env vars 2025-04-27 23:35:11 +02:00
Tixx 6244fdafc6 Use std::filesystem::operator/ instead of string concat 2025-04-26 19:45:10 +02:00
TixxandLion ca93effb7d Update --user-path error message
Co-authored-by: Lion <development@kortlepel.com>
2025-04-26 18:46:15 +02:00
Tixx f9d347bd9b Look for a userfolder specficied in the game's ini config 2025-04-26 18:42:41 +02:00
Tixx a63f1bd27c Check if user path argument exists 2025-04-26 18:42:40 +02:00
Tixx 6597fe5e26 Rename windows api variable 2025-04-19 21:23:51 +02:00
Tixx 2fa5d69369 Link to the docs (#181)
Link to the docs instead

---

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-04-05 12:45:22 +02:00
Tixx dc78883451 Notify user about missing protected mods 2025-04-01 09:09:49 +02:00
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 ae650cc142 Get error code when the game fails to launch on windows 2025-03-28 23:16:37 +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 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
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
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
Tixx 46e6fda26e Update license header 2024-12-07 11:26:09 +01: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
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
Tixx dff2f2712b Bump version 2024-11-07 22:12:20 +01:00
Tixx d58ff960ec Fix github regex 2024-11-07 21:39:18 +01:00
Tixx f67f8573e0 Log zlib error messages 2024-11-07 21:36:38 +01:00
Tixx e0041666ca Clarify and change auth message log 2024-11-05 10:26:10 +01:00
Tixx ed686333ec Print message from auth 2024-11-05 10:15:10 +01:00
Tixx bd4c9c34a9 Add BeamMP github to the list of allowed links 2024-11-02 22:33:26 +01:00
Tixx 8519e279a7 Add beammp.gg to the list of allowed links 2024-11-02 22:18:46 +01:00
Tixx 4fdc3c4031 Fix --port 2024-10-20 16:59:00 +02:00
Tixx 708da44fec Remove unused code 2024-10-20 16:57:47 +02:00
Tixx 6b6e304cfd Switch to std::async 2024-10-18 19:23:53 +02:00
Tixx 06cb366bb5 Add mutex to CoreSend 2024-10-16 23:12:02 +02:00
Tixx 0b35f0484f put blocking http requests on another thread 2024-10-16 23:12:02 +02:00
Tixx ca9dd1ae75 Switch to only timeout on connection 2024-10-14 20:29:19 +02:00
Tixx d9874ce70e Make return from parsemodinfo look better 2024-10-12 21:12:12 +02:00
Tixx 423519f31e Only listen on localhost ipv4 (#134)
This avoids the firewall popup on windows.
2024-10-12 20:58:29 +02:00
Tixx 3f12bb757a Mod info logs and check for old format 2024-10-10 21:35:27 +02:00
Tixx 4fbd25b551 Handle new modlist being empty but still valid 2024-10-09 19:41:38 +02:00
Tixx 3cf1a2e51b Add mod info debug log 2024-10-09 19:39:27 +02:00
Tixx afac729505 Ixmplement game arguments for linux 2024-10-06 15:56:48 +02:00
Tixx 0c53ff4cd4 Pass game arguments to beamng on windows 2024-10-05 18:34:39 +02:00
Tixx 68a4d64387 Fix linux relauch 2024-10-05 18:08:25 +02:00
Tixx 5bdd8c11da Fix relaunch 2024-10-05 18:01:47 +02:00
Tixx 47681cda50 Let user know about update even if --no-update was specified 2024-10-05 18:01:36 +02:00
Tixx c99fecfa1c Fix debug log 2024-10-05 17:26:14 +02:00
Tixx d26e0320e4 Add back support for old dev argument with warning 2024-10-05 17:26:14 +02:00