Files
PDFReaderLite/pdfreaderlite/resources.py
T

18 lines
428 B
Python

from __future__ import annotations
import sys
from pathlib import Path
def resource_path(relative_path: str) -> Path:
base_path = Path(getattr(sys, "_MEIPASS", Path(__file__).resolve().parents[1]))
return base_path / relative_path
def software_icon_path() -> Path:
return resource_path("resources/icons/icon_software.ico")
def pdf_icon_path() -> Path:
return resource_path("resources/icons/icon_pdf.ico")