PixelLauncher 2.1.3 — инстансы профилей, старт развёрнутым, аккуратные иконки сборок

This commit is contained in:
kosta2014p committed 2026-10-21 22:58:41 +07:00
1 parent 39cf752b7b
commit a04a586038
13 files changed
+1219 -119

No files matched your search

+36 -1
View File
@@ -26,7 +26,7 @@ STAGE = os.path.join(BUILD, "stage")
ISCC = r"C:\Program Files (x86)\Inno Setup 6\ISCC.exe"
PYVER = "%d.%d.%d" % sys.version_info[:3]
APP_VERSION = "2.1.2" # должен совпадать с LAUNCHER_VERSION в launcher/__init__.py
APP_VERSION = "2.1.3" # должен совпадать с LAUNCHER_VERSION в launcher/__init__.py
SETUP_NAME = "PixelLauncherSetup%s.exe" % APP_VERSION
@@ -83,6 +83,38 @@ def build_stage():
copied.append("tkinter/")
log("tkinter/Tcl: " + ", ".join(copied) + " + tcl/")
# --- Pillow (опционально) — сглаженные иконки сборок; если её нет,
# лаунчер переключается на штатный Tk-путь
sites = [os.path.join(base, "Lib", "site-packages")]
try:
import site as _site
us = _site.getusersitepackages()
sites.extend(us if isinstance(us, (list, tuple)) else [us])
except Exception:
pass
staged = []
for site_dir in sites:
if not os.path.isdir(site_dir):
continue
for name in sorted(os.listdir(site_dir)):
if name != "PIL" and not name.lower().startswith("pillow"):
continue
src = os.path.join(site_dir, name)
dst = os.path.join(STAGE, name)
if os.path.isdir(src):
if os.path.isdir(dst):
shutil.rmtree(dst, ignore_errors=True)
shutil.copytree(src, dst,
ignore=shutil.ignore_patterns("__pycache__",
"*.pyc"))
elif os.path.isfile(src):
shutil.copy2(src, dst)
staged.append(name)
if staged:
break
log("Pillow: " + (", ".join(staged) if staged
else "не найдена — иконки без сглаживания"))
# ._pth: гарантируем точку в пути (иначе import launcher не найдёт)
pth = [f for f in os.listdir(STAGE) if f.endswith("._pth")][0]
pth_path = os.path.join(STAGE, pth)
@@ -151,6 +183,9 @@ if __name__ == "__main__":
"import tkinter,ssl,urllib.request,json,zipfile;"
"r=tkinter.Tk(); r.withdraw(); r.destroy();"
"import launcher.config, launcher.http, launcher.manifest;"
"import importlib,importlib.util;"
"importlib.import_module('PIL.Image')"
" if importlib.util.find_spec('PIL') else None;"
"print('stage ok')"],
capture_output=True, text=True, encoding="utf-8", errors="replace",
cwd=STAGE)