mirror of
https://github.com/topjohnwu/Magisk.git
synced 2024-12-21 23:47:39 +00:00
Move project common code into include
This commit is contained in:
parent
7087badf87
commit
8e8f01f8b5
@ -1,5 +1,6 @@
|
||||
use crate::gen::gen_cxx_binding;
|
||||
|
||||
#[path = "../include/gen.rs"]
|
||||
mod gen;
|
||||
|
||||
fn main() {
|
||||
|
@ -1,9 +0,0 @@
|
||||
// We expose constant values as macros so that all constants are literals
|
||||
// An advantage for doing this is that we can use concat!() on these values
|
||||
|
||||
#[macro_export]
|
||||
macro_rules! LOGFILE {
|
||||
() => {
|
||||
"/cache/magisk.log"
|
||||
};
|
||||
}
|
@ -2,13 +2,11 @@
|
||||
|
||||
pub use libc;
|
||||
|
||||
pub use consts::*;
|
||||
pub use files::*;
|
||||
pub use logging::*;
|
||||
pub use misc::*;
|
||||
pub use xwrap::*;
|
||||
|
||||
mod consts;
|
||||
mod files;
|
||||
mod logging;
|
||||
mod misc;
|
||||
|
@ -2,7 +2,7 @@ use protobuf_codegen::Customize;
|
||||
|
||||
use crate::gen::gen_cxx_binding;
|
||||
|
||||
#[path = "../base/gen.rs"]
|
||||
#[path = "../include/gen.rs"]
|
||||
mod gen;
|
||||
|
||||
fn main() {
|
||||
|
@ -1,6 +1,6 @@
|
||||
use crate::gen::gen_cxx_binding;
|
||||
|
||||
#[path = "../base/gen.rs"]
|
||||
#[path = "../include/gen.rs"]
|
||||
mod gen;
|
||||
|
||||
fn main() {
|
||||
|
@ -1,8 +1,9 @@
|
||||
pub use base;
|
||||
use daemon::*;
|
||||
use logging::*;
|
||||
use std::ffi::CStr;
|
||||
|
||||
#[path = "../include/consts.rs"]
|
||||
mod consts;
|
||||
mod daemon;
|
||||
mod logging;
|
||||
|
||||
|
@ -20,6 +20,7 @@ use base::*;
|
||||
|
||||
use crate::daemon::{MagiskD, MAGISKD};
|
||||
use crate::logging::LogFile::{Actual, Buffer};
|
||||
use crate::LOGFILE;
|
||||
|
||||
#[allow(dead_code, non_camel_case_types)]
|
||||
#[derive(FromPrimitive, ToPrimitive)]
|
||||
|
8
native/src/include/consts.rs
Normal file
8
native/src/include/consts.rs
Normal file
@ -0,0 +1,8 @@
|
||||
// Expose constant strings as macros so that we can use concat!() on these values
|
||||
|
||||
#[macro_export]
|
||||
macro_rules! LOGFILE {
|
||||
() => {
|
||||
"/cache/magisk.log"
|
||||
};
|
||||
}
|
@ -1,6 +1,6 @@
|
||||
use crate::gen::gen_cxx_binding;
|
||||
|
||||
#[path = "../base/gen.rs"]
|
||||
#[path = "../include/gen.rs"]
|
||||
mod gen;
|
||||
|
||||
fn main() {
|
||||
|
Loading…
x
Reference in New Issue
Block a user