Skip to content
Merged

v1.13 #377

Show file tree
Hide file tree
Changes from all commits
Commits
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
3 changes: 2 additions & 1 deletion .env.example
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
GPG_FINGERPRINT=
GPG_FINGERPRINT=
GOROOT_LEGACY=
3 changes: 2 additions & 1 deletion .github/ISSUE_TEMPLATE/bug_report.md
Original file line number Diff line number Diff line change
Expand Up @@ -42,11 +42,12 @@ Check all that apply:
- [ ] Age of Empires: Definitive Edition
- [ ] Age of Empires II: Definitive Edition
- [ ] Age of Empires III: Definitive Edition
- [ ] Age of Empires IV: Anniversary Edition
- [ ] Age of Mythology: Retold

**Server**

- OS and Architecture: [e.g. Ubuntu]
- OS: [e.g. Ubuntu]
- OS Version and architecture [e.g. 24.04 x64]:
- Server version [e.g. 1.0.0]:
- Server log (**mandatory**):
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/codeql.yml
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,6 @@ jobs:
- if: matrix.build-mode == 'manual'
shell: bash
run: |
cp go.work.example go.work
go build -o build/server/server.exe ./server
go build -o build/server/bin/genCert.exe ./server-genCert
go build -o build/launcher/launcher.exe ./launcher
Expand All @@ -94,6 +93,7 @@ jobs:
go build -o build/tools/scripts/copyLauncherResources.exe ./tools/scripts/cmd/copyLauncherResources.go
go build -o build/tools/scripts/copyServerResources.exe ./tools/scripts/cmd/copyServerResources.go
go build -o build/tools/scripts/createServerResourcesFolder.exe ./tools/scripts/cmd/createServerResourcesFolder.go
go build -o build/tools/scripts/generateGoreleaserConfig.exe ./tools/scripts/cmd/generateGoreleaserConfig.go
- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v3
with:
Expand Down
34 changes: 18 additions & 16 deletions .github/workflows/releaser.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,29 +16,31 @@ jobs:
uses: actions/checkout@v6
with:
fetch-depth: 0
- name: Rename go.work
shell: bash
run: |
cp go.work.example go.work
- name: Set up Go
uses: actions/setup-go@v6
with:
go-version: '1.25.7'
go-version: '1.26.0'
cache-dependency-path: |
common/go.sum
server/go.sum
server-genCert/go.sum
launcher/go.sum
launcher-common/go.sum
launcher-agent/go.sum
launcher-config/go.sum
launcher-config-admin/go.sum
launcher-config-admin-agent/go.sum
battle-server-manager/go.sum
go.work.sum
- name: Set up Go legacy
id: setup_go_legacy
run: |
dir="${{ vars.GOROOT_LEGACY }}"
subdir="go-legacy-win7"
curl -L https://github.com/thongtech/$subdir/releases/download/v1.26.0-1/$subdir-1.26.0-1.linux_amd64.tar.gz -o go.tar.gz
sudo mkdir -p "$dir"
sudo tar -C "$dir" --strip-components=1 -xzf go.tar.gz
rm go.tar.gz
echo "goroot=$dir/$subdir" >> $GITHUB_OUTPUT
- name: Generate Goreleaser config
shell: bash
run: |
go run tools/scripts/cmd/generateGoreleaserConfig.go
go run tools/scripts/cmd/generateGoreleaserConfig.go "${{ steps.setup_go_legacy.outputs.goroot }}"
- name: Run GoReleaser
uses: goreleaser/goreleaser-action@v6
with:
version: '~> v2'
args: release --clean --snapshot --fail-fast --skip=sign
- name: Import GPG key
id: import_gpg
uses: crazy-max/ghaction-import-gpg@v6
Expand Down
5 changes: 2 additions & 3 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
go.work
go.work.sum
.tools
.task
.env
Expand All @@ -13,4 +11,5 @@ build/**/*
!build/launcher/.gitkeep
!build/battle-server-manager/
!build/battle-server-manager/.gitkeep
.goreleaser.yaml
.goreleaser.yaml
tools/**/go.sum
27 changes: 17 additions & 10 deletions DEVELOPMENT.md
Original file line number Diff line number Diff line change
@@ -1,17 +1,23 @@
## Local development

Copy `go.work.example` to `go.work`

### System requirements

- OS requirements correspond to the server/launcher ones. Cross-compilation works on all systems out-the-box.
- [Go 1.25](https://go.dev/dl/) or higher, except for Windows 7-8 (and equivalent) which need an unofficial fork
like [thongtech/go-legacy-win7](https://github.com/thongtech/go-legacy-win7) (recommended)
or [XTLS/go-win7](https://github.com/XTLS/go-win7).
- [Git](https://git-scm.com/downloads), with the latest supported for Windows 7/8 being v2.46.2.
- Go 1.26:
* Officially from https://go.dev/dl/ if not running Windows or is 10 and higher (or equivalent).
* Unnoficially from [thongtech/go-legacy-win7](https://github.com/thongtech/go-legacy-win7) if running Windows
7-8.X (or equivalent). Regardless if you install the official version, you need to install this one too for
release.
- [Git](https://git-scm.com/downloads), with the latest supported for Windows 7-8 being v2.46.2.
- [Task](https://taskfile.dev/installation/).
- [GoReleaser](https://goreleaser.com/).

### Setup

Copy `.env.example` to `.env` and set:

* ```GPG_FINGERPRINT``` to the fingerprint of the key. Required only for `task release`.
* ```GOROOT_LEGACY``` to the legacy go installation path. Required for `task build` and
`task release`.

### Debug

It is recommended to use an IDE such as [GoLand](https://www.jetbrains.com/go/) (free for academia)
Expand All @@ -30,13 +36,14 @@ Depending on the module you want to debug, you will need to run the correspondin

### Build

Run ```task build```.
1. Make sure you have CGO disabled with ```go env -w CGO_ENABLED=0```
2. Run ```task build```.

### Release

1. Install [gpg2](https://docs.releng.linuxfoundation.org/en/latest/gpg.html) if needed.
2. Create a new sign-only GPG key pair (*RSA 4096-bit*) with a passphrase.
3. Copy .env.example to .env and set ```GPG_FINGERPRINT``` to the fingerprint of the key.
3. Make sure you have CGO disabled with ```go env -w CGO_ENABLED=0```
4. Finally run ```task release```

*Note: You will also need a local tag in semantic form like vX.Y.Z*
49 changes: 32 additions & 17 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ is in maintenance or is eventually shutdown.
* **Age of Empires: Definitive Edition**.
* **Age of Empires II: Definitive Edition**.
* **Age of Empires III: Definitive Edition**.
* **Age of Empires IV: Anniversary Edition**.
* **Age of Mythology: Retold** ([currently](https://github.com/luskaner/ageLANServer/issues/245) only the *Steam*
version).

Expand All @@ -36,7 +37,7 @@ is in maintenance or is eventually shutdown.
> See more details
> in [Questions and Answers (QA)](https://github.com/luskaner/ageLANServer/wiki/Questions-and-Answers-(QA)).

### Age of Empires II: Definitive Edition, Age of Empires III: Definitive Edition and Age of Mythology: Retold
### AoE II: DE, AoE III: DE, AoE IV: AE and AoM: RT

<details>
<summary>List of features</summary>
Expand All @@ -48,7 +49,7 @@ is in maintenance or is eventually shutdown.

</details>

### Age of Empires II: Definitive Edition, Age of Empires III: Definitive Edition
### AoE II: DE and AoE III: DE

<details>
<summary>List of features</summary>
Expand All @@ -58,7 +59,7 @@ is in maintenance or is eventually shutdown.

</details>

### Age of Empires III: Definitive Edition
### AoE II: DE

<details>
<summary>List of features</summary>
Expand All @@ -68,7 +69,16 @@ is in maintenance or is eventually shutdown.

</details>

### Age of Mythology: Retold
### AoE III: DE, AoE IV: AE

<details>
<summary>List of features</summary>

- 👥 Groups

</details>

### AoM: RT

<details>
<summary>List of features</summary>
Expand All @@ -89,7 +99,7 @@ is in maintenance or is eventually shutdown.

</details>

#### Age of Empires III: Definitive Edition
#### AoE III: DE, AoE IV: AE

<details>
<summary>List of limitations</summary>
Expand All @@ -98,7 +108,7 @@ is in maintenance or is eventually shutdown.

</details>

#### Age of Mythology: Retold
#### AoM: RT

<details>
<summary>List of limitations</summary>
Expand All @@ -109,7 +119,7 @@ is in maintenance or is eventually shutdown.
the official server.
* Favor stash is infinite.
* Story mode has all missions unlocked by default.
* Challenge mode lifes are infinite, you have access to all legends and you are max level (99) by default.
* Challenge mode lifes are infinite, you have access to all legends, and you are max level (99) by default.

</details>

Expand Down Expand Up @@ -140,7 +150,7 @@ is in maintenance or is eventually shutdown.

#### Stable

- **Windows**: 7 (or equivalent).
- **Windows**: 7 (or equivalent, 10 or higher recommended).
- **Linux**: kernel 3.2 (see [here](https://go.dev/wiki/Linux) for more details).
- **macOS**: Monterey (v12).

Expand All @@ -154,7 +164,7 @@ system and configuration.
- Solaris-based (Solaris and Illumos).
- AIX.

Note: For the full list see [minimum requirements for Go](https://go.dev/wiki/MinimumRequirements) 1.25.
Note: For the full list see [minimum requirements for Go](https://go.dev/wiki/MinimumRequirements) 1.26.

</details>

Expand Down Expand Up @@ -185,6 +195,10 @@ it will require admin rights elevation.**
on [Steam](https://store.steampowered.com/app/933110/Age_of_Empires_III_Definitive_Edition)
or [Xbox](https://www.xbox.com/games/store/age-of-empires-iii-definitive-edition/9n1hf804qxn4) (*only on a compatible
Windows version*). Recommended a late 2023 version or later.
- Age of Empires IV: Anniversary Edition
on [Steam](https://store.steampowered.com/app/1466860/Age_of_Empires_IV_Anniversary_Edition)
or [Xbox](https://www.xbox.com/games/store/age-of-empires-iv-anniversary-edition/9n94ncgm1q2n). Recommended a 2025
version or later.
- Age of Mythology: Retold
on [Steam](https://store.steampowered.com/app/1934680/Age_of_Mythology_Retold). Recommended a 2025 version or later.

Expand Down Expand Up @@ -303,14 +317,14 @@ play.
- Redirect the game's API requests to the LAN server.
- Proxy certain requests:
- CDN so it does not detect the official game status.
- Chat and user names show properly.
- Chat and usernames show properly.
- (Optional) Install a self-signed certificate to allow the game to connect to the LAN server.
- (except AoE I) Add a certificate to the game's store to allow the game to connect to the LAN server.
- (Optional) Run custom configuration commands to setup/revert the configuration.
- (except AoE I and AoE IV) Add a certificate to the game's store to allow the game to connect to the LAN server.
- (Optional) Run custom configuration commands to set up/revert the configuration.
- (Windows Optional) Re-broadcast the battle server through other network interfaces apart from the most priority one.
- Automatically find and start the game.

Afterwards, it reverses any changes to allow the official launcher to connect to the official servers.
Afterward, it reverses any changes to allow the official launcher to connect to the official servers.
</details>

*Note: See the [launcher README](launcher/README.md) for more details.*
Expand All @@ -329,20 +343,21 @@ Afterwards, it reverses any changes to allow the official launcher to connect to
`Client.Path` to point to the game's directory.
**You will need to use a custom launcher (plus what my
other [repo](https://github.com/luskaner/ageLANServerLauncherCompanion) provides) for 100% offline play**.
6. If you are using AoM and don't have AoE II: DE installed on Steam edit the
`battle-server-manager/resources/config.athens.toml` file and point `Executable.Path` to the AoE II: DE
6. If you are using AoE IV/AoM and don't have AoE II: DE installed edit the
`battle-server-manager/resources/config.<game>.toml` file and point `Executable.Path` to the AoE II: DE
BattleServer.exe executable (it's portable), for example, 'S:
\SteamLibrary\steamapps\common\AoE2DE\BattleServer\BattleServer.exe'.
7. **Execute `launcher/start_<game_title>` script**: you will be asked for admin elevation and
confirmation of other dialogs as needed, you will also need to allow the connections via the Microsoft Defender
Firewall or any other.
8. **Repeat the above steps for every PC** (except the point 6) you want to play in LAN with by running the *launcher*,
the first PC to
launch it will host the "server" and the rest will auto-discover and be prompted to connnect to it.
launch it will host the "server" and the rest will auto-discover and be prompted to connect to it.
9. In the game, just host a new lobby via the Multiplayer section. Setting it to public visibility is recommended.
10. If the lobby is Public, they can join directly in the browser or you can **Invite friends** by searching them by
name
and sending an invite as needed. If the game allows, you can share the link to join the lobby automatically (only
and sending an invitation as needed. If the game allows, you can share the link to join the lobby automatically (
only
works if already
in-game).

Expand Down
2 changes: 2 additions & 0 deletions Taskfile.debug.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,10 @@ tasks:
deps:
- build-config-all
- prepare-server
- prepare-battle-server-manager
- build-server
- build-launcher-agent
- build-battle-server-manager
- os:prepare-launcher
sources:
- common/**/*
Expand Down
2 changes: 1 addition & 1 deletion Taskfile.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ tasks:
build-goreleaser-cfg:
internal: true
cmds:
- go run tools/scripts/cmd/generateGoreleaserConfig.go
- go run tools/scripts/cmd/generateGoreleaserConfig.go "{{ .GOROOT_LEGACY }}"
build:
deps:
- build-goreleaser-cfg
Expand Down
4 changes: 2 additions & 2 deletions battle-server-manager/go.mod
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
module battle-server-manager

go 1.25.0
go 1.26.0

require (
github.com/deckarep/golang-set/v2 v2.8.0
Expand All @@ -12,7 +12,7 @@ require (
require (
github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc // indirect
github.com/fsnotify/fsnotify v1.9.0 // indirect
github.com/go-viper/mapstructure/v2 v2.4.0 // indirect
github.com/go-viper/mapstructure/v2 v2.5.0 // indirect
github.com/google/go-cmp v0.7.0 // indirect
github.com/inconshreveable/mousetrap v1.1.0 // indirect
github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2 // indirect
Expand Down
29 changes: 28 additions & 1 deletion battle-server-manager/go.sum
Original file line number Diff line number Diff line change
@@ -1,25 +1,52 @@
github.com/cpuguy83/go-md2man/v2 v2.0.6/go.mod h1:oOW0eioCTA6cOiMLiUPZOpcVxMig6NIQQ7OS05n1F4g=
github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc h1:U9qPSI2PIWSS1VwoXQT9A3Wy9MM3WgvqSxFWenqJduM=
github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
github.com/deckarep/golang-set/v2 v2.8.0 h1:swm0rlPCmdWn9mESxKOjWk8hXSqoxOp+ZlfuyaAdFlQ=
github.com/deckarep/golang-set/v2 v2.8.0/go.mod h1:VAky9rY/yGXJOLEDv3OMci+7wtDpOF4IN+y82NBOac4=
github.com/frankban/quicktest v1.14.6 h1:7Xjx+VpznH+oBnejlPUj8oUpdxnVs4f8XU8WnHkI4W8=
github.com/fsnotify/fsnotify v1.9.0 h1:2Ml+OJNzbYCTzsxtv8vKSFD9PbJjmhYF14k/jKC7S9k=
github.com/go-viper/mapstructure/v2 v2.4.0 h1:EBsztssimR/CONLSZZ04E8qAkxNYq4Qp9LvH92wZUgs=
github.com/fsnotify/fsnotify v1.9.0/go.mod h1:8jBTzvmWwFyi3Pb8djgCCO5IBqzKJ/Jwo8TRcHyHii0=
github.com/go-viper/mapstructure/v2 v2.5.0 h1:vM5IJoUAy3d7zRSVtIwQgBj7BiWtMPfmPEgAXnvj1Ro=
github.com/go-viper/mapstructure/v2 v2.5.0/go.mod h1:oJDH3BJKyqBA2TXFhDsKDGDTlndYOZ6rGS0BRZIxGhM=
github.com/google/go-cmp v0.7.0 h1:wk8382ETsv4JYUZwIsn6YpYiWiBsYLSJiTsyBybVuN8=
github.com/google/go-cmp v0.7.0/go.mod h1:pXiqmnSA92OHEEa9HXL2W4E7lf9JzCmGVUdgjX3N/iU=
github.com/inconshreveable/mousetrap v1.1.0 h1:wN+x4NVGpMsO7ErUn/mUI3vEoE6Jt13X2s0bqwp9tc8=
github.com/inconshreveable/mousetrap v1.1.0/go.mod h1:vpF70FUmC8bwa3OWnCshd2FqLfsEA9PFc4w1p2J65bw=
github.com/kr/pretty v0.2.1/go.mod h1:ipq/a2n7PKx3OHsz4KJII5eveXtPO4qwEXGdVfWzfnI=
github.com/kr/pretty v0.3.1 h1:flRD4NNwYAUpkphVc1HcthR4KEIFJ65n8Mw5qdRn3LE=
github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ=
github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI=
github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY=
github.com/pelletier/go-toml/v2 v2.2.4 h1:mye9XuhQ6gvn5h28+VilKrrPoQVanw5PMw/TB0t5Ec4=
github.com/pelletier/go-toml/v2 v2.2.4/go.mod h1:2gIqNv+qfxSVS7cM2xJQKtLSTLUE9V8t9Stt+h56mCY=
github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2 h1:Jamvg5psRIccs7FGNTlIRMkT8wgtp5eCXdBlqhYGL6U=
github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4=
github.com/rogpeppe/go-internal v1.14.1 h1:UQB4HGPB6osV0SQTLymcB4TgvyWu6ZyliaW0tI/otEQ=
github.com/rogpeppe/go-internal v1.14.1/go.mod h1:MaRKkUm5W0goXpeCfT7UZI6fk/L7L7so1lCWt35ZSgc=
github.com/russross/blackfriday/v2 v2.1.0/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM=
github.com/sagikazarmark/locafero v0.12.0 h1:/NQhBAkUb4+fH1jivKHWusDYFjMOOKU88eegjfxfHb4=
github.com/sagikazarmark/locafero v0.12.0/go.mod h1:sZh36u/YSZ918v0Io+U9ogLYQJ9tLLBmM4eneO6WwsI=
github.com/spf13/afero v1.15.0 h1:b/YBCLWAJdFWJTN9cLhiXXcD7mzKn9Dm86dNnfyQw1I=
github.com/spf13/afero v1.15.0/go.mod h1:NC2ByUVxtQs4b3sIUphxK0NioZnmxgyCrfzeuq8lxMg=
github.com/spf13/cast v1.10.0 h1:h2x0u2shc1QuLHfxi+cTJvs30+ZAHOGRic8uyGTDWxY=
github.com/spf13/cast v1.10.0/go.mod h1:jNfB8QC9IA6ZuY2ZjDp0KtFO2LZZlg4S/7bzP6qqeHo=
github.com/spf13/cobra v1.10.2 h1:DMTTonx5m65Ic0GOoRY2c16WCbHxOOw6xxezuLaBpcU=
github.com/spf13/cobra v1.10.2/go.mod h1:7C1pvHqHw5A4vrJfjNwvOdzYu0Gml16OCs2GRiTUUS4=
github.com/spf13/pflag v1.0.9/go.mod h1:McXfInJRrz4CZXVZOBLb0bTZqETkiAhM9Iw0y3An2Bg=
github.com/spf13/pflag v1.0.10 h1:4EBh2KAYBwaONj6b2Ye1GiHfwjqyROoF4RwYO+vPwFk=
github.com/spf13/pflag v1.0.10/go.mod h1:McXfInJRrz4CZXVZOBLb0bTZqETkiAhM9Iw0y3An2Bg=
github.com/spf13/viper v1.21.0 h1:x5S+0EU27Lbphp4UKm1C+1oQO+rKx36vfCoaVebLFSU=
github.com/spf13/viper v1.21.0/go.mod h1:P0lhsswPGWD/1lZJ9ny3fYnVqxiegrlNrEmgLjbTCAY=
github.com/stretchr/testify v1.11.1 h1:7s2iGBzp5EwR7/aIZr8ao5+dra3wiQyKjjFuvgVKu7U=
github.com/subosito/gotenv v1.6.0 h1:9NlTDc1FTs4qu0DDq7AEtTPNw6SVm7uBMsUCUjABIf8=
github.com/subosito/gotenv v1.6.0/go.mod h1:Dk4QP5c2W3ibzajGcXpNraDfq2IrhjMIvMSWPKKo0FU=
go.yaml.in/yaml/v3 v3.0.4 h1:tfq32ie2Jv2UxXFdLJdh3jXuOzWiL1fo0bu/FbuKpbc=
go.yaml.in/yaml/v3 v3.0.4/go.mod h1:DhzuOOF2ATzADvBadXxruRBLzYTpT36CKvDb3+aBEFg=
golang.org/x/sys v0.41.0 h1:Ivj+2Cp/ylzLiEU89QhWblYnOE9zerudt9Ftecq2C6k=
golang.org/x/sys v0.41.0/go.mod h1:OgkHotnGiDImocRcuBABYBEXf8A9a87e/uXjp9XT3ks=
golang.org/x/text v0.34.0 h1:oL/Qq0Kdaqxa1KbNeMKwQq0reLCCaFtqu2eNuSeNHbk=
golang.org/x/text v0.34.0/go.mod h1:homfLqTYRFyVYemLBFl5GgL/DWEiH5wcsQ5gSh1yziA=
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c h1:Hei/4ADfdWqJk1ZMxUNpqntNwaWcugrBjAiHlqqRiVk=
gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c/go.mod h1:JHkPIbrfpd72SG/EVd6muEfDQjcINNoR0C8j2r3qZ4Q=
gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA=
Loading
Loading