mirror of
https://github.com/rustdesk/rustdesk.git
synced 2026-07-05 14:54:54 +03:00
Fix/generate py target injection (#15248)
* fix: generate.py, target injection Signed-off-by: fufesou <linlong1266@gmail.com> * refact: logs Signed-off-by: fufesou <linlong1266@gmail.com> * Potential fix for pull request finding Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com> * Update port_forward.rs --------- Signed-off-by: fufesou <linlong1266@gmail.com> Co-authored-by: RustDesk <71636191+rustdesk@users.noreply.github.com> Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
This commit is contained in:
@@ -2,6 +2,7 @@
|
|||||||
|
|
||||||
import os
|
import os
|
||||||
import optparse
|
import optparse
|
||||||
|
import subprocess
|
||||||
from hashlib import md5
|
from hashlib import md5
|
||||||
import brotli
|
import brotli
|
||||||
import datetime
|
import datetime
|
||||||
@@ -65,11 +66,15 @@ def write_app_metadata(output_folder: str):
|
|||||||
print(f"App metadata has been written to {output_path}")
|
print(f"App metadata has been written to {output_path}")
|
||||||
|
|
||||||
def build_portable(output_folder: str, target: str):
|
def build_portable(output_folder: str, target: str):
|
||||||
os.chdir(output_folder)
|
current_dir = os.getcwd()
|
||||||
if target:
|
try:
|
||||||
os.system("cargo build --locked --release --target " + target)
|
os.chdir(output_folder)
|
||||||
else:
|
cmd = ["cargo", "build", "--locked", "--release"]
|
||||||
os.system("cargo build --locked --release")
|
if target:
|
||||||
|
cmd.extend(["--target", target])
|
||||||
|
subprocess.run(cmd, check=True)
|
||||||
|
finally:
|
||||||
|
os.chdir(current_dir)
|
||||||
|
|
||||||
# Linux: python3 generate.py -f ../rustdesk-portable-packer/test -o . -e ./test/main.py
|
# Linux: python3 generate.py -f ../rustdesk-portable-packer/test -o . -e ./test/main.py
|
||||||
# Windows: python3 .\generate.py -f ..\rustdesk\flutter\build\windows\runner\Debug\ -o . -e ..\rustdesk\flutter\build\windows\runner\Debug\rustdesk.exe
|
# Windows: python3 .\generate.py -f ..\rustdesk\flutter\build\windows\runner\Debug\ -o . -e ..\rustdesk\flutter\build\windows\runner\Debug\rustdesk.exe
|
||||||
|
|||||||
@@ -30,7 +30,6 @@ fn run_rdp(port: u16) {
|
|||||||
if !password.is_empty() {
|
if !password.is_empty() {
|
||||||
args.push(format!("/pass:{}", password));
|
args.push(format!("/pass:{}", password));
|
||||||
}
|
}
|
||||||
println!("{:?}", args);
|
|
||||||
std::process::Command::new("cmdkey")
|
std::process::Command::new("cmdkey")
|
||||||
.args(&args)
|
.args(&args)
|
||||||
.output()
|
.output()
|
||||||
|
|||||||
Reference in New Issue
Block a user