Operations that copies the project now also copies the PRL
This commit is contained in:
parent
a8c865b921
commit
110053dca1
|
|
@ -7,6 +7,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
||||||
|
|
||||||
## [1.6.4] - UNRELEASED
|
## [1.6.4] - UNRELEASED
|
||||||
### Added
|
### Added
|
||||||
|
- General:
|
||||||
|
- Operations that copies the project now also copies the PRL
|
||||||
- Command line:
|
- Command line:
|
||||||
- `--help-list-offsets` to list footprint offsets (JLCPCB)
|
- `--help-list-offsets` to list footprint offsets (JLCPCB)
|
||||||
- `--help-list-rotations` to list footprint rotations (JLCPCB)
|
- `--help-list-rotations` to list footprint rotations (JLCPCB)
|
||||||
|
|
|
||||||
12
kibot/gs.py
12
kibot/gs.py
|
|
@ -483,9 +483,17 @@ class GS(object):
|
||||||
return None
|
return None
|
||||||
pro_copy = new_pcb_name.replace('.kicad_pcb', GS.pro_ext)
|
pro_copy = new_pcb_name.replace('.kicad_pcb', GS.pro_ext)
|
||||||
if not dry:
|
if not dry:
|
||||||
logger.debug('Copying project `{}` to `{}`'.format(pro_name, pro_copy))
|
logger.debug(f'Copying project `{pro_name}` to `{pro_copy}`')
|
||||||
copy2(pro_name, pro_copy)
|
copy2(pro_name, pro_copy)
|
||||||
return pro_copy
|
# Also copy the PRL
|
||||||
|
prl_name = pro_name[:-3]+'prl'
|
||||||
|
prl_copy = None
|
||||||
|
if os.path.isfile(prl_name):
|
||||||
|
prl_copy = pro_copy[:-3]+'prl'
|
||||||
|
if not dry:
|
||||||
|
logger.debug(f'Copying project local settings `{prl_name}` to `{prl_copy}`')
|
||||||
|
copy2(prl_name, prl_copy)
|
||||||
|
return pro_copy, prl_copy
|
||||||
|
|
||||||
@staticmethod
|
@staticmethod
|
||||||
def copy_project_sch(sch_dir):
|
def copy_project_sch(sch_dir):
|
||||||
|
|
|
||||||
|
|
@ -930,7 +930,7 @@ class VariantOptions(BaseOptions):
|
||||||
fname = os.path.join(pcb_dir, basename+'.kicad_pcb')
|
fname = os.path.join(pcb_dir, basename+'.kicad_pcb')
|
||||||
logger.debug('Storing modified PCB to `{}`'.format(fname))
|
logger.debug('Storing modified PCB to `{}`'.format(fname))
|
||||||
GS.board.Save(fname)
|
GS.board.Save(fname)
|
||||||
pro_name = GS.copy_project(fname)
|
pro_name, _ = GS.copy_project(fname)
|
||||||
KiConf.fix_page_layout(pro_name)
|
KiConf.fix_page_layout(pro_name)
|
||||||
return fname, pcb_dir
|
return fname, pcb_dir
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -232,11 +232,13 @@ class Copy_FilesOptions(Base3DOptions):
|
||||||
self.add_sch_files(extra_files, dest_dir)
|
self.add_sch_files(extra_files, dest_dir)
|
||||||
elif mode_project:
|
elif mode_project:
|
||||||
self.add_sch_files(extra_files, dest_dir)
|
self.add_sch_files(extra_files, dest_dir)
|
||||||
prj_name = GS.copy_project(fname, dry)
|
prj_name, prl_name = GS.copy_project(fname, dry)
|
||||||
# Extra files that we are generating
|
# Extra files that we are generating
|
||||||
extra_files.append(fname)
|
extra_files.append(fname)
|
||||||
if prj_name:
|
if prj_name:
|
||||||
extra_files.append(prj_name)
|
extra_files.append(prj_name)
|
||||||
|
if prl_name:
|
||||||
|
extra_files.append(prl_name)
|
||||||
if mode_project:
|
if mode_project:
|
||||||
extra_files += self.copy_footprints(f.dest, dry)
|
extra_files += self.copy_footprints(f.dest, dry)
|
||||||
extra_files += self.copy_symbols(f.dest, dry)
|
extra_files += self.copy_symbols(f.dest, dry)
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue