Commit 87c3a46d63b2adb3bbdccd20bfb0e79b4e5adb00
1 parent
8d6196a1
Exists in
master
and in
17 other branches
FIX: Fixed problem with raycasting preset path on windows exe
Showing
1 changed file
with
7 additions
and
6 deletions
Show diff stats
invesalius/constants.py
@@ -324,15 +324,20 @@ FILE_PATH = os.path.split(__file__)[0] | @@ -324,15 +324,20 @@ FILE_PATH = os.path.split(__file__)[0] | ||
324 | 324 | ||
325 | if hasattr(sys,"frozen") and (sys.frozen == "windows_exe"\ | 325 | if hasattr(sys,"frozen") and (sys.frozen == "windows_exe"\ |
326 | or sys.frozen == "console_exe"): | 326 | or sys.frozen == "console_exe"): |
327 | - abs_path_icon = os.path.abspath(FILE_PATH + os.sep + ".." + os.sep + ".." + os.sep + "..") | ||
328 | - ICON_DIR = os.path.join(abs_path_icon, "icons") | 327 | + abs_path = os.path.abspath(FILE_PATH + os.sep + ".." + os.sep + ".." + os.sep + "..") |
328 | + ICON_DIR = os.path.join(abs_path, "icons") | ||
329 | SAMPLE_DIR = os.path.join(FILE_PATH, 'samples') | 329 | SAMPLE_DIR = os.path.join(FILE_PATH, 'samples') |
330 | DOC_DIR = os.path.join(FILE_PATH, 'docs') | 330 | DOC_DIR = os.path.join(FILE_PATH, 'docs') |
331 | + | ||
332 | + folder=RAYCASTING_PRESETS_DIRECTORY= os.path.join(abs_path, "presets", "raycasting") | ||
331 | else: | 333 | else: |
332 | ICON_DIR = os.path.abspath(os.path.join(FILE_PATH, '..', 'icons')) | 334 | ICON_DIR = os.path.abspath(os.path.join(FILE_PATH, '..', 'icons')) |
333 | SAMPLE_DIR = os.path.abspath(os.path.join(FILE_PATH,'..', 'samples')) | 335 | SAMPLE_DIR = os.path.abspath(os.path.join(FILE_PATH,'..', 'samples')) |
334 | DOC_DIR = os.path.abspath(os.path.join(FILE_PATH,'..', 'docs')) | 336 | DOC_DIR = os.path.abspath(os.path.join(FILE_PATH,'..', 'docs')) |
335 | 337 | ||
338 | + folder=RAYCASTING_PRESETS_DIRECTORY= os.path.abspath(os.path.join(".", | ||
339 | + "presets", | ||
340 | + "raycasting")) | ||
336 | 341 | ||
337 | # MAC App | 342 | # MAC App |
338 | if not os.path.exists(ICON_DIR): | 343 | if not os.path.exists(ICON_DIR): |
@@ -353,10 +358,6 @@ ID_TO_BMP = {VOL_FRONT: [_("Front"), os.path.join(ICON_DIR, "view_front.png")], | @@ -353,10 +358,6 @@ ID_TO_BMP = {VOL_FRONT: [_("Front"), os.path.join(ICON_DIR, "view_front.png")], | ||
353 | # if 1, use vtkVolumeRaycastMapper, if 0, use vtkFixedPointVolumeRayCastMapper | 358 | # if 1, use vtkVolumeRaycastMapper, if 0, use vtkFixedPointVolumeRayCastMapper |
354 | TYPE_RAYCASTING_MAPPER = 0 | 359 | TYPE_RAYCASTING_MAPPER = 0 |
355 | 360 | ||
356 | -folder=RAYCASTING_PRESETS_DIRECTORY= os.path.abspath(os.path.join(".", | ||
357 | - "presets", | ||
358 | - "raycasting")) | ||
359 | - | ||
360 | 361 | ||
361 | RAYCASTING_FILES = {_("Airways"): "Airways.plist", | 362 | RAYCASTING_FILES = {_("Airways"): "Airways.plist", |
362 | _("Airways II"): "Airways II.plist", | 363 | _("Airways II"): "Airways II.plist", |