From 34433795b5a96d72824d3c388ad6f77ea6eac66e Mon Sep 17 00:00:00 2001 From: WuBoytH Date: Wed, 9 Oct 2024 13:28:12 -0700 Subject: [PATCH] Build Updates (#591) * ignore ds store * 13.0.3 offsets * fix build errors --- Cargo.toml | 2 -- crates/menus/Cargo.toml | 2 +- crates/menus/src/arcadia/mod.rs | 6 +++--- crates/menus/src/config/mod.rs | 2 +- crates/menus/src/workspaces/mod.rs | 2 +- src/api/lua.rs | 6 +++--- src/lib.rs | 1 - src/lua/lua.rs | 2 +- 8 files changed, 10 insertions(+), 13 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index 98d873b2b..5d3ed03e6 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -66,10 +66,8 @@ config = { path = "crates/config" } menus = { path = "crates/menus", optional = true } [patch.crates-io] -nnsdk = { git = "https://github.com/ultimate-research/nnsdk-rs"} # Specifying latest commit because git only doesn't use latest changes native-tls = { git = "https://github.com/skyline-rs/rust-native-tls", rev = "f202fca" } -crc32fast = { git = "https://github.com/srijs/rust-crc32fast", rev = "e9c65bd" } [features] default = ["online", "ui"] diff --git a/crates/menus/Cargo.toml b/crates/menus/Cargo.toml index 086b6cc28..407943f88 100644 --- a/crates/menus/Cargo.toml +++ b/crates/menus/Cargo.toml @@ -9,7 +9,7 @@ edition = "2021" serde = { version = "1.0", features = ["derive"] } serde_json = "1.0" toml = "0.5.11" -skyline-web = "0.1" +skyline-web = { git = "https://github.com/skyline-rs/skyline-web" } skyline-config = { git = "https://github.com/skyline-rs/skyline-config" } log = "0.4.19" smash-arc = { git = "https://github.com/jam1garner/smash-arc" } diff --git a/crates/menus/src/arcadia/mod.rs b/crates/menus/src/arcadia/mod.rs index 9cd64e36d..0b5bcebda 100644 --- a/crates/menus/src/arcadia/mod.rs +++ b/crates/menus/src/arcadia/mod.rs @@ -84,7 +84,7 @@ pub fn get_mods(presets: &HashSet) -> Vec { description: Some(res.description.unwrap_or_default().replace('\n', "
")), }, Err(e) => { - skyline_web::DialogOk::ok(format!("The following info.toml is not valid: \n\n* '{}'\n\nError: {}", folder_name, e,)); + skyline_web::dialog_ok::DialogOk::ok(format!("The following info.toml is not valid: \n\n* '{}'\n\nError: {}", folder_name, e,)); default_entry }, }; @@ -100,7 +100,7 @@ pub fn show_arcadia(workspace: Option) { let umm_path = utils::paths::mods(); if !umm_path.exists() { - skyline_web::DialogOk::ok("It seems the directory specified in your configuration does not exist."); + skyline_web::dialog_ok::DialogOk::ok("It seems the directory specified in your configuration does not exist."); return; } let workspace_name: String = @@ -215,7 +215,7 @@ pub fn show_arcadia(workspace: Option) { if new_presets != presets { // Acquire the filesystem so we can check if it's already finished or not (for boot-time mod manager) // if let Some(_filesystem) = crate::GLOBAL_FILESYSTEM.try_read() { - if active_workspace.eq(&workspace_name) && skyline_web::Dialog::yes_no("Your preset has successfully been updated!
Your changes will take effect on the next boot.
Would you like to reboot the game to reload your mods?") { + if active_workspace.eq(&workspace_name) && skyline_web::dialog::Dialog::yes_no("Your preset has successfully been updated!
Your changes will take effect on the next boot.
Would you like to reboot the game to reload your mods?") { unsafe { skyline::nn::oe::RequestToRelaunchApplication() }; } // } diff --git a/crates/menus/src/config/mod.rs b/crates/menus/src/config/mod.rs index 0c9cca40e..e7bbe607e 100644 --- a/crates/menus/src/config/mod.rs +++ b/crates/menus/src/config/mod.rs @@ -131,7 +131,7 @@ pub fn show_config_editor(storage: &mut StorageHolder) { storage.flush(); if reboot_required { - skyline_web::DialogOk::ok( + skyline_web::dialog_ok::DialogOk::ok( "Some important fields in the configuration have been changed.
Smash will now reboot to reload ARCropolis with the new changes.", ); unsafe { skyline::nn::oe::RequestToRelaunchApplication() }; diff --git a/crates/menus/src/workspaces/mod.rs b/crates/menus/src/workspaces/mod.rs index abab9a7f1..b581a3bde 100644 --- a/crates/menus/src/workspaces/mod.rs +++ b/crates/menus/src/workspaces/mod.rs @@ -112,7 +112,7 @@ pub fn show_workspaces() { if active_workspace.ne(&prev_set_workspace) { // if let Some(_filesystem) = crate::GLOBAL_FILESYSTEM.try_read() { - if skyline_web::Dialog::yes_no(format!("Your active workspace has successfully been changed to {}!
Your changes will take effect on the next boot.
Would you like to reboot the game to reload your mods?", active_workspace)) { + if skyline_web::dialog::Dialog::yes_no(format!("Your active workspace has successfully been changed to {}!
Your changes will take effect on the next boot.
Would you like to reboot the game to reload your mods?", active_workspace)) { unsafe { skyline::nn::oe::RequestToRelaunchApplication() }; } // } diff --git a/src/api/lua.rs b/src/api/lua.rs index ed32193b5..4a43c19e1 100644 --- a/src/api/lua.rs +++ b/src/api/lua.rs @@ -2,7 +2,7 @@ use crate::lua::lua::{lua_state, luaL_Reg_container, luaL_Reg_from_api}; use std::ffi::CString; #[no_mangle] -pub extern "C" fn arcorp_add_lua_menu_manager(name: *mut u8, reg_vec_ptr: *mut luaL_Reg_from_api, reg_vec_size: usize, reg_vec_cap: usize) -> bool { +pub extern "C" fn arcorp_add_lua_menu_manager(name: *mut i8, reg_vec_ptr: *mut luaL_Reg_from_api, reg_vec_size: usize, reg_vec_cap: usize) -> bool { debug!("arcorp_add_lua_menu_manager -> Function called"); unsafe { match CString::from_raw(name).to_str() { @@ -28,7 +28,7 @@ pub extern "C" fn arcorp_add_lua_menu_manager(name: *mut u8, reg_vec_ptr: *mut l } #[no_mangle] -pub extern "C" fn arcorp_add_lua_ingame_manager(name: *mut u8, reg_vec_ptr: *mut luaL_Reg_from_api, reg_vec_size: usize, reg_vec_cap: usize) -> bool { +pub extern "C" fn arcorp_add_lua_ingame_manager(name: *mut i8, reg_vec_ptr: *mut luaL_Reg_from_api, reg_vec_size: usize, reg_vec_cap: usize) -> bool { debug!("arcorp_add_lua_ingame_manager -> Function called"); unsafe { match CString::from_raw(name).to_str() { @@ -95,7 +95,7 @@ pub extern "C" fn arcrop_lua_state_push_nil(lua_state: &mut lua_state) { } #[no_mangle] -pub extern "C" fn arcrop_lua_state_push_string(lua_state: &mut lua_state, str: *mut u8) { +pub extern "C" fn arcrop_lua_state_push_string(lua_state: &mut lua_state, str: *mut i8) { debug!("arcrop_lua_state_push_string -> Function called"); unsafe { lua_state.push_string(CString::from_raw(str).to_str().expect("Failed to get string from str pointer!")); } } \ No newline at end of file diff --git a/src/lib.rs b/src/lib.rs index f3185010c..3a0857616 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -7,7 +7,6 @@ #![feature(string_remove_matches)] // #![feature(fs_try_exists)] #![feature(int_roundings)] -#![feature(stdsimd)] #![feature(lazy_cell)] use std::{ diff --git a/src/lua/lua.rs b/src/lua/lua.rs index ae2bc3d59..9cf62c426 100644 --- a/src/lua/lua.rs +++ b/src/lua/lua.rs @@ -72,7 +72,7 @@ pub struct luaL_Reg_container { #[repr(C)] #[derive(Debug)] pub struct luaL_Reg_from_api { - pub name: *mut u8, + pub name: *mut i8, pub func: LuaCfunction, }