Commit Graph
100 Commits
Author SHA1 Message Date
Tixx a6e3db6b08 Merge branch 'master' into download-fix 2026-08-02 13:04:25 +02:00
Tixx 92381aa048 handle incomplete MSG_WAITALL during tcp receive (#248)
Addresses https://github.com/BeamMP/BeamMP-Launcher/issues/185 by
handling incomplete TCP recv despite MSG_WAITALL

Fixes running the launcher inside of wine as well as the rare instances
where this happens natively.

```
       MSG_WAITALL (since Linux 2.2)
              This flag requests that the operation block until the full request is satisfied.
              However, the call may still return less data than requested if a signal is caught,
              an error or disconnect occurs, or the next data to  be  re‐ceived is of a different type
              than that returned.  This flag has no effect for datagram sockets.

```

---

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.
2026-06-13 22:16:20 +02:00
Tixx eeca50b37e Fix download size int casting 2026-04-21 17:14:42 +02:00
Tixx f30a88e76e Bump version to 2.8.0 2026-04-01 00:35:14 +02:00
Tixx 18a10dfe8f Better updating (#236)
Check hash pattern and launcher signature

---

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.
2026-04-01 00:05:16 +02:00
Tixx 7ae273f550 Check hash with regex 2026-03-31 23:54:12 +02:00
Tixx 13102552b7 Check launcher update signature 2026-03-31 23:54:09 +02:00
Tixx 8e4cfe55b9 Update vcpkg commit id (#234)
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.
2026-03-29 22:55:16 +02:00
Tixx 1a7bd19bc6 Update vcpkg commit id 2026-03-29 19:21:55 +02:00
Tixx f79f05bc9d Better header (redone) (#139) 2026-03-29 19:16:01 +02:00
Tixx b1e29a9295 Fix build on linux (#230)
Comment out unused function

#224 #226
---

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.
2026-03-21 20:28:40 +01:00
Tixx c6ae924346 Remove WriteHttpDebug function 2026-03-21 20:23:31 +01:00
Tixx 6e26a28831 Comment out unused function 2026-03-09 09:22:50 +01:00
Tixx e3049b3ba5 Small fixes (#222)
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.
2026-01-31 20:47:59 +01:00
Tixx b1c3b978ff Fix include order for winsock2 2026-01-24 20:34:47 +01:00
Tixx 5cb4d79cdd Check for BeamNG to find the correct path 2026-01-17 19:46:17 +01:00
Tixx dbb0ef2a5c Compensate for packet loss 2026-01-17 19:44:54 +01:00
Tixx fab9ff5559 Provide more info if the launcher update fails (#214)
Also prevents the launcher from bricking itself (again)

---

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-11-22 20:09:15 +01:00
Tixx a2789a8524 Bump version to v2.7.0 2025-10-20 22:39:36 +02:00
Tixx 3db98eaf0c Provide more info if the launcher update fails
Also prevents the launcher from bricking itself (again)
2025-10-05 15:13:49 +02:00
Tixx 6f84b56f1b Bump version 2025-09-27 20:47:14 +02:00
Tixx 6f5197217c Workaround bom header (#211)
This PR removes the utf8 bom encoding header which was causing issues.
This PR also adds support for unicode characters in the terminal on
windows.

For context it looks like the BeamNG launcher only encodes it with the
utf8 header, which is what it's currently removing.

---

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-09-27 20:14:10 +02:00
Tixx d1d2b3414b Adjust ini parser (#212)
This PR removes mid-line ini comments which were causing issue because
users had `#` and `;` in their file path.

---

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-09-27 20:08:13 +02:00
Tixx a669557726 Make logger stdout cross platform again 2025-09-21 21:54:24 +02:00
Tixx be1f5c04f7 Remove mid-line ini comments 2025-09-21 21:49:40 +02:00
Tixx 1209ff88e2 Support unicode in windows terminal 2025-09-21 21:39:57 +02:00
Tixx c40af681bf Strip bom encoding 2025-09-21 21:39:38 +02:00
Tixx c03b1d5946 Bump version to v2.6.3 2025-09-17 09:20:21 +02:00
Tixx 5e73c7bce2 Check outdated registry entry for GameDir 2025-09-17 09:19:50 +02:00
Tixx 386f471362 Fix includes for linux build 2025-09-16 20:16:28 +02:00
Tixx 6c3bfda23b Bump version to v2.6.2 2025-09-16 20:09:56 +02:00
Tixx 5737e27bf3 Use ini instead of registry for game dir 2025-09-16 20:07:57 +02:00
Tixx 1860c0aef1 Fix userfolder on linux (hopefully) 2025-09-16 20:07:26 +02:00
Tixx 9d20b678f9 Bump version to v2.6.1 2025-09-16 17:53:29 +02:00
Tixx be7594039e Fix updating logic 2025-09-16 17:52:30 +02:00
Tixx 77f3375658 Bump version to v2.6.0 2025-09-16 16:38:55 +02:00
Tixx ae6e5b51bf User folder parsing updates (#208)
This PR adds support for the changes made to the BeamNG userfolder path
location.
1. Registry check for userfolder removed
2. New ini file is checked for userfolder
3. Ini parser now supports global keys

---

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-09-16 16:36:07 +02:00
Tixx 8a0f87f476 Remove registry check and add support for new ini file 2025-09-16 16:11:26 +02:00
Tixx 33b2030f97 Support global keys in ini 2025-09-16 16:10:16 +02:00
Tixx 5b2eb0a1a0 Change to execution paths to binary paths (#200)
Previously, it used argv[0] for the execution path, which is fine in
most cases, but in my case, it is not.
The thing is, I use NixOS, and I have created a Nix module for BeamMP.
When running BeamMP-Launcher, it tries to check for updates, and fails
because of the SHA hash.
There are other ways around this, such as setting the execution
directory, but I think this is a far clearer approach

---

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-08-02 19:38:18 +02:00
Tixx b6b0e4ba3e Refine updating (#201)
This PR makes the launcher update more reliable by downloading the
update to a "new_BeamMP-Launcher.exe" file, instead of the launcher
renaming itself to a backup (effectively bricking itself and the
shortcut) and then hoping the download doesn't fail.

---

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-07-27 01:58:06 +02:00
Tixx a87aa7230a Make null termination in hex encoding more clear 2025-07-27 01:07:23 +02:00
Tixx b9cc025083 Check hashes after downloading 2025-07-25 23:50:16 +02:00
Tixx c0ed056440 Fix for backup failing when it's in use
The backup file may still be in use by older launcher versions (v2.0.71) if they update
2025-07-17 14:33:25 +02:00
Tixx e6e5bf8327 Fix launcher update to delete backup after download 2025-07-17 14:32:17 +02:00
Tixx e7cfb6e406 Add Debian legacy Steam installation path (#198)
Current Steam installations seem to have a much cleaner filesystem
layout on Debian while older ones look quite different.

Older Debian installations ~/.steam/root points to ~/.steam while newer
ones point to ~/.steam/debian-installation and hence BeamMP cannot find
integrity.json. 'steamapps' is at ~/.steam/debian-installation in newer
installations.

On the older installations, 'steamapps' is at ~/.steam/steam/steamapps.

---

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-07-09 11:12:11 +02:00
Tixx 406c79ef82 Bump version to v2.5.1 2025-07-08 13:24:32 +02:00
Tixx f104451bb9 Switch Invalid INI line log to debug (#196)
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-07-05 20:24:43 +02:00
Tixx d52def2114 Make new CheckVer & GetEN compatible with linux (#195)
Fixes issues for linux that came from PR #167 

---

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-07-03 23:29:07 +02:00
Tixx d71757b56c Switch Invalid INI line log to debug 2025-06-29 12:56:24 +02:00
Tixx f7d3fcf925 Make new CheckVer & GetEN compatible with linux 2025-06-29 10:07:34 +02:00
Tixx 7bef6f35c2 Bump version to 2.5.0 2025-06-28 20:21:17 +02:00
Tixx b64d645f73 Switch to wstring for paths on windows (#167)
This PR changes everything relating to file system paths to use
std::wstring instead of std::string. This allows for non-latin
characters to be in the user's path, for example in their windows
username.

- [x] Convert windows code to use wstring
- [x] Fix linux build
- [x] Fix hashing

---

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-28 19:25:13 +02:00
Tixx 1780133569 Include assert 2025-06-25 14:29:29 +02:00
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