Skip to content

Commit

Permalink
Refact. Remove third-party prebuilt dep, topmost window
Browse files Browse the repository at this point in the history
Signed-off-by: fufesou <[email protected]>
  • Loading branch information
fufesou committed Feb 25, 2024
1 parent 4c8c2aa commit 205b24d
Show file tree
Hide file tree
Showing 3 changed files with 82 additions and 1 deletion.
17 changes: 17 additions & 0 deletions .github/workflows/flutter-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -125,6 +136,12 @@ jobs:
ls -l ./libs/portable/Runner.res;
fi
- name: Download RustDeskTempTopMostWindow artifacts
uses: actions/download-artifact@v4
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'
Expand Down
59 changes: 59 additions & 0 deletions .github/workflows/third-party/RustDeskTempTopMostWindow.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
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:
runs-on: ${{ inputs.target }}
strategy:
fail-fast: false
env:
build_output_dir: WindowInjection/${{ inputs.platform }}/${{ inputs.configuration }}
steps:
- name: Check out repository code
uses: actions/checkout@v4

- name: Add MSBuild to PATH
uses: microsoft/setup-msbuild@v2

- name: Download the source code
run: |
git clone https://github.com/fufesou/RustDeskTempTopMostWindow RustDeskTempTopMostWindow
git checkout v0.3
- name: Build the solution
run: |
cd RustDeskTempTopMostWindow
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@v4
with:
name: topmostwindow-artifacts
path: |
./${{ env.build_output_dir }}/WindowInjection.dll
7 changes: 6 additions & 1 deletion build.py
Original file line number Diff line number Diff line change
Expand Up @@ -80,8 +80,10 @@ def get_all_features():
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()
Expand Down Expand Up @@ -188,6 +190,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

Expand Down

0 comments on commit 205b24d

Please sign in to comment.