Skip to content

Commit

Permalink
Merge pull request #8 from x1nixmzeng/dokan-2
Browse files Browse the repository at this point in the history
Dokan 2
  • Loading branch information
x1nixmzeng authored Mar 7, 2022
2 parents 38d7125 + ed312c4 commit bf4f6ec
Show file tree
Hide file tree
Showing 13 changed files with 326 additions and 107 deletions.
5 changes: 3 additions & 2 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ set(HEADER_FILES

include_directories("${DOKAN_ROOT}/include")

add_executable(xbox-iso-vfs "${SOURCE_FILES}")
add_executable(xbox-iso-vfs "${SOURCE_FILES}" "${HEADER_FILES}")

target_link_libraries(xbox-iso-vfs "${DOKAN_ROOT}/lib/dokan2.lib")

target_link_libraries(xbox-iso-vfs "${DOKAN_ROOT}/lib/dokan1.lib")
8 changes: 7 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,11 +26,17 @@ Once mounted, the files can be

## Installation

1. Download Dokan v1.4 - [x64](https://github.com/dokan-dev/dokany/releases/download/v1.4.0.1000/Dokan_x64.msi)/[x86](https://github.com/dokan-dev/dokany/releases/download/v1.4.0.1000/Dokan_x86.msi) or [all releases](https://github.com/dokan-dev/dokany/releases/tag/v1.4.0.1000)
1. Download Dokan v2 - [x64](https://github.com/dokan-dev/dokany/releases/download/v2.0.3.2000/Dokan_x64.msi)/[x86](https://github.com/dokan-dev/dokany/releases/download/v2.0.3.2000/Dokan_x86.msi) or [all releases](https://github.com/dokan-dev/dokany/releases/tag/v2.0.3.2000)
2. Run the Dokan installer
3. Download xbox-iso-vfs - [latest version](https://github.com/x1nixmzeng/xbox-iso-vfs/releases/download/v1.1/Release.zip)


## History

* Mar 2022 - Upgraded Dokan from v1.4 to v2.0 to match new API and improvements
* Jan 2021 - Initial version


## Similar Projects

The idea of an ISO file system in userspace (FUSE) is not new, even for the Xbox community
Expand Down
8 changes: 6 additions & 2 deletions src/main.cc
Original file line number Diff line number Diff line change
Expand Up @@ -72,12 +72,14 @@ class App : public Singleton<App> {
}

void runDokan() {

DokanInit();

DOKAN_OPTIONS dokanOptions;
ZeroMemory(&dokanOptions, sizeof(DOKAN_OPTIONS));

dokanOptions.Version = DOKAN_VERSION;
// Use default thread count
dokanOptions.ThreadCount = 0;
dokanOptions.SingleThread = FALSE;
dokanOptions.Timeout = 0;
dokanOptions.GlobalContext = reinterpret_cast<ULONG64>(&m_vfsContainer);
dokanOptions.MountPoint = m_params.mountPoint.c_str();
Expand Down Expand Up @@ -145,6 +147,8 @@ class App : public Singleton<App> {
break;
}

DokanShutdown();

if (watcher.joinable()) {
watcher.detach();
}
Expand Down
7 changes: 0 additions & 7 deletions src/vfs_operations.cc
Original file line number Diff line number Diff line change
Expand Up @@ -203,12 +203,6 @@ static NTSTATUS DOKAN_CALLBACK vfs_findfiles(LPCWSTR filename,
return STATUS_SUCCESS;
}

static NTSTATUS DOKAN_CALLBACK vfs_findfileswithpattern(LPCWSTR, LPCWSTR,
PFillFindData,
PDOKAN_FILE_INFO) {
return STATUS_NOT_IMPLEMENTED;
}

static NTSTATUS DOKAN_CALLBACK vfs_getdiskfreespace(
PULONGLONG free_bytes_available, PULONGLONG total_number_of_bytes,
PULONGLONG total_number_of_free_bytes, PDOKAN_FILE_INFO dokanfileinfo) {
Expand Down Expand Up @@ -247,7 +241,6 @@ void setup(DOKAN_OPERATIONS &dokanOperations) {
dokanOperations.ReadFile = vfs_readfile;
dokanOperations.GetFileInformation = vfs_getfileInformation;
dokanOperations.FindFiles = vfs_findfiles;
dokanOperations.FindFilesWithPattern = vfs_findfileswithpattern;
dokanOperations.GetDiskFreeSpace = vfs_getdiskfreespace;
dokanOperations.GetVolumeInformation = vfs_getvolumeinformation;
}
Expand Down
Loading

0 comments on commit bf4f6ec

Please sign in to comment.