Compare commits

...

28 Commits

Author SHA1 Message Date
24e6f5e8f1 Merge pull request #132 from alterware/ci/update-premake5
chore: update Premake5
2026-01-28 16:51:09 +01:00
4cc556a4a0 Merge pull request #130 from alterware/dependabot/github_actions/docker/metadata-action-5.10.0
build(deps): bump docker/metadata-action from 5.8.0 to 5.10.0
2026-01-02 17:29:59 +01:00
3a2a48909f Merge pull request #131 from alterware/dependabot/github_actions/docker/setup-buildx-action-3.12.0
build(deps): bump docker/setup-buildx-action from 3.11.1 to 3.12.0
2026-01-02 17:29:51 +01:00
7180d3bdc1 Merge pull request #129 from alterware/dependabot/github_actions/docker/login-action-3.6.0
build(deps): bump docker/login-action from 3.5.0 to 3.6.0
2026-01-02 17:29:41 +01:00
884de56d34 Merge pull request #128 from alterware/dependabot/github_actions/docker/setup-qemu-action-3.7.0
build(deps): bump docker/setup-qemu-action from 3.6.0 to 3.7.0
2026-01-02 17:29:30 +01:00
dependabot[bot]
e8403ca3ba build(deps): bump docker/setup-buildx-action from 3.11.1 to 3.12.0
Bumps [docker/setup-buildx-action](https://github.com/docker/setup-buildx-action) from 3.11.1 to 3.12.0.
- [Release notes](https://github.com/docker/setup-buildx-action/releases)
- [Commits](https://github.com/docker/setup-buildx-action/compare/v3.11.1...v3.12.0)

---
updated-dependencies:
- dependency-name: docker/setup-buildx-action
  dependency-version: 3.12.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-01-02 16:28:53 +00:00
dependabot[bot]
553a7be4e5 build(deps): bump docker/metadata-action from 5.8.0 to 5.10.0
Bumps [docker/metadata-action](https://github.com/docker/metadata-action) from 5.8.0 to 5.10.0.
- [Release notes](https://github.com/docker/metadata-action/releases)
- [Commits](https://github.com/docker/metadata-action/compare/v5.8.0...v5.10.0)

---
updated-dependencies:
- dependency-name: docker/metadata-action
  dependency-version: 5.10.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-01-02 16:28:42 +00:00
dependabot[bot]
e7f1332abd build(deps): bump docker/login-action from 3.5.0 to 3.6.0
Bumps [docker/login-action](https://github.com/docker/login-action) from 3.5.0 to 3.6.0.
- [Release notes](https://github.com/docker/login-action/releases)
- [Commits](https://github.com/docker/login-action/compare/v3.5.0...v3.6.0)

---
updated-dependencies:
- dependency-name: docker/login-action
  dependency-version: 3.6.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-01-02 16:28:34 +00:00
dependabot[bot]
85e11071b4 build(deps): bump docker/setup-qemu-action from 3.6.0 to 3.7.0
Bumps [docker/setup-qemu-action](https://github.com/docker/setup-qemu-action) from 3.6.0 to 3.7.0.
- [Release notes](https://github.com/docker/setup-qemu-action/releases)
- [Commits](https://github.com/docker/setup-qemu-action/compare/v3.6.0...v3.7.0)

---
updated-dependencies:
- dependency-name: docker/setup-qemu-action
  dependency-version: 3.7.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-01-02 16:28:19 +00:00
ca0dd5f7db chore: add more to dependabot 2026-01-02 17:25:30 +01:00
291f3d7e70 Merge pull request #126 from alterware/dependabot/submodules/deps/GSL-756c91a
build(deps): bump deps/GSL from `543d0dd` to `756c91a`
2026-01-01 17:08:11 +01:00
40db083087 Merge pull request #127 from alterware/dependabot/submodules/deps/zlib-570720b
build(deps): bump deps/zlib from `5a82f71` to `570720b`
2026-01-01 17:06:04 +01:00
dependabot[bot]
d63df17a9b build(deps): bump deps/zlib from 5a82f71 to 570720b
Bumps [deps/zlib](https://github.com/madler/zlib) from `5a82f71` to `570720b`.
- [Release notes](https://github.com/madler/zlib/releases)
- [Commits](5a82f71ed1...570720b0c2)

---
updated-dependencies:
- dependency-name: deps/zlib
  dependency-version: 570720b0c24f9686c33f35a1b3165c1f568b96be
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-01-01 14:02:39 +00:00
dependabot[bot]
c42efd812c build(deps): bump deps/GSL from 543d0dd to 756c91a
Bumps [deps/GSL](https://github.com/Microsoft/GSL) from `543d0dd` to `756c91a`.
- [Release notes](https://github.com/Microsoft/GSL/releases)
- [Commits](543d0dd3fe...756c91ab89)

---
updated-dependencies:
- dependency-name: deps/GSL
  dependency-version: 756c91ab895aa52f650599bb1a3fc131f1f4b5ef
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-01-01 14:02:35 +00:00
07f54e71bd fix: copy va 2025-11-29 18:25:37 +01:00
3231438f20 fix: correct usage of C func 2025-11-28 23:13:04 +01:00
fd5b0da1af Merge pull request #124 from alterware/dependabot/submodules/deps/GSL-543d0dd
build(deps): bump deps/GSL from `494e6e9` to `543d0dd`
2025-11-01 18:03:26 +01:00
638f83694b Merge pull request #123 from alterware/dependabot/submodules/deps/libtomcrypt-a3cc5bf
build(deps): bump deps/libtomcrypt from `5edb54e` to `a3cc5bf`
2025-11-01 17:37:10 +01:00
dependabot[bot]
0feed9adaf build(deps): bump deps/GSL from 494e6e9 to 543d0dd
Bumps [deps/GSL](https://github.com/Microsoft/GSL) from `494e6e9` to `543d0dd`.
- [Release notes](https://github.com/Microsoft/GSL/releases)
- [Commits](494e6e988c...543d0dd3fe)

---
updated-dependencies:
- dependency-name: deps/GSL
  dependency-version: 543d0dd3fe966ddf20e884b44e5fdbf12cb43784
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-11-01 14:01:57 +00:00
dependabot[bot]
83c16a1b8c build(deps): bump deps/libtomcrypt from 5edb54e to a3cc5bf
Bumps [deps/libtomcrypt](https://github.com/libtom/libtomcrypt) from `5edb54e` to `a3cc5bf`.
- [Release notes](https://github.com/libtom/libtomcrypt/releases)
- [Commits](5edb54e522...a3cc5bf623)

---
updated-dependencies:
- dependency-name: deps/libtomcrypt
  dependency-version: a3cc5bf62341b7269ace805fa227b701ddae4165
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-11-01 14:01:54 +00:00
2554b7fd3c Merge pull request #122 from alterware/dependabot/submodules/deps/GSL-494e6e9
build(deps): bump deps/GSL from `7e0943d` to `494e6e9`
2025-10-12 17:04:10 +02:00
dependabot[bot]
3f1c3acb57 build(deps): bump deps/GSL from 7e0943d to 494e6e9
Bumps [deps/GSL](https://github.com/Microsoft/GSL) from `7e0943d` to `494e6e9`.
- [Release notes](https://github.com/Microsoft/GSL/releases)
- [Commits](7e0943d20d...494e6e988c)

---
updated-dependencies:
- dependency-name: deps/GSL
  dependency-version: 494e6e988cc55d0bc7f3763c076ec358a38c68a6
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-10-01 14:03:54 +00:00
a96634787e fix: remove build option for MacOS 2025-09-17 17:42:42 +02:00
bb9a13e254 chore: update Premake5 2025-09-17 17:37:52 +02:00
f533f8cd4d Merge pull request #121 from alterware/dependabot/submodules/deps/libtommath-839ae9e
build(deps): bump deps/libtommath from `e823b0c` to `839ae9e`
2025-07-01 16:46:26 +02:00
dependabot[bot]
531e1d913d build(deps): bump deps/libtommath from e823b0c to 839ae9e
Bumps [deps/libtommath](https://github.com/libtom/libtommath) from `e823b0c` to `839ae9e`.
- [Release notes](https://github.com/libtom/libtommath/releases)
- [Commits](e823b0c34c...839ae9ea66)

---
updated-dependencies:
- dependency-name: deps/libtommath
  dependency-version: 839ae9ea66718705fba2b5773d1bdfb2b457cea4
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-07-01 14:42:06 +00:00
701f4fa722 Merge pull request #118 from alterware/dependabot/submodules/deps/libtomcrypt-3905c28
build(deps): bump deps/libtomcrypt from `a6b9aff` to `3905c28`
2025-05-01 18:32:54 +02:00
dependabot[bot]
7e3aa9facc build(deps): bump deps/libtomcrypt from a6b9aff to 3905c28
Bumps [deps/libtomcrypt](https://github.com/libtom/libtomcrypt) from `a6b9aff` to `3905c28`.
- [Release notes](https://github.com/libtom/libtomcrypt/releases)
- [Commits](a6b9aff7aa...3905c28913)

---
updated-dependencies:
- dependency-name: deps/libtomcrypt
  dependency-version: 3905c28913232d6e82a2a381cc2b71b0af7aa791
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-05-01 14:36:06 +00:00
11 changed files with 83 additions and 38 deletions

View File

@@ -0,0 +1,34 @@
name: "Configure gcc"
description: "Installs and configures gcc in a specific version on an ubuntu image"
inputs:
gcc_version:
description: "The version of gcc to install. Must be the major version only."
required: true
enable_x86:
description: "Whether to enable x86 support."
default: "false"
runs:
using: "composite"
steps:
- name: Install g++ and multilib
shell: bash
run: |
apt-get update
apt-get install -y gcc-${{ inputs.gcc_version }} g++-${{ inputs.gcc_version }} ${ADDITIONAL_PACKAGES}
env:
ADDITIONAL_PACKAGES: ${{ case(inputs.enable_x86 == 'true', format('gcc-{0}-multilib g++-{0}-multilib', inputs.gcc_version), '') }}
- name: Configure gcc
shell: bash
run: |
function register_gcc_version {
local version=$1
local priority=$2
update-alternatives \
--verbose \
--install /usr/bin/gcc gcc /usr/bin/gcc-${version} ${priority} \
--slave /usr/bin/g++ g++ /usr/bin/g++-${version}
}
register_gcc_version ${{ inputs.gcc_version }} 100

View File

@@ -1,7 +1,12 @@
version: 2
updates:
- package-ecosystem: gitsubmodule
directory: "/"
schedule:
interval: monthly
open-pull-requests-limit: 10
- package-ecosystem: gitsubmodule
directory: "/"
schedule:
interval: monthly
- package-ecosystem: github-actions
directory: "/"
schedule:
interval: monthly

View File

@@ -16,7 +16,7 @@ concurrency:
cancel-in-progress: true
env:
PREMAKE_VERSION: "5.0.0-beta6"
PREMAKE_VERSION: "5.0.0-beta8"
jobs:
build-windows:
@@ -89,17 +89,16 @@ jobs:
configuration:
- release
arch:
- x86
- amd64
steps:
- name: Install g++ and multilib
- name: Enable i386 architecture
if: ${{ matrix.build_arch == 'x86' }}
run: dpkg --add-architecture i386
- name: Install base packages
run: |
apt-get update
apt-get install -y wget tar git make gcc-13 g++-13 gcc-13-multilib g++-13-multilib
update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-13 13
update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-13 13
update-alternatives --set gcc /usr/bin/gcc-13
update-alternatives --set g++ /usr/bin/g++-13
apt-get install -y wget tar git make curl
- name: Check out files
uses: actions/checkout@main
@@ -108,12 +107,11 @@ jobs:
fetch-depth: 0
lfs: false
- name: Install dependencies (x86)
if: matrix.arch == 'x86'
run: |
dpkg --add-architecture i386
apt-get update
apt-get install -y gcc-13-multilib g++-13-multilib
- name: Configure gcc
uses: ./.github/actions/configure-gcc
with:
gcc_version: 14
enable_x86: ${{ case(matrix.build_arch == 'x86', 'true', 'false') }}
- name: Install Premake5
uses: diamante0018/setup-premake@master
@@ -315,19 +313,19 @@ jobs:
shell: bash
- name: Setup QEMU
uses: docker/setup-qemu-action@v3.6.0
uses: docker/setup-qemu-action@v3.7.0
- name: Setup Docker Buildx
uses: docker/setup-buildx-action@v3.10.0
uses: docker/setup-buildx-action@v3.12.0
- name: Login to DockerHub
uses: docker/login-action@v3.4.0
uses: docker/login-action@v3.6.0
with:
username: ${{ secrets.DOCKERHUB_USER }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- id: meta
uses: docker/metadata-action@v5.7.0
uses: docker/metadata-action@v5.10.0
with:
images: |
alterware/master-server
@@ -337,7 +335,7 @@ jobs:
- name: Build and Push Docker Image
id: build-and-push
uses: docker/build-push-action@v6.15.0
uses: docker/build-push-action@v6.18.0
with:
context: .
platforms: linux/amd64,linux/arm64

View File

@@ -11,6 +11,8 @@ Run using [Docker][docker-link]
docker run -p 20810:20810/udp -e AW_STATS_LOCATION=<UTF-8 C-string> alterware/master-server:latest
```
When setting the `AW_STATS_LOCATION` environment variable, you may want the container to write stats to a file or directory on the host system. In this case, you must **mount a directory from the host** into the container and ensure it has write permissions.
or run as a systemd service
```
@@ -38,7 +40,7 @@ WantedBy=multi-user.target
- Install [Premake5][premake5-link] and add it to your system PATH
- Clone this repository using [Git][git-link]
- Update the submodules using ``git submodule update --init --recursive``
- Run Premake with either of these two options ``premake5 vs2022`` (Windows) or ``premake5 gmake2`` (Linux/macOS)
- Run Premake with either of these two options ``premake5 vs2022`` (Windows) or ``premake5 gmake`` (Linux/macOS)
**IMPORTANT**
Requirements for Unix systems:

2
deps/GSL vendored

Submodule deps/GSL updated: 3325bbd33d...756c91ab89

View File

@@ -60,10 +60,6 @@ function libtomcrypt.project()
buildoptions "-mcpu=apple-m1"
filter {}
filter { "system:macosx", "platforms:amd64" }
buildoptions "-mcpu=x86-64"
filter {}
warnings "Off"
kind "StaticLib"
end

2
deps/zlib vendored

Submodule deps/zlib updated: 5a82f71ed1...570720b0c2

View File

@@ -102,7 +102,7 @@ if os.getenv("CI") then
defines "CI"
end
flags {"NoIncrementalLink", "NoMinimalRebuild", "MultiProcessorCompile", "No64BitChecks"}
multiprocessorcompile "On"
filter "configurations:release"
optimize "Size"

View File

@@ -1,5 +1,6 @@
#pragma once
#include "memory.hpp"
#include <cstdarg>
#include <cstdint>
template <class Type, std::size_t n>
@@ -29,12 +30,21 @@ namespace utils::string
while (true)
{
const auto res = vsnprintf(entry->buffer_, entry->size_, format, ap);
va_list ap_copy;
va_copy(ap_copy, ap);
if (res > 0) break; // Success
if (res == 0) return nullptr; // Error
const auto res = vsnprintf(entry->buffer_, entry->size_, format, ap_copy);
va_end(ap_copy);
entry->double_size();
if (res < 0) return nullptr; // Error
if (static_cast<std::size_t>(res) >= entry->size_)
{
entry->double_size();
continue;
}
break; // Success
}
return entry->buffer_;