diff --git a/Dockerfile b/Dockerfile index 7796690..82f0dfa 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,25 +1,26 @@ # Portions Copyright 2019 Productize SPRL -# +# # Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: -# +# # The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. -# +# # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -# +# # # This docker configuration was originally based on https://github.com/productize/docker-kicad as of 301bf181b72c811e9644b83a895ec4a16f2fa1a0 -FROM ubuntu:disco +FROM ubuntu:bionic MAINTAINER Jesse Vincent LABEL Description="Minimal KiCad image based on Ubuntu" ADD upstream/kicad-automation-scripts/kicad-ppa.pgp . + RUN echo 'debconf debconf/frontend select Noninteractive' | debconf-set-selections && \ apt-get -y update && \ apt-get -y install gnupg2 && \ - echo 'deb http://ppa.launchpad.net/js-reynaud/kicad-5.1/ubuntu disco main' >> /etc/apt/sources.list && \ + echo 'deb http://ppa.launchpad.net/js-reynaud/kicad-5.1/ubuntu bionic main' >> /etc/apt/sources.list && \ apt-key add kicad-ppa.pgp && \ apt-get -y update && apt-get -y install --no-install-recommends kicad kicad-footprints kicad-symbols kicad-packages3d && \ apt-get -y purge gnupg2 && \ @@ -63,7 +64,7 @@ RUN apt-get -y update && \ COPY upstream/kiplot /opt/kiplot -RUN cd /opt/kiplot && pip3 install -e . +RUN cd /opt/kiplot && pip3 install -e . COPY etc/kiplot /opt/etc/kiplot diff --git a/etc/rules.mk b/etc/rules.mk index 4c30fd4..bd929fc 100644 --- a/etc/rules.mk +++ b/etc/rules.mk @@ -19,7 +19,7 @@ OUTPUT_PATH := $(PROJECT_ABS_PATH)/$(OUTPUT_BASEDIR) export DOCKER_VOLUMES := --volume $(DOCKER_VISIBLE_PATH):/kicad-project: \ - --volume $(OUTPUT_PATH):/output: + --volume $(OUTPUT_PATH):/output: # Infrastructure config @@ -30,20 +30,20 @@ DOCKER_RUN := $(TOOLS_HOME)/bin/kicad-docker-run -all: +all: @echo "This project does not have an 'all' target. You probably want 'fabrication-outputs'" debug: @echo "BOARD=$(BOARD)" @echo "BOARD_SNAPSHOT_LABEL=$(BOARD_SNAPSHOT_LABEL)" @echo "MAKEFILE_PATH=$(MAKEFILE_PATH)" - + @echo "DOCKER_VISIBLE_PATH=$(DOCKER_VISIBLE_PATH)" @echo "PROJECT_PATH=$(PROJECT_PATH)" @echo "PROJECT_ABS_PATH=$(PROJECT_ABS_PATH)" @echo "OUTPUT_PATH=$(OUTPUT_PATH)" -fabrication-outputs: dirs bom interactive-bom schematic gerbers archive +fabrication-outputs: dirs bom interactive-bom schematic gerbers kicost archive @echo "Done. You can find your outputs in " @echo $(OUTPUT_PATH) @@ -72,8 +72,11 @@ interactive-bom: dirs bom: dirs $(DOCKER_RUN) python -m kicad-automation.eeschema.export_bom --schematic /kicad-project/$(SCHEMATIC_RELATIVE_PATH) --output_dir /output/bom/ export +kicost: bom + $(DOCKER_RUN) kicost --input /kicad-project/$(PROJECT_PATH)/$(BOARD).xml --output=/output/kicost.xlsx --overwrite + schematic-pdf: dirs - $(DOCKER_RUN) python -m kicad-automation.eeschema.schematic --schematic /kicad-project/$(SCHEMATIC_RELATIVE_PATH) --output_dir /output/schematic/pdf export --all_pages -f pdf + $(DOCKER_RUN) python -m kicad-automation.eeschema.schematic --schematic /kicad-project/$(SCHEMATIC_RELATIVE_PATH) --output_dir /output/schematic/pdf export --all_pages -f pdf schematic-svg: dirs $(DOCKER_RUN) python -m kicad-automation.eeschema.schematic --schematic /kicad-project/$(SCHEMATIC_RELATIVE_PATH) --output_dir /output/schematic/svg export --all_pages -f svg