Skip to content

Commit 5984569

Browse files
authored
Merge pull request #123 from wravery/dev
fix: #122
2 parents 27665fd + f6bfb13 commit 5984569

4 files changed

Lines changed: 11 additions & 16 deletions

File tree

Cargo.toml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ resolver = "2"
44
members = ["download-cef", "update-bindings", "export-cef-dir", "sys", "cef"]
55

66
[workspace.package]
7-
version = "137.0.0+137.0.8"
7+
version = "137.0.1+137.0.8"
88
edition = "2021"
99
license = "Apache-2.0 OR MIT"
1010
authors = [
@@ -15,8 +15,8 @@ authors = [
1515
repository = "https://github.com/tauri-apps/cef-rs"
1616

1717
[workspace.dependencies]
18-
cef-dll-sys = { version = "137.0.0", path = "sys" }
19-
download-cef = { version = "1.4", path = "download-cef" }
18+
cef-dll-sys = { version = "137.0.1", path = "sys" }
19+
download-cef = { version = "1.4.1", path = "download-cef" }
2020

2121
anyhow = "1"
2222
bindgen = "0.72"

download-cef/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
[package]
22
name = "download-cef"
33
description = "Download and extract pre-built CEF (Chromium Embedded Framework) archives."
4-
version = "1.4.0"
4+
version = "1.4.1"
55

66
edition.workspace = true
77
license.workspace = true

download-cef/src/lib.rs

Lines changed: 6 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -58,25 +58,20 @@ pub const WINDOWS_TARGETS: &[&str] = &[
5858
"i686-pc-windows-msvc",
5959
];
6060

61-
pub fn default_version(version: &'static str) -> String {
62-
static VERSIONS: Mutex<Option<HashMap<&'static str, String>>> = Mutex::new(None);
61+
pub fn default_version(version: &str) -> String {
62+
static VERSIONS: Mutex<Option<HashMap<String, String>>> = Mutex::new(None);
6363
let mut versions = VERSIONS.lock().expect("Lock error");
6464
if versions.is_none() {
6565
*versions = Some(HashMap::new());
6666
};
6767
let versions = versions.as_mut().unwrap();
6868
versions
69-
.entry(version)
69+
.entry(version.to_string())
7070
.or_insert_with(|| {
7171
Version::parse(version)
72-
.map(|version| {
73-
if version.build.is_empty() {
74-
version.to_string()
75-
} else {
76-
version.build.to_string()
77-
}
78-
})
79-
.unwrap_or_else(|_| version.to_string())
72+
.ok()
73+
.and_then(|version| (!version.build.is_empty()).then(|| version.build.to_string()))
74+
.unwrap_or_else(|| version.to_string())
8075
})
8176
.clone()
8277
}

sys/build.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ fn main() -> anyhow::Result<()> {
3131
let cef_dir = out_dir.join(&cef_dir);
3232

3333
if !fs::exists(&cef_dir)? {
34-
let cef_version = env::var("CARGO_PKG_VERSION")?;
34+
let cef_version = download_cef::default_version(&env::var("CARGO_PKG_VERSION")?);
3535
let index = CefIndex::download()?;
3636
let platform = index.platform(&target)?;
3737
let version = platform.version(&cef_version)?;

0 commit comments

Comments
 (0)