Fix a bug in the *.spec files and also apply the following major changes:

- Add support for adding the base folder to PATH.
- Only display one pop up window at a time in order to avoid confusion.
- Add automatic updates feature:
	- Windows and Linux versions will be shipped with an updater program used to
	  update both Artemis and the updater itself.
	- MacOs versions will not have the updater. Instead the user will be asked
	  to download the new software version (if present) via browser.
This commit is contained in:
Alessandro
2019-09-21 16:11:53 +02:00
parent 08b3312b23
commit 8e79bf6adf
34 changed files with 1360 additions and 280 deletions

View File

@@ -0,0 +1,31 @@
import hashlib
import sys
"""Print on stadard output the size in KB and sha256 codes of a list
of command line-provided file names."""
print()
try:
fnames = sys.argv[1:]
except Exception:
print("Provide a valid filename.")
exit()
for fname in fnames:
try:
with open(fname, mode='rb') as f:
target = f.read()
except Exception:
print("File not found")
exit()
code = hashlib.sha256()
code.update(target)
hash_code = code.hexdigest()
print("File name:", fname)
print("Size (KB):", round(len(target) / 1024, 3))
print("Hash code:", hash_code)
print("-" * 80)