This commit is contained in:
hzhou 2020-09-24 17:26:58 +08:00
parent a4a7602ba6
commit 3d5d219a8c
8 changed files with 21 additions and 6 deletions

4
.gitignore vendored
View File

@ -1,2 +1,6 @@
/target /target
**/*.rs.bk **/*.rs.bk
version.rs
sled.db
hbbs.sh
hbbs.conf

3
Cargo.lock generated
View File

@ -476,8 +476,9 @@ dependencies = [
[[package]] [[package]]
name = "hbbs" name = "hbbs"
version = "0.1.0" version = "1.0.0"
dependencies = [ dependencies = [
"cc 1.0.59 (registry+https://github.com/rust-lang/crates.io-index)",
"clap 2.33.3 (registry+https://github.com/rust-lang/crates.io-index)", "clap 2.33.3 (registry+https://github.com/rust-lang/crates.io-index)",
"hbb_common 0.1.0", "hbb_common 0.1.0",
"lazy_static 1.4.0 (registry+https://github.com/rust-lang/crates.io-index)", "lazy_static 1.4.0 (registry+https://github.com/rust-lang/crates.io-index)",

View File

@ -1,8 +1,9 @@
[package] [package]
name = "hbbs" name = "hbbs"
version = "0.1.0" version = "1.0.0"
authors = ["open-trade <info@opentradesolutions.com>"] authors = ["open-trade <info@opentradesolutions.com>"]
edition = "2018" edition = "2018"
build= "build.rs"
[[bin]] [[bin]]
name = "hbbr" name = "hbbr"
@ -20,6 +21,10 @@ lazy_static = "1.4"
clap = "2.33" clap = "2.33"
rust-ini = "0.15" rust-ini = "0.15"
[build-dependencies]
cc = "1.0"
hbb_common = { path = "libs/hbb_common" }
[workspace] [workspace]
members = ["libs/hbb_common"] members = ["libs/hbb_common"]

3
build.rs Normal file
View File

@ -0,0 +1,3 @@
fn main() {
hbb_common::gen_version();
}

@ -1 +1 @@
Subproject commit 311c3881d18589a382f07c2d572d00123fd0b295 Subproject commit fae9789b30fea0ff90f05e319002ca1c48b529c7

View File

@ -28,7 +28,7 @@ async fn main() -> ResultType<()> {
DEFAULT_PORT DEFAULT_PORT
); );
let matches = App::new("hbbr") let matches = App::new("hbbr")
.version("1.0") .version(hbbs::VERSION)
.author("Zhou Huabing <info@rustdesk.com>") .author("Zhou Huabing <info@rustdesk.com>")
.about("RustDesk Relay Server") .about("RustDesk Relay Server")
.args_from_usage(&args) .args_from_usage(&args)

View File

@ -2,3 +2,5 @@ mod rendezvous_server;
mod sled_async; mod sled_async;
use sled_async::*; use sled_async::*;
pub use rendezvous_server::*; pub use rendezvous_server::*;
mod version;
pub use version::*;

View File

@ -13,14 +13,14 @@ async fn main() -> ResultType<()> {
let args = format!( let args = format!(
"-c --config=[FILE] +takes_value 'Sets a custom config file' "-c --config=[FILE] +takes_value 'Sets a custom config file'
-p, --port=[NUMBER(default={})] 'Sets the listening port' -p, --port=[NUMBER(default={})] 'Sets the listening port'
-s, --serial=[NUMBER(default={0})] 'Sets configure update serial number' -s, --serial=[NUMBER(default=0)] 'Sets configure update serial number'
-R, --rendezvous-servers=[HOSTS] 'Sets rendezvous servers, seperated by colon' -R, --rendezvous-servers=[HOSTS] 'Sets rendezvous servers, seperated by colon'
-u, --software-url=[URL] 'Sets download url of RustDesk software of newest version' -u, --software-url=[URL] 'Sets download url of RustDesk software of newest version'
-r, --relay-server=[HOST] 'Sets the default relay server'", -r, --relay-server=[HOST] 'Sets the default relay server'",
DEFAULT_PORT DEFAULT_PORT
); );
let matches = App::new("hbbs") let matches = App::new("hbbs")
.version("1.0") .version(crate::VERSION)
.author("Zhou Huabing <info@rustdesk.com>") .author("Zhou Huabing <info@rustdesk.com>")
.about("RustDesk Rendezvous Server") .about("RustDesk Rendezvous Server")
.args_from_usage(&args) .args_from_usage(&args)