mirror of
git://projects.qi-hardware.com/eda-tools.git
synced 2024-11-22 15:44:05 +02:00
patch cleanup
This commit is contained in:
parent
771599b3f9
commit
724ca1e3ec
@ -1,3 +1,57 @@
|
||||
diff -ru kicad.orig/include/appl_wxstruct.h kicad/include/appl_wxstruct.h
|
||||
--- kicad.orig/include/appl_wxstruct.h 2012-01-02 15:12:29.461843000 +0100
|
||||
+++ kicad/include/appl_wxstruct.h 2012-01-04 00:58:00.447684901 +0100
|
||||
@@ -52,6 +52,7 @@
|
||||
class wxSingleInstanceChecker;
|
||||
class wxHtmlHelpController;
|
||||
|
||||
+extern bool g_CmdLineMode;
|
||||
|
||||
/**
|
||||
* Class EDA_APP
|
||||
@@ -185,6 +186,8 @@
|
||||
*/
|
||||
void InitEDA_Appl( const wxString& aName, EDA_APP_T aId = APP_UNKNOWN_T );
|
||||
|
||||
+ virtual int OnRun() { return g_CmdLineMode ? 0 : wxApp::OnRun(); }
|
||||
+
|
||||
/**
|
||||
* Function SetLanguage
|
||||
* sets the dictionary file name for internationalization.
|
||||
diff -ru kicad.orig/include/wxBasePcbFrame.h kicad/include/wxBasePcbFrame.h
|
||||
--- kicad.orig/include/wxBasePcbFrame.h 2012-01-02 15:12:29.461843000 +0100
|
||||
+++ kicad/include/wxBasePcbFrame.h 2012-01-11 11:06:46.974797876 +0100
|
||||
@@ -520,6 +520,7 @@
|
||||
|
||||
bool ExportToDxfFile( const wxString& aFullFileName,
|
||||
int aLayer,
|
||||
+ bool aPlotOriginIsAuxAxis,
|
||||
GRTraceMode aTraceMode );
|
||||
|
||||
void Plot_Layer( PLOTTER* plotter,
|
||||
diff -ru kicad.orig/include/wxEeschemaStruct.h kicad/include/wxEeschemaStruct.h
|
||||
--- kicad.orig/include/wxEeschemaStruct.h 2012-01-02 15:12:29.461843000 +0100
|
||||
+++ kicad/include/wxEeschemaStruct.h 2012-01-04 02:04:17.560214904 +0100
|
||||
@@ -585,6 +585,8 @@
|
||||
void SVG_Print( wxCommandEvent& event );
|
||||
|
||||
// Plot functions:
|
||||
+ void CmdLineToPlot_PS( bool PlotBW, bool PlotSheetRef );
|
||||
+ void CmdLineToPlot_DXF( bool PlotBW, bool PlotSheetRef );
|
||||
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-02 15:12:29.461843000 +0100
|
||||
+++ kicad/include/wxPcbStruct.h 2012-01-10 17:49:51.848114042 +0100
|
||||
@@ -75,6 +75,7 @@
|
||||
class PCB_EDIT_FRAME : public PCB_BASE_FRAME
|
||||
{
|
||||
friend class PCB_LAYER_WIDGET;
|
||||
+ friend bool Pcbnew_CmdLine();
|
||||
|
||||
void updateTraceWidthSelectBox();
|
||||
void updateViaSizeSelectBox();
|
||||
diff -ru kicad.orig/common/confirm.cpp kicad/common/confirm.cpp
|
||||
--- kicad.orig/common/confirm.cpp 2012-01-02 15:12:29.461843000 +0100
|
||||
+++ kicad/common/confirm.cpp 2012-01-04 00:59:04.412020890 +0100
|
||||
@ -57,46 +111,3 @@ diff -ru kicad.orig/common/edaappl.cpp kicad/common/edaappl.cpp
|
||||
m_Checker = new wxSingleInstanceChecker( aName.Lower() + wxT( "-" ) + wxGetUserId() );
|
||||
|
||||
/* Init KiCad environment
|
||||
diff -ru kicad.orig/include/appl_wxstruct.h kicad/include/appl_wxstruct.h
|
||||
--- kicad.orig/include/appl_wxstruct.h 2012-01-02 15:12:29.461843000 +0100
|
||||
+++ kicad/include/appl_wxstruct.h 2012-01-04 00:58:00.447684901 +0100
|
||||
@@ -52,6 +52,7 @@
|
||||
class wxSingleInstanceChecker;
|
||||
class wxHtmlHelpController;
|
||||
|
||||
+extern bool g_CmdLineMode;
|
||||
|
||||
/**
|
||||
* Class EDA_APP
|
||||
@@ -185,6 +186,8 @@
|
||||
*/
|
||||
void InitEDA_Appl( const wxString& aName, EDA_APP_T aId = APP_UNKNOWN_T );
|
||||
|
||||
+ virtual int OnRun() { return g_CmdLineMode ? 0 : wxApp::OnRun(); }
|
||||
+
|
||||
/**
|
||||
* Function SetLanguage
|
||||
* sets the dictionary file name for internationalization.
|
||||
diff -ru kicad.orig/include/wxEeschemaStruct.h kicad/include/wxEeschemaStruct.h
|
||||
--- kicad.orig/include/wxEeschemaStruct.h 2012-01-02 15:12:29.461843000 +0100
|
||||
+++ kicad/include/wxEeschemaStruct.h 2012-01-04 02:04:17.560214904 +0100
|
||||
@@ -585,6 +585,8 @@
|
||||
void SVG_Print( wxCommandEvent& event );
|
||||
|
||||
// Plot functions:
|
||||
+ void CmdLineToPlot_PS( bool PlotBW, bool PlotSheetRef );
|
||||
+ void CmdLineToPlot_DXF( bool PlotBW, bool PlotSheetRef );
|
||||
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-02 15:12:29.461843000 +0100
|
||||
+++ kicad/include/wxPcbStruct.h 2012-01-10 17:49:51.848114042 +0100
|
||||
@@ -75,6 +75,7 @@
|
||||
class PCB_EDIT_FRAME : public PCB_BASE_FRAME
|
||||
{
|
||||
friend class PCB_LAYER_WIDGET;
|
||||
+ friend bool Pcbnew_CmdLine();
|
||||
|
||||
void updateTraceWidthSelectBox();
|
||||
void updateViaSizeSelectBox();
|
||||
|
@ -122,19 +122,13 @@ diff -ru kicad.orig/eeschema/dialogs/dialog_SVG_print.h kicad/eeschema/dialogs/d
|
||||
--- kicad.orig/eeschema/dialogs/dialog_SVG_print.h 2012-01-02 15:12:29.461843000 +0100
|
||||
+++ kicad/eeschema/dialogs/dialog_SVG_print.h 2012-01-04 01:03:17.627432139 +0100
|
||||
@@ -12,6 +12,7 @@
|
||||
|
||||
class DIALOG_SVG_PRINT : public DIALOG_SVG_PRINT_base
|
||||
{
|
||||
+friend void CmdLinePrintSVGDoc( EDA_DRAW_FRAME* frame, bool aPrintAll, bool aPrint_Sheet_Ref, bool aPrintBlackAndWhite );
|
||||
private:
|
||||
EDA_DRAW_FRAME* m_Parent;
|
||||
wxConfig* m_Config;
|
||||
@@ -37,5 +38,4 @@
|
||||
bool aPrint_Sheet_Ref = false );
|
||||
};
|
||||
|
||||
-
|
||||
#endif // _DIALOG_SVG_PRINT_H_
|
||||
|
||||
class DIALOG_SVG_PRINT : public DIALOG_SVG_PRINT_base
|
||||
{
|
||||
+friend void CmdLinePrintSVGDoc( EDA_DRAW_FRAME* frame, bool aPrintAll, bool aPrint_Sheet_Ref, bool aPrintBlackAndWhite );
|
||||
private:
|
||||
EDA_DRAW_FRAME* m_Parent;
|
||||
wxConfig* m_Config;
|
||||
diff -ru kicad.orig/eeschema/eeschema.cpp kicad/eeschema/eeschema.cpp
|
||||
--- kicad.orig/eeschema/eeschema.cpp 2012-01-02 15:12:29.461843000 +0100
|
||||
+++ kicad/eeschema/eeschema.cpp 2012-01-04 01:05:55.083907033 +0100
|
||||
|
@ -262,8 +262,8 @@
|
||||
+
|
||||
+bool Pcbnew_CmdLine();
|
||||
--- /dev/null 2012-01-06 01:10:09.493787641 +0100
|
||||
+++ kicad/pcbnew/pcbnew_cmdline.cpp 2012-01-10 22:52:01.869091302 +0100
|
||||
@@ -0,0 +1,525 @@
|
||||
+++ kicad/pcbnew/pcbnew_cmdline.cpp 2012-01-11 11:18:27.603953821 +0100
|
||||
@@ -0,0 +1,526 @@
|
||||
+/////////////////////////////////////////////////////////////////////////////
|
||||
+// Name: pcbnew_cmdline.cpp
|
||||
+// Copyright: Wolfgang Spraul
|
||||
@ -323,25 +323,25 @@
|
||||
+
|
||||
+ { wxCMD_LINE_SWITCH, 0, wxT("drill"),
|
||||
+ wxT("File -> Fabrication -> Drill File (.drl)") },
|
||||
+ { wxCMD_LINE_SWITCH, 0, wxT("drill-origin-aux"),
|
||||
+ { wxCMD_LINE_SWITCH, 0, wxT("drill-aux-origin"),
|
||||
+ wxT(" Use aux axis as origin (def: abs)\n") },
|
||||
+
|
||||
+ { wxCMD_LINE_OPTION, 0, wxT("plot"),
|
||||
+ wxT("File -> Plot [gerber|ps|dxf]"),
|
||||
+ wxCMD_LINE_VAL_STRING },
|
||||
+ { wxCMD_LINE_SWITCH, 0, wxT("plot-fill-all-zones"),
|
||||
+ wxT(" fill zones before plotting (not in the dialog)") },
|
||||
+ wxT(" Fill zones before plotting (not in the dialog)") },
|
||||
+ { wxCMD_LINE_OPTION, 0, wxT("plot-drill-marks"),
|
||||
+ wxT(" Drill marks [none|small|actual] (def: small)"),
|
||||
+ wxCMD_LINE_VAL_STRING },
|
||||
+ { wxCMD_LINE_SWITCH, 0, wxT("plot-mirror"),
|
||||
+ wxT(" Mirrored plot (Postscript only)") },
|
||||
+ { wxCMD_LINE_SWITCH, 0, wxT("plot-ps-force-a4"),
|
||||
+ wxT(" Postscript: Mirrored plot") },
|
||||
+ { wxCMD_LINE_SWITCH, 0, wxT("plot-force-a4"),
|
||||
+ wxT(" Postscript: Force A4 output") },
|
||||
+ { wxCMD_LINE_SWITCH, 0, wxT("plot-gb-ex-pcb-edge"),
|
||||
+ wxT(" Gerber: exclude PCB edge") },
|
||||
+ { wxCMD_LINE_SWITCH, 0, wxT("plot-gb-aux-origin"),
|
||||
+ wxT(" Gerber: Use aux axis as origin (def: abs)\n") },
|
||||
+ { wxCMD_LINE_SWITCH, 0, wxT("plot-aux-origin"),
|
||||
+ wxT(" Gerber & DXF: Aux axis as origin (def: abs)") },
|
||||
+ { wxCMD_LINE_SWITCH, 0, wxT("plot-exclude-edge"),
|
||||
+ wxT(" Gerber: Exclude PCB edge\n") },
|
||||
+
|
||||
+ { wxCMD_LINE_OPTION, 0, wxT("svg"),
|
||||
+ wxT("File -> Print SVG [selected|board]"),
|
||||
@ -448,7 +448,7 @@
|
||||
+ {
|
||||
+ DIALOG_GENDRILL drill_frame( frame );
|
||||
+ drill_frame.m_Choice_Drill_Offset->SetSelection(
|
||||
+ parser.Found( wxT("drill-origin-aux") ) );
|
||||
+ parser.Found( wxT("drill-aux-origin") ) );
|
||||
+ wxSafeYield();
|
||||
+ drill_frame.GenDrillAndReportFiles();
|
||||
+ }
|
||||
@ -506,9 +506,9 @@
|
||||
+ // --plot-mirror
|
||||
+ g_PcbPlotOptions.m_PlotMirror = parser.Found( wxT("plot-mirror") );
|
||||
+
|
||||
+ // --plot-gb-ex-pcb-edge
|
||||
+ // --plot-exclude-edge
|
||||
+ g_PcbPlotOptions.m_ExcludeEdgeLayer =
|
||||
+ parser.Found( wxT("plot-gb-ex-pcb-edge") );
|
||||
+ parser.Found( wxT("plot-exclude-edge") );
|
||||
+
|
||||
+ parser.Found( wxT("layers"), &layers_str );
|
||||
+ wxStringTokenizer tokenizer( layers_str, _(",") );
|
||||
@ -637,18 +637,19 @@
|
||||
+ case PLOT_FORMAT_POST:
|
||||
+ success = frame->ExportToPostScriptFile( fn.GetFullPath(),
|
||||
+ layer_i,
|
||||
+ parser.Found( wxT("plot-ps-force-a4") ),
|
||||
+ parser.Found( wxT("plot-force-a4") ),
|
||||
+ FILLED /* trace_mode */ );
|
||||
+ break;
|
||||
+
|
||||
+ case PLOT_FORMAT_GERBER:
|
||||
+ success = frame->ExportToGerberFile( fn.GetFullPath(), layer_i,
|
||||
+ parser.Found( wxT("plot-gb-aux-origin") ),
|
||||
+ parser.Found( wxT("plot-aux-origin") ),
|
||||
+ FILLED /* trace_mode */ );
|
||||
+ break;
|
||||
+
|
||||
+ case PLOT_FORMAT_DXF:
|
||||
+ success = frame->ExportToDxfFile( fn.GetFullPath(), layer_i,
|
||||
+ parser.Found( wxT("plot-aux-origin") ),
|
||||
+ FILLED /* trace_mode */ );
|
||||
+ break;
|
||||
+ }
|
||||
|
@ -162,6 +162,54 @@ diff -ru kicad.orig/pcbnew/pcbnew.h kicad/pcbnew/pcbnew.h
|
||||
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-02 15:12:29.461843000 +0100
|
||||
+++ kicad/pcbnew/pcbplot.cpp 2012-01-11 11:10:58.453057344 +0100
|
||||
@@ -774,6 +774,7 @@
|
||||
|
||||
case PLOT_FORMAT_DXF:
|
||||
success = m_Parent->ExportToDxfFile( fn.GetFullPath(), layer,
|
||||
+ false,
|
||||
g_PcbPlotOptions.m_PlotMode );
|
||||
break;
|
||||
}
|
||||
diff -ru kicad.orig/pcbnew/plotdxf.cpp kicad/pcbnew/plotdxf.cpp
|
||||
--- kicad.orig/pcbnew/plotdxf.cpp 2012-01-02 15:12:29.461843000 +0100
|
||||
+++ kicad/pcbnew/plotdxf.cpp 2012-01-11 11:07:41.473420495 +0100
|
||||
@@ -16,7 +16,7 @@
|
||||
|
||||
|
||||
bool PCB_BASE_FRAME::ExportToDxfFile( const wxString& aFullFileName, int aLayer,
|
||||
- GRTraceMode aTraceMode )
|
||||
+ bool aPlotOriginIsAuxAxis, GRTraceMode aTraceMode )
|
||||
{
|
||||
Ki_PageDescr* currentsheet = GetScreen()->m_CurrentSheetDesc;
|
||||
|
||||
@@ -27,11 +27,23 @@
|
||||
return false;
|
||||
}
|
||||
|
||||
+ wxPoint offset;
|
||||
+
|
||||
+ if( aPlotOriginIsAuxAxis )
|
||||
+ {
|
||||
+ offset = m_originAxisPosition;
|
||||
+ }
|
||||
+ else
|
||||
+ {
|
||||
+ offset.x = 0;
|
||||
+ offset.y = 0;
|
||||
+ }
|
||||
+
|
||||
SetLocaleTo_C_standard();
|
||||
|
||||
DXF_PLOTTER* plotter = new DXF_PLOTTER();
|
||||
plotter->set_paper_size( currentsheet );
|
||||
- plotter->set_viewport( wxPoint( 0, 0 ), 1, 0 );
|
||||
+ plotter->set_viewport( offset, 1, 0 );
|
||||
plotter->set_creator( wxT( "PCBNEW-DXF" ) );
|
||||
plotter->set_filename( aFullFileName );
|
||||
plotter->start_plot( output_file );
|
||||
diff -ru kicad.orig/pcbnew/xchgmod.cpp kicad/pcbnew/xchgmod.cpp
|
||||
--- kicad.orig/pcbnew/xchgmod.cpp 2012-01-02 15:12:29.461843000 +0100
|
||||
+++ kicad/pcbnew/xchgmod.cpp 2012-01-05 21:47:50.531456715 +0100
|
||||
|
9
kicad-patches/kicad_diff.sh
Executable file
9
kicad-patches/kicad_diff.sh
Executable file
@ -0,0 +1,9 @@
|
||||
#!/bin/bash
|
||||
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
|
@ -1,7 +1,7 @@
|
||||
# Based on BZR revision 2448
|
||||
|
||||
# under discussion
|
||||
fix-pinedit-collision.patch
|
||||
# fix-pinedit-collision.patch
|
||||
|
||||
# cmdline options for eeschema and pcbnew
|
||||
cmdline-new.patch
|
||||
|
Loading…
Reference in New Issue
Block a user