1
0
mirror of git://projects.qi-hardware.com/eda-tools.git synced 2024-12-22 12:57:41 +02:00

upleveled cmdline patches to kicad bzr 3493

This commit is contained in:
Wolfgang Spraul 2012-04-08 08:37:48 +02:00
parent 4902886baa
commit 49d4ae6e50
9 changed files with 201 additions and 175 deletions

2
kicad-cmdline-testing/.gitignore vendored Normal file
View File

@ -0,0 +1,2 @@
ben-wpan
kicad-libs

View File

@ -100,7 +100,7 @@ if [ "$1" == "test" ]; then
$PCBNEW --drc atusb.brd
ls -la *.rpt
echo -----
echo Generating .pos front and back position files:
echo Generating .pos position file:
$PCBNEW --pos atusb.brd
ls -la *.pos
echo -----
@ -132,7 +132,7 @@ if [ "$1" == "clean" ]; then
atusb.erc \
atusb.net \
atusb.drl atusb-NPTH.drl \
atusb_Front.pos \
atusb_all.pos \
atusb.rpt \
atusb.cmp \
atusb.csv \

View File

@ -1,7 +1,7 @@
First build
-----------
bzr checkout -r 3378 lp:kicad kicad.bzr
bzr checkout -r 3493 lp:kicad kicad.bzr
cd kicad.bzr
ln -s wherever/eda-tools/kicad-patches patches
quilt push -a
@ -23,3 +23,33 @@ quilt push -a
cmake .
make -j 5
make install
Uplevel patches to latest KiCad
-------------------------------
git clone git@projects.qi-hardware.com:eda-tools.git
bzr branch lp:kicad
cp -a kicad kicad.<latest_kicad_rev>
cd kicad
# apply patches manually
patch --dry-run -p1 < ../eda-tools/kicad-patches/cmdline_{new,common,eeschema,pcbnew}.patch
# check with --dry-run, apply carefully, go through .rej files
# delete all .rej and .orig files
# build latest KiCad with upleveled patches
cmake -DKICAD_TESTING_VERSION=ON .
make -j 5
# test cmdline functionality
cd ../eda-tools/kicad-cmdline-testing
./kicmd_test clean
./kicmd_test test
# check that the output files look right, no crashes, no dialogs and
# that a subsequent ./kicmd_test clean will find and delete all
# expected files
./eda-tools/kicad-patches/kicad_diff.sh <latest_kicad_rev>
# check patches, move to eda-tools/kicad-patches, update doc, check
# that it applies clean, commit

View File

@ -1,6 +1,6 @@
diff -ru kicad.orig/include/appl_wxstruct.h kicad/include/appl_wxstruct.h
--- kicad.orig/include/appl_wxstruct.h 2012-01-25 13:11:10.508078000 +0100
+++ kicad/include/appl_wxstruct.h 2012-01-25 11:59:30.048140872 +0100
diff -ru kicad.3493/include/appl_wxstruct.h kicad/include/appl_wxstruct.h
--- kicad.3493/include/appl_wxstruct.h 2012-04-08 03:24:18.653600000 +0200
+++ kicad/include/appl_wxstruct.h 2012-04-08 06:48:52.439995635 +0200
@@ -52,6 +52,7 @@
class wxSingleInstanceChecker;
class wxHtmlHelpController;
@ -18,11 +18,10 @@ diff -ru kicad.orig/include/appl_wxstruct.h kicad/include/appl_wxstruct.h
/**
* Function SetLanguage
* sets the dictionary file name for internationalization.
Only in kicad/include: netlist_lexer.h
diff -ru kicad.orig/include/wxBasePcbFrame.h kicad/include/wxBasePcbFrame.h
--- kicad.orig/include/wxBasePcbFrame.h 2012-01-25 13:11:10.508078000 +0100
+++ kicad/include/wxBasePcbFrame.h 2012-01-25 11:59:30.049140864 +0100
@@ -517,6 +517,7 @@
diff -ru kicad.3493/include/wxBasePcbFrame.h kicad/include/wxBasePcbFrame.h
--- kicad.3493/include/wxBasePcbFrame.h 2012-04-08 03:24:18.653600000 +0200
+++ kicad/include/wxBasePcbFrame.h 2012-04-08 06:48:52.440995630 +0200
@@ -571,6 +571,7 @@
bool ExportToDxfFile( const wxString& aFullFileName,
int aLayer,
@ -30,10 +29,10 @@ diff -ru kicad.orig/include/wxBasePcbFrame.h kicad/include/wxBasePcbFrame.h
EDA_DRAW_MODE_T aTraceMode );
void Plot_Layer( PLOTTER* plotter,
diff -ru kicad.orig/include/wxEeschemaStruct.h kicad/include/wxEeschemaStruct.h
--- kicad.orig/include/wxEeschemaStruct.h 2012-01-25 13:11:10.508078000 +0100
+++ kicad/include/wxEeschemaStruct.h 2012-01-25 11:59:30.119140342 +0100
@@ -593,6 +593,8 @@
diff -ru kicad.3493/include/wxEeschemaStruct.h kicad/include/wxEeschemaStruct.h
--- kicad.3493/include/wxEeschemaStruct.h 2012-04-08 03:24:18.653600000 +0200
+++ kicad/include/wxEeschemaStruct.h 2012-04-08 06:48:52.442995618 +0200
@@ -595,6 +595,8 @@
void SVG_Print( wxCommandEvent& event );
// Plot functions:
@ -42,10 +41,10 @@ diff -ru kicad.orig/include/wxEeschemaStruct.h kicad/include/wxEeschemaStruct.h
void ToPlot_PS( wxCommandEvent& event );
void ToPlot_HPGL( wxCommandEvent& event );
void ToPlot_DXF( wxCommandEvent& event );
diff -ru kicad.orig/include/wxPcbStruct.h kicad/include/wxPcbStruct.h
--- kicad.orig/include/wxPcbStruct.h 2012-01-25 13:11:10.508078000 +0100
+++ kicad/include/wxPcbStruct.h 2012-01-25 11:59:30.199139746 +0100
@@ -75,6 +75,7 @@
diff -ru kicad.3493/include/wxPcbStruct.h kicad/include/wxPcbStruct.h
--- kicad.3493/include/wxPcbStruct.h 2012-04-08 03:24:18.653600000 +0200
+++ kicad/include/wxPcbStruct.h 2012-04-08 06:48:52.445995601 +0200
@@ -74,6 +74,7 @@
class PCB_EDIT_FRAME : public PCB_BASE_FRAME
{
friend class PCB_LAYER_WIDGET;
@ -53,18 +52,19 @@ diff -ru kicad.orig/include/wxPcbStruct.h kicad/include/wxPcbStruct.h
void updateTraceWidthSelectBox();
void updateViaSizeSelectBox();
Only in kicad/common: CMakeFiles
Only in kicad/common: cmake_install.cmake
diff -ru kicad.orig/common/confirm.cpp kicad/common/confirm.cpp
--- kicad.orig/common/confirm.cpp 2012-01-25 13:11:10.508078000 +0100
+++ kicad/common/confirm.cpp 2012-01-25 11:59:30.201139731 +0100
@@ -9,11 +9,18 @@
#include <wx/html/htmlwin.h>
#include <html_messagebox.h>
diff -ru kicad.3493/common/confirm.cpp kicad/common/confirm.cpp
--- kicad.3493/common/confirm.cpp 2012-04-08 03:24:18.653600000 +0200
+++ kicad/common/confirm.cpp 2012-04-08 06:49:55.618649886 +0200
@@ -11,6 +11,8 @@
#include <dialog_exit_base.h>
#include <bitmaps.h>
+bool g_CmdLineMode = false;
void DisplayError( wxWindow* parent, const wxString& text, int displaytime )
+
class DIALOG_EXIT: public DIALOG_EXIT_BASE
{
public:
@@ -42,6 +44,12 @@
{
wxMessageDialog* dialog;
@ -77,7 +77,7 @@ diff -ru kicad.orig/common/confirm.cpp kicad/common/confirm.cpp
if( displaytime > 0 )
dialog = new wxMessageDialog( parent, text, _( "Warning" ),
wxOK | wxCENTRE | wxICON_INFORMATION );
@@ -30,6 +37,12 @@
@@ -58,6 +66,12 @@
{
wxMessageDialog* dialog;
@ -90,7 +90,7 @@ diff -ru kicad.orig/common/confirm.cpp kicad/common/confirm.cpp
dialog = new wxMessageDialog( parent, text, _( "Info:" ),
wxOK | wxCENTRE | wxICON_INFORMATION );
@@ -41,6 +54,12 @@
@@ -69,6 +83,12 @@
void DisplayHtmlInfoMessage( wxWindow* parent, const wxString& title,
const wxString& text, const wxSize& size )
{
@ -103,9 +103,9 @@ diff -ru kicad.orig/common/confirm.cpp kicad/common/confirm.cpp
HTML_MESSAGE_BOX *dlg = new HTML_MESSAGE_BOX(parent,title, wxDefaultPosition, size );
dlg->AddHTML_Text( text );
dlg->ShowModal();
diff -ru kicad.orig/common/edaappl.cpp kicad/common/edaappl.cpp
--- kicad.orig/common/edaappl.cpp 2012-01-25 13:11:10.508078000 +0100
+++ kicad/common/edaappl.cpp 2012-01-25 11:59:30.202139723 +0100
diff -ru kicad.3493/common/edaappl.cpp kicad/common/edaappl.cpp
--- kicad.3493/common/edaappl.cpp 2012-04-08 03:24:18.653600000 +0200
+++ kicad/common/edaappl.cpp 2012-04-08 06:48:52.448995586 +0200
@@ -306,6 +306,7 @@
wxString EnvLang;

View File

@ -1,7 +1,7 @@
diff -ru kicad.orig/eeschema/CMakeLists.txt kicad/eeschema/CMakeLists.txt
--- kicad.orig/eeschema/CMakeLists.txt 2012-01-25 13:11:10.508078000 +0100
+++ kicad/eeschema/CMakeLists.txt 2012-01-25 12:16:26.730617529 +0100
@@ -81,6 +81,7 @@
diff -ru kicad.3493/eeschema/CMakeLists.txt kicad/eeschema/CMakeLists.txt
--- kicad.3493/eeschema/CMakeLists.txt 2012-04-08 03:24:18.653600000 +0200
+++ kicad/eeschema/CMakeLists.txt 2012-04-08 06:50:45.274378556 +0200
@@ -82,6 +82,7 @@
eeredraw.cpp
eeschema.cpp
eeschema_config.cpp
@ -9,9 +9,9 @@ diff -ru kicad.orig/eeschema/CMakeLists.txt kicad/eeschema/CMakeLists.txt
erc.cpp
events_called_functions_for_edit.cpp
files-io.cpp
diff -ru kicad.orig/eeschema/dialogs/dialog_build_BOM.h kicad/eeschema/dialogs/dialog_build_BOM.h
--- kicad.orig/eeschema/dialogs/dialog_build_BOM.h 2012-01-25 13:11:10.508078000 +0100
+++ kicad/eeschema/dialogs/dialog_build_BOM.h 2012-01-25 12:16:26.730617529 +0100
diff -ru kicad.3493/eeschema/dialogs/dialog_build_BOM.h kicad/eeschema/dialogs/dialog_build_BOM.h
--- kicad.3493/eeschema/dialogs/dialog_build_BOM.h 2012-04-08 03:24:18.653600000 +0200
+++ kicad/eeschema/dialogs/dialog_build_BOM.h 2012-04-08 06:50:45.278378536 +0200
@@ -17,6 +17,7 @@
class DIALOG_BUILD_BOM : public DIALOG_BUILD_BOM_BASE
@ -20,9 +20,9 @@ diff -ru kicad.orig/eeschema/dialogs/dialog_build_BOM.h kicad/eeschema/dialogs/d
private:
EDA_DRAW_FRAME* m_Parent;
wxConfig* m_Config;
diff -ru kicad.orig/eeschema/dialogs/dialog_erc.cpp kicad/eeschema/dialogs/dialog_erc.cpp
--- kicad.orig/eeschema/dialogs/dialog_erc.cpp 2012-01-25 13:11:10.508078000 +0100
+++ kicad/eeschema/dialogs/dialog_erc.cpp 2012-01-25 12:16:26.742617441 +0100
diff -ru kicad.3493/eeschema/dialogs/dialog_erc.cpp kicad/eeschema/dialogs/dialog_erc.cpp
--- kicad.3493/eeschema/dialogs/dialog_erc.cpp 2012-04-08 03:24:18.653600000 +0200
+++ kicad/eeschema/dialogs/dialog_erc.cpp 2012-04-08 06:50:45.279378530 +0200
@@ -574,10 +574,10 @@
_( "Electronic rule check file (.erc)|*.erc" ),
wxFD_SAVE | wxFD_OVERWRITE_PROMPT );
@ -36,9 +36,9 @@ diff -ru kicad.orig/eeschema/dialogs/dialog_erc.cpp kicad/eeschema/dialogs/dialo
{
Close( true );
ExecuteFile( this, wxGetApp().GetEditorName(), QuoteFullPath( fn ) );
diff -ru kicad.orig/eeschema/dialogs/dialog_erc.h kicad/eeschema/dialogs/dialog_erc.h
--- kicad.orig/eeschema/dialogs/dialog_erc.h 2012-01-25 13:11:10.508078000 +0100
+++ kicad/eeschema/dialogs/dialog_erc.h 2012-01-25 12:16:26.742617441 +0100
diff -ru kicad.3493/eeschema/dialogs/dialog_erc.h kicad/eeschema/dialogs/dialog_erc.h
--- kicad.3493/eeschema/dialogs/dialog_erc.h 2012-04-08 03:24:18.653600000 +0200
+++ kicad/eeschema/dialogs/dialog_erc.h 2012-04-08 06:50:45.280378524 +0200
@@ -29,6 +29,7 @@
class DIALOG_ERC : public DIALOG_ERC_BASE
@ -47,9 +47,9 @@ diff -ru kicad.orig/eeschema/dialogs/dialog_erc.h kicad/eeschema/dialogs/dialog_
DECLARE_EVENT_TABLE()
private:
diff -ru kicad.orig/eeschema/dialogs/dialog_plot_schematic_DXF.cpp kicad/eeschema/dialogs/dialog_plot_schematic_DXF.cpp
--- kicad.orig/eeschema/dialogs/dialog_plot_schematic_DXF.cpp 2012-01-25 13:11:10.508078000 +0100
+++ kicad/eeschema/dialogs/dialog_plot_schematic_DXF.cpp 2012-01-25 12:16:26.743617434 +0100
diff -ru kicad.3493/eeschema/dialogs/dialog_plot_schematic_DXF.cpp kicad/eeschema/dialogs/dialog_plot_schematic_DXF.cpp
--- kicad.3493/eeschema/dialogs/dialog_plot_schematic_DXF.cpp 2012-04-08 03:24:18.653600000 +0200
+++ kicad/eeschema/dialogs/dialog_plot_schematic_DXF.cpp 2012-04-08 06:50:45.281378518 +0200
@@ -42,6 +42,7 @@
class DIALOG_PLOT_SCHEMATIC_DXF : public DIALOG_PLOT_SCHEMATIC_DXF_BASE
@ -74,9 +74,9 @@ diff -ru kicad.orig/eeschema/dialogs/dialog_plot_schematic_DXF.cpp kicad/eeschem
void SCH_EDIT_FRAME::ToPlot_DXF( wxCommandEvent& event )
{
DIALOG_PLOT_SCHEMATIC_DXF DXF_frame( this );
diff -ru kicad.orig/eeschema/dialogs/dialog_plot_schematic_PS.cpp kicad/eeschema/dialogs/dialog_plot_schematic_PS.cpp
--- kicad.orig/eeschema/dialogs/dialog_plot_schematic_PS.cpp 2012-01-25 13:11:10.508078000 +0100
+++ kicad/eeschema/dialogs/dialog_plot_schematic_PS.cpp 2012-01-25 12:16:26.743617434 +0100
diff -ru kicad.3493/eeschema/dialogs/dialog_plot_schematic_PS.cpp kicad/eeschema/dialogs/dialog_plot_schematic_PS.cpp
--- kicad.3493/eeschema/dialogs/dialog_plot_schematic_PS.cpp 2012-04-08 03:24:18.653600000 +0200
+++ kicad/eeschema/dialogs/dialog_plot_schematic_PS.cpp 2012-04-08 06:50:45.282378513 +0200
@@ -48,6 +48,7 @@
class DIALOG_PLOT_SCHEMATIC_PS : public DIALOG_PLOT_SCHEMATIC_PS_BASE
@ -101,9 +101,9 @@ diff -ru kicad.orig/eeschema/dialogs/dialog_plot_schematic_PS.cpp kicad/eeschema
void SCH_EDIT_FRAME::ToPlot_PS( wxCommandEvent& event )
{
DIALOG_PLOT_SCHEMATIC_PS dlg( this );
diff -ru kicad.orig/eeschema/dialogs/dialog_SVG_print.cpp kicad/eeschema/dialogs/dialog_SVG_print.cpp
--- kicad.orig/eeschema/dialogs/dialog_SVG_print.cpp 2012-01-25 13:11:10.508078000 +0100
+++ kicad/eeschema/dialogs/dialog_SVG_print.cpp 2012-01-25 12:16:26.744617426 +0100
diff -ru kicad.3493/eeschema/dialogs/dialog_SVG_print.cpp kicad/eeschema/dialogs/dialog_SVG_print.cpp
--- kicad.3493/eeschema/dialogs/dialog_SVG_print.cpp 2012-04-08 03:24:18.653600000 +0200
+++ kicad/eeschema/dialogs/dialog_SVG_print.cpp 2012-04-08 06:50:45.283378508 +0200
@@ -53,6 +53,13 @@
static bool s_Print_Frame_Ref = true;
static int s_PlotBlackAndWhite = 0;
@ -118,9 +118,9 @@ diff -ru kicad.orig/eeschema/dialogs/dialog_SVG_print.cpp kicad/eeschema/dialogs
/*!
* DIALOG_SVG_PRINT functions
diff -ru kicad.orig/eeschema/dialogs/dialog_SVG_print.h kicad/eeschema/dialogs/dialog_SVG_print.h
--- kicad.orig/eeschema/dialogs/dialog_SVG_print.h 2012-01-25 13:11:10.508078000 +0100
+++ kicad/eeschema/dialogs/dialog_SVG_print.h 2012-01-25 12:16:26.744617426 +0100
diff -ru kicad.3493/eeschema/dialogs/dialog_SVG_print.h kicad/eeschema/dialogs/dialog_SVG_print.h
--- kicad.3493/eeschema/dialogs/dialog_SVG_print.h 2012-04-08 03:24:18.653600000 +0200
+++ kicad/eeschema/dialogs/dialog_SVG_print.h 2012-04-08 06:50:45.283378508 +0200
@@ -11,6 +11,8 @@
class DIALOG_SVG_PRINT : public DIALOG_SVG_PRINT_base
@ -130,21 +130,18 @@ diff -ru kicad.orig/eeschema/dialogs/dialog_SVG_print.h kicad/eeschema/dialogs/d
private:
EDA_DRAW_FRAME* m_Parent;
wxConfig* m_Config;
Only in kicad/eeschema: eeschema
Only in kicad/eeschema: eeschema_cmdline.cpp
Only in kicad/eeschema: eeschema_cmdline.h
diff -ru kicad.orig/eeschema/eeschema.cpp kicad/eeschema/eeschema.cpp
--- kicad.orig/eeschema/eeschema.cpp 2012-01-25 13:11:10.508078000 +0100
+++ kicad/eeschema/eeschema.cpp 2012-01-25 12:16:58.330385504 +0100
@@ -41,6 +41,7 @@
diff -ru kicad.3493/eeschema/eeschema.cpp kicad/eeschema/eeschema.cpp
--- kicad.3493/eeschema/eeschema.cpp 2012-04-08 03:24:18.653600000 +0200
+++ kicad/eeschema/eeschema.cpp 2012-04-08 06:51:29.448137537 +0200
@@ -39,6 +39,7 @@
#include <general.h>
#include <protos.h>
#include <hotkeys.h>
+#include <eeschema_cmdline.h>
#include <dialogs/dialog_color_config.h>
#include <transform.h>
+#include <eeschema_cmdline.h>
#include <wx/snglinst.h>
@@ -122,6 +123,9 @@
#include <wildcards_and_files_ext.h>
@@ -123,6 +124,9 @@
wxFileName filename;
SCH_EDIT_FRAME* frame = NULL;

View File

@ -1,5 +1,5 @@
--- /dev/null 2012-01-06 01:10:09.493787641 +0100
+++ kicad/eeschema/eeschema_cmdline.h 2012-01-25 11:59:18.262228810 +0100
--- /dev/null 2012-04-03 10:16:45.622661012 +0200
+++ kicad/eeschema/eeschema_cmdline.h 2012-04-08 06:48:35.478088781 +0200
@@ -0,0 +1,14 @@
+/////////////////////////////////////////////////////////////////////////////
+// Name: eeschema_cmdline.h
@ -15,8 +15,8 @@
+};
+
+extern EESCHEMA_CMDLINE g_EESchemaCmdLine;
--- /dev/null 2012-01-06 01:10:09.493787641 +0100
+++ kicad/eeschema/eeschema_cmdline.cpp 2012-01-25 12:29:57.467694380 +0100
--- /dev/null 2012-04-03 10:16:45.622661012 +0200
+++ kicad/eeschema/eeschema_cmdline.cpp 2012-04-08 07:11:42.232529821 +0200
@@ -0,0 +1,234 @@
+/////////////////////////////////////////////////////////////////////////////
+// Name: eeschema_cmdline.cpp
@ -40,6 +40,7 @@
+#include <dialog_color_config.h>
+#include <wxEeschemaStruct.h>
+#include <sch_sheet.h>
+#include <wildcards_and_files_ext.h>
+#include <eeschema_cmdline.h>
+
+EESCHEMA_CMDLINE g_EESchemaCmdLine;
@ -234,8 +235,7 @@
+ frame->BuildNetListBase();
+ fn.SetExt( wxT( "net" ) );
+ frame->WriteNetListFile( NET_TYPE_PCBNEW /* aFormat */,
+ fn.GetFullPath(), false /* aUse_netnames - only used for Spice */,
+ false /* aUsePrefix */ );
+ fn.GetFullPath(), 0 /* aNetlistOptions */ );
+ }
+ else if ( parser.Found( wxT("bom") ) )
+ {
@ -252,8 +252,8 @@
+ }
+ return true;
+}
--- /dev/null 2012-01-06 01:10:09.493787641 +0100
+++ kicad/pcbnew/pcbnew_cmdline.h 2012-01-25 11:59:20.948208768 +0100
--- /dev/null 2012-04-03 10:16:45.622661012 +0200
+++ kicad/pcbnew/pcbnew_cmdline.h 2012-04-08 06:48:35.482088711 +0200
@@ -0,0 +1,7 @@
+/////////////////////////////////////////////////////////////////////////////
+// Name: pcbnew_cmdline.h
@ -262,9 +262,9 @@
+/////////////////////////////////////////////////////////////////////////////
+
+bool Pcbnew_CmdLine();
--- /dev/null 2012-01-06 01:10:09.493787641 +0100
+++ kicad/pcbnew/pcbnew_cmdline.cpp 2012-01-25 12:30:23.351506231 +0100
@@ -0,0 +1,526 @@
--- /dev/null 2012-04-03 10:16:45.622661012 +0200
+++ kicad/pcbnew/pcbnew_cmdline.cpp 2012-04-08 08:12:17.841567431 +0200
@@ -0,0 +1,538 @@
+/////////////////////////////////////////////////////////////////////////////
+// Name: pcbnew_cmdline.cpp
+// Copyright: Wolfgang Spraul
@ -307,6 +307,7 @@
+#include <printout_controler.h>
+#include <dialog_plot_base.h>
+#include <dialog_SVG_print.h>
+#include <wildcards_and_files_ext.h>
+
+extern int g_DrawDefaultLineThickness;
+
@ -457,9 +458,11 @@
+ if ( parser.Found( wxT("plot"), &str ) ) // see pcbplot.cpp
+ {
+ int plot_format;
+ PCB_PLOT_PARAMS plot_params;
+ wxString ext, layers_str;
+
+ g_PcbPlotOptions.m_PlotLineWidth = g_DrawDefaultLineThickness;
+ plot_params = frame->GetPlotSettings();
+ plot_params.m_PlotLineWidth = g_DrawDefaultLineThickness;
+ if (!str.CmpNoCase( wxT("ps") ) )
+ {
+ plot_format = PLOT_FORMAT_POST;
@ -492,11 +495,11 @@
+ && parser.Found( wxT("plot-drill-marks"), &str ) )
+ {
+ if (!str.CmpNoCase( wxT("none") ) )
+ g_PcbPlotOptions.m_DrillShapeOpt = PCB_PLOT_PARAMS::NO_DRILL_SHAPE;
+ plot_params.m_DrillShapeOpt = PCB_PLOT_PARAMS::NO_DRILL_SHAPE;
+ else if ( !str.CmpNoCase( wxT("small") ) )
+ g_PcbPlotOptions.m_DrillShapeOpt = PCB_PLOT_PARAMS::SMALL_DRILL_SHAPE;
+ plot_params.m_DrillShapeOpt = PCB_PLOT_PARAMS::SMALL_DRILL_SHAPE;
+ else if ( !str.CmpNoCase( wxT("actual") ) )
+ g_PcbPlotOptions.m_DrillShapeOpt = PCB_PLOT_PARAMS::FULL_DRILL_SHAPE;
+ plot_params.m_DrillShapeOpt = PCB_PLOT_PARAMS::FULL_DRILL_SHAPE;
+ else
+ {
+ wxFprintf( stderr, wxT("Unexpected Postscript plot drill marks option '%ls'.\n"), str.c_str());
@ -505,12 +508,14 @@
+ }
+
+ // --plot-mirror
+ g_PcbPlotOptions.m_PlotMirror = parser.Found( wxT("plot-mirror") );
+ plot_params.m_PlotMirror = parser.Found( wxT("plot-mirror") );
+
+ // --plot-exclude-edge
+ g_PcbPlotOptions.m_ExcludeEdgeLayer =
+ plot_params.m_ExcludeEdgeLayer =
+ parser.Found( wxT("plot-exclude-edge") );
+
+ frame->SetPlotSettings(plot_params);
+
+ parser.Found( wxT("layers"), &layers_str );
+ wxStringTokenizer tokenizer( layers_str, _(",") );
+ int layer_i = 0;
@ -766,8 +771,15 @@
+ }
+
+ if ( parser.Found( wxT("pos") ) )
+ // see gen_modules_placefile.cpp:PCB_EDIT_FRAME::GenModulesPosition()
+ frame->GenModulesPosition( dummy );
+ {
+ // see gen_modules_placefile.cpp:PCB_EDIT_FRAME::GenFootprintsPositionFile()
+ fn = cmdline_fn;
+ fn.SetName( fn.GetName() + wxT( "_all") );
+ fn.SetExt( FootprintPlaceFileExtension );
+ frame->DoGenFootprintsPositionFile( fn.GetFullPath(),
+ true /* aUnitsMM */, true /* aForceSmdItems */,
+ 2 /* aSide, 2 = both */ );
+ }
+
+ if ( parser.Found( wxT("bom") ) )
+ // see build_BOM_from_board.cpp:PCB_EDIT_FRAME::RecreateBOMFileFromBoard()

View File

@ -1,6 +1,6 @@
diff -ru kicad.orig/pcbnew/build_BOM_from_board.cpp kicad/pcbnew/build_BOM_from_board.cpp
--- kicad.orig/pcbnew/build_BOM_from_board.cpp 2012-01-25 13:11:10.508078000 +0100
+++ kicad/pcbnew/build_BOM_from_board.cpp 2012-01-25 12:18:17.031808065 +0100
diff -ru kicad.3493/pcbnew/build_BOM_from_board.cpp kicad/pcbnew/build_BOM_from_board.cpp
--- kicad.3493/pcbnew/build_BOM_from_board.cpp 2012-04-08 03:24:18.653600000 +0200
+++ kicad/pcbnew/build_BOM_from_board.cpp 2012-04-08 06:52:44.569728557 +0200
@@ -67,6 +67,7 @@
fn = GetScreen()->GetFileName();
fn.SetExt( CsvFileExtension );
@ -17,32 +17,31 @@ diff -ru kicad.orig/pcbnew/build_BOM_from_board.cpp kicad/pcbnew/build_BOM_from_
FichBom = wxFopen( fn.GetFullPath(), wxT( "wt" ) );
diff -ru kicad.orig/pcbnew/CMakeLists.txt kicad/pcbnew/CMakeLists.txt
--- kicad.orig/pcbnew/CMakeLists.txt 2012-01-25 13:11:10.508078000 +0100
+++ kicad/pcbnew/CMakeLists.txt 2012-01-25 12:18:17.032808058 +0100
@@ -155,6 +155,7 @@
diff -ru kicad.3493/pcbnew/CMakeLists.txt kicad/pcbnew/CMakeLists.txt
--- kicad.3493/pcbnew/CMakeLists.txt 2012-04-08 03:24:18.653600000 +0200
+++ kicad/pcbnew/CMakeLists.txt 2012-04-08 06:52:44.572728497 +0200
@@ -162,6 +162,7 @@
onleftclick.cpp
onrightclick.cpp
pcb_plot_params.cpp
pcbnew.cpp
+ pcbnew_cmdline.cpp
pcbnew_config.cpp
pcbplot.cpp
plotgerb.cpp
Only in kicad/pcbnew/dialogs: dialog_freeroute_exchange_help_html.h
diff -ru kicad.orig/pcbnew/dialogs/dialog_gendrill.h kicad/pcbnew/dialogs/dialog_gendrill.h
--- kicad.orig/pcbnew/dialogs/dialog_gendrill.h 2012-01-25 13:11:10.508078000 +0100
+++ kicad/pcbnew/dialogs/dialog_gendrill.h 2012-01-25 12:18:17.043807978 +0100
diff -ru kicad.3493/pcbnew/dialogs/dialog_gendrill.h kicad/pcbnew/dialogs/dialog_gendrill.h
--- kicad.3493/pcbnew/dialogs/dialog_gendrill.h 2012-04-08 03:24:18.653600000 +0200
+++ kicad/pcbnew/dialogs/dialog_gendrill.h 2012-04-08 06:52:44.574728462 +0200
@@ -33,6 +33,7 @@
class DIALOG_GENDRILL : public DIALOG_GENDRILL_BASE
{
+friend bool Pcbnew_CmdLine();
public:
static int m_UnitDrillIsInch;
static int m_ZerosFormat;
diff -ru kicad.orig/pcbnew/dialogs/dialog_SVG_print.h kicad/pcbnew/dialogs/dialog_SVG_print.h
--- kicad.orig/pcbnew/dialogs/dialog_SVG_print.h 2012-01-25 13:11:10.508078000 +0100
+++ kicad/pcbnew/dialogs/dialog_SVG_print.h 2012-01-25 12:18:17.044807971 +0100
DIALOG_GENDRILL( PCB_EDIT_FRAME* parent );
~DIALOG_GENDRILL();
diff -ru kicad.3493/pcbnew/dialogs/dialog_SVG_print.h kicad/pcbnew/dialogs/dialog_SVG_print.h
--- kicad.3493/pcbnew/dialogs/dialog_SVG_print.h 2012-04-08 03:24:18.653600000 +0200
+++ kicad/pcbnew/dialogs/dialog_SVG_print.h 2012-04-08 06:52:44.575728446 +0200
@@ -13,6 +13,7 @@
class DIALOG_SVG_PRINT : public DIALOG_SVG_PRINT_base
@ -51,9 +50,9 @@ diff -ru kicad.orig/pcbnew/dialogs/dialog_SVG_print.h kicad/pcbnew/dialogs/dialo
private:
PCB_BASE_FRAME* m_Parent;
wxConfig* m_Config;
diff -ru kicad.orig/pcbnew/drc_stuff.h kicad/pcbnew/drc_stuff.h
--- kicad.orig/pcbnew/drc_stuff.h 2012-01-25 13:11:10.508078000 +0100
+++ kicad/pcbnew/drc_stuff.h 2012-01-25 12:18:17.045807964 +0100
diff -ru kicad.3493/pcbnew/drc_stuff.h kicad/pcbnew/drc_stuff.h
--- kicad.3493/pcbnew/drc_stuff.h 2012-04-08 03:24:18.653600000 +0200
+++ kicad/pcbnew/drc_stuff.h 2012-04-08 06:52:44.576728430 +0200
@@ -146,6 +146,7 @@
*/
class DRC
@ -62,10 +61,10 @@ diff -ru kicad.orig/pcbnew/drc_stuff.h kicad/pcbnew/drc_stuff.h
friend class DIALOG_DRC_CONTROL;
private:
diff -ru kicad.orig/pcbnew/gendrill.cpp kicad/pcbnew/gendrill.cpp
--- kicad.orig/pcbnew/gendrill.cpp 2012-01-25 13:11:10.508078000 +0100
+++ kicad/pcbnew/gendrill.cpp 2012-01-25 12:18:17.046807957 +0100
@@ -159,8 +159,13 @@
diff -ru kicad.3493/pcbnew/gendrill.cpp kicad/pcbnew/gendrill.cpp
--- kicad.3493/pcbnew/gendrill.cpp 2012-04-08 03:24:18.653600000 +0200
+++ kicad/pcbnew/gendrill.cpp 2012-04-08 06:52:44.582728348 +0200
@@ -155,8 +155,13 @@
fn.GetFullName(), wxGetTranslation( DrillFileWildcard ),
wxFD_SAVE | wxFD_CHANGE_DIR );
@ -79,7 +78,7 @@ diff -ru kicad.orig/pcbnew/gendrill.cpp kicad/pcbnew/gendrill.cpp
FILE* aFile = wxFopen( dlg.GetPath(), wxT( "w" ) );
@@ -619,8 +624,13 @@
@@ -615,8 +620,13 @@
fn.GetFullName(), wildcard,
wxFD_SAVE );
@ -93,8 +92,8 @@ diff -ru kicad.orig/pcbnew/gendrill.cpp kicad/pcbnew/gendrill.cpp
FILE* plotfile = wxFopen( dlg.GetPath(), wxT( "wt" ) );
@@ -659,8 +669,13 @@
fn.GetFullName(), wxGetTranslation( RptFileWildcard ),
@@ -655,8 +665,13 @@
fn.GetFullName(), wxGetTranslation( ReportFileWildcard ),
wxFD_SAVE );
+ if ( g_CmdLineMode ) {
@ -107,12 +106,12 @@ diff -ru kicad.orig/pcbnew/gendrill.cpp kicad/pcbnew/gendrill.cpp
FILE* report_dest = wxFopen( dlg.GetPath(), wxT( "w" ) );
diff -ru kicad.orig/pcbnew/gen_modules_placefile.cpp kicad/pcbnew/gen_modules_placefile.cpp
--- kicad.orig/pcbnew/gen_modules_placefile.cpp 2012-01-25 13:11:10.508078000 +0100
+++ kicad/pcbnew/gen_modules_placefile.cpp 2012-01-25 12:18:17.047807949 +0100
@@ -138,10 +138,10 @@
return;
}
diff -ru kicad.3493/pcbnew/gen_modules_placefile.cpp kicad/pcbnew/gen_modules_placefile.cpp
--- kicad.3493/pcbnew/gen_modules_placefile.cpp 2012-04-08 03:24:18.653600000 +0200
+++ kicad/pcbnew/gen_modules_placefile.cpp 2012-04-08 06:52:44.586728303 +0200
@@ -501,10 +501,10 @@
{
wxFileName fn;
- wxString boardFilePath = ( (wxFileName) GetScreen()->GetFileName()).GetPath();
+ wxString boardFilePath = ( (wxFileName) GetScreen()->GetFileName()).GetFullPath();
@ -122,31 +121,19 @@ diff -ru kicad.orig/pcbnew/gen_modules_placefile.cpp kicad/pcbnew/gen_modules_pl
+ if( !g_CmdLineMode && dirDialog.ShowModal() == wxID_CANCEL )
return;
fnFront = GetScreen()->GetFileName();
@@ -298,6 +298,7 @@
msg.Append( fnBack.GetFullPath() );
}
fn = GetScreen()->GetFileName();
diff -ru kicad.3493/pcbnew/pcbnew.cpp kicad/pcbnew/pcbnew.cpp
--- kicad.3493/pcbnew/pcbnew.cpp 2012-04-08 03:24:18.653600000 +0200
+++ kicad/pcbnew/pcbnew.cpp 2012-04-08 06:53:10.458587343 +0200
@@ -42,6 +42,7 @@
#include <wx/snglinst.h>
+ if ( !g_CmdLineMode )
wxMessageBox( msg, _( "Module Position File" ), wxICON_INFORMATION );
exit: // the only safe way out of here, no returns please.
Only in kicad/pcbnew: Makefile
Only in kicad/pcbnew: pcbnew
Only in kicad/pcbnew: pcbnew_cmdline.cpp
Only in kicad/pcbnew: pcbnew_cmdline.h
diff -ru kicad.orig/pcbnew/pcbnew.cpp kicad/pcbnew/pcbnew.cpp
--- kicad.orig/pcbnew/pcbnew.cpp 2012-01-25 13:11:10.508078000 +0100
+++ kicad/pcbnew/pcbnew.cpp 2012-01-25 12:18:40.160638484 +0100
@@ -44,6 +44,7 @@
#include <pcbnew.h>
+#include <pcbnew_cmdline.h>
#include <protos.h>
#include <hotkeys.h>
+#include <pcbnew_cmdline.h>
// Colors for layers and items
@@ -111,6 +112,9 @@
#include <wildcards_and_files_ext.h>
@@ -102,6 +103,9 @@
wxFileName fn;
PCB_EDIT_FRAME* frame = NULL;
@ -156,32 +143,32 @@ diff -ru kicad.orig/pcbnew/pcbnew.cpp kicad/pcbnew/pcbnew.cpp
InitEDA_Appl( wxT( "Pcbnew" ), APP_PCBNEW_T );
if( m_Checker && m_Checker->IsAnotherRunning() )
Only in kicad/pcbnew: pcbnew.cpp.rej
diff -ru kicad.orig/pcbnew/pcbnew.h kicad/pcbnew/pcbnew.h
--- kicad.orig/pcbnew/pcbnew.h 2012-01-25 13:11:10.508078000 +0100
+++ kicad/pcbnew/pcbnew.h 2012-01-25 12:18:17.049807933 +0100
@@ -41,6 +41,7 @@
#define FORCE_SKETCH ( IS_DRAGGED | IN_EDIT )
diff -ru kicad.3493/pcbnew/pcbnew.h kicad/pcbnew/pcbnew.h
--- kicad.3493/pcbnew/pcbnew.h 2012-04-08 03:24:18.653600000 +0200
+++ kicad/pcbnew/pcbnew.h 2012-04-08 06:52:44.592728207 +0200
@@ -49,6 +49,7 @@
extern wxString g_DocModulesFileName;
/* variables */
+extern bool g_CmdLineMode;
extern bool Drc_On;
extern bool g_AutoDeleteOldTrack;
extern bool g_Drag_Pistes_On;
diff -ru kicad.orig/pcbnew/pcbplot.cpp kicad/pcbnew/pcbplot.cpp
--- kicad.orig/pcbnew/pcbplot.cpp 2012-01-25 13:11:10.508078000 +0100
+++ kicad/pcbnew/pcbplot.cpp 2012-01-25 12:18:17.050807926 +0100
@@ -819,6 +819,7 @@
diff -ru kicad.3493/pcbnew/pcbplot.cpp kicad/pcbnew/pcbplot.cpp
--- kicad.3493/pcbnew/pcbplot.cpp 2012-04-08 03:24:18.653600000 +0200
+++ kicad/pcbnew/pcbplot.cpp 2012-04-08 07:03:09.733176047 +0200
@@ -806,7 +806,7 @@
case PLOT_FORMAT_DXF:
success = m_Parent->ExportToDxfFile( fn.GetFullPath(), layer,
+ false,
g_PcbPlotOptions.m_PlotMode );
success = m_parent->ExportToDxfFile( fn.GetFullPath(), layer,
- m_plotOpts.m_PlotMode );
+ false, m_plotOpts.m_PlotMode );
break;
}
diff -ru kicad.orig/pcbnew/plotdxf.cpp kicad/pcbnew/plotdxf.cpp
--- kicad.orig/pcbnew/plotdxf.cpp 2012-01-25 13:11:10.508078000 +0100
+++ kicad/pcbnew/plotdxf.cpp 2012-01-25 12:18:17.050807926 +0100
diff -ru kicad.3493/pcbnew/plotdxf.cpp kicad/pcbnew/plotdxf.cpp
--- kicad.3493/pcbnew/plotdxf.cpp 2012-04-08 03:24:18.653600000 +0200
+++ kicad/pcbnew/plotdxf.cpp 2012-04-08 06:52:44.599728094 +0200
@@ -16,7 +16,7 @@
@ -191,7 +178,7 @@ diff -ru kicad.orig/pcbnew/plotdxf.cpp kicad/pcbnew/plotdxf.cpp
{
LOCALE_IO toggle;
@@ -27,9 +27,21 @@
@@ -29,9 +29,21 @@
return false;
}
@ -214,20 +201,18 @@ diff -ru kicad.orig/pcbnew/plotdxf.cpp kicad/pcbnew/plotdxf.cpp
plotter->set_creator( wxT( "PCBNEW-DXF" ) );
plotter->set_filename( aFullFileName );
plotter->start_plot( output_file );
Only in kicad/pcbnew: specctra_keywords.cpp
Only in kicad/pcbnew: specctra_lexer.h
diff -ru kicad.orig/pcbnew/xchgmod.cpp kicad/pcbnew/xchgmod.cpp
--- kicad.orig/pcbnew/xchgmod.cpp 2012-01-25 13:11:10.508078000 +0100
+++ kicad/pcbnew/xchgmod.cpp 2012-01-25 12:18:17.051807919 +0100
@@ -601,6 +601,7 @@
fn.SetExt( NetCmpExtBuffer );
wildcard = _( "Component files (." ) + NetCmpExtBuffer + wxT( ")|*." ) + NetCmpExtBuffer;
diff -ru kicad.3493/pcbnew/xchgmod.cpp kicad/pcbnew/xchgmod.cpp
--- kicad.3493/pcbnew/xchgmod.cpp 2012-04-08 03:24:18.653600000 +0200
+++ kicad/pcbnew/xchgmod.cpp 2012-04-08 06:52:44.602728064 +0200
@@ -602,6 +602,7 @@
fn.SetExt( ComponentFileExtension );
wildcard = wxGetTranslation( ComponentFileWildcard );
+ if ( !g_CmdLineMode) {
wxFileDialog dlg( this, _( "Save Component Files" ), wxGetCwd(),
fn.GetFullName(), wildcard,
wxFD_SAVE | wxFD_OVERWRITE_PROMPT );
@@ -609,6 +610,7 @@
@@ -610,6 +611,7 @@
return;
fn = dlg.GetPath();

View File

@ -3,7 +3,7 @@ diff -u /dev/null kicad/eeschema/eeschema_cmdline.h > cmdline-new.patch
diff -u /dev/null kicad/eeschema/eeschema_cmdline.cpp >> cmdline-new.patch
diff -u /dev/null kicad/pcbnew/pcbnew_cmdline.h >> cmdline-new.patch
diff -u /dev/null kicad/pcbnew/pcbnew_cmdline.cpp >> cmdline-new.patch
diff -ru kicad.orig/include kicad/include > cmdline-common.patch
diff -ru kicad.orig/common kicad/common >> cmdline-common.patch
diff -ru kicad.orig/eeschema kicad/eeschema > cmdline-eeschema.patch
diff -ru kicad.orig/pcbnew kicad/pcbnew > cmdline-pcbnew.patch
diff -ru kicad.$1/include kicad/include | sed '/^Only in/d' > cmdline-common.patch
diff -ru kicad.$1/common kicad/common | sed '/^Only in/d' >> cmdline-common.patch
diff -ru kicad.$1/eeschema kicad/eeschema | sed '/^Only in/d' > cmdline-eeschema.patch
diff -ru kicad.$1/pcbnew kicad/pcbnew | sed '/^Only in/d' > cmdline-pcbnew.patch

View File

@ -1,4 +1,4 @@
# Based on BZR revision 3378
# Based on BZR revision 3493
# under discussion
# fix-pinedit-collision.patch