diff --git a/Cargo.lock b/Cargo.lock index 8342c94..dea5bf9 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -3773,7 +3773,6 @@ dependencies = [ "arboard", "arti-client", "arti-hyper", - "built", "chrono", "curve25519-dalek 4.1.3", "dark-light", diff --git a/Cargo.toml b/Cargo.toml index 38611ac..e1edcf8 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -7,7 +7,6 @@ license = "Apache-2.0" repository = "https://github.com/ardocrat/grim" keywords = [ "crypto", "grin", "mimblewimble" ] edition = "2021" -build = "src/build/build.rs" [[bin]] name = "grim-bin" @@ -97,9 +96,6 @@ tls-api-native-tls = "0.9.0" ## stratum server tokio-util = { version = "0.7.8", features = ["codec"] } -[build-dependencies] -built = "0.7.0" - [target.'cfg(all(not(target_os = "windows"), not(target_os = "android")))'.dependencies] eye = { version = "0.5.0", default-features = false } diff --git a/src/build/build.rs b/src/build/build.rs deleted file mode 100644 index af0986d..0000000 --- a/src/build/build.rs +++ /dev/null @@ -1,17 +0,0 @@ -// Copyright 2023 The Grim Developers -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -fn main() { - built::write_built_file().expect("Failed to acquire build-time information"); -} diff --git a/src/gui/app.rs b/src/gui/app.rs index e9f9fb1..17fe021 100644 --- a/src/gui/app.rs +++ b/src/gui/app.rs @@ -18,7 +18,7 @@ use egui::{Align, Context, CursorIcon, Layout, Modifiers, Rect, ResizeDirection, use egui::epaint::{RectShape}; use egui::os::OperatingSystem; -use crate::{AppConfig, built_info}; +use crate::AppConfig; use crate::gui::Colors; use crate::gui::icons::{ARROWS_IN, ARROWS_OUT, CARET_DOWN, MOON, SUN, X}; use crate::gui::platform::PlatformCallbacks; @@ -257,7 +257,7 @@ impl App { let title_text = if hide_app_name { "ツ".to_string() } else { - format!("Grim {}", built_info::PKG_VERSION) + format!("Grim {}", crate::VERSION) }; painter.text( title_rect.center(), diff --git a/src/gui/views/views.rs b/src/gui/views/views.rs index 7f3d92f..0568b96 100644 --- a/src/gui/views/views.rs +++ b/src/gui/views/views.rs @@ -23,7 +23,7 @@ use egui::epaint::text::TextWrapping; use egui::os::OperatingSystem; use egui::text::{LayoutJob, TextFormat}; use egui::text_edit::TextEditState; -use crate::{AppConfig, built_info}; +use crate::AppConfig; use crate::gui::Colors; use crate::gui::icons::{CHECK_SQUARE, CLIPBOARD_TEXT, COPY, EYE, EYE_SLASH, SCAN, SQUARE}; @@ -655,7 +655,7 @@ impl View { .color(Colors::white_or_black(true)) ); ui.add_space(-2.0); - ui.label(RichText::new(built_info::PKG_VERSION) + ui.label(RichText::new(crate::VERSION) .size(16.0) .color(Colors::title(false)) ); diff --git a/src/lib.rs b/src/lib.rs index 3f70f65..54ac58b 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -37,10 +37,7 @@ mod tor; mod settings; pub mod gui; -// Include build information. -pub mod built_info { - include!(concat!(env!("OUT_DIR"), "/built.rs")); -} +pub const VERSION: &str = env!("CARGO_PKG_VERSION"); /// Android platform entry point. #[allow(dead_code)]