diff --git a/.github/workflows/flutter-build.yml b/.github/workflows/flutter-build.yml index 3d377c8d6..f6609ce4f 100644 --- a/.github/workflows/flutter-build.yml +++ b/.github/workflows/flutter-build.yml @@ -96,6 +96,22 @@ jobs: VCPKG_ROOT: C:\rustdesk_thirdpary_lib\vcpkg run: python3 .\build.py --portable --hwcodec --flutter --feature IddDriver + - name: find Runner.res + # Windows: find Runner.res (compiled from ./flutter/windows/runner/Runner.rc), copy to ./Runner.res + # Runner.rc does not contain actual version, but Runner.res does + continue-on-error: true + shell: bash + run: | + runner_res=$(find . -name "Runner.res"); + if [ "$runner_res" == "" ]; then + echo "Runner.res: not found"; + else + echo "Runner.res: $runner_res"; + cp $runner_res ./libs/portable/Runner.res; + echo "list ./libs/portable/Runner.res"; + ls -l ./libs/portable/Runner.res; + fi + - name: Sign rustdesk files uses: GermanBluefox/code-sign-action@v7 if: env.UPLOAD_ARTIFACT == 'true' @@ -198,6 +214,22 @@ jobs: curl -LJ -o ./Release/sciter.dll https://github.com/c-smile/sciter-sdk/raw/master/bin.win/x32/sciter.dll echo "output_folder=./Release" >> $GITHUB_OUTPUT + - name: find Runner.res + # Windows: find Runner.res (compiled from ./flutter/windows/runner/Runner.rc), copy to ./Runner.res + # Runner.rc does not contain actual version, but Runner.res does + continue-on-error: true + shell: bash + run: | + runner_res=$(find . -name "Runner.res"); + if [ "$runner_res" == "" ]; then + echo "Runner.res: not found"; + else + echo "Runner.res: $runner_res"; + cp $runner_res ./libs/portable/Runner.res; + echo "list ./libs/portable/Runner.res"; + ls -l ./libs/portable/Runner.res; + fi + - name: Sign rustdesk files uses: GermanBluefox/code-sign-action@v7 if: env.UPLOAD_ARTIFACT == 'true' diff --git a/flutter/windows/runner/Runner.rc b/flutter/windows/runner/Runner.rc index 32d01bf44..03776ded4 100644 --- a/flutter/windows/runner/Runner.rc +++ b/flutter/windows/runner/Runner.rc @@ -93,7 +93,7 @@ BEGIN VALUE "FileDescription", "rustdesk" "\0" VALUE "FileVersion", VERSION_AS_STRING "\0" VALUE "InternalName", "rustdesk" "\0" - VALUE "LegalCopyright", "Copyright (C) 2022 com.carriez. All rights reserved." "\0" + VALUE "LegalCopyright", "Copyright (C) 2023 com.carriez. All rights reserved." "\0" VALUE "OriginalFilename", "rustdesk.exe" "\0" VALUE "ProductName", "rustdesk" "\0" VALUE "ProductVersion", VERSION_AS_STRING "\0" diff --git a/libs/portable/build.rs b/libs/portable/build.rs index 2450e16cd..4f33273f5 100644 --- a/libs/portable/build.rs +++ b/libs/portable/build.rs @@ -1,5 +1,10 @@ extern crate embed_resource; +use std::fs; fn main() { - embed_resource::compile("icon.rc", embed_resource::NONE); + let runner_res_path = "Runner.res"; + match fs::metadata(runner_res_path) { + Ok(_) => println!("cargo:rustc-link-lib=dylib:+verbatim=./libs/portable/Runner.res"), + Err(_) => embed_resource::compile("icon.rc", embed_resource::NONE), + } }