mirror of
https://github.com/ynput/ayon-core.git
synced 2026-01-01 08:24:53 +01:00
added console, testing infrastructure, zipfile support
This commit is contained in:
parent
6da5c7b463
commit
28be966c37
9 changed files with 301 additions and 30 deletions
38
igniter/install_thread.py
Normal file
38
igniter/install_thread.py
Normal file
|
|
@ -0,0 +1,38 @@
|
|||
# -*- coding: utf-8 -*-
|
||||
"""Working thread for installer."""
|
||||
import sys
|
||||
from Qt.QtCore import QThread, Signal
|
||||
|
||||
from .bootstrap_repos import BootstrapRepos
|
||||
|
||||
|
||||
class InstallThread(QThread):
|
||||
|
||||
message = Signal(str)
|
||||
_path = None
|
||||
|
||||
def __init__(self, parent=None):
|
||||
QThread.__init__(self, parent)
|
||||
|
||||
def run(self):
|
||||
self.message.emit("Installing Pype ...")
|
||||
bs = BootstrapRepos()
|
||||
local_version = bs.get_local_version()
|
||||
|
||||
if getattr(sys, "freeze", None):
|
||||
# copy frozen repo zip
|
||||
pass
|
||||
else:
|
||||
# we are running from live code.
|
||||
# zip content of `repos`, copy it to user data dir and append
|
||||
# version to it.
|
||||
if not self._path:
|
||||
self.message.emit(
|
||||
f"We will use local Pype version {local_version}")
|
||||
repo_file = bs.install_live_repos()
|
||||
if not repo_file:
|
||||
self.message.emit(f"!!! install failed - {repo_file}")
|
||||
self.message.emit(f"installed as {repo_file}")
|
||||
|
||||
def set_path(self, path: str) -> None:
|
||||
self._path = path
|
||||
Loading…
Add table
Add a link
Reference in a new issue