Skip to content

Commit

Permalink
Merge pull request #736 from LavaGang/alpha-development
Browse files Browse the repository at this point in the history
MelonLoader v0.6.5
  • Loading branch information
HerpDerpinstine authored Sep 4, 2024
2 parents 062eee6 + 498e1eb commit bed7261
Show file tree
Hide file tree
Showing 175 changed files with 1,591 additions and 899 deletions.
41 changes: 28 additions & 13 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -118,6 +118,9 @@ jobs:
toolchain: nightly
# Target triple to install for this toolchain
targets: x86_64-unknown-linux-gnu
- name: update environment
shell: bash
run: sudo apt-get update
- name: install dev dependencies
shell: bash
run: sudo apt-get install libgtk-3-dev
Expand Down Expand Up @@ -171,8 +174,10 @@ jobs:
shell: cmd
run: |
echo Copying Managed Libs...
mkdir Output\Debug\x64\MelonLoader\Managed\
xcopy BaseLibs\Managed Output\Debug\x64\MelonLoader\Managed\ /E /H /Y
mkdir Output\Debug\x64\MelonLoader\Dependencies\Mono
xcopy BaseLibs\Mono Output\Debug\x64\MelonLoader\Dependencies\Mono\ /E /H /Y
xcopy BaseLibs\net35 Output\Debug\x64\MelonLoader\net35\ /E /H /Y
xcopy BaseLibs\net6 Output\Debug\x64\MelonLoader\net6\ /E /H /Y
echo.
echo Copying Dobby x64...
xcopy BaseLibs\dobby_x64.dll Output\Debug\x64\dobby.dll*
Expand Down Expand Up @@ -213,8 +218,10 @@ jobs:
shell: cmd
run: |
echo Copying Managed Libs...
mkdir Output\Debug\x86\MelonLoader\Managed\
xcopy BaseLibs\Managed Output\Debug\x86\MelonLoader\Managed\ /E /H /Y
mkdir Output\Debug\x86\MelonLoader\Dependencies\Mono
xcopy BaseLibs\Mono Output\Debug\x86\MelonLoader\Dependencies\Mono\ /E /H /Y
xcopy BaseLibs\net35 Output\Debug\x86\MelonLoader\net35\ /E /H /Y
xcopy BaseLibs\net6 Output\Debug\x86\MelonLoader\net6\ /E /H /Y
echo.
echo Copying Dobby x86...
xcopy BaseLibs\dobby_x86.dll Output\Debug\x86\dobby.dll*
Expand Down Expand Up @@ -255,8 +262,10 @@ jobs:
shell: cmd
run: |
echo Copying Managed Libs...
mkdir Output\Release\x64\MelonLoader\Managed\
xcopy BaseLibs\Managed Output\Release\x64\MelonLoader\Managed\ /E /H /Y
mkdir Output\Release\x64\MelonLoader\Dependencies\Mono
xcopy BaseLibs\Mono Output\Release\x64\MelonLoader\Dependencies\Mono\ /E /H /Y
xcopy BaseLibs\net35 Output\Release\x64\MelonLoader\net35\ /E /H /Y
xcopy BaseLibs\net6 Output\Release\x64\MelonLoader\net6\ /E /H /Y
echo.
echo Copying Dobby x64...
xcopy BaseLibs\dobby_x64.dll Output\Release\x64\dobby.dll*
Expand Down Expand Up @@ -297,11 +306,13 @@ jobs:
shell: cmd
run: |
echo Copying Managed Libs...
mkdir Output\Release\x86\MelonLoader\Managed\
xcopy BaseLibs\Managed Output\Release\x86\MelonLoader\Managed\ /E /H /Y
mkdir Output\Release\x86\MelonLoader\Dependencies\Mono
xcopy BaseLibs\Mono Output\Release\x86\MelonLoader\Dependencies\Mono\ /E /H /Y
xcopy BaseLibs\net35 Output\Release\x86\MelonLoader\net35\ /E /H /Y
xcopy BaseLibs\net6 Output\Release\x86\MelonLoader\net6\ /E /H /Y
echo.
echo Copying Dobby x86...
echo F | xcopy BaseLibs\dobby_x86.dll Output\Release\x86\dobby.dll*
xcopy BaseLibs\dobby_x86.dll Output\Release\x86\dobby.dll*
echo.
echo Copying documentation files...
copy NOTICE.txt Output\Release\x86
Expand Down Expand Up @@ -339,8 +350,10 @@ jobs:
shell: cmd
run: |
echo Copying Managed Libs...
mkdir Output\Debug\x64\MelonLoader\Managed\
xcopy BaseLibs\Managed Output\Debug\x64\MelonLoader\Managed\ /E /H /Y
mkdir Output\Debug\x64\MelonLoader\Dependencies\Mono
xcopy BaseLibs\Mono Output\Debug\x64\MelonLoader\Dependencies\Mono\ /E /H /Y
xcopy BaseLibs\net35 Output\Debug\x64\MelonLoader\net35\ /E /H /Y
xcopy BaseLibs\net6 Output\Debug\x64\MelonLoader\net6\ /E /H /Y
echo.
echo Copying documentation files...
copy NOTICE.txt Output\Debug\x64
Expand Down Expand Up @@ -378,8 +391,10 @@ jobs:
shell: cmd
run: |
echo Copying Managed Libs...
mkdir Output\Release\x64\MelonLoader\Managed\
xcopy BaseLibs\Managed Output\Release\x64\MelonLoader\Managed\ /E /H /Y
mkdir Output\Release\x64\MelonLoader\Dependencies\Mono
xcopy BaseLibs\Mono Output\Release\x64\MelonLoader\Dependencies\Mono\ /E /H /Y
xcopy BaseLibs\net35 Output\Release\x64\MelonLoader\net35\ /E /H /Y
xcopy BaseLibs\net6 Output\Release\x64\MelonLoader\net6\ /E /H /Y
echo.
echo Copying documentation files...
copy NOTICE.txt Output\Release\x64
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/nuget.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ jobs:
steps:
- uses: actions/checkout@v4
- name: Setup .NET
uses: actions/[email protected].0
uses: actions/[email protected].1
with:
dotnet-version: 7.0.x
- name: .NET Pack
Expand All @@ -23,4 +23,4 @@ jobs:
uses: actions/upload-artifact@v4
with:
name: MelonLoaderNuGetPackage
path: MelonLoader/Output/Release/MelonLoader/LavaGang.MelonLoader.0.6.4.nupkg
path: MelonLoader/Output/Release/MelonLoader/LavaGang.MelonLoader.0.6.5.nupkg
Binary file not shown.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
41 changes: 41 additions & 0 deletions BaseLibs/net6/UnityEngine.Il2CppAssetBundleManager.deps.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
{
"runtimeTarget": {
"name": ".NETCoreApp,Version=v6.0",
"signature": ""
},
"compilationOptions": {},
"targets": {
".NETCoreApp,Version=v6.0": {
"UnityEngine.Il2CppAssetBundleManager/1.0.0": {
"dependencies": {
"LavaGang.MelonLoader": "0.6.4"
},
"runtime": {
"UnityEngine.Il2CppAssetBundleManager.dll": {}
}
},
"LavaGang.MelonLoader/0.6.4": {
"runtime": {
"lib/net6.0/MelonLoader.dll": {
"assemblyVersion": "0.6.4.0",
"fileVersion": "0.6.4.0"
}
}
}
}
},
"libraries": {
"UnityEngine.Il2CppAssetBundleManager/1.0.0": {
"type": "project",
"serviceable": false,
"sha512": ""
},
"LavaGang.MelonLoader/0.6.4": {
"type": "package",
"serviceable": true,
"sha512": "sha512-Ydn7Kn9pPbBY+/VaWsROY2UfAMu6c8rPvAop1TR0R9wOTns02UyIJjvbnQ+pWOgUanw4Orx32syndtoTkSLGew==",
"path": "lavagang.melonloader/0.6.4",
"hashPath": "lavagang.melonloader.0.6.4.nupkg.sha512"
}
}
}
Binary file not shown.
41 changes: 41 additions & 0 deletions BaseLibs/net6/UnityEngine.Il2CppImageConversionManager.deps.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
{
"runtimeTarget": {
"name": ".NETCoreApp,Version=v6.0",
"signature": ""
},
"compilationOptions": {},
"targets": {
".NETCoreApp,Version=v6.0": {
"UnityEngine.Il2CppImageConversionManager/1.0.0": {
"dependencies": {
"LavaGang.MelonLoader": "0.6.4"
},
"runtime": {
"UnityEngine.Il2CppImageConversionManager.dll": {}
}
},
"LavaGang.MelonLoader/0.6.4": {
"runtime": {
"lib/net6.0/MelonLoader.dll": {
"assemblyVersion": "0.6.4.0",
"fileVersion": "0.6.4.0"
}
}
}
}
},
"libraries": {
"UnityEngine.Il2CppImageConversionManager/1.0.0": {
"type": "project",
"serviceable": false,
"sha512": ""
},
"LavaGang.MelonLoader/0.6.4": {
"type": "package",
"serviceable": true,
"sha512": "sha512-Ydn7Kn9pPbBY+/VaWsROY2UfAMu6c8rPvAop1TR0R9wOTns02UyIJjvbnQ+pWOgUanw4Orx32syndtoTkSLGew==",
"path": "lavagang.melonloader/0.6.4",
"hashPath": "lavagang.melonloader.0.6.4.nupkg.sha512"
}
}
}
Binary file not shown.
2 changes: 1 addition & 1 deletion Bootstrap/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -29,4 +29,4 @@ windows = { version = "0.52.0", features = [
]}

[lib]
crate-type = ["cdylib"]
crate-type = ["dylib"]
8 changes: 6 additions & 2 deletions Bootstrap/src/base_assembly/mono.rs
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,7 @@ pub fn init(runtime: &FerrexRuntime) -> Result<(), DynErr> {
let _runtime_dir = paths::runtime_dir()?;

//get MelonLoader.dll's path and confirm it exists
let mut melonloader_dll = melonenv::paths::MELONLOADER_FOLDER.clone();
melonloader_dll.extend(&["net35", "MelonLoader.dll"]);
let mut melonloader_dll = _runtime_dir.join("MelonLoader.dll");

if !melonloader_dll.exists() {
return Err("MelonLoader.dll not found".into());
Expand Down Expand Up @@ -84,6 +83,9 @@ pub fn start() -> Result<(), DynErr> {
}

fn preload(runtime: &FerrexRuntime) -> Result<(), DynErr> {

debug!("Initializing Preload")?;

if !melonenv::paths::PRELOAD_DLL.exists() {
return Err("Preload.dll not found".into());
}
Expand All @@ -93,5 +95,7 @@ fn preload(runtime: &FerrexRuntime) -> Result<(), DynErr> {
.get_method("Initialize", 0, runtime)?
.invoke(None, None, runtime)?;

debug!("Preload Initialized!")?;

Ok(())
}
26 changes: 16 additions & 10 deletions Bootstrap/src/constants.rs
Original file line number Diff line number Diff line change
Expand Up @@ -18,26 +18,32 @@ pub type InvokeFnIl2Cpp = extern "C" fn(
pub type InitFnMono = extern "C" fn(*const c_char, *const c_char) -> *mut MonoDomain;
pub type InitFnIl2Cpp = extern "C" fn(*const c_char) -> *mut Il2CppDomain;

pub const MELON_VERSION: &str = "0.6.4";
pub const MELON_VERSION: &str = "0.6.5";

pub const IS_ALPHA: bool = false;

pub const RED: Color = Color::TrueColor {
r: (255),
g: (0),
b: (0),
r: (205),
g: (92),
b: (92),
};

pub const GREEN: Color = Color::TrueColor {
r: (0),
g: (255),
b: (0),
r: (50),
g: (205),
b: (50),
};

pub const BLUE: Color = Color::TrueColor {
r: (64),
g: (64),
b: (255),
r: (100),
g: (149),
b: (237),
};

pub const YELLOW: Color = Color::TrueColor {
r: (255),
g: (255),
b: (0),
};

#[derive(Debug, Clone, Copy)]
Expand Down
2 changes: 1 addition & 1 deletion Bootstrap/src/logging/logger.rs
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ pub fn log_console_file(level: LogLevel, message: &str) -> Result<(), LogError>

let file_string = format!("[{}] [WARNING] {}", timestamp(), message);

println!("{}", console_string.bright_yellow());
println!("{}", console_string.color(constants::YELLOW));

write(&file_string).map_err(|_| LogError::FailedToWriteToLog)?;
}
Expand Down
2 changes: 1 addition & 1 deletion Bootstrap/src/melonenv/paths.rs
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ pub fn get_managed_dir() -> Result<PathBuf, DynErr> {
match managed_path.exists() {
true => Ok(managed_path),
false => {
let managed_path = base_folder.join("MelonLoader").join("Managed");
let managed_path = base_folder.join("MelonLoader").join("Dependencies").join("Mono");

match managed_path.exists() {
true => Ok(managed_path),
Expand Down
36 changes: 36 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
| Versions: |
| - |
| [v0.6.5](#v065) |
| [v0.6.4](#v064) |
| [v0.6.3](#v063) |
| [v0.6.2](#v062) |
Expand Down Expand Up @@ -36,6 +37,41 @@

---

### v0.6.5

1. Replaced [BepInEx/Il2CppInterop](https://github.com/BepInEx/Il2CppInterop) with [ds5678/Il2CppInterop](https://github.com/ds5678/Il2CppInterop)
2. Updated Il2CppInterop to 1.5.4
3. Updated Cpp2IL to 2022.1.0-pre-release.18
4. Updated AsmResolver to 6.0.0-beta.1
5. Updated AssetRipper.VersionUtilities to 1.5.0
6. Updated AssetsTools.NET to 3.0.0
7. Updated UnityEngine.Il2CppAssetBundleManager for latest compatibility
8. Updated UnityEngine.Il2CppImageConversionManager for latest compatibility
9. Implemented `--cpp2il.callanalyzer` launch option to enable Cpp2IL's CallAnalyzer processor
10. Implemented `--cpp2il.nativemethoddetector` launch option to enable Cpp2IL's NativeMethodDetector processor
11. Implemented several fixes for Il2CppInterop related issues
12. Implemented Cpp2IL's StrippedCodeRegSupport plugin
13. Implemented `ExternalArguments` Dictionary for MelonLaunchOptions (Credits to [HAHOOS](https://github.com/HAHOOS) :P)
14. Implemented `Peek` Method for LemonEnumerator
15. Fixed an accidental regression with LemonSHA256
16. Fixed an issue with Native logs using the wrong Colors
17. Fixed an issue with Preload module not replacing Mono libraries on Older Mono Games
18. Fixed an issue with MonoMod DetourContext Disposal not working properly
19. Fixed an issue with Debugger Launch Option causing crashes
20. Fixed an issue with Console not having the Game Name and Version in the title
21. Fixed an issue with Sharing Violation during Log Initialization
22. Fixed an issue with `--melonloader.basedir` launch option always expecting an `=` sign before the path
23. Fixed an issue with Il2CppInteropFixes not being properly error handled
24. Fixed an issue with Il2CppInteropFixes using `il2cpp_type_get_class_or_element_class` instead of `il2cpp_class_from_type`
25. Fixed an issue with EOS Support Module not being properly error handled
26. Fixed an issue with NativeStackWalk not unregistering addresses
27. Fixed an issue with Errors being Spammed if `UnityEngine.Transform::SetAsLastSibling` fails to resolve
28. Fixed an issue with MelonLaunchOptions failing to parse arguments if an `=` sign is used instead of a space
29. Fixed an issue with MelonLaunchOptions failing to parse options if a `-` prefix is used instead of `--`
30. Fixed an issue with Command Line Arguments not being logged

---

### v0.6.4

1. Removed Analytics Blocker for causing crashes, will be ported to its own Plugin
Expand Down
Loading

0 comments on commit bed7261

Please sign in to comment.