mirror of
https://github.com/ModOrganizer2/usvfs.git
synced 2026-07-27 14:04:27 -07:00
Formatting and removing old files (#76)
This commit is contained in:
@@ -0,0 +1,41 @@
|
||||
---
|
||||
# We'll use defaults from the LLVM style, but with 4 columns indentation.
|
||||
BasedOnStyle: LLVM
|
||||
IndentWidth: 2
|
||||
---
|
||||
Language: Cpp
|
||||
DeriveLineEnding: false
|
||||
UseCRLF: true
|
||||
DerivePointerAlignment: false
|
||||
PointerAlignment: Left
|
||||
AlignConsecutiveAssignments: true
|
||||
AllowShortFunctionsOnASingleLine: Inline
|
||||
AllowShortIfStatementsOnASingleLine: Never
|
||||
AllowShortLambdasOnASingleLine: Empty
|
||||
AlwaysBreakTemplateDeclarations: Yes
|
||||
AccessModifierOffset: -2
|
||||
AlignTrailingComments: true
|
||||
SpacesBeforeTrailingComments: 2
|
||||
NamespaceIndentation: Inner
|
||||
MaxEmptyLinesToKeep: 1
|
||||
BreakBeforeBraces: Custom
|
||||
BraceWrapping:
|
||||
AfterCaseLabel: false
|
||||
AfterClass: true
|
||||
AfterControlStatement: false
|
||||
AfterEnum: true
|
||||
AfterFunction: true
|
||||
AfterNamespace: true
|
||||
AfterStruct: true
|
||||
AfterUnion: true
|
||||
AfterExternBlock: true
|
||||
BeforeCatch: false
|
||||
BeforeElse: false
|
||||
BeforeLambdaBody: false
|
||||
BeforeWhile: false
|
||||
IndentBraces: false
|
||||
SplitEmptyFunction: false
|
||||
SplitEmptyRecord: false
|
||||
SplitEmptyNamespace: true
|
||||
ColumnLimit: 88
|
||||
ForEachMacros: ['Q_FOREACH', 'foreach']
|
||||
@@ -0,0 +1 @@
|
||||
1c95b7452585e53ef97954248aed42480d5bb5de
|
||||
@@ -0,0 +1,7 @@
|
||||
# Set the default behavior, in case people don't have core.autocrlf set.
|
||||
* text=auto
|
||||
|
||||
# Explicitly declare text files you want to always be normalized and converted
|
||||
# to native line endings on checkout.
|
||||
*.cpp text eol=crlf
|
||||
*.h text eol=crlf
|
||||
@@ -9,7 +9,7 @@ on:
|
||||
types: [opened, synchronize, reopened]
|
||||
|
||||
env:
|
||||
VCPKG_BINARY_SOURCES: "clear;x-gha,readwrite"
|
||||
VCPKG_BINARY_SOURCES: clear;files,${{ github.workspace }}/vcpkg_cache,readwrite
|
||||
|
||||
jobs:
|
||||
build:
|
||||
@@ -32,11 +32,24 @@ jobs:
|
||||
- uses: actions/checkout@v4
|
||||
- uses: lukka/run-vcpkg@v11
|
||||
|
||||
- name: Restore vcpkg cache
|
||||
uses: actions/cache/restore@v4
|
||||
with:
|
||||
path: ${{ github.workspace }}/vcpkg_cache
|
||||
key: vcpkg-${{ matrix.arch }}-${{ matrix.config }}-${{ hashFiles('vcpkg.json') }}
|
||||
restore-keys: vcpkg-${{ matrix.arch }}-${{ matrix.config }}
|
||||
|
||||
# configure
|
||||
- run: cmake --preset vs2022-windows-${{ matrix.arch }} -B build_${{ matrix.arch }} "-DCMAKE_INSTALL_PREFIX=install/${{ matrix.config }}"
|
||||
env:
|
||||
VCPKG_ROOT: ${{ github.workspace }}/vcpkg
|
||||
|
||||
- name: Save vcpkg cache
|
||||
uses: actions/cache/save@v4
|
||||
with:
|
||||
path: ${{ github.workspace }}/vcpkg_cache
|
||||
key: vcpkg-${{ matrix.arch }}-${{ matrix.config }}-${{ hashFiles('vcpkg.json') }}
|
||||
|
||||
# build
|
||||
- run: cmake --build build_${{ matrix.arch }} --config ${{ matrix.config }} --target INSTALL
|
||||
env:
|
||||
|
||||
@@ -0,0 +1,17 @@
|
||||
name: Lint USVFS
|
||||
|
||||
on:
|
||||
push:
|
||||
pull_request:
|
||||
types: [opened, synchronize, reopened]
|
||||
|
||||
jobs:
|
||||
lint:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
- name: Check format
|
||||
uses: ModOrganizer2/check-formatting-action@master
|
||||
with:
|
||||
check-path: "."
|
||||
exclude-regex: "third-party"
|
||||
@@ -30,3 +30,5 @@ msbuild.log
|
||||
/stderr_32.log
|
||||
/stdout.log
|
||||
/stdout_32.log
|
||||
|
||||
.vscode
|
||||
|
||||
@@ -0,0 +1,20 @@
|
||||
repos:
|
||||
- repo: https://github.com/pre-commit/pre-commit-hooks
|
||||
rev: v5.0.0
|
||||
hooks:
|
||||
- id: trailing-whitespace
|
||||
- id: end-of-file-fixer
|
||||
- id: check-merge-conflict
|
||||
- id: check-case-conflict
|
||||
- repo: https://github.com/pre-commit/mirrors-clang-format
|
||||
rev: v19.1.5
|
||||
hooks:
|
||||
- id: clang-format
|
||||
'types_or': [c++, c]
|
||||
|
||||
ci:
|
||||
autofix_commit_msg: "[pre-commit.ci] Auto fixes from pre-commit.com hooks."
|
||||
autofix_prs: true
|
||||
autoupdate_commit_msg: "[pre-commit.ci] Pre-commit autoupdate."
|
||||
autoupdate_schedule: quarterly
|
||||
submodules: false
|
||||
@@ -1,7 +1,7 @@
|
||||
#pragma once
|
||||
|
||||
#include "usvfsparameters.h"
|
||||
#include "dllimport.h"
|
||||
#include "usvfsparameters.h"
|
||||
#include <shared_memory.h>
|
||||
|
||||
namespace usvfs
|
||||
@@ -10,9 +10,8 @@ namespace usvfs
|
||||
class ForcedLibrary
|
||||
{
|
||||
public:
|
||||
ForcedLibrary(
|
||||
const std::string& processName, const std::string& libraryPath,
|
||||
const shared::VoidAllocatorT &allocator);
|
||||
ForcedLibrary(const std::string& processName, const std::string& libraryPath,
|
||||
const shared::VoidAllocatorT& allocator);
|
||||
|
||||
std::string processName() const;
|
||||
std::string libraryPath() const;
|
||||
@@ -22,16 +21,15 @@ private:
|
||||
shared::StringT m_libraryPath;
|
||||
};
|
||||
|
||||
|
||||
class DLLEXPORT SharedParameters
|
||||
{
|
||||
public:
|
||||
SharedParameters() = delete;
|
||||
SharedParameters(const SharedParameters &reference) = delete;
|
||||
SharedParameters &operator=(const SharedParameters &reference) = delete;
|
||||
SharedParameters() = delete;
|
||||
SharedParameters(const SharedParameters& reference) = delete;
|
||||
SharedParameters& operator=(const SharedParameters& reference) = delete;
|
||||
|
||||
SharedParameters(const usvfsParameters& reference,
|
||||
const shared::VoidAllocatorT &allocator);
|
||||
const shared::VoidAllocatorT& allocator);
|
||||
|
||||
usvfsParameters makeLocal() const;
|
||||
|
||||
@@ -40,9 +38,9 @@ public:
|
||||
std::string currentInverseSHMName() const;
|
||||
void setSHMNames(const std::string& current, const std::string& inverse);
|
||||
|
||||
void setDebugParameters(
|
||||
LogLevel level, CrashDumpsType dumpType, const std::string& dumpPath,
|
||||
std::chrono::milliseconds delayProcess);
|
||||
void setDebugParameters(LogLevel level, CrashDumpsType dumpType,
|
||||
const std::string& dumpPath,
|
||||
std::chrono::milliseconds delayProcess);
|
||||
|
||||
std::size_t userConnected();
|
||||
std::size_t userDisconnected();
|
||||
@@ -70,30 +68,29 @@ public:
|
||||
void clearForcedLibraries();
|
||||
|
||||
private:
|
||||
using StringAllocatorT =
|
||||
shared::VoidAllocatorT::rebind<shared::StringT>::other;
|
||||
using StringAllocatorT = shared::VoidAllocatorT::rebind<shared::StringT>::other;
|
||||
|
||||
using DWORDAllocatorT = shared::VoidAllocatorT::rebind<DWORD>::other;
|
||||
|
||||
using ForcedLibraryAllocatorT =
|
||||
shared::VoidAllocatorT::rebind<ForcedLibrary>::other;
|
||||
using ForcedLibraryAllocatorT = shared::VoidAllocatorT::rebind<ForcedLibrary>::other;
|
||||
|
||||
using ProcessBlacklist =
|
||||
boost::container::flat_set<shared::StringT, std::less<shared::StringT>,
|
||||
StringAllocatorT>;
|
||||
|
||||
using ProcessBlacklist = boost::container::flat_set<
|
||||
shared::StringT, std::less<shared::StringT>, StringAllocatorT>;
|
||||
using ProcessList =
|
||||
boost::container::flat_set<DWORD, std::less<DWORD>, DWORDAllocatorT>;
|
||||
|
||||
using ProcessList = boost::container::flat_set<
|
||||
DWORD, std::less<DWORD>, DWORDAllocatorT>;
|
||||
using FileSuffixSkipList =
|
||||
boost::container::flat_set<shared::StringT, std::less<shared::StringT>,
|
||||
StringAllocatorT>;
|
||||
|
||||
using FileSuffixSkipList = boost::container::flat_set<
|
||||
shared::StringT, std::less<shared::StringT>, StringAllocatorT>;
|
||||
|
||||
using DirectorySkipList = boost::container::flat_set<
|
||||
shared::StringT, std::less<shared::StringT>, StringAllocatorT>;
|
||||
|
||||
using ForcedLibraries = boost::container::slist<
|
||||
ForcedLibrary, ForcedLibraryAllocatorT>;
|
||||
using DirectorySkipList =
|
||||
boost::container::flat_set<shared::StringT, std::less<shared::StringT>,
|
||||
StringAllocatorT>;
|
||||
|
||||
using ForcedLibraries =
|
||||
boost::container::slist<ForcedLibrary, ForcedLibraryAllocatorT>;
|
||||
|
||||
mutable bi::interprocess_mutex m_mutex;
|
||||
shared::StringT m_instanceName;
|
||||
@@ -112,4 +109,4 @@ private:
|
||||
ForcedLibraries m_forcedLibraries;
|
||||
};
|
||||
|
||||
} // namespace
|
||||
} // namespace usvfs
|
||||
|
||||
+167
-151
@@ -23,7 +23,6 @@ along with usvfs. If not, see <http://www.gnu.org/licenses/>.
|
||||
#include "dllimport.h"
|
||||
#include "usvfsparameters.h"
|
||||
|
||||
|
||||
/*
|
||||
* Virtual operations:
|
||||
* - link file
|
||||
@@ -34,183 +33,200 @@ along with usvfs. If not, see <http://www.gnu.org/licenses/>.
|
||||
* - delete directory
|
||||
* Maybe:
|
||||
* - rename/move (= copy + delete)
|
||||
* - copy-on-write semantics (changes to files are done in a separate copy of the file, the original is kept on disc but hidden)
|
||||
* - copy-on-write semantics (changes to files are done in a separate copy of the
|
||||
* file, the original is kept on disc but hidden)
|
||||
*/
|
||||
|
||||
static const unsigned int LINKFLAG_FAILIFEXISTS =
|
||||
0x00000001; // if set, linking fails in case of an error
|
||||
static const unsigned int LINKFLAG_MONITORCHANGES =
|
||||
0x00000002; // if set, changes to the source directory after the link operation
|
||||
// will be updated in the virtual fs. only relevant in static
|
||||
// link directory operations
|
||||
static const unsigned int LINKFLAG_CREATETARGET =
|
||||
0x00000004; // if set, file creation (including move or copy) operations to
|
||||
// destination will be redirected to the source. Only one createtarget
|
||||
// can be set for a destination folder so this flag will replace
|
||||
// the previous create target.
|
||||
// If there different create-target have been set for an element and
|
||||
// one of its ancestors, the inner-most create-target is used
|
||||
static const unsigned int LINKFLAG_RECURSIVE =
|
||||
0x00000008; // if set, directories are linked recursively
|
||||
static const unsigned int LINKFLAG_FAILIFSKIPPED =
|
||||
0x00000010; // if set, linking fails if the file or directory is skipped
|
||||
// files or directories are skipped depending on whats been added to
|
||||
// the skip file suffixes or skip directories list in
|
||||
// the sharedparameters class, those lists are checked during virtual
|
||||
// linking
|
||||
|
||||
static const unsigned int LINKFLAG_FAILIFEXISTS = 0x00000001; // if set, linking fails in case of an error
|
||||
static const unsigned int LINKFLAG_MONITORCHANGES = 0x00000002; // if set, changes to the source directory after the link operation
|
||||
// will be updated in the virtual fs. only relevant in static
|
||||
// link directory operations
|
||||
static const unsigned int LINKFLAG_CREATETARGET = 0x00000004; // if set, file creation (including move or copy) operations to
|
||||
// destination will be redirected to the source. Only one createtarget
|
||||
// can be set for a destination folder so this flag will replace
|
||||
// the previous create target.
|
||||
// If there different create-target have been set for an element and one of its
|
||||
// ancestors, the inner-most create-target is used
|
||||
static const unsigned int LINKFLAG_RECURSIVE = 0x00000008; // if set, directories are linked recursively
|
||||
static const unsigned int LINKFLAG_FAILIFSKIPPED = 0x00000010; // if set, linking fails if the file or directory is skipped
|
||||
// files or directories are skipped depending on whats been added to
|
||||
// the skip file suffixes or skip directories list in
|
||||
// the sharedparameters class, those lists are checked during virtual linking
|
||||
extern "C"
|
||||
{
|
||||
|
||||
extern "C" {
|
||||
/**
|
||||
* removes all virtual mappings
|
||||
*/
|
||||
DLLEXPORT void WINAPI usvfsClearVirtualMappings();
|
||||
|
||||
/**
|
||||
* removes all virtual mappings
|
||||
*/
|
||||
DLLEXPORT void WINAPI usvfsClearVirtualMappings();
|
||||
/**
|
||||
* link a file virtually
|
||||
* @note: the directory the destination file resides in has to exist - at least
|
||||
* virtually.
|
||||
*/
|
||||
DLLEXPORT BOOL WINAPI usvfsVirtualLinkFile(LPCWSTR source, LPCWSTR destination,
|
||||
unsigned int flags);
|
||||
|
||||
/**
|
||||
* link a file virtually
|
||||
* @note: the directory the destination file resides in has to exist - at least virtually.
|
||||
*/
|
||||
DLLEXPORT BOOL WINAPI usvfsVirtualLinkFile(LPCWSTR source, LPCWSTR destination, unsigned int flags);
|
||||
/**
|
||||
* link a directory virtually. This static variant recursively links all files
|
||||
* individually, change notifications are used to update the information.
|
||||
* @param failIfExists if true, this call fails if the destination directory exists
|
||||
* (virtually or physically)
|
||||
*/
|
||||
DLLEXPORT BOOL WINAPI usvfsVirtualLinkDirectoryStatic(LPCWSTR source,
|
||||
LPCWSTR destination,
|
||||
unsigned int flags);
|
||||
|
||||
/**
|
||||
* link a directory virtually. This static variant recursively links all files individually, change notifications
|
||||
* are used to update the information.
|
||||
* @param failIfExists if true, this call fails if the destination directory exists (virtually or physically)
|
||||
*/
|
||||
DLLEXPORT BOOL WINAPI usvfsVirtualLinkDirectoryStatic(LPCWSTR source, LPCWSTR destination, unsigned int flags);
|
||||
/**
|
||||
* connect to a virtual filesystem as a controller, without hooking the calling
|
||||
* process. Please note that you can only be connected to one vfs, so this will
|
||||
* silently disconnect from a previous vfs.
|
||||
*/
|
||||
DLLEXPORT BOOL WINAPI usvfsConnectVFS(const usvfsParameters* p);
|
||||
|
||||
/**
|
||||
* connect to a virtual filesystem as a controller, without hooking the calling process. Please note that
|
||||
* you can only be connected to one vfs, so this will silently disconnect from a previous vfs.
|
||||
*/
|
||||
DLLEXPORT BOOL WINAPI usvfsConnectVFS(const usvfsParameters* p);
|
||||
/**
|
||||
* @brief create a new VFS. This is similar to ConnectVFS except it guarantees
|
||||
* the vfs is reset before use.
|
||||
*/
|
||||
DLLEXPORT BOOL WINAPI usvfsCreateVFS(const usvfsParameters* p);
|
||||
|
||||
/**
|
||||
* @brief create a new VFS. This is similar to ConnectVFS except it guarantees
|
||||
* the vfs is reset before use.
|
||||
*/
|
||||
DLLEXPORT BOOL WINAPI usvfsCreateVFS(const usvfsParameters* p);
|
||||
/**
|
||||
* disconnect from a virtual filesystem. This removes hooks if necessary
|
||||
*/
|
||||
DLLEXPORT void WINAPI usvfsDisconnectVFS();
|
||||
|
||||
/**
|
||||
* disconnect from a virtual filesystem. This removes hooks if necessary
|
||||
*/
|
||||
DLLEXPORT void WINAPI usvfsDisconnectVFS();
|
||||
DLLEXPORT void WINAPI usvfsGetCurrentVFSName(char* buffer, size_t size);
|
||||
|
||||
DLLEXPORT void WINAPI usvfsGetCurrentVFSName(char *buffer, size_t size);
|
||||
/**
|
||||
* retrieve a list of all processes connected to the vfs
|
||||
*/
|
||||
DLLEXPORT BOOL WINAPI usvfsGetVFSProcessList(size_t* count, LPDWORD processIDs);
|
||||
|
||||
/**
|
||||
* retrieve a list of all processes connected to the vfs
|
||||
*/
|
||||
DLLEXPORT BOOL WINAPI usvfsGetVFSProcessList(size_t *count, LPDWORD processIDs);
|
||||
// retrieve a list of all processes connected to the vfs, stores an array
|
||||
// of `count` elements in `*buffer`
|
||||
//
|
||||
// if this returns TRUE and `count` is not 0, the caller must release the buffer
|
||||
// with `free(*buffer)`
|
||||
//
|
||||
// return values:
|
||||
// - ERROR_INVALID_PARAMETERS: either `count` or `buffer` is NULL
|
||||
// - ERROR_TOO_MANY_OPEN_FILES: there seems to be way too many usvfs processes
|
||||
// running, probably some internal error
|
||||
// - ERROR_NOT_ENOUGH_MEMORY: malloc() failed
|
||||
//
|
||||
DLLEXPORT BOOL WINAPI usvfsGetVFSProcessList2(size_t* count, DWORD** buffer);
|
||||
|
||||
// retrieve a list of all processes connected to the vfs, stores an array
|
||||
// of `count` elements in `*buffer`
|
||||
//
|
||||
// if this returns TRUE and `count` is not 0, the caller must release the buffer
|
||||
// with `free(*buffer)`
|
||||
//
|
||||
// return values:
|
||||
// - ERROR_INVALID_PARAMETERS: either `count` or `buffer` is NULL
|
||||
// - ERROR_TOO_MANY_OPEN_FILES: there seems to be way too many usvfs processes
|
||||
// running, probably some internal error
|
||||
// - ERROR_NOT_ENOUGH_MEMORY: malloc() failed
|
||||
//
|
||||
DLLEXPORT BOOL WINAPI usvfsGetVFSProcessList2(size_t* count, DWORD** buffer);
|
||||
/**
|
||||
* spawn a new process that can see the virtual file system. The signature is
|
||||
* identical to CreateProcess
|
||||
*/
|
||||
DLLEXPORT BOOL WINAPI usvfsCreateProcessHooked(
|
||||
LPCWSTR lpApplicationName, LPWSTR lpCommandLine,
|
||||
LPSECURITY_ATTRIBUTES lpProcessAttributes,
|
||||
LPSECURITY_ATTRIBUTES lpThreadAttributes, BOOL bInheritHandles,
|
||||
DWORD dwCreationFlags, LPVOID lpEnvironment, LPCWSTR lpCurrentDirectory,
|
||||
LPSTARTUPINFOW lpStartupInfo, LPPROCESS_INFORMATION lpProcessInformation);
|
||||
|
||||
/**
|
||||
* spawn a new process that can see the virtual file system. The signature is identical to CreateProcess
|
||||
*/
|
||||
DLLEXPORT BOOL WINAPI usvfsCreateProcessHooked(
|
||||
LPCWSTR lpApplicationName, LPWSTR lpCommandLine,
|
||||
LPSECURITY_ATTRIBUTES lpProcessAttributes,
|
||||
LPSECURITY_ATTRIBUTES lpThreadAttributes, BOOL bInheritHandles,
|
||||
DWORD dwCreationFlags, LPVOID lpEnvironment, LPCWSTR lpCurrentDirectory,
|
||||
LPSTARTUPINFOW lpStartupInfo, LPPROCESS_INFORMATION lpProcessInformation);
|
||||
/**
|
||||
* retrieve a single log message.
|
||||
* FIXME There is currently no way to unblock from the caller side
|
||||
* FIXME retrieves log messages from all instances, the logging queue is not separated
|
||||
*/
|
||||
DLLEXPORT bool WINAPI usvfsGetLogMessages(LPSTR buffer, size_t size,
|
||||
bool blocking = false);
|
||||
|
||||
/**
|
||||
* retrieve a single log message.
|
||||
* FIXME There is currently no way to unblock from the caller side
|
||||
* FIXME retrieves log messages from all instances, the logging queue is not separated
|
||||
*/
|
||||
DLLEXPORT bool WINAPI usvfsGetLogMessages(LPSTR buffer, size_t size, bool blocking = false);
|
||||
/**
|
||||
* retrieves a readable representation of the vfs tree
|
||||
* @param buffer the buffer to write to. this may be null if you only want to
|
||||
* determine the required buffer size
|
||||
* @param size pointer to a variable that contains the buffer. After the call
|
||||
* this value will have been updated to contain the required size,
|
||||
* even if this is bigger than the buffer size
|
||||
*/
|
||||
DLLEXPORT BOOL WINAPI usvfsCreateVFSDump(LPSTR buffer, size_t* size);
|
||||
|
||||
/**
|
||||
* retrieves a readable representation of the vfs tree
|
||||
* @param buffer the buffer to write to. this may be null if you only want to determine the required
|
||||
* buffer size
|
||||
* @param size pointer to a variable that contains the buffer. After the call
|
||||
* this value will have been updated to contain the required size,
|
||||
* even if this is bigger than the buffer size
|
||||
*/
|
||||
DLLEXPORT BOOL WINAPI usvfsCreateVFSDump(LPSTR buffer, size_t *size);
|
||||
/**
|
||||
* adds an executable to the blacklist so it doesn't get exposed to the virtual
|
||||
* file system
|
||||
* @param executableName name of the executable
|
||||
*/
|
||||
DLLEXPORT VOID WINAPI usvfsBlacklistExecutable(LPCWSTR executableName);
|
||||
|
||||
/**
|
||||
* adds an executable to the blacklist so it doesn't get exposed to the virtual
|
||||
* file system
|
||||
* @param executableName name of the executable
|
||||
*/
|
||||
DLLEXPORT VOID WINAPI usvfsBlacklistExecutable(LPCWSTR executableName);
|
||||
/**
|
||||
* clears the executable blacklist
|
||||
*/
|
||||
DLLEXPORT VOID WINAPI usvfsClearExecutableBlacklist();
|
||||
|
||||
/**
|
||||
* clears the executable blacklist
|
||||
*/
|
||||
DLLEXPORT VOID WINAPI usvfsClearExecutableBlacklist();
|
||||
/**
|
||||
* adds a file suffix to a list to skip during file linking
|
||||
* .txt and some_file.txt are both valid file suffixes,
|
||||
* not to be confused with file extensions
|
||||
* @param fileSuffix a valid file suffix
|
||||
*/
|
||||
DLLEXPORT VOID WINAPI usvfsAddSkipFileSuffix(LPCWSTR fileSuffix);
|
||||
|
||||
/**
|
||||
* adds a file suffix to a list to skip during file linking
|
||||
* .txt and some_file.txt are both valid file suffixes,
|
||||
* not to be confused with file extensions
|
||||
* @param fileSuffix a valid file suffix
|
||||
*/
|
||||
DLLEXPORT VOID WINAPI usvfsAddSkipFileSuffix(LPCWSTR fileSuffix);
|
||||
/**
|
||||
* clears the file suffix skip-list
|
||||
*/
|
||||
DLLEXPORT VOID WINAPI usvfsClearSkipFileSuffixes();
|
||||
|
||||
/**
|
||||
* clears the file suffix skip-list
|
||||
*/
|
||||
DLLEXPORT VOID WINAPI usvfsClearSkipFileSuffixes();
|
||||
/**
|
||||
* adds a directory name that will be skipped during directory linking.
|
||||
* Not a path. Any directory matching the name will be skipped,
|
||||
* regardless of it's path, for example if .git is added,
|
||||
* any sub-path or root-path containing a .git directory
|
||||
* will have the .git directory skipped during directory linking
|
||||
* @param directory name of the directory
|
||||
*/
|
||||
DLLEXPORT VOID WINAPI usvfsAddSkipDirectory(LPCWSTR directory);
|
||||
|
||||
/**
|
||||
* adds a directory name that will be skipped during directory linking.
|
||||
* Not a path. Any directory matching the name will be skipped,
|
||||
* regardless of it's path, for example if .git is added,
|
||||
* any sub-path or root-path containing a .git directory
|
||||
* will have the .git directory skipped during directory linking
|
||||
* @param directory name of the directory
|
||||
*/
|
||||
DLLEXPORT VOID WINAPI usvfsAddSkipDirectory(LPCWSTR directory);
|
||||
/**
|
||||
* clears the directory skip-list
|
||||
*/
|
||||
DLLEXPORT VOID WINAPI usvfsClearSkipDirectories();
|
||||
|
||||
/**
|
||||
* clears the directory skip-list
|
||||
*/
|
||||
DLLEXPORT VOID WINAPI usvfsClearSkipDirectories();
|
||||
/**
|
||||
* adds a library to be force loaded when the given process is injected
|
||||
* @param
|
||||
*/
|
||||
DLLEXPORT VOID WINAPI usvfsForceLoadLibrary(LPCWSTR processName, LPCWSTR libraryPath);
|
||||
|
||||
/**
|
||||
* adds a library to be force loaded when the given process is injected
|
||||
* @param
|
||||
*/
|
||||
DLLEXPORT VOID WINAPI usvfsForceLoadLibrary(LPCWSTR processName, LPCWSTR libraryPath);
|
||||
/**
|
||||
* clears all previous calls to ForceLoadLibrary
|
||||
*/
|
||||
DLLEXPORT VOID WINAPI usvfsClearLibraryForceLoads();
|
||||
|
||||
/**
|
||||
* clears all previous calls to ForceLoadLibrary
|
||||
*/
|
||||
DLLEXPORT VOID WINAPI usvfsClearLibraryForceLoads();
|
||||
/**
|
||||
* print debugging info about the vfs. The format is currently not fixed and may
|
||||
* change between usvfs versions
|
||||
*/
|
||||
DLLEXPORT VOID WINAPI usvfsPrintDebugInfo();
|
||||
|
||||
/**
|
||||
* print debugging info about the vfs. The format is currently not fixed and may
|
||||
* change between usvfs versions
|
||||
*/
|
||||
DLLEXPORT VOID WINAPI usvfsPrintDebugInfo();
|
||||
// #if defined(UNITTEST) || defined(_WINDLL)
|
||||
DLLEXPORT void WINAPI usvfsInitLogging(bool toLocal = false);
|
||||
// #endif
|
||||
|
||||
//#if defined(UNITTEST) || defined(_WINDLL)
|
||||
DLLEXPORT void WINAPI usvfsInitLogging(bool toLocal = false);
|
||||
//#endif
|
||||
/**
|
||||
* used internally to initialize a process at startup-time as a "slave". Don't call
|
||||
* directly
|
||||
*/
|
||||
DLLEXPORT void __cdecl InitHooks(LPVOID userData, size_t userDataSize);
|
||||
|
||||
/**
|
||||
* used internally to initialize a process at startup-time as a "slave". Don't call directly
|
||||
*/
|
||||
DLLEXPORT void __cdecl InitHooks(LPVOID userData, size_t userDataSize);
|
||||
// the instance and shm names are not updated
|
||||
//
|
||||
DLLEXPORT void WINAPI usvfsUpdateParameters(usvfsParameters* p);
|
||||
|
||||
// the instance and shm names are not updated
|
||||
//
|
||||
DLLEXPORT void WINAPI usvfsUpdateParameters(usvfsParameters* p);
|
||||
|
||||
DLLEXPORT int WINAPI usvfsCreateMiniDump(PEXCEPTION_POINTERS exceptionPtrs, CrashDumpsType type, const wchar_t* dumpPath);
|
||||
|
||||
DLLEXPORT const char* WINAPI usvfsVersionString();
|
||||
DLLEXPORT int WINAPI usvfsCreateMiniDump(PEXCEPTION_POINTERS exceptionPtrs,
|
||||
CrashDumpsType type,
|
||||
const wchar_t* dumpPath);
|
||||
|
||||
DLLEXPORT const char* WINAPI usvfsVersionString();
|
||||
}
|
||||
|
||||
@@ -18,5 +18,13 @@
|
||||
#define USVFS_STRINGIFYW_HELPER(x) L## #x
|
||||
#endif
|
||||
|
||||
#define USVFS_VERSION_STRING USVFS_STRINGIFY(USVFS_VERSION_MAJOR) "." USVFS_STRINGIFY(USVFS_VERSION_MINOR) "." USVFS_STRINGIFY(USVFS_VERSION_BUILD) "." USVFS_STRINGIFY(USVFS_VERSION_REVISION) USVFS_BUILD_STRING
|
||||
#define USVFS_VERSION_WSTRING USVFS_STRINGIFYW(USVFS_VERSION_MAJOR) L"." USVFS_STRINGIFYW(USVFS_VERSION_MINOR) L"." USVFS_STRINGIFYW(USVFS_VERSION_BUILD) L"." USVFS_STRINGIFYW(USVFS_VERSION_REVISION) USVFS_BUILD_WSTRING
|
||||
#define USVFS_VERSION_STRING \
|
||||
USVFS_STRINGIFY(USVFS_VERSION_MAJOR) \
|
||||
"." USVFS_STRINGIFY(USVFS_VERSION_MINOR) "." USVFS_STRINGIFY( \
|
||||
USVFS_VERSION_BUILD) "." USVFS_STRINGIFY(USVFS_VERSION_REVISION) \
|
||||
USVFS_BUILD_STRING
|
||||
#define USVFS_VERSION_WSTRING \
|
||||
USVFS_STRINGIFYW(USVFS_VERSION_MAJOR) \
|
||||
L"." USVFS_STRINGIFYW(USVFS_VERSION_MINOR) L"." USVFS_STRINGIFYW( \
|
||||
USVFS_VERSION_BUILD) L"." USVFS_STRINGIFYW(USVFS_VERSION_REVISION) \
|
||||
USVFS_BUILD_WSTRING
|
||||
|
||||
@@ -20,11 +20,12 @@ along with usvfs. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
#pragma once
|
||||
|
||||
#include "logging.h"
|
||||
#include "dllimport.h"
|
||||
#include "logging.h"
|
||||
#include <chrono>
|
||||
|
||||
enum class CrashDumpsType : uint8_t {
|
||||
enum class CrashDumpsType : uint8_t
|
||||
{
|
||||
None,
|
||||
Mini,
|
||||
Data,
|
||||
@@ -34,34 +35,34 @@ enum class CrashDumpsType : uint8_t {
|
||||
extern "C"
|
||||
{
|
||||
|
||||
// deprecated, use usvfsParameters and usvfsCreateParameters()
|
||||
//
|
||||
struct USVFSParameters {
|
||||
char instanceName[65];
|
||||
char currentSHMName[65];
|
||||
char currentInverseSHMName[65];
|
||||
bool debugMode{false};
|
||||
LogLevel logLevel{LogLevel::Debug};
|
||||
CrashDumpsType crashDumpsType{CrashDumpsType::None};
|
||||
char crashDumpsPath[260];
|
||||
};
|
||||
// deprecated, use usvfsParameters and usvfsCreateParameters()
|
||||
//
|
||||
struct USVFSParameters
|
||||
{
|
||||
char instanceName[65];
|
||||
char currentSHMName[65];
|
||||
char currentInverseSHMName[65];
|
||||
bool debugMode{false};
|
||||
LogLevel logLevel{LogLevel::Debug};
|
||||
CrashDumpsType crashDumpsType{CrashDumpsType::None};
|
||||
char crashDumpsPath[260];
|
||||
};
|
||||
|
||||
struct usvfsParameters;
|
||||
|
||||
struct usvfsParameters;
|
||||
DLLEXPORT usvfsParameters* usvfsCreateParameters();
|
||||
DLLEXPORT usvfsParameters* usvfsDupeParameters(usvfsParameters* p);
|
||||
DLLEXPORT void usvfsCopyParameters(const usvfsParameters* source,
|
||||
usvfsParameters* dest);
|
||||
DLLEXPORT void usvfsFreeParameters(usvfsParameters* p);
|
||||
|
||||
DLLEXPORT usvfsParameters* usvfsCreateParameters();
|
||||
DLLEXPORT usvfsParameters* usvfsDupeParameters(usvfsParameters* p);
|
||||
DLLEXPORT void usvfsCopyParameters(const usvfsParameters* source, usvfsParameters* dest);
|
||||
DLLEXPORT void usvfsFreeParameters(usvfsParameters* p);
|
||||
|
||||
DLLEXPORT void usvfsSetInstanceName(usvfsParameters* p, const char* name);
|
||||
DLLEXPORT void usvfsSetDebugMode(usvfsParameters* p, BOOL debugMode);
|
||||
DLLEXPORT void usvfsSetLogLevel(usvfsParameters* p, LogLevel level);
|
||||
DLLEXPORT void usvfsSetCrashDumpType(usvfsParameters* p, CrashDumpsType type);
|
||||
DLLEXPORT void usvfsSetCrashDumpPath(usvfsParameters* p, const char* path);
|
||||
DLLEXPORT void usvfsSetProcessDelay(usvfsParameters* p, int milliseconds);
|
||||
|
||||
DLLEXPORT const char* usvfsLogLevelToString(LogLevel lv);
|
||||
DLLEXPORT const char* usvfsCrashDumpTypeToString(CrashDumpsType t);
|
||||
DLLEXPORT void usvfsSetInstanceName(usvfsParameters* p, const char* name);
|
||||
DLLEXPORT void usvfsSetDebugMode(usvfsParameters* p, BOOL debugMode);
|
||||
DLLEXPORT void usvfsSetLogLevel(usvfsParameters* p, LogLevel level);
|
||||
DLLEXPORT void usvfsSetCrashDumpType(usvfsParameters* p, CrashDumpsType type);
|
||||
DLLEXPORT void usvfsSetCrashDumpPath(usvfsParameters* p, const char* path);
|
||||
DLLEXPORT void usvfsSetProcessDelay(usvfsParameters* p, int milliseconds);
|
||||
|
||||
DLLEXPORT const char* usvfsLogLevelToString(LogLevel lv);
|
||||
DLLEXPORT const char* usvfsCrashDumpTypeToString(CrashDumpsType t);
|
||||
}
|
||||
|
||||
@@ -13,18 +13,13 @@ struct usvfsParameters
|
||||
int delayProcessMs;
|
||||
|
||||
usvfsParameters();
|
||||
usvfsParameters(const usvfsParameters&) = default;
|
||||
usvfsParameters(const usvfsParameters&) = default;
|
||||
usvfsParameters& operator=(const usvfsParameters&) = default;
|
||||
|
||||
usvfsParameters(
|
||||
const char* instanceName,
|
||||
const char* currentSHMName,
|
||||
const char* currentInverseSHMName,
|
||||
bool debugMode,
|
||||
LogLevel logLevel,
|
||||
CrashDumpsType crashDumpsType,
|
||||
const char* crashDumpsPath,
|
||||
int delayProcessMs);
|
||||
usvfsParameters(const char* instanceName, const char* currentSHMName,
|
||||
const char* currentInverseSHMName, bool debugMode, LogLevel logLevel,
|
||||
CrashDumpsType crashDumpsType, const char* crashDumpsPath,
|
||||
int delayProcessMs);
|
||||
|
||||
usvfsParameters(const USVFSParameters& oldParams);
|
||||
|
||||
|
||||
+2
-2
@@ -1,4 +1,4 @@
|
||||
AsmJit - Complete x86/x64 JIT and Remote Assembler for C++
|
||||
AsmJit - Complete x86/x64 JIT and Remote Assembler for C++
|
||||
Copyright (c) 2008-2015, Petr Kobalicek <kobalicek.petr@gmail.com>
|
||||
|
||||
This software is provided 'as-is', without any express or implied
|
||||
@@ -15,4 +15,4 @@ freely, subject to the following restrictions:
|
||||
appreciated but is not required.
|
||||
2. Altered source versions must be plainly marked as such, and must not be
|
||||
misrepresented as being the original software.
|
||||
3. This notice may not be removed or altered from any source distribution.
|
||||
3. This notice may not be removed or altered from any source distribution.
|
||||
|
||||
+1
-1
@@ -20,4 +20,4 @@ FITNESS FOR A PARTICULAR PURPOSE, TITLE AND NON-INFRINGEMENT. IN NO EVENT
|
||||
SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABLE
|
||||
FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWISE,
|
||||
ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
|
||||
DEALINGS IN THE SOFTWARE.
|
||||
DEALINGS IN THE SOFTWARE.
|
||||
|
||||
@@ -6,4 +6,4 @@ Redistribution and use in source and binary forms, with or without modification,
|
||||
|
||||
Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
|
||||
Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
|
||||
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
|
||||
@@ -25,4 +25,4 @@ LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
||||
DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
||||
THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
||||
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
|
||||
@@ -172,4 +172,3 @@ If the Library as you received it specifies that a proxy can decide
|
||||
whether future versions of the GNU Lesser General Public License shall
|
||||
apply, that proxy's public statement of acceptance of any version is
|
||||
permanent authorization for you to choose that version for the Library.
|
||||
|
||||
|
||||
+2
-2
@@ -1,6 +1,6 @@
|
||||
The MIT License (MIT)
|
||||
|
||||
Copyright (c) 2015 Gabi Melman.
|
||||
Copyright (c) 2015 Gabi Melman.
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
@@ -18,4 +18,4 @@ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
THE SOFTWARE.
|
||||
THE SOFTWARE.
|
||||
|
||||
+14
-14
@@ -1,22 +1,22 @@
|
||||
Copyright (c) 2002-2012, Vivek Thampi <vivek.mt@gmail.com>
|
||||
All rights reserved.
|
||||
|
||||
Redistribution and use in source and binary forms, with or without modification,
|
||||
Redistribution and use in source and binary forms, with or without modification,
|
||||
are permitted provided that the following conditions are met:
|
||||
|
||||
1. Redistributions of source code must retain the above copyright notice,
|
||||
1. Redistributions of source code must retain the above copyright notice,
|
||||
this list of conditions and the following disclaimer.
|
||||
2. Redistributions in binary form must reproduce the above copyright notice,
|
||||
this list of conditions and the following disclaimer in the documentation
|
||||
2. Redistributions in binary form must reproduce the above copyright notice,
|
||||
this list of conditions and the following disclaimer in the documentation
|
||||
and/or other materials provided with the distribution.
|
||||
|
||||
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
|
||||
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
||||
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
||||
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR
|
||||
ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
|
||||
(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
|
||||
LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
|
||||
ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
||||
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
|
||||
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
||||
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
||||
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR
|
||||
ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
|
||||
(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
|
||||
LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
|
||||
ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
||||
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
|
||||
@@ -1,25 +0,0 @@
|
||||
From 9127260dea5092a7fb845cf24758a7cd07156207 Mon Sep 17 00:00:00 2001
|
||||
From: Lars Viklund <zao@zao.se>
|
||||
Date: Tue, 2 Jul 2013 01:11:29 +0200
|
||||
Subject: [PATCH 5/6] Boost.S11n include missing algorithm
|
||||
|
||||
---
|
||||
boost/archive/iterators/transform_width.hpp | 2 ++
|
||||
1 file changed, 2 insertions(+)
|
||||
|
||||
diff --git a/boost/archive/iterators/transform_width.hpp b/boost/archive/iterators/transform_width.hpp
|
||||
index 3562144..f95c675 100644
|
||||
--- a/boost/archive/iterators/transform_width.hpp
|
||||
+++ b/boost/archive/iterators/transform_width.hpp
|
||||
@@ -30,6 +30,8 @@
|
||||
#include <boost/iterator/iterator_adaptor.hpp>
|
||||
#include <boost/iterator/iterator_traits.hpp>
|
||||
|
||||
+#include <algorithm>
|
||||
+
|
||||
namespace boost {
|
||||
namespace archive {
|
||||
namespace iterators {
|
||||
--
|
||||
1.8.3.msysgit.0
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user