180 Commits
Author SHA1 Message Date
aldelaro5 50dd462e60 v7: Catch BadImageFormatExceptions when reading an assembly stream (#993)
* Catch BadImageFormatExceptions when reading an assembly stream

* Catch and log other TypeLoader exceptions when examining a stream
2024-09-24 20:33:22 +02:00
aldelaro5andManlyMarco af5d93917c Make Logger.Listeners and Logger.Sources thread safe
Originally pull request #656

Co-authored-by: ManlyMarco <39247311+manlymarco@users.noreply.github.com>
2024-09-17 18:50:35 +02:00
Bepis 2a61b61497 Merge pull request #960 from aldelaro5/metaplugins
Implement patcher and plugin providers
2024-09-08 23:19:59 +10:00
aldelaro5 2474dce1a1 Use PascalCase for the cache versioning const 2024-09-04 11:58:52 -04:00
aldelaro5 ede28de4a5 Make the cache version a const 2024-09-04 11:54:53 -04:00
aldelaro5 ae4d7bb34c Actually write the cache version in SaveAssemblyCache 2024-09-04 11:46:18 -04:00
aldelaro5 d389ed8067 Add versioning to CachedAssembly 2024-09-03 21:09:52 -04:00
aldelaro5 be1beb5e13 Address code review round 5 2024-09-03 20:34:17 -04:00
ManlyMarco 6b38cee127 Fix failing to initialize if game's Data folder is just 'Data' (#975)
Any Unity game can have its _Data folder renamed to just Data and continue working just fine.
2024-09-02 13:26:49 +02:00
aldelaro5 c02ad9cd68 Add an obsolete property for compatibility 2024-09-02 07:23:10 -04:00
aldelaro5 e0a81dfdbd Rename Location to prevent compilation with it 2024-09-02 07:16:13 -04:00
aldelaro5 0a4f1d6d73 Accomodate breaking changes in preparation for api refactors 2024-09-01 17:14:59 -04:00
aldelaro5 24cf635e65 Ensure providers and plugins / patchers folders are created if they don't exist 2024-09-01 09:29:35 -04:00
aldelaro5 4597be006e Remove files caching from CachedPluginLoadContext, make it forward the call instead 2024-08-31 05:54:41 -04:00
aldelaro5 ba3fac94da Upgrade MonoMod to 22.7.31.1 to fix old mono preloader crashes (#973) 2024-08-31 11:07:51 +02:00
aldelaro5 40643ffdef Offload the load context caching to bepinex 2024-08-29 21:12:07 -04:00
aldelaro5 1f182c7770 Correct the symbols resolution and rename the method 2024-08-29 21:11:36 -04:00
aldelaro5 ee5918bd76 Address minor code review 2024-08-29 14:44:30 -04:00
aldelaro5 e2396d202b address code review round 3 2024-08-29 12:50:46 -04:00
aldelaro5 b729aee545 Address code review round 3 (first part) 2024-08-28 01:14:00 -04:00
aldelaro5 bfc539bd74 Address code review round 2 2024-08-25 12:03:33 -04:00
aldelaro5 b688bfa978 Add a Source property to PluginInfo
Also abstract an interface among the base plugins classes to make this easier
2024-08-23 23:06:54 -04:00
aldelaro5 d8dd404e52 Address code review 2024-08-23 15:40:22 -04:00
aldelaro5 4d47c3cd39 Address code review 2024-08-20 15:13:10 -04:00
aldelaro5 952c74f6fe Implement Patcher and plugin providers 2024-08-19 19:57:52 -04:00
aldelaro5 53625800b8 Upgrade Harmonyx, Iced and AssetRipper.Primitives packages (#953)
* Upgrade Harmonyx to 2.10.2

* Upgrade Iced to 1.21.0

* Upgrade AssetRipper.Primitives to 3.1.3
2024-08-12 21:54:02 +02:00
ghorsington 5796f53564 Bump Il2CppInterop, HarmonyX 2022-11-13 20:02:15 +02:00
ghorsington 684959d840 Bump Cpp2IL and Il2CppInterop 2022-09-30 20:33:50 +03:00
ghorsington b9fe507672 Use Assembly.LoadFrom for loading assemblies
Assembly.LoadFile is meant for a special case that is not relevant to BepInEx
2022-09-11 18:41:22 +03:00
js6pak 0d2cbe61bf Add chainloader events 2022-08-24 21:55:09 +02:00
ghorsington f7857c7994 Restructure project names and folder layout 2022-08-14 17:19:09 +03:00
ghorsington 579ee8511b Add extended Unity version resolver; reorganise projects
The new resolver resides in BepInEx.Unity.Core
The resolver is based on multiple heuristics and integrates all workarounds we currently use so this shouldn't be a breaking change
2022-08-14 17:19:09 +03:00
ghorsington 828ef20996 UnityMono: Resolve assemblies into memory using mono API
This fixes several issues with loading assemblies. In turn, this commit also removes old Location/CodeBase fixes since now assemblies are resolved automatically correctly.

Additionally, integrate the mono loader into preloading which fixes assembly location resolving
2022-08-14 17:19:08 +03:00
ghorsington f400445ba1 Refactor Unity -> UnityMono
Use runtime names for BepInEx modules instead of just the game engine
2022-08-14 17:19:08 +03:00
ghorsington d190b069a1 Restructure versioning and project configuration
To simplify versioning and configuration:

* Removed BepInEx.Shared
* Removed BuildInfoAttribute
* Moved shared configuration to Directory.Build.props
* Refactored to use VersionSuffix and SourceRevisionId for embedding BE and commit hash info
* Enabled debug info embedding
2022-08-14 17:19:06 +03:00
js6pak 5dce49007e ConsoleOut workaround isn't needed anymore 2022-08-14 17:18:58 +03:00
js6pak 3538abf277 Support macos 2022-08-14 17:18:58 +03:00
js6pak 12079aeb09 Improve ConsoleWindow exceptions 2022-08-14 17:18:58 +03:00
js6pak 1315427acd Fix console on wine 2022-08-14 17:18:58 +03:00
ghorsington b80f29784c BepInEx.IL2CPP: Fix mutex checks 2022-08-14 17:18:58 +03:00
ghorsington 8dc326c652 ConsoleManager: enable console by default 2022-08-14 17:18:58 +03:00
ghorsington a1c7f5c4b1 ConsoleManager: refactor useWinApiEncoder -> useManagedEncoder 2022-08-14 17:18:58 +03:00
ghorsington 57658bdbb7 BepInEx.IL2CPP: retarget to net6.0, switch to Il2CppInterop 2022-08-14 17:18:58 +03:00
ghorsington e473f08e0a ConfigFile: Fix visibility of Values
GetConfigEntries was obsoleted, but Values was never set to public (only explicitly implemented)
2022-08-09 21:23:17 +03:00
Bepis 0d7ba3a5cb Fix BepInEx 6 for Unity 4.x games and below 2022-08-04 16:20:16 +10:00
ghorsington e4c9ae4115 Expose LoadPlugins(string[]) for 3rd party tools
This is a temporary solution until metaplugins are available
2022-06-05 19:03:08 +03:00
ghorsington 6b7405e46b WindowsConsoleDriver: Don't quit if console cannot be allocated 2022-06-05 17:16:51 +03:00
ghorsington 4f2226f1db Add UnhollowedAssembliesPath config option and similar --unhollowed-path CLI arg 2022-06-05 17:16:18 +03:00
Kirai Chan 810e556bb7 Add protected visibility of ConfigEntryBase ctor 2022-04-21 02:05:05 -04:00
ghorsington 16a75479bb Bump package versions 2022-04-17 18:37:36 +03:00