-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
refactor: add a global DIRS variable
To avoid passing dirs to every function, we add a global DIRS variable to store the dirs.
- Loading branch information
Showing
10 changed files
with
296 additions
and
267 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,11 @@ | ||
pub const MAA_CLI_EXE: &str = if cfg!(windows) { "maa.exe" } else { "maa" }; | ||
|
||
pub const MAA_CORE_LIB: &str = if cfg!(unix) { | ||
if cfg!(target_os = "macos") { | ||
"libMaaCore.dylib" | ||
} else { | ||
"libMaaCore.so" | ||
} | ||
} else { | ||
pub const MAA_CORE_LIB: &str = if cfg!(windows) { | ||
"MaaCore.dll" | ||
} else if cfg!(target_os = "macos") { | ||
"libMaaCore.dylib" | ||
} else { | ||
"libMaaCore.so" | ||
}; | ||
|
||
pub const MAA_CLI_VERSION: &str = env!("CARGO_PKG_VERSION"); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.