Refact/ci remove third party topmost window (#7263)

* Refact. Remove third-party prebuilt dep, topmost window

Signed-off-by: fufesou <shuanglongchen@yeah.net>

* fix ci

Signed-off-by: fufesou <shuanglongchen@yeah.net>

* Update third-party-RustDeskTempTopMostWindow.yml

---------

Signed-off-by: fufesou <shuanglongchen@yeah.net>
Co-authored-by: RustDesk <71636191+rustdesk@users.noreply.github.com>
This commit is contained in:
fufesou 2024-02-26 02:24:00 +08:00 committed by GitHub
parent 1b99d28c9b
commit 49c107bb5f
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 79 additions and 1 deletions

View File

@ -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'

View File

@ -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

View File

@ -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