Skip to content

Commit 9c5398f

Browse files
committed
Update build scripts
1 parent df32cb5 commit 9c5398f

File tree

4 files changed

+100
-50
lines changed

4 files changed

+100
-50
lines changed

.github/workflows/msbuild.yml

Lines changed: 42 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -59,25 +59,52 @@ jobs:
5959
msbuild /m /p:Configuration=Release /p:platform=x64 ${{env.SOLUTION_FILE_PATH}}
6060
msbuild /m /p:Configuration=Release /p:platform=x86 ${{env.SOLUTION_FILE_PATH}}
6161
62-
- name: Copy files
63-
working-directory: ${{env.GITHUB_WORKSPACE}}
64-
run: |
65-
md nwinfo
66-
move x64\Release\nwinfo.exe nwinfo\nwinfox64.exe
67-
move x64\Release\gnwinfo.exe nwinfo\gnwinfox64.exe
68-
move Win32\Release\nwinfo.exe nwinfo\nwinfo.exe
69-
move Win32\Release\gnwinfo.exe nwinfo\gnwinfo.exe
70-
copy gnwinfo\gnwinfo.ini nwinfo\gnwinfo.ini
71-
powershell -ExecutionPolicy Bypass -File .\copy_res.ps1 -TargetFolder nwinfo
72-
7362
- name: Download README.pdf
7463
uses: actions/download-artifact@v5
7564
with:
7665
name: README.pdf
77-
path: nwinfo
66+
path: .
7867

79-
- name: Create ZIP
80-
run: Compress-Archive -Path nwinfo/* -DestinationPath "nwinfo.zip"
68+
- name: Prepare Packages
69+
shell: pwsh
70+
run: |
71+
function Create-NwinfoPackage {
72+
param(
73+
[Parameter(Mandatory=$true)]
74+
[string]$Flavor,
75+
76+
[Parameter(Mandatory=$true)]
77+
[string]$ReadmePath
78+
)
79+
80+
$TargetFolder = "nwinfo_$($Flavor)"
81+
Write-Host "Creating package for flavor '$($Flavor)' in folder '$($TargetFolder)'" -ForegroundColor Green
82+
83+
New-Item -ItemType Directory -Path $TargetFolder -Force | Out-Null
84+
85+
Copy-Item -Path "x64\Release\nwinfo.exe" -Destination "$($TargetFolder)\nwinfox64.exe"
86+
Copy-Item -Path "x64\Release\gnwinfo.exe" -Destination "$($TargetFolder)\gnwinfox64.exe"
87+
Copy-Item -Path "Win32\Release\nwinfo.exe" -Destination "$($TargetFolder)\nwinfo.exe"
88+
Copy-Item -Path "Win32\Release\gnwinfo.exe" -Destination "$($TargetFolder)\gnwinfo.exe"
89+
Copy-Item -Path "gnwinfo\gnwinfo.ini" -Destination "$($TargetFolder)\gnwinfo.ini"
90+
91+
.\copy_res.ps1 -TargetFolder $TargetFolder -Flavor $Flavor
92+
93+
if (Test-Path $ReadmePath) {
94+
Copy-Item -Path $ReadmePath -Destination $TargetFolder
95+
}
96+
else {
97+
Write-Warning "README.pdf not found at path: $ReadmePath"
98+
}
99+
}
100+
101+
Create-NwinfoPackage -Flavor "hwrwdrv" -ReadmePath ".\README.pdf"
102+
Create-NwinfoPackage -Flavor "pawnio" -ReadmePath ".\README.pdf"
103+
104+
- name: Create ZIPs
105+
run: |
106+
Compress-Archive -Path "nwinfo_hwrwdrv\*" -DestinationPath "nwinfo.zip" -Force
107+
Compress-Archive -Path "nwinfo_pawnio\*" -DestinationPath "nwinfo_pawnio.zip" -Force
81108
82109
- name: Generate Release Notes
83110
env:
@@ -121,7 +148,7 @@ jobs:
121148
working-directory: ${{env.GITHUB_WORKSPACE}}
122149
run: |
123150
$date_version = (Get-Date -Format 'yyyyMMdd') + ".${{ github.run_number }}"
124-
gh release create latest "nwinfo.zip" `
151+
gh release create latest "nwinfo.zip" "nwinfo_pawnio.zip" `
125152
--prerelease `
126153
--title "Build $date_version" `
127154
--notes-file "release_notes.txt"

README.md

Lines changed: 16 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
<br />
1+
<br />
22
<div align="center">
33
<img src="./docs/images/icon.ico">
44
<h2 align="center">NWinfo</h2>
@@ -17,22 +17,27 @@
1717
* Gathers information directly without relying on WMI.
1818
* Compatible with Windows XP.
1919

20-
> [!WARNING]
21-
>
22-
> This application uses the `HwRwDrv` / `WinRing0` driver, which is known for security vulnerabilities.
23-
>
24-
> * It may be flagged as malware by your antivirus.
25-
> * It can be detected by anti-cheat software, potentially leading to an account ban in online games.
26-
>
27-
> If you have any concerns, feel free to delete the driver file. This may disable some program functionality.
28-
2920
## GUI Preview
3021

3122
<div align="center">
3223
<img src="./docs/images/demo.png">
3324
</div>
3425

35-
## [CLI Usage](./docs/README.md)
26+
## CLI Usage
27+
28+
For details, see [CLI (nwinfo)](./docs/README.md#cli-nwinfo) in the documentation.
29+
30+
## Supported Drivers
31+
32+
This project searches for and loads drivers from the same directory in the following order: **PawnIO -> HwRwDrv -> WinRing0**.
33+
34+
| Driver | Author | License | Notes |
35+
|------------|--------|---------|-------|
36+
| [PawnIO](https://github.com/namazso/PawnIO) | namazso | GPL v2 | Safe to use, but some hardware information may be unavailable. |
37+
| [HwRwDrv](https://hwrwdrv.phpnet.us/?i=1) | Faintsnow | Closed source | May be flagged as a virus by antivirus software and detected by anti-cheat systems. |
38+
| [WinRing0](http://openlibsys.org/) | hiyohiyo | BSD | Listed as a vulnerable driver by Microsoft, detected as a virus, and triggers anti-cheat software. |
39+
40+
**Note:** The program can still run normally even if all drivers are removed, but some hardware information may not be accessible.
3641

3742
## Licenses & Credits
3843

copy_res.ps1

Lines changed: 31 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,18 +2,45 @@
22

33
param (
44
[Parameter(Mandatory=$true, HelpMessage="Target folder path")]
5-
[string]$TargetFolder
5+
[string]$TargetFolder,
6+
7+
[Parameter(Mandatory=$true, HelpMessage="The build flavor. Can be 'hwrwdrv', 'pawnio' or 'winring0'")]
8+
[ValidateSet("hwrwdrv", "pawnio", "winring0")]
9+
[string]$Flavor
610
)
711

812
# Define the list of files to copy or download
913
$FilesToCopy = @(
14+
# Common files for all flavors
1015
"LICENSE",
1116
"hw_report.ps1",
12-
"libnw\jep106.ids",
13-
"winring0\HwRwDrv.sys",
14-
"winring0\HwRwDrvx64.sys"
17+
"libnw\jep106.ids"
1518
)
1619

20+
# Add flavor-specific files
21+
if ($Flavor -eq "hwrwdrv") {
22+
$FilesToCopy += @(
23+
"winring0\HwRwDrv.sys",
24+
"winring0\HwRwDrvx64.sys"
25+
)
26+
}
27+
elseif ($Flavor -eq "pawnio") {
28+
$FilesToCopy += @(
29+
"winring0\PawnIOx64.sys",
30+
"winring0\pawn\AMDFamily0F.bin",
31+
"winring0\pawn\AMDFamily10.bin",
32+
"winring0\pawn\AMDFamily17.bin",
33+
"winring0\pawn\IntelMSR.bin",
34+
"winring0\pawn\RyzenSMU.bin"
35+
)
36+
}
37+
elseif ($Flavor -eq "winring0") {
38+
$FilesToCopy += @(
39+
"winring0\WinRing0.sys",
40+
"winring0\WinRing0x64.sys"
41+
)
42+
}
43+
1744
$FilesToDownload = @(
1845
"https://raw.githubusercontent.com/pciutils/pciids/master/pci.ids",
1946
"https://raw.githubusercontent.com/vcrhonek/hwdata/master/pnp.ids",

docs/README.md

Lines changed: 11 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
<br />
1+
<br />
22
<div align="center">
33
<img src="./images/icon.ico">
44
<h2 align="center">NWinfo</h2>
@@ -143,29 +143,20 @@ This command exports system, disk, SMBIOS, and network information to `report.js
143143

144144
## Notes
145145

146-
### Windows 11
147-
If the driver cannot be loaded properly, modify the following registry keys:
148-
```
149-
Windows Registry Editor Version 5.00
150-
151-
[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\DeviceGuard\Scenarios\HypervisorEnforcedCodeIntegrity]
152-
"Enabled"=dword:0000000
153-
154-
[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\DeviceGuard]
155-
"EnableVirtualizationBasedSecurity"=dword:00000000
146+
### Windows XP
147+
This project is compatible with Windows XP using [YY-Thunks](https://github.com/Chuyu-Team/YY-Thunks), but it may not retrieve some hardware information.
156148

157-
[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\DeviceGuard\Scenarios\SystemGuard]
158-
"Enabled"=dword:00000000
149+
## Supported Drivers
159150

160-
[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\CI\Config]
161-
"VulnerableDriverBlocklistEnable"=dword:00000000
162-
```
151+
This project searches for and loads drivers from the same directory in the following order: **PawnIO -> HwRwDrv -> WinRing0**.
163152

164-
### Windows 7
165-
For earlier versions of Windows 7, the driver may not work properly and requires a SHA1-signed certificate.
153+
| Driver | Author | License | Notes |
154+
|------------|--------|---------|-------|
155+
| [PawnIO](https://github.com/namazso/PawnIO) | namazso | GPL v2 | Safe to use, but some hardware information may be unavailable. |
156+
| [HwRwDrv](https://hwrwdrv.phpnet.us/?i=1) | Faintsnow | Closed source | May be flagged as a virus by antivirus software and detected by anti-cheat systems. |
157+
| [WinRing0](http://openlibsys.org/) | hiyohiyo | BSD | Listed as a vulnerable driver by Microsoft, detected as a virus, and triggers anti-cheat software. |
166158

167-
### Windows XP
168-
This project is compatible with Windows XP using [YY-Thunks](https://github.com/Chuyu-Team/YY-Thunks), but it may not retrieve some hardware information.
159+
**Note:** The program can still run normally even if all drivers are removed, but some hardware information may not be accessible.
169160

170161
<div style="page-break-after: always;"></div>
171162

0 commit comments

Comments
 (0)