From 942566e957f1011b402af3dfb84d0c76cec1ad16 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jan=20Mr=C3=A1zek?= Date: Mon, 7 Nov 2022 11:24:04 +0100 Subject: [PATCH] Do not use pyvirtual display on Windows --- pcbdraw/ui.py | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/pcbdraw/ui.py b/pcbdraw/ui.py index e4d4475..c68d12c 100755 --- a/pcbdraw/ui.py +++ b/pcbdraw/ui.py @@ -1,3 +1,4 @@ +import platform import sys from dataclasses import dataclass from enum import IntEnum @@ -11,8 +12,6 @@ from .plot import (PcbPlotter, PlotComponents, PlotPaste, PlotPlaceholders, PlotSubstrate, PlotVCuts, ResistorValue, load_remapping, mm2ki) -from .renderer import (GuiPuppetError, RenderAction, Side, postProcessCrop, - renderBoard, validateExternalPrerequisites) from .populate import populate from .pcbnew_common import fakeKiCADGui @@ -274,6 +273,12 @@ def render(input: str, output: str, side: str, renderer: str, projection: str, """ Create a rendered image of the PCB using KiCAD's 3D Viewer """ + if platform.system() == "Windows": + sys.exit("Render functionality is not available on Windows.") + + from .renderer import (GuiPuppetError, RenderAction, Side, postProcessCrop, + renderBoard, validateExternalPrerequisites) + try: validateExternalPrerequisites()