mirror of
https://github.com/nestriness/cdc-file-transfer.git
synced 2026-01-30 14:35:37 +02:00
[cdc_rsync] Detect remote architecture (#86)
Improves ServerArch so that it can detect the remote architecture by running uname and checking %PROCESSOR_ARCHITECTURE%. So far, only x64 Linux and x64 Windows are supported, but in the future it is easy to add support for others, e.g. aarch64, as well. Before the detection is run, the remote architecture is guessed first based on the destination. For instance, if the destination directory starts with "C:\", it pretty much means Windows. If cdc_rsync_server exists and runs fine, there's no need for detection. Since also PortManager depends on the remote architecture, it has to be adjusted as well. So far, PortManager assumeed that "local" means Windows and "remote" means Linux. This is no longer the case for syncing to Windows devices, so this CL adds the necessary abstractions to PortManager. Also refactors ArchType into a separate class in common, since it is used now from several places. It is also expanded to handle future changes that add support for different processor architectures, e.g. aarch64.
This commit is contained in:
@@ -22,6 +22,7 @@ cc_binary(
|
||||
],
|
||||
deps = [
|
||||
"//common:ansi_filter",
|
||||
"//common:arch_type",
|
||||
"//common:buffer",
|
||||
"//common:dir_iter",
|
||||
"//common:file_watcher",
|
||||
|
||||
Reference in New Issue
Block a user