Commit 771d05d9 authored by Till Bald's avatar Till Bald

[FIX] crosslinx executable can be executed from an outside dir

parent e2b2cea3
Pipeline #8787274 passed with stages
in 65 minutes and 52 seconds
......@@ -29,7 +29,12 @@ from collections import defaultdict
# change the current directory so that all submodules etc can work as usual
# the current directory has to be the directory where crosslinx.py is stored
current_file_path = os.path.dirname(os.path.realpath(__file__))
if getattr(sys, 'frozen', False):
# we have a crosslinx executable created by pyinstaller
current_file_path = sys._MEIPASS
else:
# normal python script
current_file_path = os.path.dirname(os.path.realpath(__file__))
os.chdir(current_file_path)
sys.path.append('./include/python')
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment