-
Notifications
You must be signed in to change notification settings - Fork 46
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add Native Linux Support #63
Conversation
src/Compressor.cpp
Outdated
@@ -27,7 +30,7 @@ std::string Comp(std::string Data){ | |||
deflateEnd(&defstream); | |||
int TO = defstream.total_out; | |||
std::string Ret(TO,0); | |||
memcpy_s(&Ret[0],TO,C,TO); | |||
memcpy(&Ret[0],C,TO); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Annex K functions are not necessary here and they aren't portable.
src/GameStart.cpp
Outdated
struct passwd *pw = getpwuid(getuid()); | ||
std::string homeDir = pw->pw_dir; | ||
|
||
std::string Path = homeDir + "/.local/share/BeamNG.drive/"; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
~/.local/share/BeamNG.drive is the default user folder.
src/Network/Core.cpp
Outdated
except("(Core) Code : " + std::string(strerror(errno))); | ||
} | ||
#endif | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Made this code more readable.
src/Security/BeamNG.cpp
Outdated
GameDir = folderInfo.second->attribs["path"] + "/steamapps/common/BeamNG.drive/"; | ||
break; | ||
} | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This only works for steam as it uses the steam libraryfolders.vdf to find the game. There is no registry on Linux so it would be difficult to find the game otherwise.
src/Security/Login.cpp
Outdated
PublicKey = d["public_key"].GetString(); | ||
} | ||
info("Authentication successful!"); | ||
}else info("Authentication failed!"); | ||
if(!d["message"].IsNull()){ | ||
if(d.HasMember("message") && !d["message"].IsNull()){ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
rapidjson errors on linux when you get a member that doesn't exist. We check if the member exists first.
Hi, thanks for the contribution. Currently, we're in the process of making significant changes to the launcher, so this will not be merged at this time. Changes include a rework of the protocol. |
merge, coward |
I'd happily introduce some of these ideas to the new version, but as you saw from the code, the current launcher is not in an acceptable state. I've locked the conversation for now, @thevbw please direct your comments to /dev/null |
Will fix this up ourselves :) @gamingdoom you ok with licensing your code AGPL-3.0? |
This PR allows BeamMP to be compiled natively for Linux for use with the native version of the game, while making no changes to the Windows version.
Currently, the Linux version of BeamMP:
This PR also: