image stuff

This commit is contained in:
Bryan Gerlach
2024-10-08 16:20:39 -05:00
parent 1422374a67
commit d76c63c7a7
2 changed files with 77 additions and 85 deletions

View File

@@ -88,21 +88,21 @@ env:
jobs: jobs:
# build-RustDeskTempTopMostWindow: build-RustDeskTempTopMostWindow:
# uses: ./.github/workflows/third-party-RustDeskTempTopMostWindow.yml uses: ./.github/workflows/third-party-RustDeskTempTopMostWindow.yml
# with: with:
# upload-artifact: true upload-artifact: true
# target: windows-2022 target: windows-2022
# configuration: Release configuration: Release
# platform: x64 platform: x64
# target_version: Windows10 target_version: Windows10
# strategy: strategy:
# fail-fast: false fail-fast: false
build-for-windows-flutter: build-for-windows-flutter:
name: Build Windows name: Build Windows
#needs: [build-RustDeskTempTopMostWindow] #needs: [build-RustDeskTempTopMostWindow]
runs-on: [self-hosted, windows] runs-on: windows-2022
strategy: strategy:
fail-fast: false fail-fast: false
matrix: matrix:
@@ -148,66 +148,66 @@ jobs:
repository: rustdesk/rustdesk repository: rustdesk/rustdesk
ref: refs/tags/${{ env.VERSION }} ref: refs/tags/${{ env.VERSION }}
# - name: Install ImageMagick on Windows - name: Install ImageMagick on Windows
# run: | run: |
# choco install -y imagemagick.app --no-progress choco install -y imagemagick.app --no-progress
# Get-ChildItem -Path "${env:ProgramFiles}" | % { $_.FullName } | Select-String -Pattern "[\/\\]ImageMagick[^\/\\]*$" | Out-File -Append -FilePath $env:GITHUB_PATH -Encoding utf8 Get-ChildItem -Path "${env:ProgramFiles}" | % { $_.FullName } | Select-String -Pattern "[\/\\]ImageMagick[^\/\\]*$" | Out-File -Append -FilePath $env:GITHUB_PATH -Encoding utf8
# - name: Install LLVM and Clang - name: Install LLVM and Clang
# uses: KyleMayes/install-llvm-action@v1 uses: KyleMayes/install-llvm-action@v1
# with: with:
# version: ${{ env.LLVM_VERSION }} version: ${{ env.LLVM_VERSION }}
# - name: Install flutter - name: Install flutter
# uses: subosito/flutter-action@v2.12.0 #https://github.com/subosito/flutter-action/issues/277 uses: subosito/flutter-action@v2.12.0 #https://github.com/subosito/flutter-action/issues/277
# with: with:
# channel: "stable" channel: "stable"
# flutter-version: ${{ env.FLUTTER_VERSION }} flutter-version: ${{ env.FLUTTER_VERSION }}
# cache: true cache: true
# - name: Install Rust toolchain - name: Install Rust toolchain
# uses: dtolnay/rust-toolchain@v1 uses: dtolnay/rust-toolchain@v1
# with: with:
# toolchain: ${{ env.SCITER_RUST_VERSION }} toolchain: ${{ env.SCITER_RUST_VERSION }}
# targets: ${{ matrix.job.target }} targets: ${{ matrix.job.target }}
# components: "rustfmt" components: "rustfmt"
# - uses: Swatinem/rust-cache@v2 - uses: Swatinem/rust-cache@v2
# with: with:
# prefix-key: ${{ matrix.job.os }} prefix-key: ${{ matrix.job.os }}
# - name: Install flutter rust bridge deps - name: Install flutter rust bridge deps
# run: | run: |
# git config --global core.longpaths true git config --global core.longpaths true
# cargo install flutter_rust_bridge_codegen --version ${{ env.FLUTTER_RUST_BRIDGE_VERSION }} --features "uuid" cargo install flutter_rust_bridge_codegen --version ${{ env.FLUTTER_RUST_BRIDGE_VERSION }} --features "uuid"
# Push-Location flutter ; flutter pub get ; Pop-Location Push-Location flutter ; flutter pub get ; Pop-Location
# ~/.cargo/bin/flutter_rust_bridge_codegen --rust-input ./src/flutter_ffi.rs --dart-output ./flutter/lib/generated_bridge.dart ~/.cargo/bin/flutter_rust_bridge_codegen --rust-input ./src/flutter_ffi.rs --dart-output ./flutter/lib/generated_bridge.dart
# - name: Setup vcpkg with Github Actions binary cache - name: Setup vcpkg with Github Actions binary cache
# uses: lukka/run-vcpkg@v11 uses: lukka/run-vcpkg@v11
# with: with:
# vcpkgDirectory: C:\vcpkg vcpkgDirectory: C:\vcpkg
# vcpkgGitCommitId: ${{ env.VCPKG_COMMIT_ID }} vcpkgGitCommitId: ${{ env.VCPKG_COMMIT_ID }}
# doNotCache: false doNotCache: false
# - name: Install vcpkg dependencies - name: Install vcpkg dependencies
# env: env:
# VCPKG_DEFAULT_HOST_TRIPLET: ${{ matrix.job.vcpkg-triplet }} VCPKG_DEFAULT_HOST_TRIPLET: ${{ matrix.job.vcpkg-triplet }}
# run: | run: |
# if ! $VCPKG_ROOT/vcpkg \ if ! $VCPKG_ROOT/vcpkg \
# install \ install \
# --triplet ${{ matrix.job.vcpkg-triplet }} \ --triplet ${{ matrix.job.vcpkg-triplet }} \
# --x-install-root="$VCPKG_ROOT/installed"; then --x-install-root="$VCPKG_ROOT/installed"; then
# find "${VCPKG_ROOT}/" -name "*.log" | while read -r _1; do find "${VCPKG_ROOT}/" -name "*.log" | while read -r _1; do
# echo "$_1:" echo "$_1:"
# echo "======" echo "======"
# cat "$_1" cat "$_1"
# echo "======" echo "======"
# echo "" echo ""
# done done
# exit 1 exit 1
# fi fi
# shell: bash shell: bash
- name: icon stuff - name: icon stuff
if: ${{ inputs.iconlink != 'false' }} if: ${{ inputs.iconlink != 'false' }}
@@ -326,8 +326,13 @@ jobs:
- name: Build rustdesk - name: Build rustdesk
run: | run: |
python .\build.py --portable --flutter --skip-portable-pack python3 .\build.py --portable --hwcodec --flutter --vram --skip-portable-pack
mv ./flutter/build/windows/x64/runner/Release ./rustdesk mv ./flutter/build/windows/x64/runner/Release ./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
Remove-Item -Path usbmmidd_v2\Win32 -Recurse
Remove-Item -Path "usbmmidd_v2\deviceinstaller64.exe", "usbmmidd_v2\deviceinstaller.exe", "usbmmidd_v2\usbmmidd.bat"
mv -Force .\usbmmidd_v2 ./rustdesk
# - name: logo stuff # - name: logo stuff
# if: ${{ inputs.logolink != 'false' }} # if: ${{ inputs.logolink != 'false' }}
@@ -350,13 +355,6 @@ jobs:
run: | run: |
Invoke-WebRequest -Uri https://${{ fromJson(inputs.logolink).url }}/get_png?filename=${{ fromJson(inputs.logolink).file }}"&"uuid=${{ fromJson(inputs.logolink).uuid }} -OutFile ./res/logo.png Invoke-WebRequest -Uri https://${{ fromJson(inputs.logolink).url }}/get_png?filename=${{ fromJson(inputs.logolink).file }}"&"uuid=${{ fromJson(inputs.logolink).uuid }} -OutFile ./res/logo.png
#lines removed from above:
#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
#Remove-Item -Path usbmmidd_v2\Win32 -Recurse
#Remove-Item -Path "usbmmidd_v2\deviceinstaller64.exe", "usbmmidd_v2\deviceinstaller.exe", "usbmmidd_v2\usbmmidd.bat"
#mv -Force .\usbmmidd_v2 ./rustdesk
- name: find Runner.res - name: find Runner.res
# Windows: find Runner.res (compiled from ./flutter/windows/runner/Runner.rc), copy to ./Runner.res # Windows: find Runner.res (compiled from ./flutter/windows/runner/Runner.rc), copy to ./Runner.res
@@ -374,12 +372,12 @@ jobs:
ls -l ./libs/portable/Runner.res; ls -l ./libs/portable/Runner.res;
fi fi
# - name: Download RustDeskTempTopMostWindow artifacts - name: Download RustDeskTempTopMostWindow artifacts
# uses: actions/download-artifact@master uses: actions/download-artifact@master
# if: env.UPLOAD_ARTIFACT == 'true' if: env.UPLOAD_ARTIFACT == 'true'
# with: with:
# name: topmostwindow-artifacts name: topmostwindow-artifacts
# path: "./rustdesk" path: "./rustdesk"
- name: Upload unsigned - name: Upload unsigned
if: env.UPLOAD_ARTIFACT == 'true' if: env.UPLOAD_ARTIFACT == 'true'
@@ -419,8 +417,6 @@ jobs:
run: | run: |
echo -n "${{ env.CUSTOM }}" | cat > ./rustdesk/custom.txt echo -n "${{ env.CUSTOM }}" | cat > ./rustdesk/custom.txt
#if [ "${{ env.DIRECTION }}" = "Incoming" ]; then echo -n "eyJjb25uLXR5cGUiOiJpbmNvbWluZyJ9" | cat > ./rustdesk/custom.txt; fi
#if [ "${{ env.DIRECTION }}" = "Outgoing" ]; then echo -n "eyJjb25uLXR5cGUiOiJvdXRnb2luZyJ9" | cat > ./rustdesk/custom.txt; fi
- name: Build self-extracted executable - name: Build self-extracted executable
shell: bash shell: bash
@@ -430,7 +426,7 @@ jobs:
sed -i '/dpiAware/d' res/manifest.xml sed -i '/dpiAware/d' res/manifest.xml
pushd ./libs/portable pushd ./libs/portable
pip3 install -r requirements.txt pip3 install -r requirements.txt
python ./generate.py -f ../../rustdesk/ -o . -e "../../rustdesk/${{ inputs.appname }}.exe" python3 ./generate.py -f ../../rustdesk/ -o . -e "../../rustdesk/${{ inputs.appname }}.exe"
popd popd
mkdir -p ./SignOutput mkdir -p ./SignOutput
mv ./target/release/rustdesk-portable-packer.exe "./SignOutput/rustdesk.exe" mv ./target/release/rustdesk-portable-packer.exe "./SignOutput/rustdesk.exe"

View File

@@ -227,14 +227,10 @@ def download(request):
return response return response
def get_png(request): def get_png(request):
print("get png")
filename = request.GET['filename'] filename = request.GET['filename']
print(filename)
uuid = request.GET['uuid'] uuid = request.GET['uuid']
print(uuid)
#filename = filename+".exe" #filename = filename+".exe"
file_path = os.path.join('png',uuid,filename) file_path = os.path.join('png',uuid,filename)
print(file_path)
with open(file_path, 'rb') as file: with open(file_path, 'rb') as file:
response = HttpResponse(file, headers={ response = HttpResponse(file, headers={
'Content-Type': 'application/vnd.microsoft.portable-executable', 'Content-Type': 'application/vnd.microsoft.portable-executable',