Skip to content
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

New protocol #75

Draft
wants to merge 53 commits into
base: master
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
53 commits
Select commit Hold shift + click to select a range
7e9d4e0
remove all files
lionkor Jan 19, 2024
3fc7428
fix gitignore
lionkor Jan 19, 2024
12ba13d
move new protocol code into main repo
lionkor Jan 19, 2024
a4a1e4e
remove workflows
lionkor Jan 19, 2024
8eb8a80
remove doxygen stuff
lionkor Jan 19, 2024
03dc3e3
implement states until session setup
lionkor Jan 21, 2024
a3a946c
remove executable bit from files
lionkor Jan 25, 2024
e2a2b48
update protocol
lionkor Jan 25, 2024
c17cb84
add vcpkg
lionkor Jan 25, 2024
0d70012
add map info code
lionkor Jan 25, 2024
2d0cbc4
add ci/cd from server
lionkor Jan 25, 2024
1ad3736
comment out arm
lionkor Jan 25, 2024
265d87b
update scripts to include pkgconfig
lionkor Jan 25, 2024
1070584
include charconv for from_chars
lionkor Jan 25, 2024
0eec0fd
add platform define for tests
lionkor Jan 25, 2024
4dad60b
implement state change to playing
lionkor Jan 25, 2024
6a7bf72
add playing state
lionkor Jan 26, 2024
ece4a42
windows compat
lionkor Jan 26, 2024
cd1b2e5
remove main from common sources so the tests build
lionkor Jan 26, 2024
050261b
update protocol
lionkor Mar 2, 2024
c918d8f
update protocol again to fix compiler issue
lionkor Mar 2, 2024
23cf248
update protocol to add files
lionkor Mar 2, 2024
c5a6fc7
add client network
lionkor Mar 2, 2024
b5f0d9d
add game info
lionkor Mar 2, 2024
d141bf3
start work on login
lionkor Mar 3, 2024
874f381
rework identity to be more modular and less shit
lionkor Mar 3, 2024
e4eb9a6
fixup identity
lionkor Mar 3, 2024
fe9b2ad
add Result, move game socket to class
lionkor Mar 3, 2024
920f682
streamline login
lionkor Mar 3, 2024
6c67d07
finish login state
lionkor Mar 3, 2024
c74967e
add auto login
lionkor Mar 3, 2024
342b3c3
add an ugly launcher reference
lionkor Mar 3, 2024
387bce5
implement more plumbing between client and server network
lionkor Mar 3, 2024
ba82b89
break on error in client connection
lionkor Mar 3, 2024
c0a8071
rename pk_json to private_key_json
lionkor Mar 3, 2024
ebdb94f
fix server list endpoint url
snepsnepsnep Mar 8, 2024
15691ad
fix UB when reading key file
lionkor Mar 9, 2024
061258f
make unused-result not an error due to ubuntu's gcc :^)
lionkor Mar 9, 2024
fb39318
fix not switching to browsing when autologin
lionkor Mar 9, 2024
b9be399
fix missing closing parens on "connected to..." log
lionkor Mar 9, 2024
c6e07cd
switch to make ClientNetwork async
lionkor Mar 9, 2024
120a51e
add send debug message
lionkor Mar 9, 2024
60b6d6f
allow gzip compressed server list
lionkor Mar 10, 2024
29b4fa9
dos2unix, cache http connections for reuse
lionkor Mar 10, 2024
4e304f7
fix not reading continuously and other async bugs
lionkor Mar 10, 2024
5d56d52
make server network async, implement connecting
lionkor Mar 10, 2024
72a5e7c
add udp read
lionkor Mar 10, 2024
e836ad5
implement server network -> client network communication
lionkor Mar 10, 2024
d11262f
implement an outbox to ensure only one write() at a time
lionkor Mar 11, 2024
2d5f95c
fix result unused attribute
lionkor Mar 27, 2024
afaa350
only look for game if not dev mode
lionkor Mar 27, 2024
eb78630
add debug messages
lionkor Mar 27, 2024
9de3658
post HTTP::Get
lionkor Mar 27, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .clang-format
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
BasedOnStyle: WebKit
BreakBeforeBraces: Attach
SpaceAfterTemplateKeyword: false
...
43 changes: 0 additions & 43 deletions .github/workflows/cmake-windows.yml

This file was deleted.

152 changes: 152 additions & 0 deletions .github/workflows/linux.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,152 @@
name: Linux

on: [push]


env:
VCPKG_BINARY_SOURCES: "clear;x-gha,readwrite"
VCPKG_FORCE_SYSTEM_BINARIES: 1
CMAKE_BUILD_TYPE: "Release"
DEBIAN_FRONTEND: "noninteractive"

jobs:
x86_64-matrix:
runs-on: ubuntu-22.04
strategy:
matrix:
include:
- distro: debian
version: 11
- distro: debian
version: 12
- distro: ubuntu
version: 22.04
- distro: ubuntu
version: 20.04
container:
image: ${{ matrix.distro }}:${{ matrix.version }}
steps:
- name: get-cmake
uses: lukka/[email protected]

- name: Export GitHub Actions cache environment variables
uses: actions/github-script@v6
with:
script: |
core.exportVariable('ACTIONS_CACHE_URL', process.env.ACTIONS_CACHE_URL || '');
core.exportVariable('ACTIONS_RUNTIME_TOKEN', process.env.ACTIONS_RUNTIME_TOKEN || '');

- name: Install git
run: |
apt-get update -y
apt-get install -y git

- uses: actions/checkout@v2
with:
submodules: 'recursive'

- name: Git config safe directory
shell: bash
run: bash ./scripts/${{ matrix.distro }}-${{ matrix.version }}/1.5-git-safe.sh

- name: Install Dependencies
run: bash ./scripts/${{ matrix.distro }}-${{ matrix.version }}/1-install-deps.sh

- name: Create Build Environment
run: bash ./scripts/${{ matrix.distro }}-${{ matrix.version }}/2-configure.sh '-DCMAKE_TOOLCHAIN_FILE=./vcpkg/scripts/buildsystems/vcpkg.cmake'

- name: Build Launcher
run: bash ./scripts/${{ matrix.distro }}-${{ matrix.version }}/3-build.sh

- name: Archive launcher artifact
uses: actions/upload-artifact@v2
with:
name: BeamMP-Launcher.${{ matrix.distro }}.${{ matrix.version }}.x86_64
path: ./bin/BeamMP-Launcher

- name: Archive launcher debug info artifact
uses: actions/upload-artifact@v2
with:
name: debuginfo.${{ matrix.distro }}.${{ matrix.version }}.x86_64
path: ./bin/BeamMP-Launcher.debug

- name: Build Tests
run: bash ./scripts/${{ matrix.distro }}-${{ matrix.version }}/3-build-tests.sh

- name: Install Runtime Dependencies
run: bash ./scripts/${{ matrix.distro }}-${{ matrix.version }}/4-install-runtime-deps.sh

- name: Test
run: ./bin/BeamMP-Launcher-tests

# arm64-matrix:
# runs-on: [Linux, ARM64]
# env:
# VCPKG_DEFAULT_TRIPLET: "arm64-linux"
# strategy:
# matrix:
# include:
# - distro: debian
# version: 11
# - distro: debian
# version: 12
# - distro: ubuntu
# version: 22.04
# - distro: ubuntu
# version: 20.04
# container:
# image: ${{ matrix.distro }}:${{ matrix.version }}
# steps:
# - name: get-cmake
# uses: lukka/[email protected]
#
# - name: Export GitHub Actions cache environment variables
# uses: actions/github-script@v6
# with:
# script: |
# core.exportVariable('ACTIONS_CACHE_URL', process.env.ACTIONS_CACHE_URL || '');
# core.exportVariable('ACTIONS_RUNTIME_TOKEN', process.env.ACTIONS_RUNTIME_TOKEN || '');
#
# - name: Install git
# run: |
# apt-get update -y
# apt-get install -y git
#
# - uses: actions/checkout@v2
# with:
# submodules: 'recursive'
#
# - name: Git config safe directory
# shell: bash
# run: bash ./scripts/${{ matrix.distro }}-${{ matrix.version }}/1.5-git-safe.sh
#
# - name: Install Dependencies
# run: bash ./scripts/${{ matrix.distro }}-${{ matrix.version }}/1-install-deps.sh
#
# - name: Create Build Environment
# run: bash ./scripts/${{ matrix.distro }}-${{ matrix.version }}/2-configure.sh '-DCMAKE_TOOLCHAIN_FILE=./vcpkg/scripts/buildsystems/vcpkg.cmake'
#
# - name: Build Launcher
# run: bash ./scripts/${{ matrix.distro }}-${{ matrix.version }}/3-build.sh
#
# - name: Archive launcher artifact
# uses: actions/upload-artifact@v2
# with:
# name: BeamMP-Launcher.${{ matrix.distro }}.${{ matrix.version }}.arm64
# path: ./bin/BeamMP-Launcher
#
# - name: Archive launcher debug info artifact
# uses: actions/upload-artifact@v2
# with:
# name: debuginfo.${{ matrix.distro }}.${{ matrix.version }}.arm64
# path: ./bin/BeamMP-Launcher.debug
#
# - name: Build Tests
# run: bash ./scripts/${{ matrix.distro }}-${{ matrix.version }}/3-build-tests.sh
#
# - name: Install Runtime Dependencies
# run: bash ./scripts/${{ matrix.distro }}-${{ matrix.version }}/4-install-runtime-deps.sh
#
# - name: Test
# run: ./bin/BeamMP-Launcher-tests
#
72 changes: 0 additions & 72 deletions .github/workflows/release-build.yml

This file was deleted.

43 changes: 43 additions & 0 deletions .github/workflows/windows.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
name: Windows

on: [push]

env:
VCPKG_DEFAULT_TRIPLET: x64-windows-static
VCPKG_BINARY_SOURCES: "clear;x-gha,readwrite"
CMAKE_BUILD_TYPE: "Release"

jobs:
windows-build:
runs-on: windows-latest
steps:
- name: Export GitHub Actions cache environment variables
uses: actions/github-script@v6
with:
script: |
core.exportVariable('ACTIONS_CACHE_URL', process.env.ACTIONS_CACHE_URL || '');
core.exportVariable('ACTIONS_RUNTIME_TOKEN', process.env.ACTIONS_RUNTIME_TOKEN || '');

- uses: actions/checkout@v2
with:
submodules: 'recursive'

- name: Setup vcpkg
uses: lukka/run-vcpkg@v11
with:
runVcpkgInstall: true

- name: Create Build Environment
shell: bash
run: ./scripts/windows/1-configure.sh

- name: Build Launcher
shell: bash
run: bash ./scripts/windows/2-build.sh

- name: Archive launcher artifact
uses: actions/upload-artifact@v2
with:
name: BeamMP-Launcher-windows
path: ./bin/Release/BeamMP-Launcher.exe

4 changes: 3 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,6 @@ cmake-build-release
*.log
/*.sh
/*.obj
/*.exe
/*.exe
bin/
compile_commands.json
9 changes: 6 additions & 3 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
[submodule "evpp"]
path = evpp
url = https://github.com/BeamMP/evpp.git
[submodule "deps/BeamMP-Protocol"]
path = deps/BeamMP-Protocol
url = https://github.com/BeamMP/BeamMP-Protocol
[submodule "vcpkg"]
path = vcpkg
url = https://github.com/Microsoft/vcpkg.git
Loading
Loading