From 1fe20360f631b35ceb8b9410840ab3dbdf2e5fa8 Mon Sep 17 00:00:00 2001 From: Able Date: Mon, 16 Sep 2024 20:59:24 -0500 Subject: [PATCH] pumpkin print --- dev/src/main.rs | 21 +++++++++++++++++++++ sysdata/programs/pumpkin_print/README.md | 1 + sysdata/programs/pumpkin_print/meta.toml | 11 +++++++++++ sysdata/programs/pumpkin_print/src/main.hb | 15 +++++++++++++++ sysdata/system_config.toml | 3 +++ 5 files changed, 51 insertions(+) create mode 100644 sysdata/programs/pumpkin_print/README.md create mode 100644 sysdata/programs/pumpkin_print/meta.toml create mode 100644 sysdata/programs/pumpkin_print/src/main.hb diff --git a/dev/src/main.rs b/dev/src/main.rs index 4240643..c712822 100644 --- a/dev/src/main.rs +++ b/dev/src/main.rs @@ -72,6 +72,27 @@ pub fn new(development_type: DevelopmentType, name: String) { let readme_contents = format!("# {}", name); readme_file.write_all(readme_contents.as_bytes()).unwrap(); + let contents = format!( + "[package] +name = \"{}\" +authors = [\"\"] + +[dependants.libraries] + +[dependants.binaries] +hblang.version = \"1.0.0\" + +[build] +command = \"hblang src/main.hb\" +", + name + ); + + let toml_path_string = format!("{}/meta.toml", project_folder_path_string); + let mut readme_file = std::fs::File::create(toml_path_string.clone()).unwrap(); + + readme_file.write_all(contents.as_bytes()).unwrap(); + let src_folder_path_string = format!("{}/src", project_folder_path_string); std::fs::create_dir(src_folder_path_string.clone()).unwrap(); diff --git a/sysdata/programs/pumpkin_print/README.md b/sysdata/programs/pumpkin_print/README.md new file mode 100644 index 0000000..389887d --- /dev/null +++ b/sysdata/programs/pumpkin_print/README.md @@ -0,0 +1 @@ +# pumpkin_print \ No newline at end of file diff --git a/sysdata/programs/pumpkin_print/meta.toml b/sysdata/programs/pumpkin_print/meta.toml new file mode 100644 index 0000000..c1c49b2 --- /dev/null +++ b/sysdata/programs/pumpkin_print/meta.toml @@ -0,0 +1,11 @@ +[package] +name = "pumpkin_print" +authors = [""] + +[dependants.libraries] + +[dependants.binaries] +hblang.version = "1.0.0" + +[build] +command = "hblang src/main.hb" diff --git a/sysdata/programs/pumpkin_print/src/main.hb b/sysdata/programs/pumpkin_print/src/main.hb new file mode 100644 index 0000000..a047fd1 --- /dev/null +++ b/sysdata/programs/pumpkin_print/src/main.hb @@ -0,0 +1,15 @@ +stn := @use("../../../libraries/stn/src/lib.hb") + +main := fn(): int { + stn.log.info("\r + __)_)__\r + .-'._'-'_.'-.\r + .'.' |o|'|o| '.'.\r + | : ._: A :_. : |\r + | : '=.:.=' : |\r + | : :'.___.': : |\r + '-:__:__:__:__:-'\r + \0") + + return 0 +} \ No newline at end of file diff --git a/sysdata/system_config.toml b/sysdata/system_config.toml index 28d2c31..f8f4fbb 100644 --- a/sysdata/system_config.toml +++ b/sysdata/system_config.toml @@ -43,3 +43,6 @@ resolution = "1024x768x24" [boot.limine.ableos.modules.svga_driver] path = "boot:///svga_driver.hbf" + +[boot.limine.ableos.modules.pumpkin_print] +path = "boot:///pumpkin_print.hbf"