aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/src/main.rs
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/main.rs
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/main.rs')
-rw-r--r--src/main.rs39
1 files changed, 0 insertions, 39 deletions
diff --git a/src/main.rs b/src/main.rs
deleted file mode 100644
index 9161263..0000000
--- a/src/main.rs
+++ /dev/null
@@ -1,39 +0,0 @@
-mod core;
-mod launcher;
-mod ui;
-
-use tokio::sync::mpsc;
-use tokio::runtime::Runtime;
-use std::thread;
-
-fn main() {
- // channel for UI -> Backend
- let (tx, mut rx) = mpsc::channel(32);
-
- // Spawn Tokio runtime in a background thread
- thread::spawn(move || {
- let rt = Runtime::new().unwrap();
- rt.block_on(async move {
- println!("Backend started");
- while let Some(msg) = rx.recv().await {
- match msg {
- ui::UiEvent::StartGame => {
- println!("Backend received StartGame");
- match core::manifest::fetch_version_manifest().await {
- Ok(manifest) => {
- println!("Fetched manifest. Latest release: {}", manifest.latest.release);
- println!("Latest snapshot: {}", manifest.latest.snapshot);
- }
- Err(e) => {
- eprintln!("Error fetching manifest: {}", e);
- }
- }
- }
- }
- }
- });
- });
-
- // Run UI on main thread (must be main thread for GTK on some platforms)
- ui::init(tx);
-}