Compare commits

..

No commits in common. "master" and "0.1.2" have entirely different histories.

4 changed files with 9 additions and 32 deletions

2
Cargo.lock generated
View File

@ -4,7 +4,7 @@ version = 4
[[package]] [[package]]
name = "CraftX" name = "CraftX"
version = "0.1.3" version = "0.1.2"
dependencies = [ dependencies = [
"base64 0.22.1", "base64 0.22.1",
"dirs", "dirs",

View File

@ -1,6 +1,6 @@
[package] [package]
name = "CraftX" name = "CraftX"
version = "0.1.3" version = "0.1.2"
edition = "2024" edition = "2024"
build = "build.rs" build = "build.rs"

View File

@ -1,18 +1,4 @@
<img align="left" width="100" height="100" src="https://w0n.zip/file/bWJVJa"> # XCraft - A Modern Minecraft Launcher
### XCraft
A Modern Minecraft Launcher
#
<div align="center">
<img src="https://w0n.zip/file/Xe0zXb">
<p>
<small>
Screenshot from Windows 10
</small>
</p>
</div>
XCraft is a custom Minecraft launcher written in Rust, designed to provide enhanced flexibility and customization. It supports a custom online mode, skin and cape editing, and seamless integration with MultiMC instances. XCraft is a custom Minecraft launcher written in Rust, designed to provide enhanced flexibility and customization. It supports a custom online mode, skin and cape editing, and seamless integration with MultiMC instances.
@ -27,8 +13,8 @@ XCraft is a custom Minecraft launcher written in Rust, designed to provide enhan
## Installation ## Installation
### Download Stable Build ### Download Stable Build
You can download the latest stable build of XCraft from releases section: You can download the latest stable build of XCraft from our Jenkins CI server:
[Download from Gitea](https://gitea.awain.net/alterwain/XCraft/releases/latest). [Download from Jenkins](https://jenkins.awain.net/job/XCraft/lastStableBuild/).
### Build from Source ### Build from Source
@ -56,7 +42,6 @@ To make your Minecraft server compatible with XCraft, install the [**XCraftAuth*
## Roadmap ## Roadmap
- [ ] Cross-platform support improvements - [ ] Cross-platform support improvements
- [ ] Fabric integration
## License ## License
This project is licensed under the MIT License. This project is licensed under the MIT License.

View File

@ -38,7 +38,7 @@ struct App {
impl ApplicationHandler for App { impl ApplicationHandler for App {
fn resumed(&mut self, event_loop: &ActiveEventLoop) { fn resumed(&mut self, event_loop: &ActiveEventLoop) {
let window = event_loop.create_window(Window::default_attributes().with_inner_size(LogicalSize::new(900, 600)).with_min_inner_size(LogicalSize::new(900, 600)).with_title("XCraft")).unwrap(); let window = event_loop.create_window(Window::default_attributes().with_inner_size(LogicalSize::new(900, 600)).with_min_inner_size(LogicalSize::new(900, 600)).with_title("XCraft")).unwrap();
let mut webview_builder = WebViewBuilder::new() let webview = WebViewBuilder::new()
.with_asynchronous_custom_protocol("xcraft".into(), move |_wid, request, responder| { .with_asynchronous_custom_protocol("xcraft".into(), move |_wid, request, responder| {
let uri = request.uri().to_string(); let uri = request.uri().to_string();
if let Ok(msg) = serde_json::from_slice(request.body()) { if let Ok(msg) = serde_json::from_slice(request.body()) {
@ -47,17 +47,9 @@ impl ApplicationHandler for App {
} }
let _ = SENDER.lock().unwrap().as_ref().unwrap().send((uri, None, responder)); let _ = SENDER.lock().unwrap().as_ref().unwrap().send((uri, None, responder));
}) })
.with_url("xcraft://custom/ui"); .with_url("xcraft://custom/ui")
.build(&window)
if !cfg!(debug_assertions) { .unwrap();
webview_builder = webview_builder.with_initialization_script(r#"
document.addEventListener("contextmenu", event => event.preventDefault());
"#);
}
let webview = webview_builder
.build(&window)
.unwrap();
self.window = Some(window); self.window = Some(window);
self.webview = Some(webview); self.webview = Some(webview);