-
Notifications
You must be signed in to change notification settings - Fork 1
55 lines (46 loc) · 2.32 KB
/
Copy pathbuild-driver.yml
File metadata and controls
55 lines (46 loc) · 2.32 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
on:
push:
branches:
- ossign
jobs:
build-driver-amd64:
name: Build Driver
permissions:
contents: write
runs-on: windows-latest
steps:
- uses: actions/checkout@v4
with:
repository: scheibling/MagicTrackpad2ForWindows
ref: ossign
- name: Add msbuild to PATH
uses: microsoft/setup-msbuild@v2
- name: Cache packages
uses: actions/cache@v4
with:
path: packages
key: ${{ runner.os }}-packages
- name: Nuget install
run: |
nuget restore ./AmtPtpDeviceUsbUm/MagicTrackpad2PtpDevice.vcxproj -PackagesDirectory ${{ github.workspace }}\packages
nuget restore ./AmtPtpHidFilter/AmtPtpHidFilter.vcxproj -PackagesDirectory ${{ github.workspace }}\packages
Add-Content $env:GITHUB_PATH "${{ github.workspace }}\packages\Microsoft.Windows.WDK.x64.10.0.26100.6584\c\bin\10.0.26100.0\x64"
- name: Build driver
shell: bash
run: |
msbuild.exe ./AmtPtpDeviceUsbUm/MagicTrackpad2PtpDevice.vcxproj -p:Configuration=Release -p:Platform=x64
msbuild.exe ./AmtPtpHidFilter/AmtPtpHidFilter.vcxproj -p:Configuration=Release -p:Platform=x64
mkdir bin
cp build/AmtPtpDevice_AMD64.inf bin/
cp AmtPtpDeviceUsbUm/build/AmtPtpDeviceUsbUm/x64/Release/AmtPtpDeviceUsbUm.dll bin/
cp AmtPtpHidFilter/build/AmtPtpHidFilter/x64/Release/AmtPtpHidFilter.sys bin/
cp AmtPtpDeviceUsbUm/build/AmtPtpDeviceUsbUm/x64/Release/AmtPtpDeviceUsbUm.pdb bin/
cp AmtPtpHidFilter/build/AmtPtpHidFilter/x64/Release/AmtPtpHidFilter.pdb bin/
echo -e '.OPTION EXPLICIT ;\n.Set CabinetName1=driver.cab\n.Set CompressionType=LZX\n.Set CabinetFileCountThreshold=0\n.Set FolderFileCountThreshold=0\n.Set FolderSizeThreshold=0\n.Set MaxCabinetSize=0\n.Set MaxDiskFileCount=0\n.Set MaxDiskSize=0\n\n.Set DestinationDir= ;\nbin\AmtPtpDevice_AMD64.inf\nbin\AmtPtpDeviceUsbUm.dll\nbin\AmtPtpHidFilter.sys\nbin\AmtPtpDeviceUsbUm.pdb\nbin\AmtPtpHidFilter.pdb\n\n' > bin/driver.ddf
makecab -f bin/driver.ddf
mv disk1/driver.cab bin/driver.cab
- name: Upload artifacts
uses: actions/upload-artifact@v4
with:
name: drivers
path: bin/