build: remove built dependency

This commit is contained in:
ardocrat 2024-07-03 23:36:16 +03:00
parent caf4dd5849
commit 0cc5e92708
6 changed files with 5 additions and 30 deletions

1
Cargo.lock generated
View file

@ -3773,7 +3773,6 @@ dependencies = [
"arboard", "arboard",
"arti-client", "arti-client",
"arti-hyper", "arti-hyper",
"built",
"chrono", "chrono",
"curve25519-dalek 4.1.3", "curve25519-dalek 4.1.3",
"dark-light", "dark-light",

View file

@ -7,7 +7,6 @@ license = "Apache-2.0"
repository = "https://github.com/ardocrat/grim" repository = "https://github.com/ardocrat/grim"
keywords = [ "crypto", "grin", "mimblewimble" ] keywords = [ "crypto", "grin", "mimblewimble" ]
edition = "2021" edition = "2021"
build = "src/build/build.rs"
[[bin]] [[bin]]
name = "grim-bin" name = "grim-bin"
@ -97,9 +96,6 @@ tls-api-native-tls = "0.9.0"
## stratum server ## stratum server
tokio-util = { version = "0.7.8", features = ["codec"] } 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] [target.'cfg(all(not(target_os = "windows"), not(target_os = "android")))'.dependencies]
eye = { version = "0.5.0", default-features = false } eye = { version = "0.5.0", default-features = false }

View file

@ -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");
}

View file

@ -18,7 +18,7 @@ use egui::{Align, Context, CursorIcon, Layout, Modifiers, Rect, ResizeDirection,
use egui::epaint::{RectShape}; use egui::epaint::{RectShape};
use egui::os::OperatingSystem; use egui::os::OperatingSystem;
use crate::{AppConfig, built_info}; use crate::AppConfig;
use crate::gui::Colors; use crate::gui::Colors;
use crate::gui::icons::{ARROWS_IN, ARROWS_OUT, CARET_DOWN, MOON, SUN, X}; use crate::gui::icons::{ARROWS_IN, ARROWS_OUT, CARET_DOWN, MOON, SUN, X};
use crate::gui::platform::PlatformCallbacks; use crate::gui::platform::PlatformCallbacks;
@ -257,7 +257,7 @@ impl<Platform: PlatformCallbacks> App<Platform> {
let title_text = if hide_app_name { let title_text = if hide_app_name {
"".to_string() "".to_string()
} else { } else {
format!("Grim {}", built_info::PKG_VERSION) format!("Grim {}", crate::VERSION)
}; };
painter.text( painter.text(
title_rect.center(), title_rect.center(),

View file

@ -23,7 +23,7 @@ use egui::epaint::text::TextWrapping;
use egui::os::OperatingSystem; use egui::os::OperatingSystem;
use egui::text::{LayoutJob, TextFormat}; use egui::text::{LayoutJob, TextFormat};
use egui::text_edit::TextEditState; use egui::text_edit::TextEditState;
use crate::{AppConfig, built_info}; use crate::AppConfig;
use crate::gui::Colors; use crate::gui::Colors;
use crate::gui::icons::{CHECK_SQUARE, CLIPBOARD_TEXT, COPY, EYE, EYE_SLASH, SCAN, SQUARE}; 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)) .color(Colors::white_or_black(true))
); );
ui.add_space(-2.0); ui.add_space(-2.0);
ui.label(RichText::new(built_info::PKG_VERSION) ui.label(RichText::new(crate::VERSION)
.size(16.0) .size(16.0)
.color(Colors::title(false)) .color(Colors::title(false))
); );

View file

@ -37,10 +37,7 @@ mod tor;
mod settings; mod settings;
pub mod gui; pub mod gui;
// Include build information. pub const VERSION: &str = env!("CARGO_PKG_VERSION");
pub mod built_info {
include!(concat!(env!("OUT_DIR"), "/built.rs"));
}
/// Android platform entry point. /// Android platform entry point.
#[allow(dead_code)] #[allow(dead_code)]