Send commitlog mailing list submissions to
        commitlog@lists.openmoko.org

To subscribe or unsubscribe via the World Wide Web, visit
        http://lists.openmoko.org/mailman/listinfo/commitlog
or, via email, send a message with subject or body 'help' to
        commitlog-requ...@lists.openmoko.org

You can reach the person managing the list at
        commitlog-ow...@lists.openmoko.org

When replying, please edit your Subject line so it is more specific
than "Re: Contents of commitlog digest..."
Today's Topics:

   1. r4991 - in trunk/gta02-core: . kicad-patches
      (wer...@docs.openmoko.org)
   2. r4992 - in trunk/gta02-core: expanded scripts
      (wer...@docs.openmoko.org)
--- Begin Message ---
Author: werner
Date: 2009-05-15 21:16:59 +0200 (Fri, 15 May 2009)
New Revision: 4991

Added:
   trunk/gta02-core/kicad-patches/
   trunk/gta02-core/kicad-patches/eeschema-plot-only-mode.patch
Log:
A patch to add batch-mode plotting to eeschema:

eeschema --plot file.sch



Added: trunk/gta02-core/kicad-patches/eeschema-plot-only-mode.patch
===================================================================
--- trunk/gta02-core/kicad-patches/eeschema-plot-only-mode.patch                
                (rev 0)
+++ trunk/gta02-core/kicad-patches/eeschema-plot-only-mode.patch        
2009-05-15 19:16:59 UTC (rev 4991)
@@ -0,0 +1,92 @@
+This patch adds a command-line option --plot to eeschema that makes it
+run File -> Plot -> Plot PostScript -> Plot ALL on the specified file.
+It also prevents eeschema from opening a window and from checking for
+concurrent instances.
+
+This lets shell scripts generate plots, i.e., of schematics that have
+been processed by these scripts.
+
+Known issue: if there is an error that causes a dialog to be brought
+up, eeschema will just hang, waiting for the user to click the dialog
+away on the invisible window.
+
+This patch is for KiCad SVN revision 1768.
+
+Signed-off-by: Werner Almesberger <wer...@openmoko.org>
+
+---
+
+Index: kicad/eeschema/eeschema.cpp
+===================================================================
+--- kicad.orig/eeschema/eeschema.cpp   2009-05-15 15:53:27.000000000 -0300
++++ kicad/eeschema/eeschema.cpp        2009-05-15 16:08:53.000000000 -0300
+@@ -12,6 +12,7 @@
+ #include "general.h"
+ #include "bitmaps.h"
+ #include "eda_dde.h"
++#include "plotps.h"
+ 
+ #include "libcmp.h"
+ #include "protos.h"
+@@ -137,12 +138,23 @@
+ {
+     wxFileName fn;
+     WinEDA_SchematicFrame* frame = NULL;
++    bool plot_only = FALSE;
+ 
+     g_DebugLevel = 0;   // Debug level */
+ 
+     InitEDA_Appl( wxT( "EESchema" ), APP_TYPE_EESCHEMA );
+ 
+-    if( m_Checker && m_Checker->IsAnotherRunning() )
++    if (argc > 1 && !wxStrcmp(argv[1], wxT("--plot"))) {
++      if (argc < 3) {
++          fprintf(stderr, "usage: %ls [[--plot] filename]\n", *argv);
++          exit(1);
++      }
++      plot_only = TRUE;
++      argc--;
++      argv++;
++    }
++
++    if( !plot_only && m_Checker && m_Checker->IsAnotherRunning() )
+     {
+         if( !IsOK( NULL, _( "Eeschema is already running, Continue?" ) ) )
+             return false;
+@@ -164,9 +176,9 @@
+                                        wxPoint( 0, 0 ), wxSize( 600, 400 ) );
+ 
+     SetTopWindow( frame );
+-    frame->Show( TRUE );
++    frame->Show( !plot_only );
+ 
+-    if( CreateServer( frame, KICAD_SCH_PORT_SERVICE_NUMBER ) )
++    if( !plot_only && CreateServer( frame, KICAD_SCH_PORT_SERVICE_NUMBER ) )
+     {
+         // RemoteCommand is in controle.cpp and is called when PCBNEW
+         // sends EESCHEMA a command
+@@ -185,6 +197,15 @@
+         if( frame->DrawPanel
+             && frame->LoadOneEEProject( fn.GetFullPath(), false ) <= 0 )
+             frame->DrawPanel->Refresh( true );
++      else {
++          if (plot_only) {
++              WinEDA_PlotPSFrame* Ps_frame = new WinEDA_PlotPSFrame( frame );
++              wxCommandEvent dummy;
++
++              Ps_frame->OnPlotPsAllExecuteClick(dummy);
++              exit(0);
++          }
++      }
+     }
+     else
+     {
+@@ -194,5 +215,8 @@
+             frame->DrawPanel->Refresh( TRUE );
+     }
+ 
++    if (plot_only)
++      exit(1);
++
+     return TRUE;
+ }




--- End Message ---
--- Begin Message ---
Author: werner
Date: 2009-05-15 21:49:52 +0200 (Fri, 15 May 2009)
New Revision: 4992

Added:
   trunk/gta02-core/expanded/Makefile
   trunk/gta02-core/expanded/gta02-core-expanded.sch
Removed:
   trunk/gta02-core/expanded/gta02-core.sch
Modified:
   trunk/gta02-core/scripts/all-sheets-ps
Log:
Updated scripts to use new eeschema --plot to automatically generate
the schematics with expanded pin types.



Added: trunk/gta02-core/expanded/Makefile
===================================================================
--- trunk/gta02-core/expanded/Makefile                          (rev 0)
+++ trunk/gta02-core/expanded/Makefile  2009-05-15 19:49:52 UTC (rev 4992)
@@ -0,0 +1,11 @@
+.PHONY:        upload
+
+upload:
+       cd ../components && ./mkloe
+       ../scripts/expand-pintype ../components/gta02-core.lib \
+         ../components/gta02-core-expanded.lib
+       eeschema --plot `pwd`/gta02-core-expanded.sch
+       ../scripts/all-sheets-ps gta02-core-expanded
+       gzip -f -9 gta02-core-expanded-all.ps
+       scp gta02-core-expanded-all.ps.gz \
+         wer...@sita.openmoko.org:public_html/gta02-core/

Copied: trunk/gta02-core/expanded/gta02-core-expanded.sch (from rev 4990, 
trunk/gta02-core/expanded/gta02-core.sch)
===================================================================
--- trunk/gta02-core/expanded/gta02-core-expanded.sch                           
(rev 0)
+++ trunk/gta02-core/expanded/gta02-core-expanded.sch   2009-05-15 19:49:52 UTC 
(rev 4992)
@@ -0,0 +1,46 @@
+EESchema Schematic File Version 2  date Thu May 14 20:26:13 2009
+LIBS:power,device,conn,gta02-core-expanded
+EELAYER 24  0
+EELAYER END
+$Descr A4 11700 8267
+Sheet 1 6
+Title "GTA02-CORE"
+Date "12 may 2009"
+Rev ""
+Comp ""
+Comment1 ""
+Comment2 ""
+Comment3 ""
+Comment4 ""
+$EndDescr
+$Sheet
+S 8800 3450 2000 1150
+U 4A0AE69D
+F0 "MEMORY" 60
+F1 "memory.sch" 60
+$EndSheet
+$Sheet
+S 2400 4400 2350 1550
+U 4A0AE60B
+F0 "AUDIO" 60
+F1 "audio.sch" 60
+$EndSheet
+$Sheet
+S 5850 4400 2150 1550
+U 4A0AE5F3
+F0 "IO" 60
+F1 "io.sch" 60
+$EndSheet
+$Sheet
+S 5700 2050 1700 1150
+U 4A0AE5D4
+F0 "PMU" 60
+F1 "pmu.sch" 60
+$EndSheet
+$Sheet
+S 2350 1850 2150 1400
+U 4A0AE5B6
+F0 "CPU" 60
+F1 "cpu.sch" 60
+$EndSheet
+$EndSCHEMATC


Property changes on: trunk/gta02-core/expanded/gta02-core-expanded.sch
___________________________________________________________________
Name: svn:mergeinfo
   + 

Deleted: trunk/gta02-core/expanded/gta02-core.sch
===================================================================
--- trunk/gta02-core/expanded/gta02-core.sch    2009-05-15 19:16:59 UTC (rev 
4991)
+++ trunk/gta02-core/expanded/gta02-core.sch    2009-05-15 19:49:52 UTC (rev 
4992)
@@ -1,46 +0,0 @@
-EESchema Schematic File Version 2  date Thu May 14 20:26:13 2009
-LIBS:power,device,conn,gta02-core-expanded
-EELAYER 24  0
-EELAYER END
-$Descr A4 11700 8267
-Sheet 1 6
-Title "GTA02-CORE"
-Date "12 may 2009"
-Rev ""
-Comp ""
-Comment1 ""
-Comment2 ""
-Comment3 ""
-Comment4 ""
-$EndDescr
-$Sheet
-S 8800 3450 2000 1150
-U 4A0AE69D
-F0 "MEMORY" 60
-F1 "memory.sch" 60
-$EndSheet
-$Sheet
-S 2400 4400 2350 1550
-U 4A0AE60B
-F0 "AUDIO" 60
-F1 "audio.sch" 60
-$EndSheet
-$Sheet
-S 5850 4400 2150 1550
-U 4A0AE5F3
-F0 "IO" 60
-F1 "io.sch" 60
-$EndSheet
-$Sheet
-S 5700 2050 1700 1150
-U 4A0AE5D4
-F0 "PMU" 60
-F1 "pmu.sch" 60
-$EndSheet
-$Sheet
-S 2350 1850 2150 1400
-U 4A0AE5B6
-F0 "CPU" 60
-F1 "cpu.sch" 60
-$EndSheet
-$EndSCHEMATC

Modified: trunk/gta02-core/scripts/all-sheets-ps
===================================================================
--- trunk/gta02-core/scripts/all-sheets-ps      2009-05-15 19:16:59 UTC (rev 
4991)
+++ trunk/gta02-core/scripts/all-sheets-ps      2009-05-15 19:49:52 UTC (rev 
4992)
@@ -1,6 +1,6 @@
 #!/bin/sh
 
-B=gta02-core
+B=${1:-gta02-core}
 
 OUT=$B-all
 SHEETS="$B $B-CPU $B-PMU $B-MEMORY $B-AUDIO $B-IO"




--- End Message ---
_______________________________________________
commitlog mailing list
commitlog@lists.openmoko.org
http://lists.openmoko.org/mailman/listinfo/commitlog

Reply via email to