diff --git a/.github/DISCUSSION_TEMPLATE/announcements.md b/.github/DISCUSSION_TEMPLATE/announcements.md new file mode 100644 index 0000000..f074719 --- /dev/null +++ b/.github/DISCUSSION_TEMPLATE/announcements.md @@ -0,0 +1,12 @@ +--- +title: "[Announcement] " +--- + + + +## Summary + +## Details + +## Action required (if any) diff --git a/.github/DISCUSSION_TEMPLATE/general.md b/.github/DISCUSSION_TEMPLATE/general.md new file mode 100644 index 0000000..cd3ea70 --- /dev/null +++ b/.github/DISCUSSION_TEMPLATE/general.md @@ -0,0 +1,6 @@ +--- +title: "" +--- + + diff --git a/.github/DISCUSSION_TEMPLATE/ideas.md b/.github/DISCUSSION_TEMPLATE/ideas.md new file mode 100644 index 0000000..fef29df --- /dev/null +++ b/.github/DISCUSSION_TEMPLATE/ideas.md @@ -0,0 +1,26 @@ +--- +title: "[Idea] " +--- + +## Problem or motivation + + + +## Proposed solution + + + +## Alternatives considered + + + +## Component this relates to + + diff --git a/.github/DISCUSSION_TEMPLATE/q-a.md b/.github/DISCUSSION_TEMPLATE/q-a.md new file mode 100644 index 0000000..9675f6f --- /dev/null +++ b/.github/DISCUSSION_TEMPLATE/q-a.md @@ -0,0 +1,25 @@ +--- +title: "[Q&A] " +--- + +## What are you trying to do? + + + +## What have you already tried? + + + +## System information + +| Field | Value | +|---|---| +| Windows version (winver) | | +| termsrv.dll version | | +| Architecture | | +| RDPConf status | | +| RDP Wrapper release | | + +## Error or unexpected behaviour + + diff --git a/.github/DISCUSSION_TEMPLATE/show-and-tell.md b/.github/DISCUSSION_TEMPLATE/show-and-tell.md new file mode 100644 index 0000000..eed8346 --- /dev/null +++ b/.github/DISCUSSION_TEMPLATE/show-and-tell.md @@ -0,0 +1,16 @@ +--- +title: "[Show] " +--- + +## What are you sharing? + + + +## Details + + + +## System or environment + + diff --git a/.github/ISSUE_TEMPLATE/bug_report.yml b/.github/ISSUE_TEMPLATE/bug_report.yml new file mode 100644 index 0000000..36bdd9e --- /dev/null +++ b/.github/ISSUE_TEMPLATE/bug_report.yml @@ -0,0 +1,88 @@ +name: Bug Report +description: RDP Wrapper is not working correctly on your machine. +labels: [bug] +body: + - type: markdown + attributes: + value: | + Before submitting, please confirm: + - You are running the latest release from https://github.com/sjackson0109/rdpwrap/releases/latest + - Your termsrv.dll version is listed in `rdpwrap.ini` (check RDPConf for the status colour) + - You have excluded `C:\Program Files\RDP Wrapper\` from your antivirus + + - type: dropdown + id: status + attributes: + label: RDPConf status + description: What colour/status does RDPConf show? + options: + - Fully supported (green) — but RDP still fails + - Partially supported (yellow) + - Not supported (red) + - Not installed + - Wrapper DLL not found + validations: + required: true + + - type: input + id: windows_version + attributes: + label: Windows version + description: "Run: winver — paste the full string e.g. Windows 11 Version 24H2 (OS Build 26100.xxxx)" + placeholder: "Windows 11 Version 24H2 (OS Build 26100.3915)" + validations: + required: true + + - type: input + id: termsrv_version + attributes: + label: termsrv.dll version + description: "Run: (Get-Item C:\\Windows\\System32\\termsrv.dll).VersionInfo.FileVersion" + placeholder: "10.0.26100.3915" + validations: + required: true + + - type: input + id: rdpwrap_version + attributes: + label: RDP Wrapper version + description: Version shown in RDPConf or the release tag you downloaded. + placeholder: "ini-2026.03.29.1400" + validations: + required: true + + - type: dropdown + id: architecture + attributes: + label: System architecture + options: + - x64 (64-bit) + - x86 (32-bit) + validations: + required: true + + - type: textarea + id: description + attributes: + label: Describe the problem + description: What happens? What did you expect to happen? + validations: + required: true + + - type: textarea + id: steps + attributes: + label: Steps to reproduce + placeholder: | + 1. Run install.bat as administrator + 2. Open RDPConf + 3. Status shows ... + validations: + required: true + + - type: textarea + id: logs + attributes: + label: Relevant log output + description: Paste any output from the install/update bat scripts or Event Viewer (optional). + render: text diff --git a/.github/ISSUE_TEMPLATE/config.yml b/.github/ISSUE_TEMPLATE/config.yml new file mode 100644 index 0000000..879ea22 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/config.yml @@ -0,0 +1,20 @@ +blank_issues_enabled: false +contact_links: + - name: Q&A — ask a setup or usage question + url: https://github.com/sjackson0109/rdpwrap/discussions/new?category=q-a + about: Not sure why it is not working? Ask in Discussions rather than opening an issue. + - name: Ideas — suggest an improvement + url: https://github.com/sjackson0109/rdpwrap/discussions/new?category=ideas + about: Have an idea that is not ready to be a formal feature request? Start a discussion. + - name: General discussion + url: https://github.com/sjackson0109/rdpwrap/discussions/new?category=general + about: Anything that does not fit the other categories. + - name: Existing INI offset database + url: https://github.com/sjackson0109/rdpwrap/releases/latest + about: Check whether your Windows build is already covered before opening an INI request. + - name: Original project (stascorp, archived) + url: https://github.com/stascorp/rdpwrap + about: Historical reference only — no longer maintained. + - name: sergiye/rdpWrapper (C# rewrite) + url: https://github.com/sergiye/rdpWrapper + about: Alternative C# implementation with auto-offset generation. diff --git a/.github/ISSUE_TEMPLATE/feature_request.yml b/.github/ISSUE_TEMPLATE/feature_request.yml new file mode 100644 index 0000000..4db544a --- /dev/null +++ b/.github/ISSUE_TEMPLATE/feature_request.yml @@ -0,0 +1,41 @@ +name: Feature Request +description: Suggest an improvement or new capability. +labels: [enhancement] +body: + - type: textarea + id: problem + attributes: + label: Problem or motivation + description: What problem does this feature solve? Who is affected? + placeholder: "At the moment there is no way to ..." + validations: + required: true + + - type: textarea + id: solution + attributes: + label: Proposed solution + description: Describe the behaviour or change you would like to see. + validations: + required: true + + - type: textarea + id: alternatives + attributes: + label: Alternatives considered + description: Any other approaches you have thought about (optional). + + - type: dropdown + id: component + attributes: + label: Component this relates to + options: + - rdpwrap.dll (C++ wrapper library) + - RDPWInst / installer (Delphi) + - rdpWrapper GUI (sergiye C# app) + - rdpwrap.ini (offset database) + - CI/CD pipelines + - Documentation + - Other + validations: + required: true diff --git a/.github/ISSUE_TEMPLATE/ini_request.yml b/.github/ISSUE_TEMPLATE/ini_request.yml new file mode 100644 index 0000000..6cf1d70 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/ini_request.yml @@ -0,0 +1,71 @@ +name: INI Update Request — New Windows Build +description: Your termsrv.dll version is not in the INI database and auto-generation failed. +labels: [ini-update] +body: + - type: markdown + attributes: + value: | + Use this template when RDPConf shows **Not supported (red)** and the automatic + offset-generation step in the installer could not resolve your build. + + If you have the technical skills, please consider following + [HOW-TO-ADD-NEW-WINDOWS-BUILDS.md](../docs/HOW-TO-ADD-NEW-WINDOWS-BUILDS.md) + and submitting a pull request instead. + + - type: input + id: termsrv_version + attributes: + label: termsrv.dll version + description: "Run: (Get-Item C:\\Windows\\System32\\termsrv.dll).VersionInfo.FileVersion" + placeholder: "10.0.26100.3915" + validations: + required: true + + - type: input + id: windows_version + attributes: + label: Windows version string + description: "Run: winver — paste the full string" + placeholder: "Windows 11 Version 24H2 (OS Build 26100.3915)" + validations: + required: true + + - type: dropdown + id: architecture + attributes: + label: System architecture + options: + - x64 (64-bit) + - x86 (32-bit) + - ARM64 + validations: + required: true + + - type: dropdown + id: auto_gen + attributes: + label: Did the auto-generation step run? + description: The installer prints a message about TryAutoGenerateOffsets during install or update. + options: + - "Yes — it ran but failed with an error" + - "Yes — it ran and reported success, but wrapper still shows Not supported" + - "No — it was skipped or I installed offline" + - Not sure + validations: + required: true + + - type: textarea + id: auto_gen_output + attributes: + label: Auto-generation output (if any) + description: Paste the console output from the installer relating to offset generation. + render: text + + - type: textarea + id: ini_section + attributes: + label: Generated INI section (if available) + description: | + If you ran RDPWrapOffsetFinder manually, paste the output here. + Run: .\RDPWrapOffsetFinder.exe C:\Windows\System32\termsrv.dll + render: ini diff --git a/.github/workflows/publish-ini.yml b/.github/workflows/publish-ini.yml index 5fb6876..2824531 100644 --- a/.github/workflows/publish-ini.yml +++ b/.github/workflows/publish-ini.yml @@ -5,6 +5,7 @@ on: branches: [main, master] paths: - 'res/rdpwrap.ini' + - 'tools/RDPWrapOffsetFinder/**' - '.github/workflows/publish-ini.yml' workflow_dispatch: @@ -22,6 +23,26 @@ jobs: - name: Checkout repository uses: actions/checkout@v6 + # ── Build rdpwrap.dll for both x64 and Win32 ──────────────────────────── + - name: Setup MSBuild + uses: microsoft/setup-msbuild@v3 + + - name: Build rdpwrap.dll (x64 and Win32) + shell: pwsh + run: | + foreach ($platform in @('x64', 'Win32')) { + msbuild src-x86-x64-Fusix/RDPWrap.vcxproj ` + /p:Configuration=Release ` + /p:Platform="$platform" ` + /p:PlatformToolset=v143 ` + /p:WindowsTargetPlatformVersion=10.0 ` + /v:minimal + } + Copy-Item src-x86-x64-Fusix/x64/Release/rdpwrap.dll .\rdpwrap_x64.dll + Copy-Item src-x86-x64-Fusix/Win32/Release/rdpwrap.dll .\rdpwrap_x86.dll + Write-Host "Built DLLs:" + Get-Item .\rdpwrap_x64.dll, .\rdpwrap_x86.dll | Format-Table Name, Length + # ── Extract the date string used for tagging and the updated field ────── - name: Get release metadata id: meta @@ -38,70 +59,45 @@ jobs: echo "stamp=$stamp" >> $env:GITHUB_OUTPUT echo "inidate=$iniDate" >> $env:GITHUB_OUTPUT - # ── Download the latest RDPWrapOffsetFinder release zip from llccd ────── - - name: Download RDPWrapOffsetFinder + # ── Stage RDPWrapOffsetFinder from committed tools/ ────────────────────── + - name: Stage RDPWrapOffsetFinder from tools/ id: finder shell: pwsh run: | - $zip = "RDPWrapOffsetFinder.zip" + $version = (Get-Content tools/RDPWrapOffsetFinder/VERSION -Raw).Trim() - # Resolve the real latest-release download URL via the GitHub API - $apiUrl = "https://api.github.com/repos/llccd/RDPWrapOffsetFinder/releases/latest" - $release = Invoke-RestMethod -Uri $apiUrl -Headers @{ "User-Agent" = "rdpwrap-ci" } - $asset = $release.assets | Where-Object { $_.name -like "*.zip" } | Select-Object -First 1 - if (-not $asset) { throw "No zip asset found in latest RDPWrapOffsetFinder release" } - - Write-Host "Downloading $($asset.browser_download_url)" - Invoke-WebRequest -Uri $asset.browser_download_url -OutFile $zip - - # Expand the archive - Expand-Archive -Path $zip -DestinationPath .\finder -Force - - # Diagnostic: show what we got - Write-Host "Zip contents:" - Get-ChildItem -Recurse .\finder | Select-Object FullName - - # Helper: find a file by name pattern, preferring arch-specific subdirs - function Find-Binary($pattern, $archHint) { - $hits = Get-ChildItem -Recurse -Filter $pattern .\finder - # prefer paths that contain the arch hint - $match = $hits | Where-Object { $_.FullName -match $archHint } | Select-Object -First 1 - if (-not $match) { $match = $hits | Select-Object -First 1 } - return $match - } + Copy-Item tools/RDPWrapOffsetFinder/x64/RDPWrapOffsetFinder.exe .\RDPWrapOffsetFinder_x64.exe + Copy-Item tools/RDPWrapOffsetFinder/x64/Zydis.dll .\Zydis_x64.dll + Copy-Item tools/RDPWrapOffsetFinder/x86/RDPWrapOffsetFinder.exe .\RDPWrapOffsetFinder_x86.exe + Copy-Item tools/RDPWrapOffsetFinder/x86/Zydis.dll .\Zydis_x86.dll - $x64exe = Find-Binary "RDPWrapOffsetFinder*.exe" "x64" - $x86exe = Find-Binary "RDPWrapOffsetFinder*.exe" "x86|Win32|32" - $x64dll = Find-Binary "Zydis*.dll" "x64" - $x86dll = Find-Binary "Zydis*.dll" "x86|Win32|32" + Write-Host "Staged finder tools (version $version):" + Get-Item .\RDPWrapOffsetFinder_*.exe, .\Zydis_*.dll | Format-Table Name, Length - # If only one exe/dll variant exists, use it for both architectures - if (-not $x86exe) { $x86exe = $x64exe } - if (-not $x86dll) { $x86dll = $x64dll } - if (-not $x64exe) { throw "Could not locate RDPWrapOffsetFinder exe in zip" } - if (-not $x64dll) { throw "Could not locate Zydis dll in zip" } + echo "finder_ver=$version" >> $env:GITHUB_OUTPUT - Copy-Item $x64exe.FullName .\RDPWrapOffsetFinder_x64.exe - Copy-Item $x86exe.FullName .\RDPWrapOffsetFinder_x86.exe - Copy-Item $x64dll.FullName .\Zydis_x64.dll - Copy-Item $x86dll.FullName .\Zydis_x86.dll + # ── Download the latest rdpWrapper GUI app from sergiye ───────────────── + - name: Download rdpWrapper (sergiye) + id: wrapper + shell: pwsh + run: | + $apiUrl = "https://api.github.com/repos/sergiye/rdpWrapper/releases/latest" + $release = Invoke-RestMethod -Uri $apiUrl -Headers @{ "User-Agent" = "rdpwrap-ci" } - # Build self-contained zip bundles so manual users can extract-and-run - # without needing to rename the DLL or download a second file. foreach ($arch in @('x64', 'x86')) { - $bundle = ".\bundle_$arch" - New-Item -ItemType Directory -Path $bundle -Force | Out-Null - Copy-Item ".\RDPWrapOffsetFinder_$arch.exe" "$bundle\RDPWrapOffsetFinder.exe" - Copy-Item ".\Zydis_$arch.dll" "$bundle\Zydis.dll" - Compress-Archive -Path "$bundle\*" -DestinationPath ".\RDPWrapOffsetFinder_$arch.zip" -Force - Remove-Item $bundle -Recurse -Force + $asset = $release.assets | + Where-Object { $_.name -eq "rdpWrapper_$arch.exe" } | + Select-Object -First 1 + if (-not $asset) { + throw "Could not find rdpWrapper_$arch.exe in sergiye release $($release.tag_name)" + } + Write-Host "Downloading $($asset.browser_download_url)" + Invoke-WebRequest -Uri $asset.browser_download_url -OutFile ".\rdpWrapper_$arch.exe" } - Write-Host "Staged binaries:" - Get-ChildItem .\RDPWrapOffsetFinder_*.exe, .\Zydis_*.dll, .\RDPWrapOffsetFinder_*.zip | - Format-Table Name, Length - - echo "finder_ver=$($release.tag_name)" >> $env:GITHUB_OUTPUT + Write-Host "Wrapper exes:" + Get-Item .\rdpWrapper_x64.exe, .\rdpWrapper_x86.exe | Format-Table Name, Length + echo "wrapper_ver=$($release.tag_name)" >> $env:GITHUB_OUTPUT # ── Validate the INI has required sections ─────────────────────────────── - name: Validate INI @@ -116,6 +112,38 @@ jobs: $sectionCount = ([regex]::Matches($ini, '^\[[\d\.]+\]', 'Multiline')).Count Write-Host "INI is valid. Windows-version sections: $sectionCount" + # ── Assemble the two user-facing distribution bundles ──────────────────── + - name: Create distribution bundles + shell: pwsh + run: | + # RDPWrapper.zip - complete install package + $d = ".\bundle_wrapper" + New-Item -ItemType Directory -Path $d -Force | Out-Null + Copy-Item .\rdpwrap_x64.dll "$d\rdpwrap_x64.dll" + Copy-Item .\rdpwrap_x86.dll "$d\rdpwrap_x86.dll" + Copy-Item .\rdpWrapper_x64.exe "$d\rdpWrapper_x64.exe" + Copy-Item .\rdpWrapper_x86.exe "$d\rdpWrapper_x86.exe" + Copy-Item res\rdpwrap.ini "$d\rdpwrap.ini" + Copy-Item bin\install.bat "$d\install.bat" + Copy-Item bin\uninstall.bat "$d\uninstall.bat" + Copy-Item bin\update.bat "$d\update.bat" + Compress-Archive -Path "$d\*" -DestinationPath ".\RDPWrapper.zip" -Force + Remove-Item $d -Recurse -Force + + # RDPWrapOffsetFinder.zip - offset finder with per-arch subfolders + $f = ".\bundle_finder" + foreach ($arch in @('x64', 'x86')) { + $dir = "$f\$arch" + New-Item -ItemType Directory -Path $dir -Force | Out-Null + Copy-Item ".\RDPWrapOffsetFinder_$arch.exe" "$dir\RDPWrapOffsetFinder.exe" + Copy-Item ".\Zydis_$arch.dll" "$dir\Zydis.dll" + } + Compress-Archive -Path "$f\*" -DestinationPath ".\RDPWrapOffsetFinder.zip" -Force + Remove-Item $f -Recurse -Force + + Write-Host "Distribution bundles:" + Get-Item .\RDPWrapper.zip, .\RDPWrapOffsetFinder.zip | Format-Table Name, Length + # ── Create/update a versioned GitHub Release with all assets ───────────── - name: Publish release uses: softprops/action-gh-release@v2 @@ -125,30 +153,35 @@ jobs: prerelease: false make_latest: true body: | - ## RDP Wrapper — Automated INI Release + ## RDP Wrapper - Automated Release | Field | Value | |---|---| | INI `Updated` date | `${{ steps.meta.outputs.inidate }}` | | Published | ${{ steps.meta.outputs.stamp }} | - | RDPWrapOffsetFinder | ${{ steps.finder.outputs.finder_ver }} | + | rdpWrapper (sergiye) | ${{ steps.wrapper.outputs.wrapper_ver }} | + | RDPWrapOffsetFinder (llccd) | ${{ steps.finder.outputs.finder_ver }} | + + ### Downloads + + | File | Contents | Use | + |---|---|---| + | `RDPWrapper.zip` | rdpwrap_x64.dll, rdpwrap_x86.dll, rdpWrapper_x64.exe, rdpWrapper_x86.exe, rdpwrap.ini, install/uninstall/update.bat | Main install package - extract and run `rdpWrapper_x64.exe` | + | `RDPWrapOffsetFinder.zip` | x64\RDPWrapOffsetFinder.exe + Zydis.dll, x86\RDPWrapOffsetFinder.exe + Zydis.dll | Generate offsets for an unknown termsrv.dll version manually | + + ### Individual files (used by the automated installer) - ### Assets | File | Purpose | |---|---| - | `rdpwrap.ini` | Latest offset database for all known termsrv.dll versions | - | `RDPWrapOffsetFinder_x64.zip` | x64 finder bundle — extract and run `RDPWrapOffsetFinder.exe` directly | - | `RDPWrapOffsetFinder_x86.zip` | x86 finder bundle — extract and run `RDPWrapOffsetFinder.exe` directly | - | `RDPWrapOffsetFinder_x64.exe` / `Zydis_x64.dll` | Loose x64 binaries (used by the installer) | - | `RDPWrapOffsetFinder_x86.exe` / `Zydis_x86.dll` | Loose x86 binaries (used by the installer) | - - The installer fetches `rdpwrap.ini` from this release automatically. - If your termsrv.dll version is not in the INI, the installer downloads the - offset finder tools and generates the missing section on-the-fly. + | `rdpwrap.ini` | Offset database fetched automatically by the installer | + | `RDPWrapOffsetFinder_x64.exe` / `Zydis_x64.dll` | Loose x64 binaries downloaded by `TryAutoGenerateOffsets` | + | `RDPWrapOffsetFinder_x86.exe` / `Zydis_x86.dll` | Loose x86 binaries downloaded by `TryAutoGenerateOffsets` | files: | + RDPWrapper.zip + RDPWrapOffsetFinder.zip res/rdpwrap.ini - RDPWrapOffsetFinder_x64.zip - RDPWrapOffsetFinder_x86.zip + rdpwrap_x64.dll + rdpwrap_x86.dll RDPWrapOffsetFinder_x64.exe RDPWrapOffsetFinder_x86.exe Zydis_x64.dll diff --git a/.github/workflows/update-finder-tools.yml b/.github/workflows/update-finder-tools.yml new file mode 100644 index 0000000..f80c27d --- /dev/null +++ b/.github/workflows/update-finder-tools.yml @@ -0,0 +1,120 @@ +name: Update RDPWrapOffsetFinder tools + +# Run manually to pull a new version of llccd/RDPWrapOffsetFinder into tools/. +# The workflow commits the updated binaries and opens a pull request. +on: + workflow_dispatch: + inputs: + tag: + description: "llccd release tag to fetch (leave blank for latest)" + required: false + default: "" + +env: + FORCE_JAVASCRIPT_ACTIONS_TO_NODE24: true + +permissions: + contents: write + pull-requests: write + +jobs: + update: + runs-on: windows-2022 + + steps: + - name: Checkout repository + uses: actions/checkout@v6 + + - name: Download and extract RDPWrapOffsetFinder + id: fetch + shell: pwsh + run: | + $tag = "${{ github.event.inputs.tag }}" + if ($tag -eq "") { + $apiUrl = "https://api.github.com/repos/llccd/RDPWrapOffsetFinder/releases/latest" + } else { + $apiUrl = "https://api.github.com/repos/llccd/RDPWrapOffsetFinder/releases/tags/$tag" + } + + $release = Invoke-RestMethod -Uri $apiUrl -Headers @{ "User-Agent" = "rdpwrap-ci" } + $version = $release.tag_name + Write-Host "Fetching version $version" + + $asset = $release.assets | Where-Object { $_.name -like "*.zip" } | Select-Object -First 1 + if (-not $asset) { throw "No zip asset found in release $version" } + + Invoke-WebRequest -Uri $asset.browser_download_url -OutFile finder.zip -UseBasicParsing + Expand-Archive -Path finder.zip -DestinationPath .\finder -Force + + Write-Host "Zip contents:" + Get-ChildItem -Recurse .\finder | Select-Object FullName, Length + + # The llccd zip uses "64bit/" and "32bit/" subfolder names. + # We pick the symbol-enabled exe (not the _nosymbol variant) from each arch folder. + function Get-Bin($filter, $archHint) { + $hits = Get-ChildItem -Recurse .\finder -Filter $filter | + Where-Object { $_.FullName -match $archHint } | + Where-Object { $_.Name -notmatch "nosymbol" } + return ($hits | Select-Object -First 1) + } + + $x64exe = Get-Bin "RDPWrapOffsetFinder*.exe" "64bit" + $x64dll = Get-Bin "Zydis*.dll" "64bit" + $x86exe = Get-Bin "RDPWrapOffsetFinder*.exe" "32bit" + $x86dll = Get-Bin "Zydis*.dll" "32bit" + + # Fall back to x64 if the release only ships one arch + if (-not $x86exe) { $x86exe = $x64exe } + if (-not $x86dll) { $x86dll = $x64dll } + if (-not $x64exe) { throw "Could not locate x64 exe" } + if (-not $x64dll) { throw "Could not locate x64 Zydis.dll" } + + New-Item -ItemType Directory -Path tools\RDPWrapOffsetFinder\x64 -Force | Out-Null + New-Item -ItemType Directory -Path tools\RDPWrapOffsetFinder\x86 -Force | Out-Null + + Copy-Item $x64exe.FullName tools\RDPWrapOffsetFinder\x64\RDPWrapOffsetFinder.exe -Force + Copy-Item $x64dll.FullName tools\RDPWrapOffsetFinder\x64\Zydis.dll -Force + Copy-Item $x86exe.FullName tools\RDPWrapOffsetFinder\x86\RDPWrapOffsetFinder.exe -Force + Copy-Item $x86dll.FullName tools\RDPWrapOffsetFinder\x86\Zydis.dll -Force + Set-Content -Path tools\RDPWrapOffsetFinder\VERSION -Value $version + + Write-Host "Staged tools:" + Get-ChildItem -Recurse tools\RDPWrapOffsetFinder | Select-Object FullName, Length + + echo "version=$version" >> $env:GITHUB_OUTPUT + + - name: Commit and push to a new branch + id: push + shell: pwsh + run: | + $version = "${{ steps.fetch.outputs.version }}" + $branch = "chore/update-finder-tools-$version" + + git config user.name "github-actions[bot]" + git config user.email "github-actions[bot]@users.noreply.github.com" + git checkout -b $branch + git add tools/RDPWrapOffsetFinder + if ((git diff --cached --name-only) -eq "") { + Write-Host "No changes - tools already up to date" + exit 0 + } + git commit -m "chore: update RDPWrapOffsetFinder tools to $version" + git push origin $branch + echo "branch=$branch" >> $env:GITHUB_OUTPUT + + - name: Create pull request + if: steps.push.outputs.branch != '' + shell: pwsh + run: | + $version = "${{ steps.fetch.outputs.version }}" + $branch = "${{ steps.push.outputs.branch }}" + gh pr create ` + --title "chore: update RDPWrapOffsetFinder tools to $version" ` + --body "Automated update of the committed RDPWrapOffsetFinder binaries in ``tools/RDPWrapOffsetFinder/`` to upstream release $version. + +Triggered manually via the **Update RDPWrapOffsetFinder tools** workflow. +Merge to include the updated binaries in the next INI release." ` + --base master ` + --head $branch + env: + GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} diff --git a/tools/RDPWrapOffsetFinder/README.md b/tools/RDPWrapOffsetFinder/README.md new file mode 100644 index 0000000..e19777d --- /dev/null +++ b/tools/RDPWrapOffsetFinder/README.md @@ -0,0 +1,35 @@ +# RDPWrapOffsetFinder + +Pre-built binaries of [llccd/RDPWrapOffsetFinder](https://github.com/llccd/RDPWrapOffsetFinder), +committed here so that the CI pipeline and releases are self-contained and +reproducible without depending on an external release being available at build time. + +## Contents + +``` +x64/ + RDPWrapOffsetFinder.exe # x86-64 build + Zydis.dll # required runtime (x64) +x86/ + RDPWrapOffsetFinder.exe # x86 32-bit build + Zydis.dll # required runtime (x86) +VERSION # version tag of the upstream release +``` + +## Usage + +Extract the appropriate arch folder and run: + +``` +.\RDPWrapOffsetFinder.exe C:\Windows\System32\termsrv.dll +``` + +The output `[10.0.xxxxx.xxxxx]` section can be appended to `res/rdpwrap.ini` +and submitted as a pull request. + +## Updating + +To update the binaries when llccd releases a new version, trigger the +`Update RDPWrapOffsetFinder tools` workflow from the Actions tab +(`.github/workflows/update-finder-tools.yml`). +It will download the latest release, update this folder, and open a pull request. diff --git a/tools/RDPWrapOffsetFinder/VERSION b/tools/RDPWrapOffsetFinder/VERSION new file mode 100644 index 0000000..6d21a1c --- /dev/null +++ b/tools/RDPWrapOffsetFinder/VERSION @@ -0,0 +1 @@ +v0.9 \ No newline at end of file diff --git a/tools/RDPWrapOffsetFinder/x64/RDPWrapOffsetFinder.exe b/tools/RDPWrapOffsetFinder/x64/RDPWrapOffsetFinder.exe new file mode 100644 index 0000000..312d013 Binary files /dev/null and b/tools/RDPWrapOffsetFinder/x64/RDPWrapOffsetFinder.exe differ diff --git a/tools/RDPWrapOffsetFinder/x64/Zydis.dll b/tools/RDPWrapOffsetFinder/x64/Zydis.dll new file mode 100644 index 0000000..c747d83 Binary files /dev/null and b/tools/RDPWrapOffsetFinder/x64/Zydis.dll differ diff --git a/tools/RDPWrapOffsetFinder/x86/RDPWrapOffsetFinder.exe b/tools/RDPWrapOffsetFinder/x86/RDPWrapOffsetFinder.exe new file mode 100644 index 0000000..dd74f4f Binary files /dev/null and b/tools/RDPWrapOffsetFinder/x86/RDPWrapOffsetFinder.exe differ diff --git a/tools/RDPWrapOffsetFinder/x86/Zydis.dll b/tools/RDPWrapOffsetFinder/x86/Zydis.dll new file mode 100644 index 0000000..5909f0f Binary files /dev/null and b/tools/RDPWrapOffsetFinder/x86/Zydis.dll differ