We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Allow to work on linux (get rid of win32api)
diff --git a/sac_lib/get_file_version.py b/sac_lib/get_file_version.py index da53c0b..cacc012 100644 --- a/sac_lib/get_file_version.py +++ b/sac_lib/get_file_version.py @@ -1,5 +1,5 @@ -import win32api +import pefile def GetFileVersion(filename: str) -> str: - fileInfos = win32api.GetFileVersionInfo(filename, "\\") - return "%d.%d.%d.%d" % (fileInfos['FileVersionMS'] / 65536, fileInfos['FileVersionMS'] % 65536, fileInfos['FileVersionLS'] / 65536, fileInfos['FileVersionLS'] % 65536) \ No newline at end of file + fileInfos = pefile.PE(filename).VS_FIXEDFILEINFO + return "%d.%d.%d.%d" % (fileInfos.FileVersionMS >> 16, fileInfos.FileVersionMS & 0xFFFF, fileInfos.FileVersionLS >> 16, fileInfos.FileVersionLS & 0xFFFF)
The text was updated successfully, but these errors were encountered:
Thanks! I'll test it and update if it works :)
How did you get all these colors? That's nice, didn't know that was possible to be shown in a github issue message
(and again for the really late response)
Sorry, something went wrong.
No branches or pull requests
Allow to work on linux (get rid of win32api)
The text was updated successfully, but these errors were encountered: