Skip to content
Closed
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
14 changes: 8 additions & 6 deletions .github/workflows/tag_and_release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,28 +2,30 @@ name: Build and Release

on:
pull_request:
types:
- opened
types: [opened, edited]

jobs:
build:
runs-on: ubuntu-latest
runs-on: windows-latest

steps:
- name: Checkout code
uses: actions/checkout@v4

- name: Set up build environment
run: sudo apt-get update && sudo apt-get install -y build-essential
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: '3.13'

- name: "Set up virtualenv"
run: python -m pip install virtualenv

- name: Run Makefile
run: make venv all
shell: bash

- name: Verify executable exists
run: ls -lh ./dist/aoe_rec_tools.exe
run: dir .\dist\aoe_rec_tools.exe

- name: Upload release asset
uses: softprops/action-gh-release@v2
Expand Down
17 changes: 10 additions & 7 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
# Variables
VENV=.venv
PYTHON=$(VENV)/Scripts/python.exe
PIP=$(VENV)/Scripts/pip.exe
ACTIVATE=$(VENV)/Scripts/activate.bat
SCRIPTS=$(VENV)/$(shell if [ -f .venv/bin/pip ]; then echo bin; else echo Scripts; fi)
PYTHON=$(SCRIPTS)/python
PIP=$(SCRIPTS)/pip
FLAKE8=$(SCRIPTS)/flake8

# Default target
.PHONY: all help venv install lint test clean build
Expand All @@ -19,19 +20,21 @@ help:
@echo make build - Build into standalone executable

venv:
python -m pip install virtualenv
python -m venv $(VENV)

install:
$(ACTIVATE); $(PIP) install -r requirements.txt
$(PIP) install -r requirements.txt

lint:
$(ACTIVATE); $(VENV)/Scripts/flake8 src/
$(FLAKE8) src/

test:
$(ACTIVATE); $(PYTHON) -m unittest discover test -p "*_tests.py"
$(PYTHON) -m unittest discover test -p "*_tests.py"

clean:
rm -rf *.pyc __pycache__ build/ dist/

build: clean
$(ACTIVATE); pyinstaller --noconfirm --onefile --name "aoe_rec_tools" src/aoe_rec_tools.py
$(PYTHON) -m pip install pyinstaller
$(PYTHON) -m PyInstaller --noconfirm --onefile --name "aoe_rec_tools" src/aoe_rec_tools.py
4 changes: 0 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,6 @@

A collection of tools for manipulating recorded games of Age of Empires 2 Definitive Edition.

## Features

- Anonymizing player data in a rec file (Player names, Elo, Chat messages)

## FAQ

Q: **How do I use this?**
Expand Down
1 change: 0 additions & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
regex
flake8
pyinstaller
click
Loading