Add ability to add icon into package
This commit is contained in:
parent
3760e1ba14
commit
d7424486a4
1 changed files with 5 additions and 0 deletions
|
@ -12,6 +12,7 @@ ROOT_PATH = Path(__file__).resolve().parent
|
|||
PACKAGES_JSON_PATH = ROOT_PATH / "packages.json"
|
||||
REPOSITORY_JSON_PATH = ROOT_PATH / "repository.json"
|
||||
METADATA_FILEAME = "metadata.json"
|
||||
ICON_FILENAME = "icon.png"
|
||||
|
||||
REPOSITORY_BASE_URI = "https://raw.githubusercontent.com/pointhi/kicad-color-schemes/master"
|
||||
|
||||
|
@ -38,6 +39,10 @@ def create_pcm_from_color_scheme(path, resulting_file):
|
|||
continue
|
||||
zip.write(json_file, f"colors/{json_file.name}")
|
||||
|
||||
icon_file = path / ICON_FILENAME
|
||||
if icon_file.exists():
|
||||
zip.write(icon_file, f"resources/{ICON_FILENAME}")
|
||||
|
||||
|
||||
def install_size_of_zip(zip_path):
|
||||
install_size = 0
|
||||
|
|
Loading…
Reference in a new issue