diff --git a/.github/agents/my-agent.agent.md b/.github/agents/my-agent.agent.md new file mode 100644 index 000000000..1989ad04c --- /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/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 000000000..6e89238f4 --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,60 @@ +name: Comprehensive CI +permissions: + contents: read + +on: + push: + branches: [ main, master, develop ] + tags: + - 'v*' + pull_request: + branches: [ main, master, develop ] + workflow_dispatch: + +jobs: + build-windows: + name: Build (${{ matrix.configuration }}) + runs-on: windows-latest + strategy: + fail-fast: false + matrix: + configuration: [ Debug, Release, Beta ] + env: + SOLUTION_FILE: srchybrid/emule.sln + BUILD_PLATFORM: Win32 + + steps: + - name: Checkout repository + uses: actions/checkout@v4 + with: + submodules: recursive + fetch-depth: 0 + + - name: Set up MSBuild + uses: microsoft/setup-msbuild@v2 + + - name: Cache NuGet packages + uses: actions/cache@v4 + with: + path: | + ~/.nuget/packages + key: ${{ runner.os }}-nuget-${{ hashFiles('**/packages.config') }} + restore-keys: ${{ runner.os }}-nuget- + + - name: Restore NuGet packages + working-directory: ${{ github.workspace }}/srchybrid + run: nuget restore emule.sln + + - name: Build ${{ matrix.configuration }} configuration + working-directory: ${{ github.workspace }}/srchybrid + run: msbuild emule.sln /p:Configuration=${{ matrix.configuration }} /p:Platform=${{ env.BUILD_PLATFORM }} /m /v:minimal + + - name: Upload ${{ matrix.configuration }} artifacts + uses: actions/upload-artifact@v4 + with: + name: emule-${{ matrix.configuration }}-${{ github.run_number }} + path: | + srchybrid/${{ matrix.configuration }}/*.exe + srchybrid/${{ matrix.configuration }}/*.dll + srchybrid/${{ matrix.configuration }}/*.pdb + if-no-files-found: warn diff --git a/.github/workflows/windows-debug.yml b/.github/workflows/windows-debug.yml new file mode 100644 index 000000000..2c0041e25 --- /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 000000000..ef51fa8a4 --- /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 diff --git a/.gitignore b/.gitignore index 4a8270a9e..0f22acaaf 100644 --- a/.gitignore +++ b/.gitignore @@ -3,4 +3,5 @@ **/*Release*/* srchybrid/build/* *.user -IUpnp*.txt \ No newline at end of file +IUpnp*.txt +wiki/ diff --git a/ReplaceVistaIcon/ReplaceVistaIcon.vcxproj b/ReplaceVistaIcon/ReplaceVistaIcon.vcxproj index ea6655629..8204ad015 100644 --- a/ReplaceVistaIcon/ReplaceVistaIcon.vcxproj +++ b/ReplaceVistaIcon/ReplaceVistaIcon.vcxproj @@ -1,4 +1,4 @@ - + @@ -15,18 +15,18 @@ ReplaceVistaIcon Win32Proj ReplaceVistaIcon - 10.0 + 10.0.22621.0 Application MultiByte - v142 + v143 Application MultiByte - v142 + v143 @@ -113,4 +113,4 @@ - \ No newline at end of file + diff --git a/ResizableLib/ResizableLib.vcxproj b/ResizableLib/ResizableLib.vcxproj index c3920dd93..f94870ae9 100644 --- a/ResizableLib/ResizableLib.vcxproj +++ b/ResizableLib/ResizableLib.vcxproj @@ -1,4 +1,4 @@ - + @@ -14,20 +14,20 @@ {A5743026-DE7A-4C3D-86EA-46D6B6847F14} MFCProj ResizableLib - 10.0 + 10.0.22621.0 StaticLibrary Static Unicode - v142 + v143 StaticLibrary Static Unicode - v142 + v143 @@ -171,4 +171,4 @@ - \ No newline at end of file + diff --git a/srchybrid/CxImage/cximage.vcxproj b/srchybrid/CxImage/cximage.vcxproj index 0000eb9ef..dd1a5a278 100644 --- a/srchybrid/CxImage/cximage.vcxproj +++ b/srchybrid/CxImage/cximage.vcxproj @@ -1,4 +1,4 @@ - + @@ -14,20 +14,20 @@ {8FEC2660-7F95-4C2E-8747-36176E1FCF82} MFCProj cximage - 10.0 + 10.0.22621.0 StaticLibrary Static Unicode - v142 + v143 StaticLibrary Static Unicode - v142 + v143 @@ -429,4 +429,4 @@ - \ No newline at end of file + diff --git a/srchybrid/emule.vcxproj b/srchybrid/emule.vcxproj index 0a5934970..d4f0a530a 100644 --- a/srchybrid/emule.vcxproj +++ b/srchybrid/emule.vcxproj @@ -1,4 +1,4 @@ - + @@ -19,7 +19,7 @@ emule MFCProj emule - 10.0 + 10.0.22621.0 @@ -27,7 +27,7 @@ Static Unicode true - v142 + v143 Application @@ -35,13 +35,13 @@ false Unicode true - v142 + v143 Application Static Unicode - v142 + v143 @@ -1296,4 +1296,4 @@ del $(IntDir)emule.obj - \ No newline at end of file +