github.com/keybase/client/go@v0.0.0-20241007131713-f10651d043c8/kbfs/kbfsdokan/README.md (about) 1 The main executable for running KBFS on Windows. 2 3 Dokan is a user mode filesystem library for Windows. 4 5 Dokan implements a binding to dokan.dll. 6 Libdokan implements a library binding of KBFS and Dokan. 7 Kbfsdokan is the filesystem executable for KBFS on Dokan that works like kbfsfuse. 8 9 ## Normal installation is by installing Keybase on Windows which includes kbfsdokan 10 11 ## Installation by hand 12 13 ### Install Dokan from https://github.com/dokan-dev/dokany/releases/tag/v0.8.0 14 15 ### Install a C toolchain 16 17 + Mingw is ancient but should work 18 + Msys2 works 19 + Mingw64 works 20 + Take care to differentiate between 32 and 64 bit toolchain 21 + Add the toolchain to the path (e.g. C:\msys32\mingw32\bin) 22 + Currently Keybase uses a 32 bit toolchain for Windows 23 24 ### Build kbfsdokan 25 26 ```cd kbfs/kbfsdokan && go build``` 27 28 ### Alternatively build with more low level dokan debugging 29 30 ```cd kbfs/kbfsdokan && go build -tags debug``` 31 32 ### Troubleshooting: keep the correct dokan.dll + dokan.lib available for the build! 33 34 + 32-bit builds want 32 bit dokan.dll and dokan.lib. 35 + 64-bit builds want 64 bit dokan.dll and don't need a lib-file. 36 37 The correct files with 0.8.0 for 32 bit are: 38 39 ``` 40 dokan.lib size: 5500 bytes sha1: 1c9316a567b805c4a6adaf0abe1424fffb36a3bd 41 dokan.dll size: 53488 bytes sha1: 5c4fc6b6e3083e575eed06de3115a6d05b30db02 42 ``` 43 44 ### Troubleshooting 45 46 ### `C source files not allowed when not using cgo or SWIG: bridge.c` 47 48 This is caused by cgo not being enabled (e.g. 64 bit windows go toolchain and GOARCH=386). 49 Fix this by setting CGO_ENABLED=1 and recheck `go env`. 50 51 ### `undefined reference to `_imp__DokanMain@8'` 52 53 32-bit build and dokan.lib is missing? Make it available! 54 55 ## Try it out like kbfsfuse: 56 57 For local only functionality: 58 ```kbfsdokan.exe -debug -localuser <user> -bserver=memory -mdserver=memory M:``` 59 For normal functionality: 60 ```kbfsdokan.exe -debug -log-to-file M:``` 61 62 ## From an another console 63 64 ``` 65 M: 66 cd \public 67 cd <user> 68 dir 69 mkdir foo 70 notepad bar.txt 71 ``` 72 73 # Symlink destinations from outside KBFS to KBFS 74 75 Windows makes paths case insentive in symlink destination. KBFS has 76 support for this in the case that the case insensitive path is unique 77 and guessable. 78 79 To make this work make symlinks from outside KBFS to KBFS make it refer 80 to either the root of the drive or use `PRIVATE` or `PUBLIC` in the path 81 instead of `private` and `public`. This enables the case insentive path 82 resolving logic inside KBFS. 83 84 e.g. 85 ``` 86 C: 87 cd \tmp 88 mklink /D link1 K:\ 89 mklink /D link2 K:\PRIVATE 90 mklink /D link3 K:\PRIVATE\user1,user2 91 ``` 92 93 Note that symbolic link creation (mklink) requires admin privileges.