-
Notifications
You must be signed in to change notification settings - Fork 20
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add visual studio build interface for devpal driver on Windows
- Loading branch information
1 parent
0c78fb2
commit 763f5c1
Showing
28 changed files
with
620 additions
and
135 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,21 @@ | ||
message(STATUS "Building Windows Driver") | ||
message(STATUS "Building Windows Driver") | ||
|
||
set(VS_SOLUTION_FILE ${CMAKE_CURRENT_LIST_DIR}/visual_studio/devpal.sln) | ||
set(VS_PROJECT_FILE ${CMAKE_CURRENT_LIST_DIR}/visual_studio/devpal.vcxproj) | ||
set(VS_CONFIGURATION "Release") | ||
set(VS_PLATFORM "x64") | ||
set(VS_OUTPUT_DIR ${CMAKE_CURRENT_LIST_DIR}/visual_studio/${VS_PLATFORM}/${VS_CONFIGURATION}) | ||
set(DRIVER_BIN ${VS_OUTPUT_DIR}/devpal/devpal.sys) | ||
set(MSBUILD_CMD msbuild ${VS_SOLUTION_FILE} /p:Configuration=${VS_CONFIGURATION} /p:Platform=${VS_PLATFORM}) | ||
|
||
# configure_file(${CMAKE_CURRENT_LIST_DIR}/visual_studio/devpal.vcxproj.in ${CMAKE_CURRENT_LIST_DIR}/visual_studio/devpal.vcxproj) | ||
|
||
add_custom_command( | ||
OUTPUT ${DRIVER_BIN} | ||
COMMAND ${MSBUILD_CMD} | ||
WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR} | ||
DEPENDS ${VS_SOLUTION_FILE} ${VS_PROJECT_FILE} | ||
VERBATIM | ||
) | ||
|
||
add_custom_target(devpal ALL DEPENDS ${DRIVER_BIN}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
1 change: 0 additions & 1 deletion
1
devpal/windows/generic/read_mem16.c → devpal/windows/generic/ioctl_read_mem16.c
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
1 change: 0 additions & 1 deletion
1
devpal/windows/generic/read_mem32.c → devpal/windows/generic/ioctl_read_mem32.c
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
1 change: 0 additions & 1 deletion
1
devpal/windows/generic/read_mem64.c → devpal/windows/generic/ioctl_read_mem64.c
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
1 change: 0 additions & 1 deletion
1
devpal/windows/generic/read_mem8.c → devpal/windows/generic/ioctl_read_mem8.c
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
1 change: 0 additions & 1 deletion
1
devpal/windows/generic/write_mem16.c → devpal/windows/generic/ioctl_write_mem16.c
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
1 change: 0 additions & 1 deletion
1
devpal/windows/generic/write_mem32.c → devpal/windows/generic/ioctl_write_mem32.c
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
1 change: 0 additions & 1 deletion
1
devpal/windows/generic/write_mem64.c → devpal/windows/generic/ioctl_write_mem64.c
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
1 change: 0 additions & 1 deletion
1
devpal/windows/generic/write_mem8.c → devpal/windows/generic/ioctl_write_mem8.c
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,77 @@ | ||
; | ||
; devpal.inf | ||
; | ||
|
||
[Version] | ||
Signature="$WINDOWS NT$" | ||
Class=System ; TODO: specify appropriate Class | ||
ClassGuid={4d36e97d-e325-11ce-bfc1-08002be10318} ; TODO: specify appropriate ClassGuid | ||
Provider=%ManufacturerName% | ||
CatalogFile=devpal.cat | ||
DriverVer= ; TODO: set DriverVer in stampinf property pages | ||
PnpLockdown=1 | ||
|
||
[DestinationDirs] | ||
DefaultDestDir = 12 | ||
devpal_Device_CoInstaller_CopyFiles = 11 | ||
|
||
[SourceDisksNames] | ||
1 = %DiskName%,,,"" | ||
|
||
[SourceDisksFiles] | ||
devpal.sys = 1,, | ||
WdfCoInstaller$KMDFCOINSTALLERVERSION$.dll=1 ; make sure the number matches with SourceDisksNames | ||
|
||
;***************************************** | ||
; Install Section | ||
;***************************************** | ||
|
||
[Manufacturer] | ||
%ManufacturerName%=Standard,NT$ARCH$ | ||
|
||
[Standard.NT$ARCH$] | ||
%devpal.DeviceDesc%=devpal_Device, Root\devpal ; TODO: edit hw-id | ||
|
||
[devpal_Device.NT] | ||
CopyFiles=Drivers_Dir | ||
|
||
[Drivers_Dir] | ||
devpal.sys | ||
|
||
;-------------- Service installation | ||
[devpal_Device.NT.Services] | ||
AddService = devpal,%SPSVCINST_ASSOCSERVICE%, devpal_Service_Inst | ||
|
||
; -------------- devpal driver install sections | ||
[devpal_Service_Inst] | ||
DisplayName = %devpal.SVCDESC% | ||
ServiceType = 1 ; SERVICE_KERNEL_DRIVER | ||
StartType = 3 ; SERVICE_DEMAND_START | ||
ErrorControl = 1 ; SERVICE_ERROR_NORMAL | ||
ServiceBinary = %12%\devpal.sys | ||
|
||
; | ||
;--- devpal_Device Coinstaller installation ------ | ||
; | ||
|
||
[devpal_Device.NT.CoInstallers] | ||
AddReg=devpal_Device_CoInstaller_AddReg | ||
CopyFiles=devpal_Device_CoInstaller_CopyFiles | ||
|
||
[devpal_Device_CoInstaller_AddReg] | ||
HKR,,CoInstallers32,0x00010000, "WdfCoInstaller$KMDFCOINSTALLERVERSION$.dll,WdfCoInstaller" | ||
|
||
[devpal_Device_CoInstaller_CopyFiles] | ||
WdfCoInstaller$KMDFCOINSTALLERVERSION$.dll | ||
|
||
[devpal_Device.NT.Wdf] | ||
KmdfService = devpal, devpal_wdfsect | ||
[devpal_wdfsect] | ||
KmdfLibraryVersion = $KMDFVERSION$ | ||
|
||
[Strings] | ||
SPSVCINST_ASSOCSERVICE= 0x00000002 | ||
ManufacturerName="<Your manufacturer name>" ;TODO: Replace with your manufacturer name | ||
DiskName = "devpal Installation Disk" | ||
devpal.DeviceDesc = "devpal Device" | ||
devpal.SVCDESC = "devpal Service" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
|
||
Microsoft Visual Studio Solution File, Format Version 12.00 | ||
# Visual Studio Version 16 | ||
VisualStudioVersion = 16.0.31605.320 | ||
MinimumVisualStudioVersion = 10.0.40219.1 | ||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "devpal", "devpal.vcxproj", "{BFEF67EF-3B43-4BDF-92A1-633B0324107E}" | ||
EndProject | ||
Global | ||
GlobalSection(SolutionConfigurationPlatforms) = preSolution | ||
Debug|ARM = Debug|ARM | ||
Debug|ARM64 = Debug|ARM64 | ||
Debug|x64 = Debug|x64 | ||
Debug|x86 = Debug|x86 | ||
Release|ARM = Release|ARM | ||
Release|ARM64 = Release|ARM64 | ||
Release|x64 = Release|x64 | ||
Release|x86 = Release|x86 | ||
EndGlobalSection | ||
GlobalSection(ProjectConfigurationPlatforms) = postSolution | ||
{BFEF67EF-3B43-4BDF-92A1-633B0324107E}.Debug|ARM.ActiveCfg = Debug|ARM | ||
{BFEF67EF-3B43-4BDF-92A1-633B0324107E}.Debug|ARM.Build.0 = Debug|ARM | ||
{BFEF67EF-3B43-4BDF-92A1-633B0324107E}.Debug|ARM.Deploy.0 = Debug|ARM | ||
{BFEF67EF-3B43-4BDF-92A1-633B0324107E}.Debug|ARM64.ActiveCfg = Debug|ARM64 | ||
{BFEF67EF-3B43-4BDF-92A1-633B0324107E}.Debug|ARM64.Build.0 = Debug|ARM64 | ||
{BFEF67EF-3B43-4BDF-92A1-633B0324107E}.Debug|ARM64.Deploy.0 = Debug|ARM64 | ||
{BFEF67EF-3B43-4BDF-92A1-633B0324107E}.Debug|x64.ActiveCfg = Debug|x64 | ||
{BFEF67EF-3B43-4BDF-92A1-633B0324107E}.Debug|x64.Build.0 = Debug|x64 | ||
{BFEF67EF-3B43-4BDF-92A1-633B0324107E}.Debug|x64.Deploy.0 = Debug|x64 | ||
{BFEF67EF-3B43-4BDF-92A1-633B0324107E}.Debug|x86.ActiveCfg = Debug|Win32 | ||
{BFEF67EF-3B43-4BDF-92A1-633B0324107E}.Debug|x86.Build.0 = Debug|Win32 | ||
{BFEF67EF-3B43-4BDF-92A1-633B0324107E}.Debug|x86.Deploy.0 = Debug|Win32 | ||
{BFEF67EF-3B43-4BDF-92A1-633B0324107E}.Release|ARM.ActiveCfg = Release|ARM | ||
{BFEF67EF-3B43-4BDF-92A1-633B0324107E}.Release|ARM.Build.0 = Release|ARM | ||
{BFEF67EF-3B43-4BDF-92A1-633B0324107E}.Release|ARM.Deploy.0 = Release|ARM | ||
{BFEF67EF-3B43-4BDF-92A1-633B0324107E}.Release|ARM64.ActiveCfg = Release|ARM64 | ||
{BFEF67EF-3B43-4BDF-92A1-633B0324107E}.Release|ARM64.Build.0 = Release|ARM64 | ||
{BFEF67EF-3B43-4BDF-92A1-633B0324107E}.Release|ARM64.Deploy.0 = Release|ARM64 | ||
{BFEF67EF-3B43-4BDF-92A1-633B0324107E}.Release|x64.ActiveCfg = Release|x64 | ||
{BFEF67EF-3B43-4BDF-92A1-633B0324107E}.Release|x64.Build.0 = Release|x64 | ||
{BFEF67EF-3B43-4BDF-92A1-633B0324107E}.Release|x64.Deploy.0 = Release|x64 | ||
{BFEF67EF-3B43-4BDF-92A1-633B0324107E}.Release|x86.ActiveCfg = Release|Win32 | ||
{BFEF67EF-3B43-4BDF-92A1-633B0324107E}.Release|x86.Build.0 = Release|Win32 | ||
{BFEF67EF-3B43-4BDF-92A1-633B0324107E}.Release|x86.Deploy.0 = Release|Win32 | ||
EndGlobalSection | ||
GlobalSection(SolutionProperties) = preSolution | ||
HideSolutionNode = FALSE | ||
EndGlobalSection | ||
GlobalSection(ExtensibilityGlobals) = postSolution | ||
SolutionGuid = {865B4E9B-2EB3-401D-BFBE-AD8417D24670} | ||
EndGlobalSection | ||
EndGlobal |
Oops, something went wrong.