Skip to content
This repository has been archived by the owner on May 9, 2023. It is now read-only.

Merge from pbatard/libwdi #1

Open
wants to merge 79 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
79 commits
Select commit Hold shift + click to select a range
f301a1f
[pki] improve error report
pbatard Aug 28, 2017
45fd6f6
[tokenizer] enable replacing of tokens with empty strings
pbatard Aug 29, 2017
0298f7e
[samples] allow interface 0 in zadic
turboj Nov 12, 2017
b4a47ba
[misc] make custom definition of DEVPKEY_Device_BusReportedDeviceDesc…
geovie Dec 20, 2017
a5b36b4
[misc] fix various MinGW warnings
pbatard Jan 5, 2018
3fbca5b
[pki] use RSA 4096 bit key
turboj Nov 23, 2017
10a194e
[samples] allow interface 0 in wdi-simple
turboj Nov 23, 2017
029b7e5
[pki] use SHA1 for self signed certificate on Windows 7
geovie Feb 19, 2018
2b0d7a2
[internal] add auto detection of 'git commit --amend'
pbatard May 14, 2018
4cbd90f
Zadig 2.4
pbatard Jul 26, 2018
38f4820
fix Zadig HTTPS download and file selection issues
pbatard Jul 26, 2018
b4cd792
fix regression introduced with 38f48203af08d5a7b1253ff7951059b54b4ec9a8
pbatard Jul 27, 2018
b624672
improve installer error reporting
pbatard Jul 27, 2018
c070e60
add a timeout option to the wdi-simple installer scripts
karelbilek Sep 13, 2018
8123b41
[net] fix update check
pbatard Dec 28, 2018
bc2336e
[misc] use static_sprintf wherever possible
pbatard Dec 29, 2018
7141987
[pki] improve error reporting
pbatard Oct 10, 2019
38c8a5d
[misc] update msapi_utf8.h to latest
pbatard Mar 28, 2020
21d23dd
[pki] fix handling of non western paths during cat generation
pbatard Mar 28, 2020
88cee37
[zadig] fix profile resources not being freed
pbatard Mar 28, 2020
bccb43d
Zadig 2.5
pbatard Mar 28, 2020
faf20f6
libwdi 1.3.1
pbatard Mar 30, 2020
8f3e2a2
[misc] remove deprecated warning from VS2019 project files
pbatard Apr 18, 2020
d09916e
[core] fix registry handle leak
pbatard Apr 18, 2020
7b6d2c4
[misc] fix a typo
pbatard May 31, 2020
42eefc1
[core] add a more explicit error message for code 0x800706D9
pbatard Jun 10, 2020
933a0a0
[misc] fix a typo
AsciiWolf Jun 4, 2020
097c483
[pki] minor pki.c improvements
pbatard Jul 15, 2020
94faac0
[misc] improve error message formatting
pbatard Aug 19, 2020
721a4db
[core] replace empty device descriptors with something
pbatard Aug 19, 2020
1d66ece
docs: fix simple typo, othwerwise -> otherwise
timgates42 Dec 10, 2020
d6d91df
Merge pull request #203 from timgates42/bugfix_typo_otherwise
pbatard Dec 21, 2020
e665d76
[pki] try to work around Windows corrupting the key containers
pbatard Feb 1, 2021
cc0b96e
[misc] fix typos
jsoref Jan 13, 2021
a6ae23a
[core] Link to the standalone WDK 8 redistributables
pbatard Jun 11, 2021
abff9b2
[misc] add VS2019 CI builds
pbatard Sep 3, 2021
e52b6bf
[misc] add MinGW CI builds
pbatard Sep 3, 2021
57888e0
[misc] add Coverity CI builds
pbatard Sep 3, 2021
fb6c6d6
[misc] fix Coverity defects
pbatard Sep 3, 2021
3738153
[ci] add CodeQL analysis
pbatard Sep 4, 2021
a163631
[misc] remove *_sources files
pbatard Sep 4, 2021
a370a22
[misc] remove the zadic sample
pbatard Sep 4, 2021
0ed9de7
[misc] update Zadig and library version
pbatard Sep 4, 2021
e1257a8
[core] fix errors when providing a user driver
pbatard Sep 4, 2021
f0cc626
libwdi 1.4.0
pbatard Sep 4, 2021
bab1864
[core] pick libusb-win32 and libusbK versions from the DLL
pbatard Sep 4, 2021
1aaa794
[core] improve Windows version reporting
pbatard Sep 7, 2021
37841c2
[core] don't continue on .cat signing errors if test signing is disabled
pbatard Sep 27, 2021
99a38ae
[core] improve version handling for Windows 11
pbatard Sep 27, 2021
3d5d029
[pki] prevent an infinite loop if a certificate cannot be deleted
pbatard Oct 28, 2021
f8c408d
[misc] fix 2 small issues
Oct 1, 2021
08aa273
[core] enable the provision of an external inf
Oct 1, 2021
8a0c476
[core] add an explicit error for code 0x109
pbatard Oct 29, 2021
e56e653
[misc] fix Coverity warnings
pbatard Oct 29, 2021
d506f19
[core] fix filter-driver installation path
pbatard Oct 31, 2021
dc63334
libwdi 1.4.1
pbatard Nov 1, 2021
2f4186c
[misc] update MSVC toolchain to VS2022
pbatard Jan 20, 2022
d670251
[misc] fix MinGW warnings
pbatard Jan 22, 2022
c0c4664
[core] fix DLL build
pbatard Jan 30, 2022
63a59c3
[misc] rename windows_error_str() function
rasky Jul 11, 2022
6a1ec5b
[misc] update GitHub Actions scripts
pbatard Dec 15, 2022
6722681
[misc] update README
pbatard Dec 21, 2022
ae66132
[misc] don't use libtool when invoking windres
pbatard Feb 23, 2023
b66b7a0
[misc] replace CRLFs to LFs in examples/zadig.h
jhol Sep 12, 2022
dae3093
[zadig] fix symbol not found errors when compiling with dynamic lib
pbatard Feb 24, 2023
11f53e6
[misc] rename DLL_EXPORT to LIBWDI_DLL_EXPORT
jhol Aug 1, 2022
cf5561d
[misc] update vid_data.c to latest and update README
pbatard Feb 24, 2023
e88f149
[github] update GitHub Actions build files to use latest libusb-win32
mcuee Jan 28, 2023
30b4087
[github] update GitHub Actions build files
pbatard Feb 25, 2023
11689ba
[msvc] embed an ARM64 installer executable
pbatard Feb 25, 2023
d273d4b
[core] add ARM64 driver installation support
pbatard Feb 25, 2023
3baf428
[zadig] improve network connectivity detection
pbatard Mar 1, 2023
90278c5
libwdi 1.5.0
pbatard Mar 1, 2023
464d7c8
[misc] update Windows version detection
pbatard Jun 11, 2024
bd17edc
[core] correctly trigger UAC during driver installation
Sep 15, 2023
9b4b26d
[misc] update GitHub Actions dependencies to latest
pbatard Jun 11, 2024
6e8214c
[core] fix wrong ordering of files, causing install-filter to overwri…
dontech Feb 18, 2024
63dbca8
[arm64] add support for libusb0 on arm64
dontech Jan 5, 2024
9b23b82
libwdi 1.5.1
pbatard Jun 13, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 0 additions & 2 deletions .amend.cmd

This file was deleted.

5 changes: 4 additions & 1 deletion .gitattributes
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,9 @@
*.inf.in eol=crlf
*.rc eol=crlf
*.def eol=crlf
*.creole export-ignore
.gitattributes export-ignore
.gitignore export-ignore
*.creole export-ignore
_*.sh export-ignore
_*.cmd export-ignore
appveyor.yml export-ignore
73 changes: 73 additions & 0 deletions .github/workflows/codeql.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,73 @@
name: CodeQL

on:
push:
paths-ignore:
- '.gitignore'
- '.gitattributes'
- '**.cmd'
- '**.md'
- 'AUTHORS'
- 'NEWS'
- 'ChangeLog'
pull_request:
paths-ignore:
- '.gitignore'
- '.gitattributes'
- '**.cmd'
- '**.md'
- 'AUTHORS'
- 'NEWS'
- 'ChangeLog'

env:
WDK_URL: https://go.microsoft.com/fwlink/p/?LinkID=253170
LIBUSB0_URL: https://github.com/mcuee/libusb-win32/releases/download/release_1.4.0.0/libusb-win32-bin-1.4.0.0.zip
LIBUSBK_URL: https://github.com/mcuee/libusbk/releases/download/V3.1.0.0/libusbK-3.1.0.0-bin.7z
SOLUTION_FILE_PATH: ./libwdi.sln
TARGET_PLATFORM: x64
BUILD_CONFIGURATION: Debug
BUILD_MACROS: '"WDK_DIR=\"../wdk/Windows Kits/8.0\";LIBUSB0_DIR=\"../libusb0\";LIBUSBK_DIR=\"../libusbk/bin\""'

jobs:
CodeQL-Build:
runs-on: windows-latest

permissions:
security-events: write

steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
fetch-depth: 0
submodules: recursive

- name: Download support files
shell: cmd
run: |
curl -L ${{ env.WDK_URL }} -o wdk-redist.msi
curl -L ${{ env.LIBUSB0_URL }} -o libusb0-redist.zip
curl -L ${{ env.LIBUSBK_URL }} -o libusbk-redist.7z
msiexec /a wdk-redist.msi /qn TARGETDIR=%CD%\wdk
7z x libusb0-redist.zip
7z x libusbk-redist.7z
del *.zip
del *.7z
move libusb-win32* libusb0
move libusbK* libusbk

- name: Initialize CodeQL
uses: github/codeql-action/init@v3
with:
languages: cpp

- name: Add MSBuild to PATH
uses: microsoft/setup-msbuild@v2

- name: Build
shell: cmd
run: msbuild ${{ env.SOLUTION_FILE_PATH }} /m /p:Configuration=${{ env.BUILD_CONFIGURATION}},Platform=${{ env.TARGET_PLATFORM }},BuildMacros=${{ env.BUILD_MACROS }}

- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v3
64 changes: 64 additions & 0 deletions .github/workflows/coverity.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
name: Coverity

on:
push:
paths-ignore:
- '.gitignore'
- '.gitattributes'
- '**.cmd'
- '**.md'
- 'AUTHORS'
- 'NEWS'
- 'ChangeLog'

env:
WDK_URL: https://go.microsoft.com/fwlink/p/?LinkID=253170
LIBUSB0_URL: https://github.com/mcuee/libusb-win32/releases/download/release_1.4.0.0/libusb-win32-bin-1.4.0.0.zip
LIBUSBK_URL: https://github.com/mcuee/libusbk/releases/download/V3.1.0.0/libusbK-3.1.0.0-bin.7z
SOLUTION_FILE_PATH: ./libwdi.sln
EMAIL: [email protected]
BUILD_MACROS: '"WDK_DIR=\"../wdk/Windows Kits/8.0\";LIBUSB0_DIR=\"../libusb0\";LIBUSBK_DIR=\"../libusbk/bin\""'

jobs:
Coverity-Build:
runs-on: windows-latest

steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
fetch-depth: 0
submodules: recursive
- name: Download Coverity
run: |
curl -d "token=${{ secrets.COVERITY_SCAN_TOKEN }}&project=pbatard%2Flibwdi" -L https://scan.coverity.com/download/cxx/win64 -o cov-analysis-win64.zip
7z x cov-analysis-win64.zip
del cov-analysis-win64.zip
move cov-analysis-win64* cov-analysis-win64
- name: Add Coverity to PATH
shell: bash
run: echo "${{ github.workspace }}/cov-analysis-win64/bin" >> $GITHUB_PATH
- name: Download support files
shell: cmd
run: |
curl -L ${{ env.WDK_URL }} -o wdk-redist.msi
curl -L ${{ env.LIBUSB0_URL }} -o libusb0-redist.zip
curl -L ${{ env.LIBUSBK_URL }} -o libusbk-redist.7z
msiexec /a wdk-redist.msi /qn TARGETDIR=%CD%\wdk
7z x libusb0-redist.zip
7z x libusbk-redist.7z
del *.zip
del *.7z
move libusb-win32* libusb0
move libusbK* libusbk
- name: Add MSBuild to PATH
uses: microsoft/setup-msbuild@v2
- name: Build with Coverity
shell: cmd
run: |
cov-configure --msvc
cov-build.exe --dir cov-int msbuild ${{ env.SOLUTION_FILE_PATH }} /m /p:Configuration=Release,Platform=x64,BuildMacros=${{ env.BUILD_MACROS }}
- name: Upload Coverity build for analysis
run: |
7z a -r cov-int.zip cov-int
curl --form email=${{ env.EMAIL }} --form token=${{ secrets.COVERITY_SCAN_TOKEN }} --form [email protected] --form version="${{ env.GITHUB_SHA }}" --form description="libwdi" https://scan.coverity.com/builds?project=pbatard%2Flibwdi
100 changes: 100 additions & 0 deletions .github/workflows/mingw.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,100 @@
name: MinGW

on:
push:
paths-ignore:
- '.gitignore'
- '.gitattributes'
- '**.cmd'
- '**.md'
- 'AUTHORS'
- 'NEWS'
- 'ChangeLog'
pull_request:
paths-ignore:
- '.gitignore'
- '.gitattributes'
- '**.cmd'
- '**.md'
- 'AUTHORS'
- 'NEWS'
- 'ChangeLog'

env:
WDK_URL: https://go.microsoft.com/fwlink/p/?LinkID=253170
LIBUSB0_URL: https://github.com/mcuee/libusb-win32/releases/download/release_1.4.0.0/libusb-win32-bin-1.4.0.0.zip
LIBUSBK_URL: https://github.com/mcuee/libusbk/releases/download/V3.1.0.0/libusbK-3.1.0.0-bin.7z
BUILD_OPTIONS: '--enable-toggable-debug --enable-examples-build --disable-debug --disable-shared'
DRIVERS_PATHS: '--with-wdkdir="wdk/Windows Kits/8.0" --with-wdfver=1011 --with-libusb0="libusb0" --with-libusbk="libusbk/bin"'

jobs:
MinGW-Build:
runs-on: windows-latest

strategy:
matrix:
include:
- { sys: mingw64, env: x86_64 }
- { sys: mingw32, env: i686 }

defaults:
run:
shell: msys2 {0}

steps:
- name: Install MinGW
uses: msys2/setup-msys2@v2
with:
msystem: ${{ matrix.sys }}
update: true
install: >-
mingw-w64-${{ matrix.env }}-toolchain
base-devel
autotools
git
- name: Checkout repository
uses: actions/checkout@v4
with:
fetch-depth: 0
submodules: recursive
- name: Download support files
shell: cmd
run: |
curl -L ${{ env.WDK_URL }} -o wdk-redist.msi
curl -L ${{ env.LIBUSB0_URL }} -o libusb0-redist.zip
curl -L ${{ env.LIBUSBK_URL }} -o libusbk-redist.7z
msiexec /a wdk-redist.msi /qn TARGETDIR=%CD%\wdk
7z x libusb0-redist.zip
7z x libusbk-redist.7z
del *.zip
del *.7z
move libusb-win32* libusb0
move libusbK* libusbk
- name: Build
run: |
./bootstrap.sh
[ "${{ matrix.env }}" == "x86_64" ] && EXTRA_OPTION=--disable-32bit
./configure --build=${{ matrix.env }}-w64-mingw32 --host=${{ matrix.env }}-w64-mingw32 ${{ env.BUILD_OPTIONS }} $EXTRA_OPTION ${{ env.DRIVERS_PATHS }}
make
mkdir -p artifacts/${{ matrix.env }}
mv examples/*.exe artifacts/${{ matrix.env }}
- name: Display SHA-256
if: ${{ github.event_name == 'push' }}
run: sha256sum artifacts/${{ matrix.env }}/*.exe
- name: Upload artifacts
uses: actions/upload-artifact@v4
if: ${{ github.event_name == 'push' }}
with:
name: ${{ matrix.sys }}
path: ./artifacts/*/*.exe

Merge-Artifacts:
runs-on: windows-latest
needs: MinGW-Build
steps:
- name: Merge Artifacts
uses: actions/upload-artifact/merge@v4
if: ${{ github.event_name == 'push' }}
with:
name: MinGW
delete-merged: true
101 changes: 101 additions & 0 deletions .github/workflows/vs2022.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,101 @@
name: VS2022

on:
push:
paths-ignore:
- '.gitignore'
- '.gitattributes'
- '**.cmd'
- '**.md'
- 'AUTHORS'
- 'NEWS'
- 'ChangeLog'
pull_request:
paths-ignore:
- '.gitignore'
- '.gitattributes'
- '**.cmd'
- '**.md'
- 'AUTHORS'
- 'NEWS'
- 'ChangeLog'

env:
WDK_URL: https://go.microsoft.com/fwlink/p/?LinkID=253170
LIBUSB0_URL: https://github.com/mcuee/libusb-win32/releases/download/release_1.4.0.0/libusb-win32-bin-1.4.0.0.zip
LIBUSBK_URL: https://github.com/mcuee/libusbk/releases/download/V3.1.0.0/libusbK-3.1.0.0-bin.7z
SOLUTION_FILE_PATH: ./libwdi.sln
BUILD_MACROS: '"WDK_DIR=\"../wdk/Windows Kits/8.0\";LIBUSB0_DIR=\"../libusb0\";LIBUSBK_DIR=\"../libusbk/bin\""'

jobs:
VS2022-Build:
runs-on: windows-latest

steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
fetch-depth: 0
submodules: recursive

- name: Download support files
shell: cmd
run: |
curl -L ${{ env.WDK_URL }} -o wdk-redist.msi
curl -L ${{ env.LIBUSB0_URL }} -o libusb0-redist.zip
curl -L ${{ env.LIBUSBK_URL }} -o libusbk-redist.7z
msiexec /a wdk-redist.msi /qn TARGETDIR=%CD%\wdk
7z x libusb0-redist.zip
7z x libusbk-redist.7z
del *.zip
del *.7z
move libusb-win32* libusb0
move libusbK* libusbk

- name: Add MSBuild to PATH
uses: microsoft/setup-msbuild@v2

- name: Build
shell: cmd
run: |
for %%P in (Win32 x64) do (
for %%B in (Debug Release) do (
msbuild ${{ env.SOLUTION_FILE_PATH }} /m /p:Configuration=%%B,Platform=%%P,BuildMacros=${{ env.BUILD_MACROS }}
)
)

- name: Upload artifacts
uses: actions/upload-artifact@v4
if: ${{ github.event_name == 'push' }}
with:
name: VS2022
path: ./*/*/examples/*.exe

- name: Display SHA-256
if: ${{ github.event_name == 'push' }}
run: sha256sum ./*/*/examples/*.exe

- name: Compress release-ready version of Zadig
uses: crazy-max/ghaction-upx@v3
if: startsWith(github.ref, 'refs/tags/')
with:
version: latest
files: ./Win32/Release/examples/zadig.exe
args: --lzma --best

- name: Rename release-ready version of Zadig
if: startsWith(github.ref, 'refs/tags/')
shell: cmd
run: |
for /f "tokens=3" %%i in ('findstr FileVersion examples\zadig.rc') do set "ver=%%i"
set ver=%ver:"=%
for /f "tokens=1,2 delims=." %%i in ("%ver%") do set "ZADIG_VERSION=%%i.%%j"
copy Win32\Release\examples\zadig.exe zadig-%ZADIG_VERSION%.exe
sha256sum zadig-*.exe

- name: Upload release-ready version of Zadig
uses: actions/upload-artifact@v4
if: startsWith(github.ref, 'refs/tags/')
with:
name: Zadig
path: ./zadig-*.exe
18 changes: 15 additions & 3 deletions AUTHORS
Original file line number Diff line number Diff line change
@@ -1,16 +1,28 @@
Copyright 2010-2016 Pete Batard <[email protected]>
Copyright 2010-2011 Travis Robinson <[email protected]>
Copyright © 2010-2023 Pete Batard <[email protected]>
Copyright © 2010-2011 Travis Robinson <[email protected]>

Other contributors:
Alexander Sashnov
Bob Paddock
Fred Sundvik
Georg Vienna
Giovanni Bajo
Jacob Alexander
JaggedJax
Jasper van Bourgognie
Jeorg Fischer
Jerome-PS
Joel Holdsworth
Joseph Marshall
Josh Soerf
Karel Bilek
Liam Staskawicz
Louie Caulfield
PhracturedBlue
Ryan Pavlik
Spiro Trikaliotis
Stanley Elliott
Tim Gates
Uri Lublin
Vitali Lovich
Xiaofan Chen
Xiaofan Chen
Loading