diff --git a/.github/workflows/flutter-build.yml b/.github/workflows/flutter-build.yml index 522585b5f..0a3f7a9c3 100644 --- a/.github/workflows/flutter-build.yml +++ b/.github/workflows/flutter-build.yml @@ -35,8 +35,19 @@ env: UPLOAD_ARTIFACT: "${{ inputs.upload-artifact }}" jobs: + build-RustDeskTempTopMostWindow: + uses: ./.github/workflows/third-party-RustDeskTempTopMostWindow.yml + with: + target: windows-2019 + configuration: Release + platform: x64 + target_version: Windows10 + strategy: + fail-fast: false + build-for-windows-flutter: name: ${{ matrix.job.target }} (${{ matrix.job.os }}) + needs: [build-RustDeskTempTopMostWindow] runs-on: ${{ matrix.job.os }} strategy: fail-fast: false @@ -125,6 +136,12 @@ jobs: ls -l ./libs/portable/Runner.res; fi + - name: Download RustDeskTempTopMostWindow artifacts + uses: actions/download-artifact@master + with: + name: topmostwindow-artifacts + path: './flutter/build/windows/x64/runner/Release/' + - name: Sign rustdesk files uses: GermanBluefox/code-sign-action@v7 if: false # env.UPLOAD_ARTIFACT == 'true' diff --git a/.github/workflows/third-party-RustDeskTempTopMostWindow.yml b/.github/workflows/third-party-RustDeskTempTopMostWindow.yml new file mode 100644 index 000000000..c43410ef3 --- /dev/null +++ b/.github/workflows/third-party-RustDeskTempTopMostWindow.yml @@ -0,0 +1,56 @@ +name: build RustDeskTempTopMostWindow + +on: + workflow_call: + inputs: + target: + description: 'Target' + required: true + type: string + default: 'windows-2019' + configuration: + description: 'Configuration' + required: true + type: string + default: 'Release' + platform: + description: 'Platform' + required: true + type: string + default: 'x64' + target_version: + description: 'TargetVersion' + required: true + type: string + default: 'Windows10' + +env: + project_path: WindowInjection/WindowInjection.vcxproj + +jobs: + build-RustDeskTempTopMostWindow: + runs-on: ${{ inputs.target }} + strategy: + fail-fast: false + env: + build_output_dir: RustDeskTempTopMostWindow/WindowInjection/${{ inputs.platform }}/${{ inputs.configuration }} + steps: + - name: Add MSBuild to PATH + uses: microsoft/setup-msbuild@v2 + + - name: Download the source code + run: | + git clone https://github.com/rustdesk-org/RustDeskTempTopMostWindow RustDeskTempTopMostWindow + + # Build. commit 53b548a5398624f7149a382000397993542ad796 is tag v0.3 + - name: Build the project + run: | + cd RustDeskTempTopMostWindow && git checkout 53b548a5398624f7149a382000397993542ad796 + msbuild ${{ env.project_path }} -p:Configuration=${{ inputs.configuration }} -p:Platform=${{ inputs.platform }} /p:TargetVersion=${{ inputs.target_version }} + + - name: Archive build artifacts + uses: actions/upload-artifact@master + with: + name: topmostwindow-artifacts + path: | + ./${{ env.build_output_dir }}/WindowInjection.dll diff --git a/build.py b/build.py index 75124e33f..189365314 100755 --- a/build.py +++ b/build.py @@ -80,8 +80,10 @@ def parse_rc_features(feature): return get_all_features() elif isinstance(feature, list): if windows: + # download third party is deprecated, we use github ci instead. # force add PrivacyMode - feature.append('PrivacyMode') + # feature.append('PrivacyMode') + pass for feat in feature: if isinstance(feat, str) and feat.upper() == 'ALL': return get_all_features() @@ -194,6 +196,9 @@ def generate_build_script_for_docker(): system2("bash /tmp/build.sh") +# Downloading third party resources is deprecated. +# We can use this function in an offline build environment. +# Even in an online environment, we recommend building third-party resources yourself. def download_extract_features(features, res_dir): import re