From cb0e89f8a58f1c9aaa94a34b767df0ed9bb747f9 Mon Sep 17 00:00:00 2001 From: Mika3578 <58137747+Mika3578@users.noreply.github.com> Date: Wed, 12 Nov 2025 22:36:15 +0100 Subject: [PATCH 01/13] Create my-agent.agent.md --- .github/agents/my-agent.agent.md | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100644 .github/agents/my-agent.agent.md diff --git a/.github/agents/my-agent.agent.md b/.github/agents/my-agent.agent.md new file mode 100644 index 00000000..39a84264 --- /dev/null +++ b/.github/agents/my-agent.agent.md @@ -0,0 +1,13 @@ +--- +# Fill in the fields below to create a basic custom agent for your repository. +# The Copilot CLI can be used for local testing: https://gh.io/customagents/cli +# To make this agent available, merge this file into the default repository branch. +# For format details, see: https://gh.io/customagents/config + +name: +description: +--- + +# My Agent + +Describe what your agent does here... From 3c8beaaa743b9f9e07c3cfb3541532dfb1ebfd63 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Wed, 12 Nov 2025 21:42:50 +0000 Subject: [PATCH 02/13] Update agent config and add GitHub Actions workflows for Windows builds Co-authored-by: Mika3578 <58137747+Mika3578@users.noreply.github.com> --- .github/agents/my-agent.agent.md | 50 ++++++++++++++++++++++-- .github/workflows/windows-debug.yml | 42 ++++++++++++++++++++ .github/workflows/windows-release.yml | 55 +++++++++++++++++++++++++++ 3 files changed, 143 insertions(+), 4 deletions(-) create mode 100644 .github/workflows/windows-debug.yml create mode 100644 .github/workflows/windows-release.yml diff --git a/.github/agents/my-agent.agent.md b/.github/agents/my-agent.agent.md index 39a84264..35752f89 100644 --- a/.github/agents/my-agent.agent.md +++ b/.github/agents/my-agent.agent.md @@ -4,10 +4,52 @@ # To make this agent available, merge this file into the default repository branch. # For format details, see: https://gh.io/customagents/config -name: -description: +name: eMule Morph Build Agent +description: Specialized agent for building and managing the eMule Morph Windows C++ project --- -# My Agent +# eMule Morph Build Agent -Describe what your agent does here... +This agent assists with building and managing the eMule Morph project, which is a Windows-based C++ application built with Visual Studio. + +## Project Overview + +eMule Morph is a peer-to-peer file sharing client based on eMule. This repository contains: +- Main emule application (Win32 C++ with MFC) +- Multiple dependency libraries (cryptlib, ResizableLib, zlib, libpng, cximage, id3lib, libupnp, pthread) +- Visual Studio solution files targeting Platform Toolset v142 (VS 2019) +- Git submodules for external dependencies + +## Build Configurations + +The project supports three build configurations: +- **Debug**: Development build with debug symbols +- **Release**: Optimized production build +- **Beta**: Pre-release build with optimizations + +## Building the Project + +To build the project locally: + +1. Clone the repository with submodules: + ```bash + git clone --recursive https://github.com/Mika3578/emulemorph.git + ``` + +2. Initialize submodules (if not cloned recursively): + ```bash + git submodule init + git submodule update + ``` + +3. Open `srchybrid/emule.sln` in Visual Studio 2019 or later + +4. Select the desired configuration (Debug/Release/Beta) and build + +## GitHub Actions + +The repository includes CI/CD workflows that automatically build the project: +- Windows Debug build workflow +- Windows Release build workflow + +These workflows ensure code quality and build integrity on every commit. diff --git a/.github/workflows/windows-debug.yml b/.github/workflows/windows-debug.yml new file mode 100644 index 00000000..e5fbf0a7 --- /dev/null +++ b/.github/workflows/windows-debug.yml @@ -0,0 +1,42 @@ +name: Windows Debug Build + +on: + push: + branches: [ main, master, develop ] + pull_request: + branches: [ main, master, develop ] + workflow_dispatch: + +jobs: + build: + runs-on: windows-latest + + steps: + - name: Checkout repository + uses: actions/checkout@v4 + with: + submodules: recursive + + - name: Add MSBuild to PATH + uses: microsoft/setup-msbuild@v2 + + - name: Setup VSWhere + uses: warrenbuckley/Setup-VSWhere@v1 + + - name: Restore NuGet packages + working-directory: ${{github.workspace}}/srchybrid + run: nuget restore emule.sln + + - name: Build Debug + working-directory: ${{github.workspace}}/srchybrid + run: msbuild emule.sln /p:Configuration=Debug /p:Platform=Win32 /m /v:minimal + + - name: Upload Debug artifacts + uses: actions/upload-artifact@v4 + with: + name: emule-debug-build + path: | + srchybrid/Debug/*.exe + srchybrid/Debug/*.dll + srchybrid/Debug/*.pdb + if-no-files-found: warn diff --git a/.github/workflows/windows-release.yml b/.github/workflows/windows-release.yml new file mode 100644 index 00000000..bbf570b4 --- /dev/null +++ b/.github/workflows/windows-release.yml @@ -0,0 +1,55 @@ +name: Windows Release Build + +on: + push: + branches: [ main, master, develop ] + tags: + - 'v*' + pull_request: + branches: [ main, master, develop ] + workflow_dispatch: + +jobs: + build: + runs-on: windows-latest + + steps: + - name: Checkout repository + uses: actions/checkout@v4 + with: + submodules: recursive + + - name: Add MSBuild to PATH + uses: microsoft/setup-msbuild@v2 + + - name: Setup VSWhere + uses: warrenbuckley/Setup-VSWhere@v1 + + - name: Restore NuGet packages + working-directory: ${{github.workspace}}/srchybrid + run: nuget restore emule.sln + + - name: Build Release + working-directory: ${{github.workspace}}/srchybrid + run: msbuild emule.sln /p:Configuration=Release /p:Platform=Win32 /m /v:minimal + + - name: Upload Release artifacts + uses: actions/upload-artifact@v4 + with: + name: emule-release-build + path: | + srchybrid/Release/*.exe + srchybrid/Release/*.dll + if-no-files-found: warn + + - name: Create Release (on tag push) + if: startsWith(github.ref, 'refs/tags/v') + uses: softprops/action-gh-release@v1 + with: + files: | + srchybrid/Release/*.exe + srchybrid/Release/*.dll + draft: false + prerelease: false + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} From db83cd935f6a7abab91aef9d7537e937698c2c7c Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Wed, 12 Nov 2025 21:45:01 +0000 Subject: [PATCH 03/13] Add explicit permissions to GitHub Actions workflows for security Co-authored-by: Mika3578 <58137747+Mika3578@users.noreply.github.com> --- .github/workflows/windows-debug.yml | 2 ++ .github/workflows/windows-release.yml | 2 ++ 2 files changed, 4 insertions(+) diff --git a/.github/workflows/windows-debug.yml b/.github/workflows/windows-debug.yml index e5fbf0a7..8b1d8232 100644 --- a/.github/workflows/windows-debug.yml +++ b/.github/workflows/windows-debug.yml @@ -10,6 +10,8 @@ on: jobs: build: runs-on: windows-latest + permissions: + contents: read steps: - name: Checkout repository diff --git a/.github/workflows/windows-release.yml b/.github/workflows/windows-release.yml index bbf570b4..872a6cad 100644 --- a/.github/workflows/windows-release.yml +++ b/.github/workflows/windows-release.yml @@ -12,6 +12,8 @@ on: jobs: build: runs-on: windows-latest + permissions: + contents: write steps: - name: Checkout repository From 5beea2ae51eeb63e9b3c96660359a581cf76dd87 Mon Sep 17 00:00:00 2001 From: Mika3578 <58137747+Mika3578@users.noreply.github.com> Date: Wed, 12 Nov 2025 22:57:31 +0100 Subject: [PATCH 04/13] Update .github/workflows/windows-debug.yml Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> --- .github/workflows/windows-debug.yml | 3 --- 1 file changed, 3 deletions(-) diff --git a/.github/workflows/windows-debug.yml b/.github/workflows/windows-debug.yml index 8b1d8232..de4a50f3 100644 --- a/.github/workflows/windows-debug.yml +++ b/.github/workflows/windows-debug.yml @@ -22,9 +22,6 @@ jobs: - name: Add MSBuild to PATH uses: microsoft/setup-msbuild@v2 - - name: Setup VSWhere - uses: warrenbuckley/Setup-VSWhere@v1 - - name: Restore NuGet packages working-directory: ${{github.workspace}}/srchybrid run: nuget restore emule.sln From e52afc9b33b955e42dd3c4a1cbb5ce8cbf6b593e Mon Sep 17 00:00:00 2001 From: Mika3578 <58137747+Mika3578@users.noreply.github.com> Date: Wed, 12 Nov 2025 22:58:55 +0100 Subject: [PATCH 05/13] Apply suggestion from @Copilot Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> --- .github/workflows/windows-debug.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/windows-debug.yml b/.github/workflows/windows-debug.yml index de4a50f3..ff8e8638 100644 --- a/.github/workflows/windows-debug.yml +++ b/.github/workflows/windows-debug.yml @@ -15,7 +15,7 @@ jobs: steps: - name: Checkout repository - uses: actions/checkout@v4 + uses: actions/checkout@cfd5d913b3d6c3b4b7a0c3e8bfa6e2c1e2c3b2e3 with: submodules: recursive From 4a722d2706c37348451d489fa387a78361820bff Mon Sep 17 00:00:00 2001 From: Mika3578 <58137747+Mika3578@users.noreply.github.com> Date: Wed, 12 Nov 2025 22:59:18 +0100 Subject: [PATCH 06/13] Apply suggestion from @Copilot Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> --- .github/workflows/windows-release.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/windows-release.yml b/.github/workflows/windows-release.yml index 872a6cad..ec76f51f 100644 --- a/.github/workflows/windows-release.yml +++ b/.github/workflows/windows-release.yml @@ -17,7 +17,7 @@ jobs: steps: - name: Checkout repository - uses: actions/checkout@v4 + uses: actions/checkout@a92723a3b2fd6e477b7a2a418b1a52c2b6b5c5ee with: submodules: recursive From 9f34ce1c9610993fb13a1b343d8a3725b7c97bde Mon Sep 17 00:00:00 2001 From: Mika3578 <58137747+Mika3578@users.noreply.github.com> Date: Wed, 12 Nov 2025 23:00:38 +0100 Subject: [PATCH 07/13] Apply suggestion from @Copilot Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> --- .github/workflows/windows-release.yml | 2 -- 1 file changed, 2 deletions(-) diff --git a/.github/workflows/windows-release.yml b/.github/workflows/windows-release.yml index ec76f51f..cd53bec9 100644 --- a/.github/workflows/windows-release.yml +++ b/.github/workflows/windows-release.yml @@ -53,5 +53,3 @@ jobs: srchybrid/Release/*.dll draft: false prerelease: false - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} From b7ad8969fca53f8c82cd7e17142d76283a0e8a51 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Thu, 13 Nov 2025 11:38:22 +0000 Subject: [PATCH 08/13] Fix actions/checkout version to use v4 instead of invalid SHA Co-authored-by: Mika3578 <58137747+Mika3578@users.noreply.github.com> --- .github/workflows/windows-debug.yml | 2 +- .github/workflows/windows-release.yml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/windows-debug.yml b/.github/workflows/windows-debug.yml index ff8e8638..de4a50f3 100644 --- a/.github/workflows/windows-debug.yml +++ b/.github/workflows/windows-debug.yml @@ -15,7 +15,7 @@ jobs: steps: - name: Checkout repository - uses: actions/checkout@cfd5d913b3d6c3b4b7a0c3e8bfa6e2c1e2c3b2e3 + uses: actions/checkout@v4 with: submodules: recursive diff --git a/.github/workflows/windows-release.yml b/.github/workflows/windows-release.yml index cd53bec9..303330fc 100644 --- a/.github/workflows/windows-release.yml +++ b/.github/workflows/windows-release.yml @@ -17,7 +17,7 @@ jobs: steps: - name: Checkout repository - uses: actions/checkout@a92723a3b2fd6e477b7a2a418b1a52c2b6b5c5ee + uses: actions/checkout@v4 with: submodules: recursive From 62d2573847ab487124ac9f643cd40a7e109523b2 Mon Sep 17 00:00:00 2001 From: Mika3578 <58137747+Mika3578@users.noreply.github.com> Date: Thu, 13 Nov 2025 12:54:49 +0100 Subject: [PATCH 09/13] Update .github/workflows/windows-release.yml Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> --- .github/workflows/windows-release.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/windows-release.yml b/.github/workflows/windows-release.yml index 303330fc..6d821972 100644 --- a/.github/workflows/windows-release.yml +++ b/.github/workflows/windows-release.yml @@ -38,7 +38,7 @@ jobs: - name: Upload Release artifacts uses: actions/upload-artifact@v4 with: - name: emule-release-build + name: emule-release-build-${{ github.run_number }} path: | srchybrid/Release/*.exe srchybrid/Release/*.dll From b1efc52275bbcd428ba43f4dcc48dfb6b4a2d4c5 Mon Sep 17 00:00:00 2001 From: Mika3578 <58137747+Mika3578@users.noreply.github.com> Date: Thu, 13 Nov 2025 12:55:22 +0100 Subject: [PATCH 10/13] Update .github/workflows/windows-release.yml Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> --- .github/workflows/windows-release.yml | 3 --- 1 file changed, 3 deletions(-) diff --git a/.github/workflows/windows-release.yml b/.github/workflows/windows-release.yml index 6d821972..7a933668 100644 --- a/.github/workflows/windows-release.yml +++ b/.github/workflows/windows-release.yml @@ -24,9 +24,6 @@ jobs: - name: Add MSBuild to PATH uses: microsoft/setup-msbuild@v2 - - name: Setup VSWhere - uses: warrenbuckley/Setup-VSWhere@v1 - - name: Restore NuGet packages working-directory: ${{github.workspace}}/srchybrid run: nuget restore emule.sln From 33283e0988d9810b3121ceb854377357fce3bcd8 Mon Sep 17 00:00:00 2001 From: Mika3578 <58137747+Mika3578@users.noreply.github.com> Date: Thu, 13 Nov 2025 12:55:38 +0100 Subject: [PATCH 11/13] Update .github/workflows/windows-release.yml Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> --- .github/workflows/windows-release.yml | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/.github/workflows/windows-release.yml b/.github/workflows/windows-release.yml index 7a933668..ef51fa8a 100644 --- a/.github/workflows/windows-release.yml +++ b/.github/workflows/windows-release.yml @@ -41,12 +41,21 @@ jobs: srchybrid/Release/*.dll if-no-files-found: warn + - name: Get release files + id: get_release_files + shell: pwsh + run: | + $files = Get-ChildItem -Path "srchybrid/Release" -Include *.exe,*.dll -File | ForEach-Object { $_.FullName } + # Join with newline for multi-line YAML input + $filesString = $files -join "`n" + echo "release_files<> $env:GITHUB_OUTPUT + echo "$filesString" >> $env:GITHUB_OUTPUT + echo "EOF" >> $env:GITHUB_OUTPUT + - name: Create Release (on tag push) if: startsWith(github.ref, 'refs/tags/v') uses: softprops/action-gh-release@v1 with: - files: | - srchybrid/Release/*.exe - srchybrid/Release/*.dll + files: ${{ steps.get_release_files.outputs.release_files }} draft: false prerelease: false From d399d57ca3a203f57c369be1c803b5e3f9ee338f Mon Sep 17 00:00:00 2001 From: Mika3578 <58137747+Mika3578@users.noreply.github.com> Date: Thu, 13 Nov 2025 12:55:51 +0100 Subject: [PATCH 12/13] Update .github/workflows/windows-debug.yml Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> --- .github/workflows/windows-debug.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/windows-debug.yml b/.github/workflows/windows-debug.yml index de4a50f3..2c0041e2 100644 --- a/.github/workflows/windows-debug.yml +++ b/.github/workflows/windows-debug.yml @@ -33,7 +33,7 @@ jobs: - name: Upload Debug artifacts uses: actions/upload-artifact@v4 with: - name: emule-debug-build + name: emule-debug-build-${{ github.run_number }} path: | srchybrid/Debug/*.exe srchybrid/Debug/*.dll From b295a505f6ee70e7ed11bd72f376e6962e9e3cd4 Mon Sep 17 00:00:00 2001 From: Mika3578 <58137747+Mika3578@users.noreply.github.com> Date: Thu, 13 Nov 2025 13:00:02 +0100 Subject: [PATCH 13/13] Update .github/agents/my-agent.agent.md Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> --- .github/agents/my-agent.agent.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/agents/my-agent.agent.md b/.github/agents/my-agent.agent.md index 35752f89..1989ad04 100644 --- a/.github/agents/my-agent.agent.md +++ b/.github/agents/my-agent.agent.md @@ -33,7 +33,7 @@ To build the project locally: 1. Clone the repository with submodules: ```bash - git clone --recursive https://github.com/Mika3578/emulemorph.git + git clone --recursive [repository-url] ``` 2. Initialize submodules (if not cloned recursively):