aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/src/utils
diff options
context:
space:
mode:
authorHsiangNianian <i@jyunko.cn>2026-01-13 14:31:37 +0800
committerHsiangNianian <i@jyunko.cn>2026-01-13 14:31:37 +0800
commitf878efe456e8f5c557f2cde9d71f120f3e0b38cd (patch)
treed6e54b7dc262502f2ef9dc011fcff6ad2aba2d54 /src/utils
parent225f87bf713492daef83a85e9e2a0bfdb0f9d23f (diff)
downloadDropOut-f878efe456e8f5c557f2cde9d71f120f3e0b38cd.tar.gz
DropOut-f878efe456e8f5c557f2cde9d71f120f3e0b38cd.zip
feat: add Minecraft DropOut launcher with version fetching and basic UI
- Implemented version manifest fetching from Mojang API. - Created launcher configuration and main launcher logic. - Added SVG and PNG icons for the application. - Developed a simple HTML/CSS interface for the launcher. - Integrated Tauri commands for backend communication. - Added utility functions for file operations and config parsing.
Diffstat (limited to 'src/utils')
-rw-r--r--src/utils/mod.rs34
1 files changed, 0 insertions, 34 deletions
diff --git a/src/utils/mod.rs b/src/utils/mod.rs
deleted file mode 100644
index 088da95..0000000
--- a/src/utils/mod.rs
+++ /dev/null
@@ -1,34 +0,0 @@
-// utils/mod.rs
-pub mod file_utils;
-pub mod config_parser;
-
-// 文件操作相关的实用工具函数
-pub mod file_utils {
- use std::fs;
- use std::io::{self, Write};
-
- pub fn read_file_to_string(path: &str) -> io::Result<String> {
- fs::read_to_string(path)
- }
-
- pub fn write_string_to_file(path: &str, content: &str) -> io::Result<()> {
- let mut file = fs::File::create(path)?;
- file.write_all(content.as_bytes())
- }
-}
-
-// 配置解析相关的实用工具函数
-pub mod config_parser {
- use std::collections::HashMap;
-
- pub fn parse_config(content: &str) -> HashMap<String, String> {
- let mut config = HashMap::new();
- for line in content.lines() {
- let mut parts = line.splitn(2, '=');
- if let (Some(key), Some(value)) = (parts.next(), parts.next()) {
- config.insert(key.trim().to_string(), value.trim().to_string());
- }
- }
- config
- }
-} \ No newline at end of file