mirror of
https://gitlab.com/veloren/veloren.git
synced 2024-08-30 18:12:32 +00:00
Merge branch 'songtronix/fix-hot-anim' into 'master'
fix: hot-anim feature See merge request veloren/veloren!1110
This commit is contained in:
14
Cargo.lock
generated
14
Cargo.lock
generated
@ -4187,6 +4187,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
|
|||||||
checksum = "a41f40ed0e162c911ac6fcb53ecdc8134c46905fdbbae8c50add462a538b495f"
|
checksum = "a41f40ed0e162c911ac6fcb53ecdc8134c46905fdbbae8c50add462a538b495f"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"cfg-if",
|
"cfg-if",
|
||||||
|
"tracing-attributes",
|
||||||
"tracing-core",
|
"tracing-core",
|
||||||
]
|
]
|
||||||
|
|
||||||
@ -4201,6 +4202,17 @@ dependencies = [
|
|||||||
"tracing-subscriber",
|
"tracing-subscriber",
|
||||||
]
|
]
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "tracing-attributes"
|
||||||
|
version = "0.1.8"
|
||||||
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
|
checksum = "99bbad0de3fd923c9c3232ead88510b783e5a4d16a6154adffa3d53308de984c"
|
||||||
|
dependencies = [
|
||||||
|
"proc-macro2 1.0.18",
|
||||||
|
"quote 1.0.7",
|
||||||
|
"syn 1.0.31",
|
||||||
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "tracing-core"
|
name = "tracing-core"
|
||||||
version = "0.1.10"
|
version = "0.1.10"
|
||||||
@ -4580,8 +4592,8 @@ version = "0.6.0"
|
|||||||
dependencies = [
|
dependencies = [
|
||||||
"lazy_static",
|
"lazy_static",
|
||||||
"libloading 0.6.2",
|
"libloading 0.6.2",
|
||||||
"log",
|
|
||||||
"notify",
|
"notify",
|
||||||
|
"tracing",
|
||||||
"vek",
|
"vek",
|
||||||
"veloren-common",
|
"veloren-common",
|
||||||
]
|
]
|
||||||
|
@ -72,7 +72,7 @@ authc = { git = "https://gitlab.com/veloren/auth.git", rev = "223a4097f7ebc8d451
|
|||||||
const-tweaker = { version = "0.2.5", optional = true }
|
const-tweaker = { version = "0.2.5", optional = true }
|
||||||
|
|
||||||
# Logging
|
# Logging
|
||||||
tracing = { version = "0.1", default-features = false }
|
tracing = "0.1"
|
||||||
tracing-subscriber = { version = "0.2.3", default-features = false, features = ["env-filter", "fmt", "chrono", "ansi", "smallvec" , "tracing-log"] }
|
tracing-subscriber = { version = "0.2.3", default-features = false, features = ["env-filter", "fmt", "chrono", "ansi", "smallvec" , "tracing-log"] }
|
||||||
tracing-log = "0.1.1"
|
tracing-log = "0.1.1"
|
||||||
tracing-appender = "0.1"
|
tracing-appender = "0.1"
|
||||||
|
@ -11,7 +11,7 @@ name = "voxygen_anim"
|
|||||||
#crate-type = ["lib", "cdylib"]
|
#crate-type = ["lib", "cdylib"]
|
||||||
|
|
||||||
[features]
|
[features]
|
||||||
use-dyn-lib = ["libloading", "notify", "lazy_static", "log"]
|
use-dyn-lib = ["libloading", "notify", "lazy_static", "tracing"]
|
||||||
be-dyn-lib = []
|
be-dyn-lib = []
|
||||||
|
|
||||||
default = ["be-dyn-lib"]
|
default = ["be-dyn-lib"]
|
||||||
@ -22,4 +22,4 @@ common = { package = "veloren-common", path = "../../../common" }
|
|||||||
libloading = { version = "0.6.2", optional = true }
|
libloading = { version = "0.6.2", optional = true }
|
||||||
notify = { version = "5.0.0-pre.2", optional = true }
|
notify = { version = "5.0.0-pre.2", optional = true }
|
||||||
lazy_static = { version = "1.4.0", optional = true }
|
lazy_static = { version = "1.4.0", optional = true }
|
||||||
log = { version = "0.4.8", optional = true }
|
tracing = { version = "0.1", optional = true }
|
||||||
|
@ -7,6 +7,7 @@ use std::{
|
|||||||
thread,
|
thread,
|
||||||
time::Duration,
|
time::Duration,
|
||||||
};
|
};
|
||||||
|
use tracing::{error, warn};
|
||||||
|
|
||||||
lazy_static! {
|
lazy_static! {
|
||||||
pub static ref LIB: Mutex<Option<LoadedLib>> = Mutex::new(Some(LoadedLib::compile_load()));
|
pub static ref LIB: Mutex<Option<LoadedLib>> = Mutex::new(Some(LoadedLib::compile_load()));
|
||||||
@ -29,9 +30,15 @@ impl LoadedLib {
|
|||||||
|
|
||||||
fn load() -> Self {
|
fn load() -> Self {
|
||||||
#[cfg(target_os = "windows")]
|
#[cfg(target_os = "windows")]
|
||||||
let lib = Library::new("../target/debug/voxygen_anim_active.dll").unwrap();
|
let lib = Library::new("../target/debug/voxygen_anim_active.dll").expect(
|
||||||
|
"To use hot animation reloading you need to uncomment a line in \
|
||||||
|
`voxygen/src/anim/Cargo.toml`.",
|
||||||
|
);
|
||||||
#[cfg(not(target_os = "windows"))]
|
#[cfg(not(target_os = "windows"))]
|
||||||
let lib = Library::new("../target/debug/libvoxygen_anim.so").unwrap();
|
let lib = Library::new("../target/debug/libvoxygen_anim.so").expect(
|
||||||
|
"To use hot animation reloading you need to uncomment a line in \
|
||||||
|
`voxygen/src/anim/Cargo.toml`.",
|
||||||
|
);
|
||||||
|
|
||||||
Self { lib }
|
Self { lib }
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user