-
Notifications
You must be signed in to change notification settings - Fork 46
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #96 from BeamMP/finalize-linux-merge
Finalize linux merge
- Loading branch information
Showing
28 changed files
with
2,535 additions
and
1,310 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
--- | ||
BasedOnStyle: WebKit | ||
BreakBeforeBraces: Attach | ||
SpaceAfterTemplateKeyword: false | ||
... |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
name: CMake Linux Build | ||
|
||
on: [push, pull_request, workflow_dispatch] | ||
|
||
env: | ||
BUILD_TYPE: Release | ||
|
||
jobs: | ||
linux-build: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- uses: actions/checkout@v2 | ||
with: | ||
submodules: 'true' | ||
|
||
- name: Restore artifacts, or run vcpkg, build and cache artifacts | ||
uses: lukka/run-vcpkg@v7 | ||
id: runvcpkg | ||
with: | ||
vcpkgArguments: 'zlib nlohmann-json openssl cpp-httplib[openssl]' | ||
vcpkgDirectory: '${{ runner.workspace }}/b/vcpkg' | ||
vcpkgGitCommitId: '40616a5e954f7be1077ef37db3fbddbd5dcd1ca6' | ||
|
||
- name: Create Build Environment | ||
run: cmake -E make_directory ${{github.workspace}}/build-linux | ||
|
||
- name: Configure CMake | ||
shell: bash | ||
working-directory: ${{github.workspace}}/build-linux | ||
run: cmake $GITHUB_WORKSPACE -DCMAKE_BUILD_TYPE=$BUILD_TYPE -DCMAKE_TOOLCHAIN_FILE='${{ runner.workspace }}/b/vcpkg/scripts/buildsystems/vcpkg.cmake' | ||
|
||
- name: Build | ||
working-directory: ${{github.workspace}}/build-linux | ||
shell: bash | ||
run: cmake --build . --config $BUILD_TYPE | ||
|
||
- name: Archive artifacts | ||
uses: actions/upload-artifact@v2 | ||
with: | ||
name: BeamMP-Launcher | ||
path: ${{github.workspace}}/build-linux/BeamMP-Launcher |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
#ifndef _LINUXFIXES_H | ||
#define _LINUXFIXES_H | ||
|
||
#include <stdint.h> | ||
|
||
// Translate windows sockets stuff to linux sockets | ||
#define SOCKET uint64_t | ||
#define SOCKADDR sockaddr | ||
#define SOCKADDR_IN sockaddr_in | ||
#define WSAGetLastError() errno | ||
#define closesocket close | ||
#define SD_BOTH SHUT_RDWR | ||
// We dont need wsacleanup | ||
#define WSACleanup() | ||
#define SOCKET_ERROR -1 | ||
|
||
#define ZeroMemory(mem, len) memset(mem, 0, len) | ||
|
||
#endif |
Oops, something went wrong.