hzhou лет назад: 5
Родитель
Сommit
3d5d219a8c
8 измененных файлов с 21 добавлено и 6 удалено
  1. 4 0
      .gitignore
  2. 2 1
      Cargo.lock
  3. 6 1
      Cargo.toml
  4. 3 0
      build.rs
  5. 1 1
      libs/hbb_common
  6. 1 1
      src/hbbr/main.rs
  7. 2 0
      src/lib.rs
  8. 2 2
      src/main.rs

+ 4 - 0
.gitignore

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

+ 2 - 1
Cargo.lock

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

+ 6 - 1
Cargo.toml

@@ -1,8 +1,9 @@
1 1
 [package]
2 2
 name = "hbbs"
3
-version = "0.1.0"
3
+version = "1.0.0"
4 4
 authors = ["open-trade <info@opentradesolutions.com>"]
5 5
 edition = "2018"
6
+build= "build.rs"
6 7
 
7 8
 [[bin]]
8 9
 name = "hbbr"
@@ -20,6 +21,10 @@ lazy_static = "1.4"
20 21
 clap = "2.33"
21 22
 rust-ini = "0.15"
22 23
 
24
+[build-dependencies]
25
+cc = "1.0"
26
+hbb_common = { path = "libs/hbb_common" }
27
+
23 28
 [workspace]
24 29
 members = ["libs/hbb_common"]
25 30
 

+ 3 - 0
build.rs

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

+ 1 - 1
libs/hbb_common

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

+ 1 - 1
src/hbbr/main.rs

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

+ 2 - 0
src/lib.rs

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

+ 2 - 2
src/main.rs

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