1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112
/*
==--==--==--==--==--==--==--==--==--==--==--==--==--==--==--==--
R1
Copyright (C) 2019-2024 Anonymous
There are several releases over multiple years,
they are listed as ranges, such as: "2019-2024".
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public License
along with this program. If not, see <https://www.gnu.org/licenses/>.
::--::--::--::--::--::--::--::--::--::--::--::--::--::--::--::--
*/
//! # R1
//!
//! ## Project
//!
//! - License: GNU Lesser General Public License, either version 3, or (at your option) any later version.
//! - _This project follows [Semantic Versioning 2.0.0]_
//!
//! ## Features
//!
//! This project offers a program via `bin` feature. The program helps run one single instance of any program.
//!
//! For more details, please run the program with `help` command.
//!
//! Currently all features are tested only on Linux. On other Unix systems, the program might or might not work.
//!
//! ## Why?
//!
//! For example, [Qt Creator][w:qt] can run multiple instances. Sometimes you don't want that. Unfortunately there's no setting to tell it to
//! run just one single instance.
//!
//! There are 2 solutions:
//!
//! 1. You can file a feature request (with a picture of your cat in it), and start praying for it to be accepted.
//!
//! This could take some time. But it's probably not one day. It's not 2 days either.
//!
//! 1 week? Still seems impossible.
//!
//! ...
//!
//! 2. Or,
//!
//! You can `r1` it, professionally, just like this:
//!
//! ```shell
//! ~> r1 --target=/usr/bin/qtcreator --app-name='Qt Creator'
//! ```
//!
//! Tip: you can find its icon here: <https://code.qt.io/cgit/qt-creator/qt-creator.git/>
//!
//! [Semantic Versioning 2.0.0]: https://semver.org/spec/v2.0.0.html
//! [w:qt]: https://www.qt.io
#![warn(missing_docs)]
// ╔═════════════════╗
// ║ IDENTIFIERS ║
// ╚═════════════════╝
macro_rules! code_name { () => { "r1" }}
macro_rules! version { () => { "0.7.6" }}
/// # Crate name
pub const NAME: &str = "R1";
/// # Crate code name
pub const CODE_NAME: &str = code_name!();
/// # ID of this crate
pub const ID: &str = concat!(
"92367fde-2e86b5fd-1d7b3683-12c3d9d1-85e42107-90fbb262-6dcedd26-29c7d618-",
"5a713581-44f9add9-b6228f68-5a00c403-9a9c7576-798701e2-5d1671b0-76639e53",
);
/// # Crate version
pub const VERSION: &str = version!();
/// # Crate release date (year/month/day)
pub const RELEASE_DATE: (u16, u8, u8) = (2024, 3, 30);
/// # Tag, which can be used for logging...
pub const TAG: &str = concat!(code_name!(), "::92367fde::", version!());
// ╔════════════════════╗
// ║ IMPLEMENTATION ║
// ╚════════════════════╝
pub mod version_info;
/// # Result type used in this crate
pub type Result<T> = std::io::Result<T>;
#[test]
fn test_crate_version() {
assert_eq!(VERSION, env!("CARGO_PKG_VERSION"));
}