Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ Generally, it is recommended to use the `dokan` crate, which has the unsafe raw

`dokan-sys`, which is also a dependency of `dokan`, requires the import library of the native Dokan library in order to link against it.

If the `DokanLibrary2_LibraryPath_{ARCH}` environment variable exists (`{ARCH}` can be `x86` or `x64` depending on the architecture of your target platform), `dokan-sys` will look for the import library in the directory specified by the aforementioned environment variable. These environment variables are automatically set by Dokan's installer since v1.0.0.
If the `DokanLibrary2_LibraryPath_{ARCH}` environment variable exists (`{ARCH}` can be `x86`, `x64`, or `ARM64` depending on the architecture of your target platform), `dokan-sys` will look for the import library in the directory specified by the aforementioned environment variable. These environment variables are automatically set by Dokan's installer since v1.0.0.

Otherwise, `dokan-sys` will build the import library from bundled Dokan source code. The DLL file will be built as well and you can use the `DOKAN_DLL_OUTPUT_PATH` environment variable to have the build script copy it to the specified directory.

Expand Down
3 changes: 2 additions & 1 deletion dokan-sys/build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,8 @@ fn check_dokan_env(version_major: &str) -> bool {
let arch = match env::var("CARGO_CFG_TARGET_ARCH").unwrap().as_ref() {
"x86" => "x86",
"x86_64" => "x64",
_ => panic!("Unsupported target architecture!"),
"aarch64" => "ARM64",
other => panic!("Unsupported target architecture: {}", other),
};
let env_name = format!("DokanLibrary{}_LibraryPath_{}", version_major, arch);
println!("cargo:rerun-if-env-changed={}", env_name);
Expand Down