Skip to content

Commit

Permalink
Add check for missing DataModelPatch, specify what binary we are inst…
Browse files Browse the repository at this point in the history
…alling to notification
  • Loading branch information
WaviestBalloon committed Jan 11, 2024
1 parent 320489e commit ebde19b
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 4 deletions.
2 changes: 1 addition & 1 deletion Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

12 changes: 10 additions & 2 deletions src/args/launch.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
use crate::utils::{argparse, installation, notification::create_notification, setup, terminal::*, rpc, configuration, steamos};
use crate::args;
use std::process;
use std::{process, path::Path};
use inotify::{Inotify, WatchMask};

static ACCEPTED_PARAMS: [(&str, &str); 6] = [
Expand Down Expand Up @@ -76,7 +76,7 @@ pub fn main(raw_args: &[(String, String)]) {

warning!("Unable to find a Roblox installation, bootstrapping now...");
status!("Downloading and installing latest version...");
create_notification(&format!("{}/assets/crudejuice.png", dir_location), 15000, "Installing Roblox...", "");
create_notification(&format!("{}/assets/crudejuice.png", dir_location), 15000, &format!("Installing Roblox {}...", binary), "");

// TODO: Remove this, as Roblox has now locked all non-prod deployment channels :c
let channel = match configuration["misc"]["overrides"]["deployment_channel"].as_str() {
Expand Down Expand Up @@ -147,6 +147,14 @@ pub fn main(raw_args: &[(String, String)]) {
}

status!("Launching Roblox...");
if binary == "Studio" { // Do a check if DataModelPatch.rbxm exists, if not, Studio might have issues when running (See: https://devforum.roblox.com/t/no-verified-patch-could-be-loaded/1797937/42?u=waviestballoon)
let data_model_patch_path = format!("{}/ExtraContent/models/DataModelPatch/DataModelPatch.rbxm", install_path);
help!("{}", data_model_patch_path);
if !Path::new(&data_model_patch_path).exists() {
warning!("DataModelPatch.rbxm does not exist, Studio may have issues when running!");
create_notification("dialog-warning", 30000, "Missing critical file", "DataModelPatch.rbxm does not exist, Studio may have issues when running! Reinstalling Studio may fix this issue");
}
}
if studio_oauthing {
create_notification(
&format!("{}/assets/studio.png", dir_location),
Expand Down
2 changes: 1 addition & 1 deletion src/utils/notification.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ use crate::utils::terminal::*;
use notify_rust::Notification;

pub fn create_notification(icon: &str, expire_time: i32, title: &str, body: &str) {
help!("Notice: {body}");
help!("{title}: {body}");
let _ = Notification::new()
.summary(title)
.body(body)
Expand Down

0 comments on commit ebde19b

Please sign in to comment.