mirror of
https://github.com/safing/portmaster
synced 2025-09-01 18:19:12 +00:00
[kext] Fix dev build documentation (releasing procedure)
This commit is contained in:
parent
32d6e1cb04
commit
857df4086f
4 changed files with 32 additions and 18 deletions
|
@ -9,6 +9,10 @@ Implementation of Safing's Portmaster Windows kernel extension in Rust.
|
||||||
- [Release](release/README.md) -> Guide how to do a release build.
|
- [Release](release/README.md) -> Guide how to do a release build.
|
||||||
- [Windows Filtering Platform - MS](https://learn.microsoft.com/en-us/windows-hardware/drivers/network/roadmap-for-developing-wfp-callout-drivers) -> The driver is build on top of WFP.
|
- [Windows Filtering Platform - MS](https://learn.microsoft.com/en-us/windows-hardware/drivers/network/roadmap-for-developing-wfp-callout-drivers) -> The driver is build on top of WFP.
|
||||||
|
|
||||||
|
### Building (For release)
|
||||||
|
|
||||||
|
Please refer to [release/README.md](release/README.md) for details about the release procedure.
|
||||||
|
|
||||||
### Building (For testing and development)
|
### Building (For testing and development)
|
||||||
|
|
||||||
The Windows Portmaster Kernel Extension is currently only developed and tested for the amd64 (64-bit) architecture.
|
The Windows Portmaster Kernel Extension is currently only developed and tested for the amd64 (64-bit) architecture.
|
||||||
|
|
|
@ -1,25 +1,31 @@
|
||||||
# Kext release tool
|
# Kext release tool
|
||||||
|
|
||||||
### Generate the zip file
|
## Generate the zip file
|
||||||
|
|
||||||
|
- Make sure the deriver version in `kextinterface/version.txt` is up to date
|
||||||
|
|
||||||
- Make sure `kextinterface/version.txt` is up to date
|
|
||||||
- Execute: `cargo run`
|
- Execute: `cargo run`
|
||||||
* This will generate release `kext_release_vX-X-X.zip` file. Which contains all the necessary files to make the release.
|
_This will generate release `portmaster-kext-release-bundle-vX-X-X-X.zip` file. Which contains all the necessary files to make the release._
|
||||||
|
|
||||||
### Generate the cab file
|
## Generate the cab file
|
||||||
|
|
||||||
- Copy the zip and extract it on a windows machine.
|
**Precondition:** Visual Studio 2022 and WDK need to be installed.
|
||||||
* Visual Studio 2022 and WDK need to be installed.
|
|
||||||
- From VS Command Prompt / PowerShell run:
|
|
||||||
```
|
|
||||||
cd kext_release_v.../
|
|
||||||
./build_cab.bat
|
|
||||||
```
|
|
||||||
> Script is written for VS `$SDK_Version = "10.0.22621.0"`. If different version is used update the script.
|
|
||||||
|
|
||||||
- Sing the cab file
|
- copy the zip and extract it on a windows machine.
|
||||||
|
|
||||||
### Let Microsoft Sign
|
- update `.\build_cab.ps1`: set correct SDK version you use.
|
||||||
|
_e.g.: $SDK_Version = "10.0.26100.0" (see in `C:\Program Files (x86)\Windows Kits\10\Lib`)_
|
||||||
|
|
||||||
|
- Use "Developer PowerShell for VS":
|
||||||
|
|
||||||
|
```powershell
|
||||||
|
cd portmaster-kext-release-bundle-v...
|
||||||
|
.\build_cab.ps1
|
||||||
|
```
|
||||||
|
|
||||||
|
- Sing the the output cab file: `portmaster-kext-release-bundle-v...\PortmasterKext_v....cab`
|
||||||
|
|
||||||
|
## Let Microsoft Sign
|
||||||
|
|
||||||
- Go to https://partner.microsoft.com/en-us/dashboard/hardware/driver/New
|
- Go to https://partner.microsoft.com/en-us/dashboard/hardware/driver/New
|
||||||
- Enter "PortmasterKext vX.X.X #1" as the product name
|
- Enter "PortmasterKext vX.X.X #1" as the product name
|
||||||
|
|
|
@ -10,13 +10,17 @@ static LIB_PATH: &'static str = "./build/x86_64-pc-windows-msvc/release/driver.l
|
||||||
|
|
||||||
fn main() {
|
fn main() {
|
||||||
build_driver();
|
build_driver();
|
||||||
println!(
|
|
||||||
"Building kext v{}-{}-{} #{}",
|
let filename = format!(
|
||||||
|
"portmaster-kext-release-bundle-v{}-{}-{}-{}.zip",
|
||||||
VERSION[0], VERSION[1], VERSION[2], VERSION[3]
|
VERSION[0], VERSION[1], VERSION[2], VERSION[3]
|
||||||
);
|
);
|
||||||
|
|
||||||
|
println!("Building KEXT: {}", filename);
|
||||||
|
|
||||||
// Create Zip that will hold all the release files and scripts.
|
// Create Zip that will hold all the release files and scripts.
|
||||||
let file = File::create("portmaster-kext-release-bundle.zip").unwrap();
|
let file = File::create(&filename).unwrap();
|
||||||
|
|
||||||
let mut zip = zip::ZipWriter::new(file);
|
let mut zip = zip::ZipWriter::new(file);
|
||||||
|
|
||||||
// Write files to zip
|
// Write files to zip
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
# Remove previous cab build
|
# Remove previous cab build
|
||||||
Remove-Item -Path "PortmasterKext_v2-0-0.cab" -ErrorAction SilentlyContinue
|
Remove-Item -Path "PortmasterKext_v2-0-0.cab" -ErrorAction SilentlyContinue
|
||||||
|
|
||||||
$SDK_Version = "10.0.22621.0"
|
$SDK_Version = "10.0.26100.0"
|
||||||
|
|
||||||
# Build metadata file
|
# Build metadata file
|
||||||
rc -I "C:\Program Files (x86)\Windows Kits\10\Include\$SDK_Version\um" `
|
rc -I "C:\Program Files (x86)\Windows Kits\10\Include\$SDK_Version\um" `
|
||||||
|
|
Loading…
Add table
Reference in a new issue