From f19ab8f6062a0c8c20e8850560b7d253ba411fe9 Mon Sep 17 00:00:00 2001 From: Mika3578 <58137747+Mika3578@users.noreply.github.com> Date: Sun, 23 Nov 2025 00:48:57 +0100 Subject: [PATCH 1/2] Expand agent guidance with project context --- .github/workflows/ci.yml | 50 ++++++++++++++++++++++++++++++++++++++++ AGENTS.md | 23 ++++++++++++++++++ 2 files changed, 73 insertions(+) create mode 100644 .github/workflows/ci.yml create mode 100644 AGENTS.md diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 00000000..a9446090 --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,50 @@ +name: CI + +on: + push: + branches: ["**"] + pull_request: + +jobs: + build-windows: + name: Windows build (${{ matrix.configuration }}) + runs-on: windows-latest + strategy: + fail-fast: false + matrix: + configuration: [Debug, Release] + + steps: + - name: Checkout repository + uses: actions/checkout@v4 + with: + submodules: recursive + + - name: Setup MSBuild + uses: microsoft/setup-msbuild@v2 + + - name: Install Windows 10 SDK 10.0.22621.0 + shell: pwsh + run: choco install windows-sdk-10-version-22621-all --yes --no-progress + + - name: Install MFC components + shell: pwsh + run: | + $vsWhere = "C:\Program Files (x86)\Microsoft Visual Studio\Installer\vswhere.exe" + + $vsPath = & $vsWhere -latest -prerelease -products * -property installationPath + if (-not $vsPath) { + throw 'Unable to locate a Visual Studio installation on the runner.' + } + + $hasMfc = & $vsWhere -latest -products * -requires Microsoft.VisualStudio.Component.VC.ATLMFC -property installationPath + if ($hasMfc) { + Write-Host "MFC component already installed for Visual Studio at $hasMfc." + return + } + + &"$vsPath\Common7\IDE\vs_installer.exe" modify --installPath "$vsPath" --add Microsoft.VisualStudio.Component.VC.ATLMFC --quiet --norestart --nocache + + - name: Build solution + working-directory: ${{ github.workspace }}\srchybrid + run: msbuild emule.sln /p:Configuration=${{ matrix.configuration }} /p:Platform=Win32 /m diff --git a/AGENTS.md b/AGENTS.md new file mode 100644 index 00000000..c57b8363 --- /dev/null +++ b/AGENTS.md @@ -0,0 +1,23 @@ +# Agent Instructions +- Keep GitHub Actions workflows readable with descriptive step names and avoid removing existing matrix configurations without discussion. +- Prefer minimal, focused changes that preserve the current build targets unless broader refactors are required. +- When updating dependency installation steps, include guards to skip work if the dependency is already present. + +## Project context +- This repository hosts the eMule Morph Windows client; the primary solution lives at `srchybrid/emule.sln` and targets Win32 Debug/Release configurations. +- The build depends on Visual Studio components such as the Windows 10 SDK (10.0.22621.0) and ATLMFC; prefer detecting existing installations before adding new ones. +- Submodules provide bundled third-party libraries (e.g., `cryptopp`, `pupnp`, `pthreads`); ensure they are initialized when workflows or build scripts need them. +- Source lives primarily in `srchybrid/` (MFC/ATL C++ with resources under `srchybrid/res/`), while third-party libraries are kept at the repository root for static linkage. +- Legacy build notes are in `How-To-Compile.txt`; keep guidance aligned with the current Visual Studio toolset and SDK expectations reflected in CI. + +## Contribution preferences +- Preserve the existing solution structure and Win32 platform unless there is a strong reason to broaden platform coverage. +- When changing CI or tooling, keep steps scoped to the minimal directories needed (for example, run Windows builds from `srchybrid/`). +- Align documentation and comments with the current build expectations, especially around SDK/MFC prerequisites. +- Prefer incremental adjustments that respect the original MorphXT code style (MFC message maps, `stdafx.*`, `.rc` resource organization) and avoid sweeping refactors. + +## Build and testing guidance +- Use `git submodule update --init --recursive` before building locally or in automation that starts from a fresh checkout. +- For MSBuild invocations, use `/p:Platform=Win32` and respect both Debug and Release configurations to mirror CI coverage. +- Prefer fast, targeted checks over long-running suites, and document any required environment setup (e.g., specific SDK or MFC components) in workflow steps or accompanying notes. +- When editing project files (`*.vcxproj`, `.sln`), keep the WindowsTargetPlatformVersion in sync with the CI-installed SDK to avoid mismatches. From b983b5250d33d3501da02c3b70138d471379b479 Mon Sep 17 00:00:00 2001 From: Mika3578 <58137747+Mika3578@users.noreply.github.com> Date: Sun, 23 Nov 2025 22:55:38 +0100 Subject: [PATCH 2/2] Fix MFC installer path in CI workflow --- .github/workflows/ci.yml | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index a9446090..4ee7190e 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -43,7 +43,12 @@ jobs: return } - &"$vsPath\Common7\IDE\vs_installer.exe" modify --installPath "$vsPath" --add Microsoft.VisualStudio.Component.VC.ATLMFC --quiet --norestart --nocache + $installerPath = "C:\\Program Files (x86)\\Microsoft Visual Studio\\Installer\\vs_installer.exe" + if (-not (Test-Path $installerPath)) { + throw "Visual Studio installer not found at expected path: $installerPath" + } + + &"$installerPath" modify --installPath "$vsPath" --add Microsoft.VisualStudio.Component.VC.ATLMFC --quiet --norestart --nocache - name: Build solution working-directory: ${{ github.workspace }}\srchybrid