Prepare for releases

This commit is contained in:
Guillermo Roche 2023-05-23 20:40:54 +02:00
parent 0faf0c1773
commit d61bd044a4
2 changed files with 13 additions and 1 deletions

View File

@ -6,3 +6,6 @@ edition = "2021"
[dependencies] [dependencies]
serde = { version = "*", features = ["derive"] } serde = { version = "*", features = ["derive"] }
serde_yaml = "*" serde_yaml = "*"
[profile.release]
lto = true

View File

@ -3,9 +3,18 @@ use std::fs::File;
use std::str::FromStr; use std::str::FromStr;
use std::io::prelude::*; use std::io::prelude::*;
use std::collections::HashMap; use std::collections::HashMap;
#[cfg(not(debug_assertions))]
macro_rules! PATH { () => { "/etc/mrproxy/" } }
#[cfg(not(debug_assertions))]
static FILE_CONF: &str = concat!(PATH!(),"mrprox.conf");
#[cfg(not(debug_assertions))]
static FILE_SERVERS: &str = concat!(PATH!(),"mrprox_servers.conf");
#[cfg(debug_assertions)]
static FILE_CONF: &str = "mrprox.conf"; static FILE_CONF: &str = "mrprox.conf";
#[cfg(debug_assertions)]
static FILE_SERVERS: &str = "mrprox_servers.conf"; static FILE_SERVERS: &str = "mrprox_servers.conf";
const DEF_PORT: u16 = 25565; const DEF_PORT: u16 = 25565;
#[derive(Debug, PartialEq, Serialize, Deserialize, Clone)] #[derive(Debug, PartialEq, Serialize, Deserialize, Clone)]