[KiCanvas] Implemented the Quick Start hook

This commit is contained in:
Salvador E. Tropea 2024-01-30 10:08:07 -03:00
parent a1c0dd6c2b
commit 144a83d73d
2 changed files with 9 additions and 4 deletions

View File

@ -95,7 +95,7 @@ class KiCanvasOptions(VariantOptions):
self.restore_title(sch=True)
def run(self, out_dir):
# We declare _none_related=True because we don't know if the PCB/SCH are needed until the output is configured.
# We declare _any_related=True because we don't know if the PCB/SCH are needed until the output is configured.
# Now that we know it we can load the PCB and/or SCH.
for s in self.source:
if s == 'pcb':
@ -194,8 +194,13 @@ class KiCanvas(BaseOutput): # noqa: F821
@staticmethod
def get_conf_examples(name, layers):
# TODO: implement
outs = []
outs = BaseOutput.simple_conf_examples(name, 'Web page to browse the schematic and/or PCB', 'Browse') # noqa: F821
sources = []
if GS.sch_file:
sources.append('schematic')
if GS.pcb_file:
sources.append('pcb')
outs[0]['options'] = {'source': sources}
return outs
def get_navigate_targets(self, out_dir):

View File

@ -1389,7 +1389,7 @@ def test_quick_start_1(test_dir):
ctx.run(extra=['-c', dest_conf_f, '-b', dest_file, '-l'], no_out_dir=True, no_yaml_file=True, no_board_file=True)
OUTS = ('boardview', 'dxf', 'excellon', 'gencad', 'gerb_drill', 'gerber', 'compress', 'hpgl', 'ibom',
'navigate_results', 'netlist', 'pcb_print', 'pcbdraw', 'pdf', 'position', 'ps', 'render_3d',
'report', 'step', 'svg', 'kiri', # 'kicanvas',
'report', 'step', 'svg', 'kiri', 'kicanvas',
'bom', 'download_datasheets', 'pdf_sch_print', 'svg_sch_print')
for o in OUTS:
ctx.search_out(r'\['+o+r'\]')