[PCB/SCH Variant] Fixed targets (missing project files)
This commit is contained in:
parent
263db4eb37
commit
ea06a32181
|
|
@ -166,6 +166,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|||
- Quick Start:
|
||||
- Problems with KiCad 6+ files using KiCad 5 names for layers
|
||||
- Problems scanning dirs without enough privileges
|
||||
- PCB/SCH Variant
|
||||
- Makefile/compress targets (missing project)
|
||||
|
||||
## [1.6.3] - 2023-06-26
|
||||
### Added
|
||||
|
|
|
|||
|
|
@ -523,15 +523,15 @@ class GS(object):
|
|||
return pro_copy, prl_copy, dru_copy
|
||||
|
||||
@staticmethod
|
||||
def copy_project_names(pcb_name):
|
||||
def copy_project_names(pcb_name, ref_dir):
|
||||
pro_copy, prl_copy, dru_copy = GS.copy_project(pcb_name, dry=True)
|
||||
files = []
|
||||
if pro_copy:
|
||||
files.append(pro_copy)
|
||||
files.append(os.path.join(ref_dir, os.path.basename(pro_copy)))
|
||||
if prl_copy:
|
||||
files.append(prl_copy)
|
||||
files.append(os.path.join(ref_dir, os.path.basename(prl_copy)))
|
||||
if dru_copy:
|
||||
files.append(dru_copy)
|
||||
files.append(os.path.join(ref_dir, os.path.basename(dru_copy)))
|
||||
return files
|
||||
|
||||
@staticmethod
|
||||
|
|
|
|||
|
|
@ -62,9 +62,7 @@ class KiCanvasOptions(VariantOptions):
|
|||
elif s == 'schematic' and GS.sch_file:
|
||||
files.extend(GS.sch.file_names_variant(out_dir))
|
||||
elif s == 'project' and (GS.sch_file or GS.pcb_file):
|
||||
prj_files = GS.copy_project_names(GS.sch_file or GS.pcb_file)
|
||||
for f in prj_files:
|
||||
files.append(os.path.join(out_dir, os.path.basename(f)))
|
||||
files.extend(GS.copy_project_names(GS.sch_file or GS.pcb_file, ref_dir=out_dir))
|
||||
return files
|
||||
|
||||
def get_targets(self, out_dir):
|
||||
|
|
|
|||
|
|
@ -29,7 +29,10 @@ class PCB_Variant_Options(VariantOptions):
|
|||
self._expand_ext = 'kicad_pcb'
|
||||
|
||||
def get_targets(self, out_dir):
|
||||
return [self._parent.expand_filename(out_dir, self.output)]
|
||||
targets = [self._parent.expand_filename(out_dir, self.output)]
|
||||
if self.copy_project:
|
||||
targets.extend(GS.copy_project_names(targets[0], ref_dir=out_dir))
|
||||
return targets
|
||||
|
||||
def run(self, output):
|
||||
super().run(output)
|
||||
|
|
|
|||
|
|
@ -21,7 +21,10 @@ class Sch_Variant_Options(VariantOptions):
|
|||
super().__init__()
|
||||
|
||||
def get_targets(self, out_dir):
|
||||
return GS.sch.file_names_variant(out_dir)
|
||||
targets = list(GS.sch.file_names_variant(out_dir))
|
||||
if self.copy_project:
|
||||
targets.extend(GS.copy_project_names(GS.sch_file, ref_dir=out_dir))
|
||||
return targets
|
||||
|
||||
def run(self, output_dir):
|
||||
super().run(output_dir)
|
||||
|
|
|
|||
Loading…
Reference in New Issue