5 Commits

Author SHA1 Message Date
Bryan Gerlach
f72d9be70c change permissions on custom.txt 2025-11-20 19:58:20 -06:00
Bryan Gerlach
88dca7235b change permissions on custom.txt 2025-11-20 19:54:44 -06:00
Bryan Gerlach
05906539d7 change permissions on custom.txt 2025-11-20 17:06:49 -06:00
Bryan Gerlach
851d8e9771 1.4.4 2025-11-20 16:22:12 -06:00
Bryan Gerlach
e4420c24c8 1.4.4 2025-11-20 15:33:33 -06:00
3 changed files with 77 additions and 12 deletions

62
.github/patches/allowCustom.py vendored Normal file
View File

@@ -0,0 +1,62 @@
import os
import shutil
def remove_line_block(filepath, start_phrase, lines_to_remove_after_start):
"""
Removes a starting line and a fixed number of lines immediately following it.
:param filepath: The path to the file to modify.
:param start_phrase: The unique string to identify the first line of the block.
:param lines_to_remove_after_start: The number of lines to remove after the starting line.
"""
# 1. Configuration for the removal logic
# The starting line is: const KEY: &str = "5Qbwsde3unUcJBtrx9ZkvUmwFNoExHzpryHuPUdqlWM=";
# The block contains this line plus 8 following lines, so we want to skip 9 lines in total.
total_lines_to_skip = 1 + lines_to_remove_after_start # 1 (start line) + 8 (following lines) = 9
lines_to_keep = []
skip_count = 0
# 2. Read and filter the file content
try:
with open(filepath, 'r') as file:
for line in file:
# If we are currently in the process of skipping lines, decrement the counter and continue
if skip_count > 0:
skip_count -= 1
continue
# Check if the line matches the start phrase (we use .strip() to ignore indentation/whitespace)
if line.strip().startswith(start_phrase.strip()):
# Start skipping the block (including the current line)
skip_count = total_lines_to_skip - 1
# Note: We subtract 1 because the 'continue' will handle the first line removal immediately
continue
# If we are not skipping, keep the line
lines_to_keep.append(line)
except FileNotFoundError:
print(f"Error: File not found at {filepath}")
return
# 3. Write the remaining lines back to the file (with backup)
try:
with open(filepath, 'w') as file:
file.writelines(lines_to_keep)
print(f"Success! Removed the 9-line block starting with '{start_phrase.strip()}' from {filepath}.")
except IOError as e:
print(f"An error occurred while writing to the file: {e}")
def main():
file_path = 'src/common.rs'
start_phrase = 'const KEY: &str = "5Qbwsde3unUcJBtrx9ZkvUmwFNoExHzpryHuPUdqlWM=";'
lines_to_remove_after_start = 8
remove_line_block(file_path, start_phrase, lines_to_remove_after_start)
if __name__ == "__main__":
main()

View File

@@ -1,8 +1,8 @@
diff --git a/flutter/lib/desktop/widgets/remote_toolbar.dart b/flutter/lib/desktop/widgets/remote_toolbar.dart
index 839ea1a81..9cee52263 100644
index bc3757f1e..ba6509802 100644
--- a/flutter/lib/desktop/widgets/remote_toolbar.dart
+++ b/flutter/lib/desktop/widgets/remote_toolbar.dart
@@ -437,6 +437,7 @@ class _RemoteToolbarState extends State<RemoteToolbar> {
@@ -317,6 +317,7 @@ class _RemoteToolbarState extends State<RemoteToolbar> {
borderRadius: borderRadius,
child: _DraggableShowHide(
id: widget.id,
@@ -10,7 +10,7 @@ index 839ea1a81..9cee52263 100644
sessionId: widget.ffi.sessionId,
dragging: _dragging,
fractionX: _fractionX,
@@ -2234,6 +2235,7 @@ class RdoMenuButton<T> extends StatelessWidget {
@@ -2460,6 +2461,7 @@ class RdoMenuButton<T> extends StatelessWidget {
class _DraggableShowHide extends StatefulWidget {
final String id;
@@ -18,7 +18,7 @@ index 839ea1a81..9cee52263 100644
final SessionID sessionId;
final RxDouble fractionX;
final RxBool dragging;
@@ -2246,6 +2248,7 @@ class _DraggableShowHide extends StatefulWidget {
@@ -2472,6 +2474,7 @@ class _DraggableShowHide extends StatefulWidget {
const _DraggableShowHide({
Key? key,
required this.id,
@@ -26,7 +26,7 @@ index 839ea1a81..9cee52263 100644
required this.sessionId,
required this.fractionX,
required this.dragging,
@@ -2357,6 +2360,7 @@ class _DraggableShowHideState extends State<_DraggableShowHide> {
@@ -2583,6 +2586,7 @@ class _DraggableShowHideState extends State<_DraggableShowHide> {
mainAxisSize: MainAxisSize.min,
children: [
_buildDraggable(context),
@@ -34,9 +34,9 @@ index 839ea1a81..9cee52263 100644
Obx(() => buttonWrapper(
() {
widget.setFullscreen(!isFullscreen.value);
@@ -2463,3 +2467,50 @@ Widget _buildPointerTrackWidget(Widget child, FFI? ffi) {
),
);
@@ -2742,3 +2746,50 @@ class EdgeThicknessControl extends StatelessWidget {
return slider;
}
}
+
+class _CycleMonitorMenu extends StatelessWidget {

View File

@@ -229,7 +229,6 @@ jobs:
sed -i -e 's|Purslane Ltd|${{ fromJson(inputs.extras).compname }}|' ./flutter/windows/runner/Runner.rc
sed -i -e 's|Purslane Ltd|${{ fromJson(inputs.extras).compname }}|' ./Cargo.toml
sed -i -e 's|Purslane Ltd|${{ fromJson(inputs.extras).compname }}|' ./libs/portable/Cargo.toml
sed -i -e 's|Purslane Ltd.|${{ fromJson(inputs.extras).compname }}|' ./res/setup.nsi
- name: change url to custom
if: fromJson(inputs.extras).urlLink != 'https://rustdesk.com'
@@ -243,7 +242,6 @@ jobs:
sed -i -e "s|const url = 'https://rustdesk.com/';|const url = '${{ fromJson(inputs.extras).urlLink }}';|" ./flutter/lib/mobile/pages/settings_page.dart
sed -i -e "s|launchUrlString('https://rustdesk.com/privacy.html')|launchUrlString('${{ fromJson(inputs.extras).urlLink }}/privacy.html')|" ./flutter/lib/mobile/pages/settings_page.dart
sed -i -e "s|https://rustdesk.com/privacy.html|${{ fromJson(inputs.extras).urlLink }}/privacy.html|" ./flutter/lib/desktop/pages/install_page.dart
#sed -i -e "s|https://rustdesk.com/|${{fromJson(inputs.extras).urlLink }}|" ./res/setup.nsi
- name: change download link to custom
if: fromJson(inputs.extras).downloadLink != 'https://rustdesk.com/download'
@@ -267,8 +265,8 @@ jobs:
- name: allow custom.txt
continue-on-error: true
run: |
Invoke-WebRequest -Uri https://raw.githubusercontent.com/bryangerlach/rdgen/refs/heads/master/.github/patches/allowCustom.diff -OutFile allowCustom.diff
git apply allowCustom.diff
Invoke-WebRequest -Uri https://raw.githubusercontent.com/bryangerlach/rdgen/refs/heads/master/.github/patches/allowCustom.py -OutFile allowCustom.py
python allowCustom.py
# Remove Setup Server Tip
Invoke-WebRequest -Uri https://raw.githubusercontent.com/bryangerlach/rdgen/refs/heads/master/.github/patches/removeSetupServerTip.diff -OutFile removeSetupServerTip.diff
git apply removeSetupServerTip.diff
@@ -586,6 +584,11 @@ jobs:
run: |
echo -n "${{ inputs.custom }}" | cat > ./rustdesk/custom.txt
- name: change permissions on custom.txt
shell: pwsh
run: |
icacls ./rustdesk/custom.txt /grant "Everyone:(OI)(CI)F"
- name: Build self-extracted executable
shell: bash
if: env.UPLOAD_ARTIFACT == 'true'