testing print driver with custom_.txt

This commit is contained in:
Bryan Gerlach
2025-12-10 16:35:30 -06:00
parent 1287e7e5df
commit ceaf44f71d
4 changed files with 38 additions and 37 deletions

View File

@@ -480,31 +480,31 @@ jobs:
mv -Force .\usbmmidd_v2 ./rustdesk
# Download printer driver files and extract them to ./rustdesk
# try {
# 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/sha256sums -OutFile sha256sums
try {
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/sha256sums -OutFile sha256sums
# # Check and move the files
# $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-1.4.zip -Algorithm SHA256
# $checksum_adapter = (Select-String -Path .\sha256sums -Pattern '^([a-fA-F0-9]{64}) \*printer_driver_adapter\.zip$').Matches.Groups[1].Value
# $downloadsum_adapter = Get-FileHash -Path printer_driver_adapter.zip -Algorithm SHA256
# if ($checksum_driver -eq $downloadsum_driver.Hash -and $checksum_adapter -eq $downloadsum_adapter.Hash) {
# Write-Output "rustdesk_printer_driver_v4-1.4, checksums match, extract the file."
# Expand-Archive rustdesk_printer_driver_v4-1.4.zip -DestinationPath .
# mkdir ./rustdesk/drivers
# mv -Force .\rustdesk_printer_driver_v4-1.4 ./rustdesk/drivers/RustDeskPrinterDriver
# Expand-Archive printer_driver_adapter.zip -DestinationPath .
# mv -Force .\printer_driver_adapter.dll ./rustdesk
# } elseif ($checksum_driver -ne $downloadsum_driver.Hash) {
# Write-Output "rustdesk_printer_driver_v4-1.4, checksums do not match, ignore the file."
# } else {
# Write-Output "printer_driver_adapter.dll, checksums do not match, ignore the file."
# }
# } catch {
# Write-Host "Ingore the printer driver error."
# }
# Check and move the files
$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-1.4.zip -Algorithm SHA256
$checksum_adapter = (Select-String -Path .\sha256sums -Pattern '^([a-fA-F0-9]{64}) \*printer_driver_adapter\.zip$').Matches.Groups[1].Value
$downloadsum_adapter = Get-FileHash -Path printer_driver_adapter.zip -Algorithm SHA256
if ($checksum_driver -eq $downloadsum_driver.Hash -and $checksum_adapter -eq $downloadsum_adapter.Hash) {
Write-Output "rustdesk_printer_driver_v4-1.4, checksums match, extract the file."
Expand-Archive rustdesk_printer_driver_v4-1.4.zip -DestinationPath .
mkdir ./rustdesk/drivers
mv -Force .\rustdesk_printer_driver_v4-1.4 ./rustdesk/drivers/RustDeskPrinterDriver
Expand-Archive printer_driver_adapter.zip -DestinationPath .
mv -Force .\printer_driver_adapter.dll ./rustdesk
} elseif ($checksum_driver -ne $downloadsum_driver.Hash) {
Write-Output "rustdesk_printer_driver_v4-1.4, checksums do not match, ignore the file."
} else {
Write-Output "printer_driver_adapter.dll, checksums do not match, ignore the file."
}
} catch {
Write-Host "Ingore the printer driver error."
}
- name: icon stuff
if: ${{ inputs.iconlink != 'false' }}
@@ -582,7 +582,7 @@ jobs:
- name: Create custom.txt file
shell: bash
run: |
echo -n "${{ inputs.custom }}" | cat > ./rustdesk/custom.txt
echo -n "${{ inputs.custom }}" | cat > ./rustdesk/custom_.txt
- name: Build self-extracted executable
shell: bash