Support reading file version from Windows executables

This commit is contained in:
Oliver Hamlet
2018-10-05 19:52:51 +01:00
parent 2def44d3aa
commit be313c40cb
5 changed files with 87 additions and 6 deletions
+8 -2
View File
@@ -1,6 +1,7 @@
extern crate crc;
#[macro_use]
extern crate nom;
extern crate pelite;
extern crate regex;
#[cfg(test)]
@@ -24,8 +25,7 @@ use function::Function;
pub enum Error {
ParsingIncomplete,
ParsingError,
InvalidPath(PathBuf),
InvalidRegex(String),
PeParsingError,
IoError(io::Error),
}
@@ -44,6 +44,12 @@ impl From<io::Error> for Error {
}
}
impl From<pelite::resources::FindError> for Error {
fn from(_: pelite::resources::FindError) -> Self {
Error::PeParsingError
}
}
pub enum GameType {
Tes4,
Tes5,