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

feat(binary,fvm): upgrade to binary 4.0.0 and use fvm #27

Merged
merged 4 commits into from
Dec 19, 2024
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
3 changes: 3 additions & 0 deletions .fvmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"flutter": "3.24.5@stable"
}
6 changes: 3 additions & 3 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ jobs:
- uses: actions/checkout@v3
- uses: dart-lang/[email protected]
with:
sdk: 3.1.0
sdk: 3.5.4
- run: dart pub get
- run: dart analyze --fatal-infos --fatal-warnings
format:
Expand All @@ -19,13 +19,13 @@ jobs:
- uses: actions/checkout@v3
- uses: dart-lang/[email protected]
with:
sdk: 3.1.0
sdk: 3.5.4
- run: dart format --output none --set-exit-if-changed .\example\ .\lib\ .\test\
test:
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v3
- uses: dart-lang/[email protected]
with:
sdk: 3.1.0
sdk: 3.5.4
- run: dart test
6 changes: 3 additions & 3 deletions .github/workflows/pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ jobs:
- uses: actions/checkout@v3
- uses: dart-lang/[email protected]
with:
sdk: 3.1.0
sdk: 3.5.4
- run: dart pub get
- run: dart analyze --fatal-infos --fatal-warnings
format:
Expand All @@ -17,13 +17,13 @@ jobs:
- uses: actions/checkout@v3
- uses: dart-lang/[email protected]
with:
sdk: 3.1.0
sdk: 3.5.4
- run: dart format --output none --set-exit-if-changed .\example\ .\lib\ .\test\
test:
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v3
- uses: dart-lang/[email protected]
with:
sdk: 3.1.0
sdk: 3.5.4
- run: dart test
2 changes: 1 addition & 1 deletion .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ jobs:
- uses: actions/checkout@v3
- uses: subosito/flutter-action@v2
with:
flutter-version: "3.3.10"
flutter-version: "3.5.4"
- name: Setup credentials
env:
PUB_DEV_CREDENTIALS: ${{ secrets.PUB_DEV_CREDENTIALS }}
Expand Down
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -19,3 +19,6 @@ doc/api/
*.js_
*.js.deps
*.js.map

# FVM Version Cache
.fvm/
4 changes: 4 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{
"dart.flutterSdkPath": ".fvm/versions/3.24.5@stable",
"dart.sdkPath": ".fvm/versions/3.24.5@stable/bin/cache/dart-sdk"
}
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -44,3 +44,7 @@
## 0.7.0

- Refactoring: replace `startReadLoop()` with `Stream<RemoteFrameBufferClientReadMessage> incomingMessages` and `void handleIncomingMessages()`

## 0.8.0
- Upgrade `binary` to 4.0.0
- Manage Dart SDK via `fvm`
18 changes: 9 additions & 9 deletions lib/src/protocol/pointer_event_message.dart
Original file line number Diff line number Diff line change
Expand Up @@ -26,32 +26,32 @@ class RemoteFrameBufferPointerEventMessage
ByteData toBytes() {
Uint8 buttonMask = Uint8(0);
if (button1Down) {
buttonMask = buttonMask.setBit(0);
buttonMask = buttonMask.setNthBit(0);
}
if (button2Down) {
buttonMask = buttonMask.setBit(1);
buttonMask = buttonMask.setNthBit(1);
}
if (button3Down) {
buttonMask = buttonMask.setBit(2);
buttonMask = buttonMask.setNthBit(2);
}
if (button4Down) {
buttonMask = buttonMask.setBit(3);
buttonMask = buttonMask.setNthBit(3);
}
if (button5Down) {
buttonMask = buttonMask.setBit(4);
buttonMask = buttonMask.setNthBit(4);
}
if (button6Down) {
buttonMask = buttonMask.setBit(5);
buttonMask = buttonMask.setNthBit(5);
}
if (button7Down) {
buttonMask = buttonMask.setBit(6);
buttonMask = buttonMask.setNthBit(6);
}
if (button8Down) {
buttonMask = buttonMask.setBit(7);
buttonMask = buttonMask.setNthBit(7);
}
return ByteData(6)
..setUint8(0, 5)
..setUint8(1, buttonMask.value)
..setUint8(1, buttonMask)
..setUint16(2, x)
..setUint16(4, y);
}
Expand Down
4 changes: 2 additions & 2 deletions pubspec.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
description: Implementation of The Remote Framebuffer Protocol (RFC 6143, aka VNC protocol)
name: dart_rfb
repository: https://github.com/Goddchen/dart-rfb
version: 0.7.0
version: 0.8.0

environment:
sdk: ">=3.1.0 <4.0.0"
Expand All @@ -15,7 +15,7 @@ dev_dependencies:
mockito: ^5.4.3
test: ^1.16.0
dependencies:
binary: ^3.0.1
binary: ^4.0.0
collection: ^1.16.0
dart_des: ^1.0.2
fpdart: ^0.4.0
Expand Down
2 changes: 1 addition & 1 deletion test/protocol/pointer_event_message_test.dart
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ void main() {
equals(
(ByteData(6)
..setUint8(0, 5)
..setUint8(1, Uint8(0).setBit(0).value)
..setUint8(1, Uint8(0).setNthBit(0))
..setUint16(2, 0)
..setUint16(4, 0))
.buffer
Expand Down