Skip to content

Commit

Permalink
Merge pull request #14 from rustdesk/master
Browse files Browse the repository at this point in the history
sync
  • Loading branch information
eltorio authored Apr 3, 2024
2 parents 24d3898 + ed257e3 commit d03c42b
Show file tree
Hide file tree
Showing 25 changed files with 357 additions and 214 deletions.
29 changes: 1 addition & 28 deletions .github/workflows/flutter-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ env:
RUST_VERSION: "1.75" # https://github.com/rustdesk/rustdesk/discussions/7503
CARGO_NDK_VERSION: "3.1.2"
LLVM_VERSION: "15.0.6"
FLUTTER_VERSION: "3.16.9"
FLUTTER_VERSION: "3.19.5"
FLUTTER_RUST_BRIDGE_VERSION: "1.80.1"
# for arm64 linux because official Dart SDK does not work
FLUTTER_ELINUX_VERSION: "3.16.9"
Expand Down Expand Up @@ -83,14 +83,6 @@ jobs:
flutter-version: ${{ env.FLUTTER_VERSION }}
cache: true

- name: Replace engine with rustdesk custom flutter engine
run: |
flutter doctor -v
flutter precache --windows
Invoke-WebRequest -Uri https://github.com/fufesou/flutter-engine/releases/download/bugfix-subwindow-crash-3.16.9-apply-pull-47787/windows-x64-release.zip -OutFile windows-x64-flutter-release.zip
Expand-Archive windows-x64-flutter-release.zip -DestinationPath .
mv -Force windows-x64-release/* C:/hostedtoolcache/windows/flutter/stable-${{ env.FLUTTER_VERSION }}-x64/bin/cache/artifacts/engine/windows-x64-release/
- name: Install Rust toolchain
uses: dtolnay/rust-toolchain@v1
with:
Expand Down Expand Up @@ -175,7 +167,6 @@ jobs:
shell: bash
run: |
BASE_URL=${{ secrets.SIGN_BASE_URL }} SECRET_KEY=${{ secrets.SIGN_SECRET_KEY }} python3 res/job.py sign_files ./SignOutput
sha256sum ./SignOutput/rustdesk-*.exe ./rustdesk-*.tar.gz
- name: Publish Release
uses: softprops/action-gh-release@v1
Expand Down Expand Up @@ -286,7 +277,6 @@ jobs:
mv ./target/release/rustdesk-portable-packer.exe ./SignOutput/rustdesk-${{ env.VERSION }}-${{ matrix.job.arch }}-sciter.exe
mv ./Release ./rustdesk
tar czf rustdesk-${{ env.VERSION }}-${{ matrix.job.arch }}.tar.gz rustdesk
sha256sum ./SignOutput/rustdesk-*.exe ./rustdesk-*.tar.gz
- name: Sign rustdesk self-extracted file
if: env.UPLOAD_ARTIFACT == 'true' && env.SIGN_BASE_URL != ''
Expand Down Expand Up @@ -359,7 +349,6 @@ jobs:
codesign --force --options runtime -s ${{ secrets.MACOS_CODESIGN_IDENTITY }} --deep --strict rustdesk-${{ env.VERSION }}.dmg -vvv
# notarize the rustdesk-${{ env.VERSION }}.dmg
rcodesign notary-submit --api-key-path ~/.p12/api-key.json --staple rustdesk-${{ env.VERSION }}.dmg
sha256sum rustdesk*-aarch64.dmg
- name: Rename rustdesk
if: env.UPLOAD_ARTIFACT == 'true'
Expand Down Expand Up @@ -518,7 +507,6 @@ jobs:
codesign --force --options runtime -s ${{ secrets.MACOS_CODESIGN_IDENTITY }} --deep --strict rustdesk-${{ env.VERSION }}.dmg -vvv
# notarize the rustdesk-${{ env.VERSION }}.dmg
rcodesign notary-submit --api-key-path ${{ github.workspace }}/rustdesk.json --staple rustdesk-${{ env.VERSION }}.dmg
sha256sum rustdesk*-${{ matrix.job.arch }}.dmg
- name: Rename rustdesk
if: env.UPLOAD_ARTIFACT == 'true'
Expand Down Expand Up @@ -558,7 +546,6 @@ jobs:
- name: Combine unsigned macos app
run: |
tar czf rustdesk-${{ env.VERSION }}-macos-unsigned.tar.gz *.dmg
sha256sum rustdesk-${{ env.VERSION }}-macos-unsigned.tar.gz
- name: Publish unsigned macos app
uses: softprops/action-gh-release@v1
Expand Down Expand Up @@ -842,11 +829,6 @@ jobs:
# override default build-tools version (29.0.3) -- optional
BUILD_TOOLS_VERSION: "30.0.2"

- name: Print sha256sum
shell: bash
run: |
sha256sum ${{steps.sign-rustdesk.outputs.signedReleaseFile}} signed-apk/rustdesk-${{ env.VERSION }}-${{ matrix.job.arch }}.apk
- name: Upload Artifacts
if: env.ANDROID_SIGNING_KEY != null && env.UPLOAD_ARTIFACT == 'true'
uses: actions/upload-artifact@master
Expand Down Expand Up @@ -1450,7 +1432,6 @@ jobs:
# use cp to duplicate deb files to fit other packages.
cp "$name" "${name%%.deb}-${{ matrix.job.arch }}-sciter.deb"
done
sha256sum rustdesk-${{ env.VERSION }}-${{ matrix.job.arch }}-sciter.deb
- name: Publish debian package
if: matrix.job.extra-build-features == '' && env.UPLOAD_ARTIFACT == 'true'
Expand Down Expand Up @@ -1642,15 +1623,13 @@ jobs:
for name in rustdesk*??.rpm; do
mv "$name" "/opt/artifacts/rpm/${name%%.rpm}-suse.rpm"
done
sha256sum /opt/artifacts/rpm/*.rpm
- name: Rename rustdesk
shell: bash
run: |
for name in rustdesk*??.deb; do
cp "$name" "${name%%.deb}-${{ matrix.job.arch }}.deb"
done
sha256sum rustdesk-${{ env.VERSION }}-${{ matrix.job.arch }}.deb
- name: Publish debian package
if: matrix.job.extra-build-features == '' && env.UPLOAD_ARTIFACT == 'true'
Expand All @@ -1674,7 +1653,6 @@ jobs:
# run appimage-builder
pushd appimage
sudo appimage-builder --skip-tests --recipe ./AppImageBuilder-${{ matrix.job.arch }}.yml
sha256sum ./rustdesk-${{ env.VERSION }}-*.AppImage
- name: Publish appimage package
if: matrix.job.extra-build-features == 'appimage' && env.UPLOAD_ARTIFACT == 'true'
Expand Down Expand Up @@ -1887,7 +1865,6 @@ jobs:
for name in rustdesk*??.rpm; do
mv "$name" "/opt/artifacts/rpm/${name%%.rpm}-suse.rpm"
done
sha256sum /opt/artifacts/rpm/*.rpm
- name: Rename rustdesk
shell: bash
Expand All @@ -1896,7 +1873,6 @@ jobs:
# use cp to duplicate deb files to fit other packages.
cp "$name" "${name%%.deb}-${{ matrix.job.arch }}.deb"
done
sha256sum rustdesk-${{ env.VERSION }}-${{ matrix.job.arch }}.deb
- name: Publish debian package
if: matrix.job.extra-build-features == '' && env.UPLOAD_ARTIFACT == 'true'
Expand Down Expand Up @@ -1955,7 +1931,6 @@ jobs:
gst-plugin-pipewire
scripts: |
cd res && HBB=`pwd`/.. FLUTTER=1 makepkg -f
sha256sum rustdesk-${{ env.VERSION }}*.zst
- name: Publish archlinux package
if: matrix.job.extra-build-features == '' && env.UPLOAD_ARTIFACT == 'true'
Expand All @@ -1979,7 +1954,6 @@ jobs:
# run appimage-builder
pushd appimage
sudo appimage-builder --skip-tests --recipe ./AppImageBuilder-x86_64.yml
sha256sum ./rustdesk-${{ env.VERSION }}-*.AppImage
- name: Publish appimage package
if: matrix.job.extra-build-features == 'appimage' && env.UPLOAD_ARTIFACT == 'true'
Expand Down Expand Up @@ -2141,7 +2115,6 @@ jobs:
git clone https://github.com/flathub/shared-modules.git --depth=1
flatpak-builder --user --force-clean --repo=repo ./build ./rustdesk.json
flatpak build-bundle ./repo rustdesk-${{ env.VERSION }}-${{ matrix.job.arch }}.flatpak com.rustdesk.RustDesk
sha256sum rustdesk-${{ env.VERSION }}-${{ matrix.job.arch }}.flatpak
- name: Publish flatpak package
uses: softprops/action-gh-release@v1
Expand Down
6 changes: 4 additions & 2 deletions flutter/lib/common/widgets/peer_card.dart
Original file line number Diff line number Diff line change
Expand Up @@ -750,8 +750,10 @@ abstract class BasePeerCard extends StatelessWidget {
if (succ) {
showToast(translate('Successful'));
} else {
BotToast.showText(
contentColor: Colors.red, text: translate("Failed"));
if (tab.index == PeerTabIndex.ab.index) {
BotToast.showText(
contentColor: Colors.red, text: translate("Failed"));
}
}
},
padding: menuPadding,
Expand Down
2 changes: 1 addition & 1 deletion flutter/lib/models/ab_model.dart
Original file line number Diff line number Diff line change
Expand Up @@ -1490,7 +1490,7 @@ class Ab extends BaseAb {
@override
Future<bool> changePersonalHashPassword(String id, String hash) async {
if (!personal) return false;
if (!peers.any((e) => e.id == id)) return false;
if (!peers.any((e) => e.id == id)) return true;
return await _setPassword({"id": id, "hash": hash});
}

Expand Down
7 changes: 7 additions & 0 deletions res/msi/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,10 @@

**/bin
**/obj

x64
packages

CustomActions/x64
CustomActions/*.user
CustomActions/*.filters
17 changes: 0 additions & 17 deletions res/msi/CustomActions/CustomAction.config

This file was deleted.

56 changes: 0 additions & 56 deletions res/msi/CustomActions/CustomAction.cs

This file was deleted.

63 changes: 63 additions & 0 deletions res/msi/CustomActions/CustomActions.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
// CustomAction.cpp : Defines the entry point for the custom action.
#include "pch.h"
#include <shellapi.h>

UINT __stdcall CustomActionHello(
__in MSIHANDLE hInstall
)
{
HRESULT hr = S_OK;
DWORD er = ERROR_SUCCESS;

hr = WcaInitialize(hInstall, "CustomActionHello");
ExitOnFailure(hr, "Failed to initialize");

WcaLog(LOGMSG_STANDARD, "Initialized.");

// TODO: Add your custom action code here.
WcaLog(LOGMSG_STANDARD, "================= Example CustomAction Hello");

LExit:
er = SUCCEEDED(hr) ? ERROR_SUCCESS : ERROR_INSTALL_FAILURE;
return WcaFinalize(er);
}

UINT __stdcall RemoveInstallFolder(
__in MSIHANDLE hInstall
)
{
HRESULT hr = S_OK;
DWORD er = ERROR_SUCCESS;

int nResult = 0;
wchar_t szCustomActionData[256] = { 0 };
DWORD cchCustomActionData = sizeof(szCustomActionData) / sizeof(szCustomActionData[0]);

hr = WcaInitialize(hInstall, "RemoveInstallFolder");
ExitOnFailure(hr, "Failed to initialize");

MsiGetPropertyW(hInstall, L"InstallFolder", szCustomActionData, &cchCustomActionData);

WcaLog(LOGMSG_STANDARD, "================= Remove Install Folder: %ls", szCustomActionData);

SHFILEOPSTRUCTW fileOp;
ZeroMemory(&fileOp, sizeof(SHFILEOPSTRUCT));

fileOp.wFunc = FO_DELETE;
fileOp.pFrom = szCustomActionData;
fileOp.fFlags = FOF_NOCONFIRMATION | FOF_SILENT;

nResult = SHFileOperationW(&fileOp);
if (nResult == 0)
{
WcaLog(LOGMSG_STANDARD, "The directory \"%ls\" has been deleted.", szCustomActionData);
}
else
{
WcaLog(LOGMSG_STANDARD, "The directory \"%ls\" has not been deleted, error code: 0X%02X.", szCustomActionData, nResult);
}

LExit:
er = SUCCEEDED(hr) ? ERROR_SUCCESS : ERROR_INSTALL_FAILURE;
return WcaFinalize(er);
}
15 changes: 0 additions & 15 deletions res/msi/CustomActions/CustomActions.csproj

This file was deleted.

5 changes: 5 additions & 0 deletions res/msi/CustomActions/CustomActions.def
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
LIBRARY "CustomActions"

EXPORTS
CustomActionHello
RemoveInstallFolder
Loading

0 comments on commit d03c42b

Please sign in to comment.