This commit is contained in:
KG7x 2022-12-25 19:23:03 +03:00
parent 8c86a82422
commit 2d6075189d
14 changed files with 71 additions and 71 deletions

View File

@ -1,7 +1,7 @@
#!/bin/bash #!/bin/bash
# Build libyuv / opus / libvpx / oboe for Android # Build libyuv / opus / libvpx / oboe for Android
# Required: # Required:
# 1. set VCPKG_ROOT / ANDROID_NDK path environment variables # 1. set VCPKG_ROOT / ANDROID_NDK path environment variables
# 2. vcpkg initialized # 2. vcpkg initialized
# 3. ndk, version: 22 (if ndk < 22 you need to change LD as `export LD=$TOOLCHAIN/bin/$NDK_LLVM_TARGET-ld`) # 3. ndk, version: 22 (if ndk < 22 you need to change LD as `export LD=$TOOLCHAIN/bin/$NDK_LLVM_TARGET-ld`)
@ -23,7 +23,7 @@ HOST_TAG="linux-x86_64" # current platform, set as `ls $ANDROID_NDK/toolchains/l
TOOLCHAIN=$ANDROID_NDK/toolchains/llvm/prebuilt/$HOST_TAG TOOLCHAIN=$ANDROID_NDK/toolchains/llvm/prebuilt/$HOST_TAG
function build { function build {
ANDROID_ABI=$1 ANDROID_ABI=$1
VCPKG_TARGET=$2 VCPKG_TARGET=$2
NDK_LLVM_TARGET=$3 NDK_LLVM_TARGET=$3
LIBVPX_TARGET=$4 LIBVPX_TARGET=$4
@ -111,15 +111,15 @@ patch -N -d build/oboe -p1 < ../src/oboe.patch
# x86_64-linux-android # x86_64-linux-android
# i686-linux-android # i686-linux-android
# LIBVPX_TARGET : # LIBVPX_TARGET :
# arm64-android-gcc # arm64-android-gcc
# armv7-android-gcc # armv7-android-gcc
# x86_64-android-gcc # x86_64-android-gcc
# x86-android-gcc # x86-android-gcc
# args: ANDROID_ABI VCPKG_TARGET NDK_LLVM_TARGET LIBVPX_TARGET # args: ANDROID_ABI VCPKG_TARGET NDK_LLVM_TARGET LIBVPX_TARGET
build arm64-v8a arm64-android aarch64-linux-android arm64-android-gcc build arm64-v8a arm64-android aarch64-linux-android arm64-android-gcc
build armeabi-v7a arm-android arm-linux-androideabi armv7-android-gcc build armeabi-v7a arm-android arm-linux-androideabi armv7-android-gcc
# rm -rf build/libvpx # rm -rf build/libvpx
# rm -rf build/oboe # rm -rf build/oboe

View File

@ -1,6 +1,6 @@
#!/usr/bin/env python3 #!/usr/bin/env python3
import re import re
import os import os
import glob import glob
from tabnanny import check from tabnanny import check
@ -69,7 +69,7 @@ def main():
for ln in open('../../../Cargo.toml', encoding='utf-8'): for ln in open('../../../Cargo.toml', encoding='utf-8'):
if ln.startswith('version ='): if ln.startswith('version ='):
print('export const ' + ln) print('export const ' + ln)
def removeComment(ln): def removeComment(ln):
return re.sub('\s+\/\/.*$', '', ln) return re.sub('\s+\/\/.*$', '', ln)

View File

@ -22,8 +22,8 @@
import { simd } from "wasm-feature-detect"; import { simd } from "wasm-feature-detect";
export async function loadVp9(callback) { export async function loadVp9(callback) {
// Multithreading is used only if `options.threading` is true. // Multithreading is used only if `options.threading` is true.
// This requires browser support for the new `SharedArrayBuffer` and `Atomics` APIs, // This requires browser support for the new `SharedArrayBuffer` and `Atomics` APIs,
// currently available in Firefox and Chrome with experimental flags enabled. // currently available in Firefox and Chrome with experimental flags enabled.
// 所有主流浏览器均默认于2018年1月5日禁用SharedArrayBuffer // 所有主流浏览器均默认于2018年1月5日禁用SharedArrayBuffer
const isSIMD = await simd(); const isSIMD = await simd();

View File

@ -116,7 +116,7 @@ bool Win32Window::CreateAndShow(const std::wstring& title,
HMONITOR monitor = MonitorFromPoint(target_point, MONITOR_DEFAULTTONEAREST); HMONITOR monitor = MonitorFromPoint(target_point, MONITOR_DEFAULTTONEAREST);
UINT dpi = FlutterDesktopGetDpiForMonitor(monitor); UINT dpi = FlutterDesktopGetDpiForMonitor(monitor);
double scale_factor = dpi / 96.0; double scale_factor = dpi / 96.0;
HWND window = CreateWindow( HWND window = CreateWindow(
window_class, title.c_str(), WS_OVERLAPPEDWINDOW, window_class, title.c_str(), WS_OVERLAPPEDWINDOW,
Scale(origin.x, scale_factor), Scale(origin.y, scale_factor), Scale(origin.x, scale_factor), Scale(origin.y, scale_factor),

View File

@ -1,7 +1,7 @@
{ {
"version": "0.2.0", "version": "0.2.0",
"configurations": [ "configurations": [
{ {
"name": "Debug", "name": "Debug",
"type": "gdb", "type": "gdb",

View File

@ -221,7 +221,7 @@ BOOL DeviceCreate(PHSWDEVICE hSwDevice)
SW_DEVICE_CREATE_INFO createInfo = { 0 }; SW_DEVICE_CREATE_INFO createInfo = { 0 };
PCWSTR description = L"RustDesk Idd Driver"; PCWSTR description = L"RustDesk Idd Driver";
// These match the Pnp id's in the inf file so OS will load the driver when the device is created // These match the Pnp id's in the inf file so OS will load the driver when the device is created
PCWSTR instanceId = L"RustDeskIddDriver"; PCWSTR instanceId = L"RustDeskIddDriver";
PCWSTR hardwareIds = L"RustDeskIddDriver\0\0"; PCWSTR hardwareIds = L"RustDeskIddDriver\0\0";
PCWSTR compatibleIds = L"RustDeskIddDriver\0\0"; PCWSTR compatibleIds = L"RustDeskIddDriver\0\0";

View File

@ -14,7 +14,7 @@ extern "C" {
* @param rebootRequired [out] Indicates whether a restart is required. * @param rebootRequired [out] Indicates whether a restart is required.
* *
* @return TRUE/FALSE. If FALSE returned, error message can be retrieved by GetLastMsg() * @return TRUE/FALSE. If FALSE returned, error message can be retrieved by GetLastMsg()
* *
* @see GetLastMsg#GetLastMsg * @see GetLastMsg#GetLastMsg
*/ */
BOOL InstallUpdate(LPCTSTR fullInfPath, PBOOL rebootRequired); BOOL InstallUpdate(LPCTSTR fullInfPath, PBOOL rebootRequired);
@ -34,11 +34,11 @@ BOOL Uninstall(LPCTSTR fullInfPath, PBOOL rebootRequired);
/** /**
* @brief Check if RustDeskIddDriver device is created before. * @brief Check if RustDeskIddDriver device is created before.
* The driver device(adapter) should be single instance. * The driver device(adapter) should be single instance.
* *
* @param created [out] Indicates whether the device is created before. * @param created [out] Indicates whether the device is created before.
* *
* @return TRUE/FALSE. If FALSE returned, error message can be retrieved by GetLastMsg() * @return TRUE/FALSE. If FALSE returned, error message can be retrieved by GetLastMsg()
* *
* @see GetLastMsg#GetLastMsg * @see GetLastMsg#GetLastMsg
* *
*/ */
@ -48,11 +48,11 @@ BOOL IsDeviceCreated(PBOOL created);
* @brief Create device. * @brief Create device.
* Only one device should be created. * Only one device should be created.
* If device is installed ealier, this function returns FALSE. * If device is installed ealier, this function returns FALSE.
* *
* @param hSwDevice [out] Handler of software device, used by DeviceCreate(). Should be **NULL**. * @param hSwDevice [out] Handler of software device, used by DeviceCreate(). Should be **NULL**.
* *
* @return TRUE/FALSE. If FALSE returned, error message can be retrieved by GetLastMsg() * @return TRUE/FALSE. If FALSE returned, error message can be retrieved by GetLastMsg()
* *
* @see GetLastMsg#GetLastMsg * @see GetLastMsg#GetLastMsg
* *
*/ */
@ -79,9 +79,9 @@ VOID DeviceClose(HSWDEVICE hSwDevice);
* 1 means doing once and retry one time... * 1 means doing once and retry one time...
* *
* @return TRUE/FALSE. If FALSE returned, error message can be retrieved by GetLastMsg() * @return TRUE/FALSE. If FALSE returned, error message can be retrieved by GetLastMsg()
* *
* @see GetLastMsg#GetLastMsg * @see GetLastMsg#GetLastMsg
* *
* @remark Plug in monitor may fail if device is created in a very short time. * @remark Plug in monitor may fail if device is created in a very short time.
* System need some time to prepare the device. * System need some time to prepare the device.
* *
@ -94,7 +94,7 @@ BOOL MonitorPlugIn(UINT index, UINT edid, INT retries);
* @param index [in] Monitor index, should be 0, 1, 2. * @param index [in] Monitor index, should be 0, 1, 2.
* *
* @return TRUE/FALSE. If FALSE returned, error message can be retrieved by GetLastMsg() * @return TRUE/FALSE. If FALSE returned, error message can be retrieved by GetLastMsg()
* *
* @see GetLastMsg#GetLastMsg * @see GetLastMsg#GetLastMsg
* *
*/ */
@ -133,9 +133,9 @@ const char* GetLastMsg();
* @brief Set if print error message when debug. * @brief Set if print error message when debug.
* *
* @param b [in] TRUE to enable printing message. * @param b [in] TRUE to enable printing message.
* *
* @remark For now, no need to read evironment variable to check if should print. * @remark For now, no need to read evironment variable to check if should print.
* *
*/ */
VOID SetPrintErrMsg(BOOL b); VOID SetPrintErrMsg(BOOL b);

View File

@ -3,5 +3,5 @@ for size in 16 32 64 128 256 512 1024; do
#inkscape -z -o $size.png -w $size -h $size icon.svg >/dev/null 2>/dev/null #inkscape -z -o $size.png -w $size -h $size icon.svg >/dev/null 2>/dev/null
convert icon.png -resize ${size}x${size} app_icon_$size.png convert icon.png -resize ${size}x${size} app_icon_$size.png
done done
# from ImageMagick # from ImageMagick
#/bin/rm 16.png 32.png 48.png 128.png 256.png #/bin/rm 16.png 32.png 48.png 128.png 256.png

View File

@ -4,22 +4,22 @@ import os
import glob import glob
import sys import sys
import csv import csv
def get_lang(lang): def get_lang(lang):
out = {} out = {}
for ln in open('./src/lang/%s.rs'%lang): for ln in open('./src/lang/%s.rs'%lang):
ln = ln.strip() ln = ln.strip()
if ln.startswith('("'): if ln.startswith('("'):
k, v = line_split(ln) k, v = line_split(ln)
out[k] = v out[k] = v
return out return out
def line_split(line): def line_split(line):
toks = line.split('", "') toks = line.split('", "')
if len(toks) != 2: if len(toks) != 2:
print(line) print(line)
assert(0) assert(0)
k = toks[0][2:] k = toks[0][2:]
v = toks[1][:-3] v = toks[1][:-3]
return k, v return k, v
@ -34,8 +34,8 @@ def main():
def expand(): def expand():
for fn in glob.glob('./src/lang/*'): for fn in glob.glob('./src/lang/*'):
lang = os.path.basename(fn)[:-3] lang = os.path.basename(fn)[:-3]
if lang in ['en','cn']: continue if lang in ['en','cn']: continue
print(lang) print(lang)
dict = get_lang(lang) dict = get_lang(lang)
@ -52,11 +52,11 @@ def expand():
else: else:
fw.write(line) fw.write(line)
fw.close() fw.close()
def to_csv(): def to_csv():
for fn in glob.glob('./src/lang/*.rs'): for fn in glob.glob('./src/lang/*.rs'):
lang = os.path.basename(fn)[:-3] lang = os.path.basename(fn)[:-3]
csvfile = open('./src/lang/%s.csv'%lang, "wt") csvfile = open('./src/lang/%s.csv'%lang, "wt")
csvwriter = csv.writer(csvfile) csvwriter = csv.writer(csvfile)
for line in open(fn): for line in open(fn):

View File

@ -45,7 +45,7 @@ div.right-panel {
div.icon-and-id { div.icon-and-id {
flow: horizontal; flow: horizontal;
border-spacing: 1em; border-spacing: 1em;
} }
div.icon { div.icon {
@ -64,7 +64,7 @@ div.id {
div.permissions { div.permissions {
flow: horizontal; flow: horizontal;
border-spacing: 0.5em; border-spacing: 0.5em;
} }
div.permissions > div { div.permissions > div {
@ -141,7 +141,7 @@ button.elevate>span {
} }
button.elevate>span>span { button.elevate>span>span {
margin-left:*; margin-left:*;
margin-right:*; margin-right:*;
} }

View File

@ -4,7 +4,7 @@
@import url(common.css); @import url(common.css);
@import url(cm.css); @import url(cm.css);
</style> </style>
<script type="text/tiscript"> <script type="text/tiscript">
include "common.tis"; include "common.tis";
include "cm.tis"; include "cm.tis";
</script> </script>

View File

@ -56,7 +56,7 @@ button[type=checkbox], button[type=checkbox]:active {
button.outline { button.outline {
border: color(border) solid 1px; border: color(border) solid 1px;
background: transparent; background: transparent;
color: color(text); color: color(text);
} }
@ -115,7 +115,7 @@ textarea:empty {
.base:disabled { background: transparent; } .base:disabled { background: transparent; }
.slider:hover { background: grey; } .slider:hover { background: grey; }
.slider:active { background: grey; } .slider:active { background: grey; }
.base { size: 16px; } .base { size: 16px; }
.corner { background: white; } .corner { background: white; }
} }
@ -185,7 +185,7 @@ header div.window-icon icon {
header caption { header caption {
size: *; size: *;
} }
@media platform != "OSX" { @media platform != "OSX" {
button.window { button.window {

View File

@ -12,22 +12,22 @@ div#file-transfer {
} }
table table
{ {
font: system; font: system;
border: 1px solid color(border); border: 1px solid color(border);
flow: table-fixed; flow: table-fixed;
prototype: Grid; prototype: Grid;
size: *; size: *;
padding:0; padding:0;
border-spacing: 0; border-spacing: 0;
overflow-x: auto; overflow-x: auto;
overflow-y: hidden; overflow-y: hidden;
} }
table > thead { table > thead {
behavior: column-resizer; behavior: column-resizer;
border-bottom: color(border) solid 1px; border-bottom: color(border) solid 1px;
} }
table > tbody { table > tbody {
behavior: select-multiple; behavior: select-multiple;
@ -41,20 +41,20 @@ table th {
} }
table th table th
{ {
padding: 4px; padding: 4px;
foreground-repeat: no-repeat; foreground-repeat: no-repeat;
foreground-position: 50% 3px auto auto; foreground-position: 50% 3px auto auto;
border-left: color(border) solid 1px; border-left: color(border) solid 1px;
} }
table th.sortable[sort=asc] table th.sortable[sort=asc]
{ {
foreground-image: url(stock:arrow-down); foreground-image: url(stock:arrow-down);
} }
table th.sortable[sort=desc] table th.sortable[sort=desc]
{ {
foreground-image: url(stock:arrow-up); foreground-image: url(stock:arrow-up);
} }
@ -81,10 +81,10 @@ table.has_current thead th:current {
table tr:nth-child(odd) { background-color: white; } /* each odd row */ table tr:nth-child(odd) { background-color: white; } /* each odd row */
table tr:nth-child(even) { background-color: #F4F5F6; } /* each even row */ table tr:nth-child(even) { background-color: #F4F5F6; } /* each even row */
table.has_current tr:current /* current row */ table.has_current tr:current /* current row */
{ {
background-color: color(accent); background-color: color(accent);
} }
table.has_current tbody tr:checked table.has_current tbody tr:checked
{ {
@ -95,9 +95,9 @@ table.has_current tbody tr:checked td {
color: highlighttext; color: highlighttext;
} }
table td table td
{ {
padding: 4px; padding: 4px;
text-align: left; text-align: left;
font-size: 1em; font-size: 1em;
height: 1.4em; height: 1.4em;
@ -124,11 +124,11 @@ table td:nth-child(4) {
section { section {
size: *; size: *;
margin: 1em; margin: 1em;
border-spacing: 0.5em; border-spacing: 0.5em;
} }
table td:nth-child(1) { table td:nth-child(1) {
foreground-repeat: no-repeat; foreground-repeat: no-repeat;
foreground-position: 50% 50% foreground-position: 50% 50%
} }
@ -160,11 +160,11 @@ div.toolbar > div.button:hover {
div.toolbar > div.send { div.toolbar > div.send {
flow: horizontal; flow: horizontal;
border-spacing: 0.5em; border-spacing: 0.5em;
} }
div.remote > div.send svg { div.remote > div.send svg {
transform: scale(-1, 1); transform: scale(-1, 1);
} }
div.navbar { div.navbar {
@ -207,7 +207,7 @@ table.job-table tr td {
padding: 0.5em 1em; padding: 0.5em 1em;
border-bottom: color(border) 1px solid; border-bottom: color(border) 1px solid;
flow: horizontal; flow: horizontal;
border-spacing: 1em; border-spacing: 1em;
height: 3em; height: 3em;
overflow-x: hidden; overflow-x: hidden;
} }
@ -217,11 +217,11 @@ table.job-table tr svg {
} }
table.job-table tr.is_remote svg { table.job-table tr.is_remote svg {
transform: scale(-1, 1); transform: scale(-1, 1);
} }
table.job-table tr.is_remote div.svg_continue svg { table.job-table tr.is_remote div.svg_continue svg {
transform: scale(1, 1); transform: scale(1, 1);
} }
table.job-table tr td div.text { table.job-table tr td div.text {
@ -246,7 +246,7 @@ table#port-forward thead tr th {
table#port-forward tr td { table#port-forward tr td {
height: 3em; height: 3em;
text-align: left; text-align: left;
} }
table#port-forward input[type=text], table#port-forward input[type=number] { table#port-forward input[type=text], table#port-forward input[type=number] {

View File

@ -8,7 +8,7 @@ header #screens {
height: 22px; height: 22px;
border-radius: 4px; border-radius: 4px;
flow: horizontal; flow: horizontal;
border-spacing: 0.5em; border-spacing: 0.5em;
padding-right: 1em; padding-right: 1em;
position: relative; position: relative;
} }