mirror of
https://github.com/rustdesk/rustdesk.git
synced 2026-04-18 18:11:28 +03:00
fix: printer, printable area (#12442)
Signed-off-by: fufesou <linlong1266@gmail.com>
This commit is contained in:
20
.github/workflows/flutter-build.yml
vendored
20
.github/workflows/flutter-build.yml
vendored
@@ -177,24 +177,24 @@ jobs:
|
|||||||
|
|
||||||
# Download printer driver files and extract them to ./rustdesk
|
# Download printer driver files and extract them to ./rustdesk
|
||||||
try {
|
try {
|
||||||
Invoke-WebRequest -Uri https://github.com/rustdesk/hbb_common/releases/download/driver/rustdesk_printer_driver_v4.zip -OutFile rustdesk_printer_driver_v4.zip
|
Invoke-WebRequest -Uri https://github.com/rustdesk/hbb_common/releases/download/driver/rustdesk_printer_driver_v4-1.4.zip -OutFile rustdesk_printer_driver_v4-1.4.zip
|
||||||
Invoke-WebRequest -Uri https://github.com/rustdesk/hbb_common/releases/download/driver/printer_driver_adapter.zip -OutFile printer_driver_adapter.zip
|
Invoke-WebRequest -Uri https://github.com/rustdesk/hbb_common/releases/download/driver/printer_driver_adapter.zip -OutFile printer_driver_adapter.zip
|
||||||
Invoke-WebRequest -Uri https://github.com/rustdesk/hbb_common/releases/download/driver/sha256sums -OutFile sha256sums
|
Invoke-WebRequest -Uri https://github.com/rustdesk/hbb_common/releases/download/driver/sha256sums -OutFile sha256sums
|
||||||
|
|
||||||
# Check and move the files
|
# Check and move the files
|
||||||
$checksum_driver = (Select-String -Path .\sha256sums -Pattern '^([a-fA-F0-9]{64}) \*rustdesk_printer_driver_v4\.zip$').Matches.Groups[1].Value
|
$checksum_driver = (Select-String -Path .\sha256sums -Pattern '^([a-fA-F0-9]{64}) \*rustdesk_printer_driver_v4-1.4\.zip$').Matches.Groups[1].Value
|
||||||
$downloadsum_driver = Get-FileHash -Path rustdesk_printer_driver_v4.zip -Algorithm SHA256
|
$downloadsum_driver = Get-FileHash -Path rustdesk_printer_driver_v4-1.4.zip -Algorithm SHA256
|
||||||
$checksum_dll = (Select-String -Path .\sha256sums -Pattern '^([a-fA-F0-9]{64}) \*printer_driver_adapter\.zip$').Matches.Groups[1].Value
|
$checksum_adapter = (Select-String -Path .\sha256sums -Pattern '^([a-fA-F0-9]{64}) \*printer_driver_adapter\.zip$').Matches.Groups[1].Value
|
||||||
$downloadsum_dll = Get-FileHash -Path printer_driver_adapter.zip -Algorithm SHA256
|
$downloadsum_adapter = Get-FileHash -Path printer_driver_adapter.zip -Algorithm SHA256
|
||||||
if ($checksum_driver -eq $downloadsum_driver.Hash -and $checksum_dll -eq $downloadsum_dll.Hash) {
|
if ($checksum_driver -eq $downloadsum_driver.Hash -and $checksum_adapter -eq $downloadsum_adapter.Hash) {
|
||||||
Write-Output "rustdesk_printer_driver_v4, checksums match, extract the file."
|
Write-Output "rustdesk_printer_driver_v4-1.4, checksums match, extract the file."
|
||||||
Expand-Archive rustdesk_printer_driver_v4.zip -DestinationPath .
|
Expand-Archive rustdesk_printer_driver_v4-1.4.zip -DestinationPath .
|
||||||
mkdir ./rustdesk/drivers
|
mkdir ./rustdesk/drivers
|
||||||
mv -Force .\rustdesk_printer_driver_v4 ./rustdesk/drivers/RustDeskPrinterDriver
|
mv -Force .\rustdesk_printer_driver_v4-1.4 ./rustdesk/drivers/RustDeskPrinterDriver
|
||||||
Expand-Archive printer_driver_adapter.zip -DestinationPath .
|
Expand-Archive printer_driver_adapter.zip -DestinationPath .
|
||||||
mv -Force .\printer_driver_adapter.dll ./rustdesk
|
mv -Force .\printer_driver_adapter.dll ./rustdesk
|
||||||
} elseif ($checksum_driver -ne $downloadsum_driver.Hash) {
|
} elseif ($checksum_driver -ne $downloadsum_driver.Hash) {
|
||||||
Write-Output "rustdesk_printer_driver_v4, checksums do not match, ignore the file."
|
Write-Output "rustdesk_printer_driver_v4-1.4, checksums do not match, ignore the file."
|
||||||
} else {
|
} else {
|
||||||
Write-Output "printer_driver_adapter.dll, checksums do not match, ignore the file."
|
Write-Output "printer_driver_adapter.dll, checksums do not match, ignore the file."
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user