diff --git a/.github/agents/my-agent.agent.md b/.github/agents/my-agent.agent.md new file mode 100644 index 00000000..1989ad04 --- /dev/null +++ b/.github/agents/my-agent.agent.md @@ -0,0 +1,55 @@ +--- +# 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: eMule Morph Build Agent +description: Specialized agent for building and managing the eMule Morph Windows C++ project +--- + +# eMule Morph Build Agent + +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 [repository-url] + ``` + +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..2c0041e2 --- /dev/null +++ b/.github/workflows/windows-debug.yml @@ -0,0 +1,41 @@ +name: Windows Debug Build + +on: + push: + branches: [ main, master, develop ] + pull_request: + branches: [ main, master, develop ] + workflow_dispatch: + +jobs: + build: + runs-on: windows-latest + permissions: + contents: read + + steps: + - name: Checkout repository + uses: actions/checkout@v4 + with: + submodules: recursive + + - name: Add MSBuild to PATH + uses: microsoft/setup-msbuild@v2 + + - 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-${{ github.run_number }} + 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..ef51fa8a --- /dev/null +++ b/.github/workflows/windows-release.yml @@ -0,0 +1,61 @@ +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 + permissions: + contents: write + + steps: + - name: Checkout repository + uses: actions/checkout@v4 + with: + submodules: recursive + + - name: Add MSBuild to PATH + uses: microsoft/setup-msbuild@v2 + + - 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-${{ github.run_number }} + path: | + srchybrid/Release/*.exe + 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: ${{ steps.get_release_files.outputs.release_files }} + draft: false + prerelease: false