Skip to content

Commit

Permalink
Add Linux 32bit x86/ARM (PokemonGoF#26)
Browse files Browse the repository at this point in the history
* Add Linux 32bit x86/ARM

* Add detection code for ARM
  • Loading branch information
marauder37 authored Aug 7, 2016
1 parent 5bb958d commit b106f43
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 2 deletions.
Binary file added pogom/libencrypt-linux-arm-32.so
Binary file not shown.
Binary file added pogom/libencrypt-linux-x86-32.so
Binary file not shown.
File renamed without changes.
File renamed without changes.
13 changes: 11 additions & 2 deletions pogom/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -293,10 +293,19 @@ def get_encryption_lib_path():
lib_path = os.path.join(os.path.dirname(__file__), "encrypt64bit.dll")
else:
lib_path = os.path.join(os.path.dirname(__file__), "encrypt32bit.dll")

elif sys.platform == "darwin":
lib_path = os.path.join(os.path.dirname(__file__), "libencrypt-osx.so")
lib_path = os.path.join(os.path.dirname(__file__), "libencrypt-osx-64.so")

elif os.uname()[4].startswith("arm") and platform.architecture()[0] == '32bit':
lib_path = os.path.join(os.path.dirname(__file__), "libencrypt-linux-arm-32.so")

elif sys.platform.startswith('linux'):
lib_path = os.path.join(os.path.dirname(__file__), "libencrypt.so")
if platform.architecture()[0] == '64bit':
lib_path = os.path.join(os.path.dirname(__file__), "libencrypt-linux-x86-64.so")
else:
lib_path = os.path.join(os.path.dirname(__file__), "libencrypt-linux-x86-32.so")

else:
err = "Unexpected/unsupported platform '{}'".format(sys.platform)
log.error(err)
Expand Down

0 comments on commit b106f43

Please sign in to comment.