Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Some fixes pulled from upstream #7

Merged
merged 16 commits into from
Nov 24, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 7 additions & 6 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -132,12 +132,11 @@ jobs:
shell: bash

- name: Install Rust toolchain
uses: actions-rs/toolchain@v1
uses: dtolnay/rust-toolchain@v1
with:
toolchain: stable
target: ${{ matrix.job.target }}
override: true
profile: minimal # minimal component installation (ie, no documentation)
targets: ${{ matrix.job.target }}
components: ''

- name: Show version information (Rust, cargo, GCC)
shell: bash
Expand All @@ -149,7 +148,7 @@ jobs:
cargo -V
rustc -V

- uses: Swatinem/rust-cache@v1
- uses: Swatinem/rust-cache@v2

- name: Build
uses: actions-rs/cargo@v1
Expand Down Expand Up @@ -215,7 +214,9 @@ jobs:
;;
esac;

echo ::set-output name=CARGO_TEST_OPTIONS::${CARGO_TEST_OPTIONS}
#deprecated echo ::set-output name=CARGO_TEST_OPTIONS::${CARGO_TEST_OPTIONS}
echo "CARGO_TEST_OPTIONS=${CARGO_TEST_OPTIONS}" >> $GITHUB_ENV
echo "CARGO_TEST_OPTIONS=${CARGO_TEST_OPTIONS}" >> $GITHUB_OUTPUT

- name: Run tests
uses: actions-rs/cargo@v1
Expand Down
54 changes: 23 additions & 31 deletions .github/workflows/flutter-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -78,12 +78,11 @@ jobs:
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: actions-rs/toolchain@v1
uses: dtolnay/rust-toolchain@v1
with:
toolchain: stable
target: ${{ matrix.job.target }}
override: true
profile: minimal # minimal component installation (ie, no documentation)
targets: ${{ matrix.job.target }}
components: ''

- uses: Swatinem/rust-cache@v2
with:
Expand Down Expand Up @@ -198,12 +197,11 @@ jobs:
version: ${{ env.LLVM_VERSION }}

- name: Install Rust toolchain
uses: actions-rs/toolchain@v1
uses: dtolnay/rust-toolchain@v1
with:
toolchain: nightly-${{ matrix.job.target }}
target: ${{ matrix.job.target }}
override: true
profile: minimal # minimal component installation (ie, no documentation)
targets: ${{ matrix.job.target }}
components: ''

- uses: Swatinem/rust-cache@v2
with:
Expand Down Expand Up @@ -358,12 +356,11 @@ jobs:
flutter-version: ${{ env.FLUTTER_VERSION }}

- name: Install Rust toolchain
uses: actions-rs/toolchain@v1
uses: dtolnay/rust-toolchain@v1
with:
toolchain: stable
target: ${{ matrix.job.target }}
override: true
profile: minimal # minimal component installation (ie, no documentation)
targets: ${{ matrix.job.target }}
components: ''

- uses: Swatinem/rust-cache@v2
with:
Expand Down Expand Up @@ -481,12 +478,11 @@ jobs:
shell: bash

- name: Install Rust toolchain
uses: actions-rs/toolchain@v1
uses: dtolnay/rust-toolchain@v1
with:
toolchain: stable
target: ${{ matrix.job.target }}
override: true
profile: minimal # minimal component installation (ie, no documentation)
targets: ${{ matrix.job.target }}
components: ''

- uses: Swatinem/rust-cache@v2
with:
Expand Down Expand Up @@ -634,11 +630,10 @@ jobs:
path: ./

- name: Install Rust toolchain
uses: actions-rs/toolchain@v1
uses: dtolnay/rust-toolchain@v1
with:
toolchain: stable
override: true
profile: minimal # minimal component installation (ie, no documentation)
components: ''

- uses: Swatinem/rust-cache@v2
with:
Expand Down Expand Up @@ -799,12 +794,11 @@ jobs:
free -m

- name: Install Rust toolchain
uses: actions-rs/toolchain@v1
uses: dtolnay/rust-toolchain@v1
with:
toolchain: stable
target: ${{ matrix.job.target }}
override: true
profile: minimal # minimal component installation (ie, no documentation)
targets: ${{ matrix.job.target }}
components: ''

- name: Save Rust toolchain version
run: |
Expand Down Expand Up @@ -1009,12 +1003,11 @@ jobs:
free -m

- name: Install Rust toolchain
uses: actions-rs/toolchain@v1
uses: dtolnay/rust-toolchain@v1
with:
toolchain: stable
target: ${{ matrix.job.target }}
override: true
profile: minimal # minimal component installation (ie, no documentation)
targets: ${{ matrix.job.target }}
components: ''

- name: Save Rust toolchain version
run: |
Expand Down Expand Up @@ -1202,12 +1195,11 @@ jobs:
free -m

- name: Install Rust toolchain
uses: actions-rs/toolchain@v1
uses: dtolnay/rust-toolchain@v1
with:
toolchain: stable
target: ${{ matrix.job.target }}
override: true
profile: minimal # minimal component installation (ie, no documentation)
targets: ${{ matrix.job.target }}
components: ''

- name: Save Rust toolchain version
run: |
Expand Down
13 changes: 6 additions & 7 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

50 changes: 26 additions & 24 deletions flutter/lib/common/widgets/toolbar.dart
Original file line number Diff line number Diff line change
Expand Up @@ -88,32 +88,34 @@ List<TTextMenu> toolbarControls(BuildContext context, String id, FFI ffi) {
);
}
// osAccount / osPassword
v.add(
TTextMenu(
child: Row(children: [
Text(translate(pi.isHeadless ? 'OS Account' : 'OS Password')),
]),
trailingIcon: Transform.scale(
scale: isDesktop ? 0.8 : 1,
child: IconButton(
onPressed: () {
if (isMobile && Navigator.canPop(context)) {
Navigator.pop(context);
}
if (pi.isHeadless) {
showSetOSAccount(sessionId, ffi.dialogManager);
} else {
handleOsPasswordEditIcon(sessionId, ffi.dialogManager);
}
},
icon: Icon(Icons.edit, color: isMobile ? MyTheme.accent : null),
if (perms['keyboard'] != false) {
v.add(
TTextMenu(
child: Row(children: [
Text(translate(pi.isHeadless ? 'OS Account' : 'OS Password')),
]),
trailingIcon: Transform.scale(
scale: isDesktop ? 0.8 : 1,
child: IconButton(
onPressed: () {
if (isMobile && Navigator.canPop(context)) {
Navigator.pop(context);
}
if (pi.isHeadless) {
showSetOSAccount(sessionId, ffi.dialogManager);
} else {
handleOsPasswordEditIcon(sessionId, ffi.dialogManager);
}
},
icon: Icon(Icons.edit, color: isMobile ? MyTheme.accent : null),
),
),
onPressed: () => pi.isHeadless
? showSetOSAccount(sessionId, ffi.dialogManager)
: handleOsPasswordAction(sessionId, ffi.dialogManager),
),
onPressed: () => pi.isHeadless
? showSetOSAccount(sessionId, ffi.dialogManager)
: handleOsPasswordAction(sessionId, ffi.dialogManager),
),
);
);
}
// paste
if (isMobile && perms['keyboard'] != false && perms['clipboard'] != false) {
v.add(TTextMenu(
Expand Down
2 changes: 1 addition & 1 deletion libs/hbb_common/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ bytes = { version = "1.4", features = ["serde"] }
log = "0.4"
env_logger = "0.10"
socket2 = { version = "0.3", features = ["reuseport"] }
zstd = "0.12"
zstd = "0.13"
quinn = {version = "0.9", optional = true }
anyhow = "1.0"
futures-util = "0.3"
Expand Down
2 changes: 1 addition & 1 deletion libs/portable/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ build = "build.rs"
embed-resource = "2.1"

[dependencies]
brotli = "3.3"
brotli = "3.4"
dirs = "5.0"
md5 = "0.7"
winapi = { version = "0.3", features = ["winbase"] }
2 changes: 1 addition & 1 deletion res/DEBIAN/postinst
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@ set -e
if [ "$1" = configure ]; then

INITSYS=$(ls -al /proc/1/exe | awk -F' ' '{print $NF}' | awk -F'/' '{print $NF}')
ln -s /usr/lib/rustdesk/rustdesk /usr/bin/rustdesk

if [ "systemd" == "$INITSYS" ]; then
ln -s /usr/lib/rustdesk/rustdesk /usr/bin/rustdesk

if [ -e /etc/systemd/system/rustdesk.service ]; then
rm /etc/systemd/system/rustdesk.service /usr/lib/systemd/system/rustdesk.service /usr/lib/systemd/user/rustdesk.service >/dev/null 2>&1
Expand Down
2 changes: 1 addition & 1 deletion res/DEBIAN/prerm
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@ set -e
case $1 in
remove|upgrade)
INITSYS=$(ls -al /proc/1/exe | awk -F' ' '{print $NF}' | awk -F'/' '{print $NF}')
rm /usr/bin/rustdesk

if [ "systemd" == "${INITSYS}" ]; then
rm /usr/bin/rustdesk

systemctl stop rustdesk || true
systemctl disable rustdesk || true
Expand Down
2 changes: 1 addition & 1 deletion src/lang/id.rs
Original file line number Diff line number Diff line change
Expand Up @@ -572,6 +572,6 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> =
("privacy_mode_impl_virtual_display_tip", "Mode 2"),
("Enter privacy mode", "Masuk mode privasi"),
("Exit privacy mode", "Keluar mode privasi"),
("idd_not_support_under_win10_2004_tip", ""),
("idd_not_support_under_win10_2004_tip", "Driver grafis yang Anda gunakan tidak kompatibel dengan versi Windows Anda dan memerlukan Windows 10 versi 2004 atau yang lebih baru"),
].iter().cloned().collect();
}
7 changes: 6 additions & 1 deletion src/server/wayland.rs
Original file line number Diff line number Diff line change
Expand Up @@ -175,7 +175,12 @@ pub(super) async fn check_init() -> ResultType<()> {
.trim_end_matches(",")
.parse()
.unwrap_or(origin.1 + height as i32);
(w, h)
if w < origin.0 + width as i32 || h < origin.1 + height as i32 {
(origin.0 + width as i32, origin.1 + height as i32)
}
else{
(w, h)
}
}
_ => (origin.0 + width as i32, origin.1 + height as i32),
};
Expand Down
Loading