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
-17
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");
}
+2 -2
View File
@@ -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<Platform: PlatformCallbacks> App<Platform> {
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(),
+2 -2
View File
@@ -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))
);
+1 -4
View File
@@ -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)]