fix: align resource and runtime paths
This commit is contained in:
@@ -30,8 +30,14 @@ def get_app_dir():
|
||||
|
||||
|
||||
def get_resource_path(relative_path):
|
||||
"""Return absolute Path for a file under <app_dir>/resources/."""
|
||||
return get_app_dir() / "resources" / relative_path
|
||||
"""Return absolute Path for a resource file.
|
||||
|
||||
Development resources live under src/resources/. In a PyInstaller onedir
|
||||
build, resources are copied next to the executable under resources/.
|
||||
"""
|
||||
if getattr(sys, "frozen", False):
|
||||
return get_app_dir() / "resources" / relative_path
|
||||
return get_app_dir() / "src" / "resources" / relative_path
|
||||
|
||||
|
||||
def get_config_path(relative_path):
|
||||
|
||||
Reference in New Issue
Block a user