diff --git a/.github/workflows/generator-macos.yml b/.github/workflows/generator-macos.yml index de6229b..7b861fe 100644 --- a/.github/workflows/generator-macos.yml +++ b/.github/workflows/generator-macos.yml @@ -93,13 +93,13 @@ jobs: fail-fast: false matrix: job: - # - { - # target: x86_64-apple-darwin, - # os: macos-13, #macos-latest or macos-14 use M1 now, https://docs.github.com/en/actions/using-github-hosted-runners/about-github-hosted-runners/about-github-hosted-runners#:~:text=14%20GB-,macos%2Dlatest%20or%20macos%2D14,-The%20macos%2Dlatestlabel - # extra-build-args: "", - # arch: x86_64, - # vcpkg-triplet: x64-osx, - # } + - { + target: x86_64-apple-darwin, + os: macos-13, #macos-latest or macos-14 use M1 now, https://docs.github.com/en/actions/using-github-hosted-runners/about-github-hosted-runners/about-github-hosted-runners#:~:text=14%20GB-,macos%2Dlatest%20or%20macos%2D14,-The%20macos%2Dlatestlabel + extra-build-args: "", + arch: x86_64, + vcpkg-triplet: x64-osx, + } - { target: aarch64-apple-darwin, os: macos-latest, @@ -727,8 +727,8 @@ jobs: if [ -n "$DMG_FILE" ]; then echo "Found DMG file: $DMG_FILE" - mv "$DMG_FILE" "${{ inputs.filename }}.dmg" - echo "Renamed to ${{ inputs.filename }}.dmg" + mv "$DMG_FILE" "${{ inputs.filename }}-${{ matrix.job.arch }}.dmg" + echo "Renamed to ${{ inputs.filename }}-${{ matrix.job.arch }}.dmg" else echo "No DMG file found matching the pattern" exit 1 diff --git a/.github/workflows/generator-windows.yml b/.github/workflows/generator-windows.yml index 7772b82..c4ccd0b 100644 --- a/.github/workflows/generator-windows.yml +++ b/.github/workflows/generator-windows.yml @@ -450,14 +450,44 @@ jobs: - name: Build rustdesk run: | + # Windows: build RustDesk + python3 .\build.py --portable --hwcodec --flutter --vram --skip-portable-pack + mv ./flutter/build/windows/x64/runner/Release ./rustdesk + + # Download usbmmidd_v2.zip and extract it to ./rustdesk Invoke-WebRequest -Uri https://github.com/rustdesk-org/rdev/releases/download/usbmmidd_v2/usbmmidd_v2.zip -OutFile usbmmidd_v2.zip Expand-Archive usbmmidd_v2.zip -DestinationPath . -Force - python3 .\build.py --portable --hwcodec --flutter --vram --skip-portable-pack Remove-Item -Path usbmmidd_v2\Win32 -Recurse Remove-Item -Path "usbmmidd_v2\deviceinstaller64.exe", "usbmmidd_v2\deviceinstaller.exe", "usbmmidd_v2\usbmmidd.bat" - mv ./flutter/build/windows/x64/runner/Release ./rustdesk 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.zip -OutFile rustdesk_printer_driver_v4.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\.zip$').Matches.Groups[1].Value + $downloadsum_driver = Get-FileHash -Path rustdesk_printer_driver_v4.zip -Algorithm SHA256 + $checksum_dll = (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 + if ($checksum_driver -eq $downloadsum_driver.Hash -and $checksum_dll -eq $downloadsum_dll.Hash) { + Write-Output "rustdesk_printer_driver_v4, checksums match, extract the file." + Expand-Archive rustdesk_printer_driver_v4.zip -DestinationPath . + mkdir ./rustdesk/drivers + mv -Force .\rustdesk_printer_driver_v4 ./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, 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' }} continue-on-error: true diff --git a/rdgenerator/forms.py b/rdgenerator/forms.py index 244de0e..9cbfa64 100644 --- a/rdgenerator/forms.py +++ b/rdgenerator/forms.py @@ -4,7 +4,7 @@ from PIL import Image class GenerateForm(forms.Form): #Platform platform = forms.ChoiceField(choices=[('windows','Windows'),('linux','Linux (currently unavailable)'),('android','Android'),('macos','macOS')], initial='windows') - version = forms.ChoiceField(choices=[('master','nightly'),('1.3.8','1.3.8'),('1.3.7','1.3.7'),('1.3.6','1.3.6'),('1.3.5','1.3.5'),('1.3.4','1.3.4'),('1.3.3','1.3.3')], initial='1.3.8') + version = forms.ChoiceField(choices=[('master','nightly'),('1.3.9','1.3.9'),('1.3.8','1.3.8'),('1.3.7','1.3.7'),('1.3.6','1.3.6'),('1.3.5','1.3.5'),('1.3.4','1.3.4'),('1.3.3','1.3.3')], initial='1.3.9') help_text="'master' is the development version (nightly build) with the latest features but may be less stable" delayFix = forms.BooleanField(initial=True, required=False) diff --git a/rdgenerator/templates/generated.html b/rdgenerator/templates/generated.html index c52de3b..026c415 100644 --- a/rdgenerator/templates/generated.html +++ b/rdgenerator/templates/generated.html @@ -143,7 +143,8 @@ Download {{filename}}-x86_64.apk Download {{filename}}-armv7.apk {% elif platform == 'macos' %} - Download {{filename}}.dmg + Download {{filename}}-x86_64.dmg + Download {{filename}}-aarch64.dmg {% else %}
Error: No file generated
{% endif %}