summaryrefslogtreecommitdiffstats
path: root/src/core/file_sys/patch_manager.cpp (unfollow)
Commit message (Collapse)AuthorFilesLines
2023-08-21patch_manager: apply manual HTML patches when presentLiam1-1/+8
2023-08-15vfs: expand support for NCA readingLiam1-18/+21
2023-07-21configure_system: Implement with for looplat9nq1-2/+2
2023-06-16patch_manager: remove unnecessary GetSize callsLiam1-5/+4
2023-06-03Fix typoKevin Sundqvist Norlén1-1/+1
Co-authored-by: liamwhite <liamwhite@users.noreply.github.com>
2023-06-03Pick game icon based on the configured system languageKeve12271-1/+32
2023-06-03vfs: add vfs_cached for romfs buildLiam1-2/+3
2022-08-21core/file_sys: fix alignment of BuildIdLiam1-2/+2
2022-08-19core/file_sys: fix BuildId paddingLiam1-8/+6
2022-04-23general: Convert source file copyright comments over to SPDXMorph1-3/+2
This formats all copyright comments according to SPDX formatting guidelines. Additionally, this resolves the remaining GPLv2 only licensed files by relicensing them to GPLv2.0-or-later.
2022-04-07patch_manager: Apply layered exefs patches from 'atmosphere' SD directorytech-ticks1-25/+38
2022-03-20general: Fix clang/gcc build errorsameerj1-0/+4
2022-03-19core: Reduce unused includesameerj1-1/+0
2022-02-15Dump patched exefs rather than baseKelebek11-9/+9
2021-06-28patch_manager: Do not apply LayeredFS mods when dumpingMorph1-2/+4
We should not apply any mods when dumping a game's RomFS.
2021-06-28core: Simplify SDMC mod loadinglat9nq1-19/+6
If someone else wants to support other mod formats in the SDMC directory, that can be added later. For now, just allow RomFS modding here and force people to do other types of mods the old way. Addresses review comments. Co-authored-by: LC <mathew1800@gmail.com>
2021-06-28core: Support LayeredFS mod from SDMC directorylat9nq1-2/+29
Enables loading a mod directly from `[yuzu data directory]/sdmc/atmosphere/contents/[title_id]`. For use with some homebrew mod managers.
2021-05-26common: fs: Rework the Common Filesystem interface to make use of std::filesystem (#6270)Morph1-1/+0
* common: fs: fs_types: Create filesystem types Contains various filesystem types used by the Common::FS library * common: fs: fs_util: Add std::string to std::u8string conversion utility * common: fs: path_util: Add utlity functions for paths Contains various utility functions for getting or manipulating filesystem paths used by the Common::FS library * common: fs: file: Rewrite the IOFile implementation * common: fs: Reimplement Common::FS library using std::filesystem * common: fs: fs_paths: Add fs_paths to replace common_paths * common: fs: path_util: Add the rest of the path functions * common: Remove the previous Common::FS implementation * general: Remove unused fs includes * string_util: Remove unused function and include * nvidia_flags: Migrate to the new Common::FS library * settings: Migrate to the new Common::FS library * logging: backend: Migrate to the new Common::FS library * core: Migrate to the new Common::FS library * perf_stats: Migrate to the new Common::FS library * reporter: Migrate to the new Common::FS library * telemetry_session: Migrate to the new Common::FS library * key_manager: Migrate to the new Common::FS library * bis_factory: Migrate to the new Common::FS library * registered_cache: Migrate to the new Common::FS library * xts_archive: Migrate to the new Common::FS library * service: acc: Migrate to the new Common::FS library * applets/profile: Migrate to the new Common::FS library * applets/web: Migrate to the new Common::FS library * service: filesystem: Migrate to the new Common::FS library * loader: Migrate to the new Common::FS library * gl_shader_disk_cache: Migrate to the new Common::FS library * nsight_aftermath_tracker: Migrate to the new Common::FS library * vulkan_library: Migrate to the new Common::FS library * configure_debug: Migrate to the new Common::FS library * game_list_worker: Migrate to the new Common::FS library * config: Migrate to the new Common::FS library * configure_filesystem: Migrate to the new Common::FS library * configure_per_game_addons: Migrate to the new Common::FS library * configure_profile_manager: Migrate to the new Common::FS library * configure_ui: Migrate to the new Common::FS library * input_profiles: Migrate to the new Common::FS library * yuzu_cmd: config: Migrate to the new Common::FS library * yuzu_cmd: Migrate to the new Common::FS library * vfs_real: Migrate to the new Common::FS library * vfs: Migrate to the new Common::FS library * vfs_libzip: Migrate to the new Common::FS library * service: bcat: Migrate to the new Common::FS library * yuzu: main: Migrate to the new Common::FS library * vfs_real: Delete the contents of an existing file in CreateFile Current usages of CreateFile expect to delete the contents of an existing file, retain this behavior for now. * input_profiles: Don't iterate the input profile dir if it does not exist Silences an error produced in the log if the directory does not exist. * game_list_worker: Skip parsing file if the returned VfsFile is nullptr Prevents crashes in GetLoader when the virtual file is nullptr * common: fs: Validate paths for path length * service: filesystem: Open the mod load directory as read only
2021-04-15common: Move settings to common from core.bunnei1-1/+1
- Removes a dependency on core and input_common from common.
2020-12-08file_sys: Consolidate common Title ID operationsMorph1-2/+2
2020-11-18patch_manager: Remove usages of the global system instanceLioncash1-44/+37
With this, only 19 usages of the global system instance remain within the core library. We're almost there.
2020-10-13core/CMakeLists: Make some warnings errorsLioncash1-1/+1
Makes our error coverage a little more consistent across the board by applying it to Linux side of things as well. This also makes it more consistent with the warning settings in other libraries in the project. This also updates httplib to 0.7.9, as there are several warning cleanups made that allow us to enable several warnings as errors.
2020-09-15cheat_engine: Remove unnecessary system argument to CheatParser's Parse functionLioncash1-9/+5
This isn't used within the function at all in any implementations, so we can remove it entirely.
2020-09-15patch_manager: Resolve implicit truncations in FormatTitleVersion()Lioncash1-3/+4
We make it explicit that we're truncating arithmetic here to resolve compiler warnings (even if the sizes weren't u32/u64 arithmetic generally promotes to int :<)
2020-09-15patch_manager: Make use of type aliasesLioncash1-53/+59
We can use these to avoid typing the same type redundantly. This way, if these ever change, only a single location needs to be modified.
2020-09-15patch_manager: Make a few functions internally linkedLioncash1-3/+12
These functions are only used within this translation unit, so we can make them internally linked.
2020-08-23file_sys: Replace inclusions with forward declarations where applicableLioncash1-2/+1
Same behavior, minus unnecessary inclusions where not necessary.
2020-08-03patch_manager: Resolve -Wignored-qualifier warningsLioncash1-2/+2
Top level const will always be ignored in this case, so it can be removed.
2020-05-28Make copying directory string more conciselat9nq1-2/+1
2020-05-28Address requested changeslat9nq1-3/+3
2020-05-28*nix systems can read any-case patch directorieslat9nq1-8/+27
Changes many patch_manager functions to use a case-less variant of GetSubdirectory. Fixes patches not showing up on *nix systems when patch directories are named with odd cases, i.e. `exeFS'.
2020-04-17core: memory: Move to Core::Memory namespace.bunnei1-4/+4
- helpful to disambiguate Kernel::Memory namespace.
2020-04-16CMakeLists: Specify -Wextra on linux buildsLioncash1-1/+2
Allows reporting more cases where logic errors may exist, such as implicit fallthrough cases, etc. We currently ignore unused parameters, since we currently have many cases where this is intentional (virtual interfaces). While we're at it, we can also tidy up any existing code that causes warnings. This also uncovered a few bugs as well.
2020-04-14file_sys: patch_manager: Return early when there are no layers to apply.bunnei1-0/+6
2019-11-28patch_manager: Adds check for disabled cheats to prevent them from being enabled (#3178)Morph1-5/+11
* Adds check for disabled cheats to prevent them from being added to the CheatList * Address feedback
2019-09-22dmnt_cheat_vm: Default initialize structure valuesZach Hilman1-2/+1
2019-09-22patch_manager: Update cheat parsing for new VMZach Hilman1-12/+17
2019-09-21yuzu: Port old usages of Filesystem namespace to FilesystemControllerZach Hilman1-8/+16
2019-09-21patch_manager: Add short-circuit edge-case to GetPatchVersionNamesZach Hilman1-0/+2
If title ID is 0, there are no add ons, prevents wasting time looking for them.
2019-09-21patch_manager: Add error checking to load dir to prevent crashesZach Hilman1-0/+15
Prevents a crash if the load dir would be nullptr, instead logs an error and returns appropriately.
2019-06-25patch_manager: Add getter for title versionZach Hilman1-0/+10
2019-06-12common/hex_util: Combine HexVectorToString() and HexArrayToString()Lioncash1-4/+4
These can be generified together by using a concept type to designate them. This also has the benefit of not making copies of potentially very large arrays.
2019-03-28patch_manager: Dump NSO name with build IDZach Hilman1-4/+5
2019-03-27core: Port current uses of RegisteredCache to ContentProviderZach Hilman1-6/+7
2019-03-22file_sys/cheat_engine: Remove use of global system accessorsLioncash1-7/+7
Instead, pass in the core timing instance and make the dependency explicit in the interface.
2019-03-22file_sys/patch_manager: Deduplicate NSO headerLioncash1-14/+8
This source file was utilizing its own version of the NSO header. Instead of keeping this around, we can have the patch manager also use the version of the header that we have defined in loader/nso.h
2019-03-22file_sys/patch_manager: Remove two magic valuesLioncash1-2/+5
These correspond to the NSOBuildHeader.
2019-03-05patch_manager: Display cheats in game list add-onsZach Hilman1-0/+2
2019-03-05patch_manager: Add support for loading cheats listsZach Hilman1-0/+52
Uses load/<title_id>/<mod_name>/cheats as root dir, file name is all upper or lower hex first 8 bytes build ID.
2018-12-11patch_manager: Prevent use of a dangling pointer within PatchRomFSLioncash1-4/+3
fmt::format() returns a std::string instance by value, so calling .c_str() on it here is equivalent to doing: auto* ptr = std::string{}.c_str(); The data being pointed to isn't guaranteed to actually be valid anymore after that expression ends. Instead, we can just take the string as is, and provide the necessary formatting parameters.
2018-12-03patch_manager: Obey disabled add-ons list when patching gameZach Hilman1-11/+45
2018-12-02filesystem: De-globalize registered_cache_unionLioncash1-10/+9
We can just return a new instance of this when it's requested. This only ever holds pointers to the existing registed caches, so it's not a large object. Plus, this also gets rid of the need to keep around a separate member function just to properly clear out the union. Gets rid of one of five globals in the filesystem code.
2018-11-21patch_manager: Show LayeredExeFS patch in add-ons columnZach Hilman1-3/+14
The decision was made to name them LayeredExeFS instead of just LayeredFS to differentiate from normal RomFS-based mods. The name may be long/unweildy, but conveys the meaning well.
2018-11-20patch_manager: Apply LayeredExeFS patchesZach Hilman1-0/+25
This will scan the <mod>/exefs dir for all files and then layer those on top of the game's exefs and use this as the new exefs. This allows for overriding of the compressed NSOs or adding new files. This does use the same dir as IPS/IPSwitch patch, but since the loader will not look for those they are ignored.
2018-11-20settings: Add option to dump ExeFS of games upon launchZach Hilman1-0/+9
When enabled, all exefs(es) will be copied to yuzu/dump/<title_id>/exefs.
2018-10-30global: Use std::optional instead of boost::optional (#1578)Frederic L1-5/+4
* get rid of boost::optional * Remove optional references * Use std::reference_wrapper for optional references * Fix clang format * Fix clang format part 2 * Adressed feedback * Fix clang format and MacOS build
2018-10-29patch_manager: Add support for dumping decompressed NSOsZach Hilman1-0/+13
When enabled in settings, PatchNSO will dump the unmodified NSO that it was passed to a file named <build id>.nso in the dump root for the current title ID.
2018-10-28file_sys/patch_manager: Remove unnecessary if-statements (#1586)Frederic L1-7/+6
* remove unnecessary if-statements * Addressed feedback
2018-10-17patch_manager: Add support for using LayeredFS with DataZach Hilman1-2/+3
2018-10-16file_sys/registered_cache: Use unique_ptr and regular pointers instead of shared_ptrs where applicableLioncash1-1/+1
The data retrieved in these cases are ultimately chiefly owned by either the RegisteredCache instance itself, or the filesystem factories. Both these should live throughout the use of their contained data. If they don't, it should be considered an interface/design issue, and using shared_ptr instances here would mask that, as the data would always be prolonged after the main owner's lifetime ended. This makes the lifetime of the data explicit and makes it harder to accidentally create cyclic references. It also makes the interface slightly more flexible than the previous API, as a shared_ptr can be created from a unique_ptr, but not the other way around, so this allows for that use-case if it ever becomes necessary in some form.
2018-10-13patch_manager: Move non-Program RomFS patch log to DebugZach Hilman1-2/+8
Normal Program-type patches will still be logged to aid in debugging, but for others (mainly Control), it was moved to Debug.
2018-10-09patch_manager: Return a std::unique_ptr from ParseControlNCA() and GetControlMetadata() instead of a std::shared_ptrLioncash1-8/+7
Neither of these functions require the use of shared ownership of the returned pointer. This makes it more difficult to create reference cycles with, and makes the interface more generic, as std::shared_ptr instances can be created from a std::unique_ptr, but the vice-versa isn't possible. This also alters relevant functions to take NCA arguments by const reference rather than a const reference to a std::shared_ptr. These functions don't alter the ownership of the memory used by the NCA instance, so we can make the interface more generic by not assuming anything about the type of smart pointer the NCA is contained within and make it the caller's responsibility to ensure the supplied NCA is valid.
2018-10-05romfs_factory: Extract packed update setter to new functionZach Hilman1-3/+4
2018-10-05patch_manager: Add support for NSP packed updatesZach Hilman1-2/+2
Reads as Update (NSP) in add-ons
2018-10-05patch_manager: Add support for packed updatesZach Hilman1-3/+12
Will prefer any installed update over the packed version.
2018-10-04patch_manager: Avoid romfs_ext requirement for patchingZach Hilman1-4/+1
2018-10-04fsmitm_romfsbuild: Extract stubs and IPS to romfs_ext dirZach Hilman1-1/+12
2018-10-04ips_layer: Fix inaccuracies with comments and flagsZach Hilman1-1/+1
Specifically bugs/crashes that arise when putting them in positions that are legal but not typical, such as midline, between patch data, or between patch records.
2018-10-04ips_layer: Deduplicate resource usageZach Hilman1-2/+4
2018-10-04patch_manager: Add support for IPSwitch format patchesZach Hilman1-22/+56
2018-10-02nso: Optimize loading of IPS patchesZach Hilman1-44/+37
Avoid resource-heavy classes and remove quasi-duplicated code.
2018-10-01patch_manager: Add PatchNSO functionZach Hilman1-0/+94
While PatchExeFS operated on the entire directory, this function operates on the uncompressed NSO. Avoids copying decompression code to PatchManager.
2018-10-01patch_manager: Use strings for patch type instead of enumZach Hilman1-19/+31
2018-10-01aoc_u: Extract AccumulateAOCTitleIDs to separate functionZach Hilman1-1/+2
2018-10-01aoc_u: Implement GetAddOnContentBaseIdZach Hilman1-2/+3
Command #5
2018-10-01patch_manager: Add DLC recognition to PatchManagerZach Hilman1-0/+26
2018-09-26patch_manager: Invert conditionals within ApplyLayeredFS()Lioncash1-27/+30
Avoids the need to nest code quite a bit by early-exiting in error cases.
2018-09-26vfs_concat/vfs_layered: Remove friend declarations from ConcatenatedVfsFileLioncash1-3/+2
Given these are only added to the class to allow those functions to access the private constructor, it's a better approach to just make them static functions in the interface, to make the dependency explicit.
2018-09-24fsmitm: Cleanup and modernize fsmitm portZach Hilman1-31/+35
2018-09-22patch_manager: Add LayeredFS mods supportZach Hilman1-1/+42
2018-09-20file-sys: Default heavy-weight class destructors in the cpp fileLioncash1-0/+2
Several classes have a lot of non-trivial members within them, or don't but likely should have the destructor defaulted in the cpp file for future-proofing/being more friendly to forward declarations. Leaving the destructor unspecified allows the compiler to inline the destruction code all over the place, which is generally undesirable from a code bloat perspective.
2018-09-15Port #4182 from Citra: "Prefix all size_t with std::"fearlessTobi1-2/+2
2018-09-06file_sys/patch_manager: Add missing includesLioncash1-0/+4
These includes were previously being satisfied indirectly.
2018-09-04bktr: Fix bucket overlap errorZach Hilman1-0/+3
2018-09-04patch_manager: Centralize Control-type NCA parsingZach Hilman1-20/+55
2018-09-04game_list: Fix version display on non-NAND titlesZach Hilman1-6/+22
2018-09-04bktr: Add logging on successful patchZach Hilman1-5/+17
2018-09-04bktr: Fix missing includes and optimize styleZach Hilman1-19/+16
2018-09-04file_sys: Add class to manage game patchesZach Hilman1-0/+90
Right now only includes Updates, but should eventually contain all of the other patches we need.