Fix py2app (#69)

* Initial commit of py2app code

* Use environment variable RESOURCE_PATH when running as a bundle

* Move config files to system config location
This commit is contained in:
2023-12-16 22:20:24 -06:00
committed by GitHub
parent 525fd99a58
commit f663430984
28 changed files with 93 additions and 25 deletions

View File

@@ -26,7 +26,7 @@ from src.engines.engine_manager import EngineManager
from src.render_queue import RenderQueue, JobNotFoundError
from src.utilities.config import Config
from src.utilities.misc_helper import system_safe_path, current_system_os, current_system_cpu, \
current_system_os_version, config_dir
current_system_os_version
from src.utilities.server_helper import generate_thumbnail_for_job
from src.utilities.zeroconf_server import ZeroconfServer
@@ -55,7 +55,7 @@ def sorted_jobs(all_jobs, sort_by_date=True):
@server.route('/')
@server.route('/index')
def index():
with open(system_safe_path(os.path.join(config_dir(), 'presets.yaml'))) as f:
with open(system_safe_path(os.path.join(Config.config_dir(), 'presets.yaml'))) as f:
render_presets = yaml.load(f, Loader=yaml.FullLoader)
return render_template('index.html', all_jobs=sorted_jobs(RenderQueue.all_jobs()),