Initial commit

This commit is contained in:
2024-09-01 06:20:49 +03:00
parent bd61f5d591
commit 9263c396a1
81 changed files with 1494 additions and 1521 deletions

View File

@@ -3,6 +3,7 @@ pub mod fetch;
pub mod io;
pub mod jre;
pub mod platform;
pub mod utils;
/// Wrap a builder which uses a mut reference into one which outputs an owned value
macro_rules! wrap_ref_builder {

View File

@@ -0,0 +1,18 @@
use serde::{Deserialize, Serialize};
use tokio::io;
const PACKAGE_JSON_CONTENT: &str =
include_str!("../../../../apps/app-frontend/package.json");
#[derive(Serialize, Deserialize)]
pub struct Launcher {
pub version: String,
pub development_build: bool,
}
pub fn read_package_json() -> io::Result<Launcher> {
// Deserialize the content of package.json into a Launcher struct
let launcher: Launcher = serde_json::from_str(PACKAGE_JSON_CONTENT)?;
Ok(launcher)
}