parent
8eb0aec3e8
commit
62e8aacd9f
15
bin/solaar
15
bin/solaar
|
@ -24,20 +24,7 @@ def init_paths():
|
|||
import os.path
|
||||
import sys
|
||||
|
||||
# Python 3 might have problems converting back to UTF-8 in case of Unicode surrogates
|
||||
decoded_path = None
|
||||
try:
|
||||
decoded_path = sys.path[0]
|
||||
sys.path[0].encode(sys.getfilesystemencoding())
|
||||
|
||||
except UnicodeError:
|
||||
sys.stderr.write(
|
||||
"ERROR: Solaar cannot recognize encoding of filesystem path, "
|
||||
"this may happen due to non UTF-8 characters in the pathname.\n"
|
||||
)
|
||||
sys.exit(1)
|
||||
|
||||
root = os.path.join(os.path.realpath(decoded_path), "..")
|
||||
root = os.path.join(os.path.realpath(sys.path[0]), "..")
|
||||
prefix = os.path.normpath(root)
|
||||
src_lib = os.path.join(prefix, "lib")
|
||||
share_lib = os.path.join(prefix, "share", "solaar", "lib")
|
||||
|
|
Loading…
Reference in New Issue