Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
K
kicad-source-mirror
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Commits
Open sidebar
Elphel
kicad-source-mirror
Commits
2c9b84a7
Commit
2c9b84a7
authored
Nov 01, 2014
by
Garth Corral
Browse files
Options
Browse Files
Download
Plain Diff
Merge trunk @ 5247 to pickup build fixes
parents
e8bfd5fa
0561940d
Changes
16
Hide whitespace changes
Inline
Side-by-side
Showing
16 changed files
with
194 additions
and
165 deletions
+194
-165
CMakeLists.txt
CMakeLists.txt
+12
-32
config.h.cmake
CMakeModules/config.h.cmake
+0
-3
INSTALL.txt
INSTALL.txt
+35
-87
common_plotGERBER_functions.cpp
common/common_plotGERBER_functions.cpp
+1
-2
plot_schematic_DXF.cpp
eeschema/plot_schematic_DXF.cpp
+2
-2
plot_schematic_HPGL.cpp
eeschema/plot_schematic_HPGL.cpp
+2
-2
plot_schematic_PDF.cpp
eeschema/plot_schematic_PDF.cpp
+2
-2
plot_schematic_PS.cpp
eeschema/plot_schematic_PS.cpp
+2
-2
plot_schematic_SVG.cpp
eeschema/plot_schematic_SVG.cpp
+4
-4
gen_modules_placefile.cpp
pcbnew/exporters/gen_modules_placefile.cpp
+1
-1
pcbframe.cpp
pcbnew/pcbframe.cpp
+9
-18
pcbplot.cpp
pcbnew/pcbplot.cpp
+12
-4
pcbplot.h
pcbnew/pcbplot.h
+4
-1
plot_board_layers.cpp
pcbnew/plot_board_layers.cpp
+6
-2
python_console_frame.h
pcbnew/scripting/python_console_frame.h
+99
-0
tool_pcb.cpp
pcbnew/tool_pcb.cpp
+3
-3
No files found.
CMakeLists.txt
View file @
2c9b84a7
...
@@ -307,40 +307,22 @@ set( KIFACE_PREFIX "_" )
...
@@ -307,40 +307,22 @@ set( KIFACE_PREFIX "_" )
#================================================
#================================================
# Locations for install targets.
# Locations for install targets.
set
(
KICAD_BIN bin
#================================================
CACHE PATH
"Location of KiCad binaries."
)
if
(
NOT APPLE
)
set
(
KICAD_FP_LIB_INSTALL_PATH
"
${
CMAKE_INSTALL_PREFIX
}
"
CACHE PATH
"Default path where footprint libraries are installed."
)
if
(
UNIX AND NOT APPLE
)
# Everything without leading / is relative to CMAKE_INSTALL_PREFIX.
# Everything without leading / is relative to CMAKE_INSTALL_PREFIX.
set
(
KICAD_BIN bin
CACHE PATH
"Location of KiCad binaries."
)
set
(
KICAD_PLUGINS lib/kicad/plugins
set
(
KICAD_PLUGINS lib/kicad/plugins
CACHE PATH
"Location of KiCad plugins."
)
CACHE PATH
"Location of KiCad plugins."
)
set
(
KICAD_DATA share/kicad
set
(
KICAD_DATA share/kicad
CACHE PATH
"Location of KiCad data files."
)
CACHE PATH
"Location of KiCad data files."
)
set
(
KICAD_DOCS share/doc/kicad
set
(
KICAD_DOCS share/doc/kicad
CACHE PATH
"Location of KiCad documentation files."
)
CACHE PATH
"Location of KiCad documentation files."
)
set
(
KICAD_FP_LIB_INSTALL_PATH
"
${
KICAD_FP_LIB_INSTALL_PATH
}
/share/kicad/modules"
)
set
(
KICAD_DEMOS
${
KICAD_DATA
}
/demos
endif
()
CACHE PATH
"Location of KiCad demo files."
)
set
(
KICAD_TEMPLATE
${
KICAD_DATA
}
/template
if
(
MINGW
)
CACHE PATH
"Location of KiCad template files."
)
# Everything without leading / is relative to CMAKE_INSTALL_PREFIX.
else
()
set
(
KICAD_PLUGINS
${
KICAD_BIN
}
/plugins
CACHE PATH
"Location of KiCad plugins."
)
set
(
KICAD_DATA share
CACHE PATH
"Location of KiCad data files."
)
set
(
KICAD_DOCS doc
CACHE PATH
"Location of KiCad documentation files."
)
set
(
KICAD_FP_LIB_INSTALL_PATH
"
${
KICAD_FP_LIB_INSTALL_PATH
}
/modules"
)
endif
()
set
(
KICAD_DEMOS
${
KICAD_DATA
}
/demos
CACHE PATH
"Location of KiCad demo files."
)
set
(
KICAD_TEMPLATE
${
KICAD_DATA
}
/template
CACHE PATH
"Location of KiCad template files."
)
if
(
APPLE
)
# everything without leading / is relative to CMAKE_INSTALL_PREFIX.
# everything without leading / is relative to CMAKE_INSTALL_PREFIX.
# CMAKE_INSTALL_PREFIX is root of .dmg image
# CMAKE_INSTALL_PREFIX is root of .dmg image
set
(
KICAD_BIN
${
CMAKE_INSTALL_PREFIX
}
set
(
KICAD_BIN
${
CMAKE_INSTALL_PREFIX
}
...
@@ -376,10 +358,6 @@ if( APPLE )
...
@@ -376,10 +358,6 @@ if( APPLE )
set
(
KICAD_DEMOS demos
set
(
KICAD_DEMOS demos
CACHE PATH
"Location of KiCad demo files."
FORCE
)
CACHE PATH
"Location of KiCad demo files."
FORCE
)
# used to set DEFAULT_FP_LIB_PATH in config.h.cmake, but then never used
# set it to correct value just in case (see common.cpp)
set
(
KICAD_FP_LIB_INSTALL_PATH
"~/Library/Preferences/kicad"
)
# Override default paths for fixup_bundle
# Override default paths for fixup_bundle
set
(
OSX_BUNDLE_OVERRIDE_PATHS
"
set
(
OSX_BUNDLE_OVERRIDE_PATHS
"
function( gp_item_default_embedded_path_override item default_embedded_path_var )
function( gp_item_default_embedded_path_override item default_embedded_path_var )
...
@@ -557,7 +535,9 @@ if( KICAD_SKIP_BOOST )
...
@@ -557,7 +535,9 @@ if( KICAD_SKIP_BOOST )
message
(
FATAL_ERROR
"Boost 1.54+ libraries are required."
)
message
(
FATAL_ERROR
"Boost 1.54+ libraries are required."
)
endif
()
endif
()
add_custom_target
(
boost
)
# it is required to meet some further dependencies
# Keeps CMake from complaining about undefined boost dependencies even though Boost was
# found. Sigh!!!!!
add_custom_target
(
boost
)
message
(
WARNING
"
message
(
WARNING
"
WARNING: You decided to skip building boost library.
WARNING: You decided to skip building boost library.
...
...
CMakeModules/config.h.cmake
View file @
2c9b84a7
...
@@ -61,9 +61,6 @@
...
@@ -61,9 +61,6 @@
/// The install prefix defined in CMAKE_INSTALL_PREFIX.
/// The install prefix defined in CMAKE_INSTALL_PREFIX.
#define DEFAULT_INSTALL_PATH "@CMAKE_INSTALL_PREFIX@"
#define DEFAULT_INSTALL_PATH "@CMAKE_INSTALL_PREFIX@"
/// Default footprint library install path when installed with `make install`.
#define DEFAULT_FP_LIB_PATH "@KICAD_FP_LIB_INSTALL_PATH@"
/// When defined, build the GITHUB_PLUGIN for pcbnew.
/// When defined, build the GITHUB_PLUGIN for pcbnew.
#cmakedefine BUILD_GITHUB_PLUGIN
#cmakedefine BUILD_GITHUB_PLUGIN
...
...
INSTALL.txt
View file @
2c9b84a7
...
@@ -24,87 +24,43 @@ Installation from binary packages
...
@@ -24,87 +24,43 @@ Installation from binary packages
Installation from binary packages for Windows
Installation from binary packages for Windows
---------------------------------------------
---------------------------------------------
KiCad can be installed in 'C:\kicad', 'D:\kicad', 'C:\Program files\kicad',
The KiCad binary archive can be installed anywhere on the system that as long as the user
'D:\Program files\kicad'
.
has write privileges
.
For example, for an installation in the folder 'C:\kicad', unzip KiCad
You can create a shortcut to '${prefix}\bin\kicad.exe' where ${prefix} is the install path.
packages:
kicad-{version}.zip
kicad-doc-{version}.zip
kicad-library-{version}.zip
to the folder 'C:\kicad'.
The main program is the project manager (kicad.exe) and from it you can run
the other programs (schematic editor - eeschema, pcb editor - pcbnew,
utilities: cvpcb and gerbview).
You can create a shortcut to 'C:\kicad\bin\kicad.exe'.
Installation from binary packages for Linux
Installation from binary packages for Linux
-------------------------------------------
-------------------------------------------
KiCad can be installed in '/usr' or '/usr/local'.
KiCad can be installed in '/usr' or '/usr/local'. You must have "root" access for installation.
You must have "root" access for installation.
cd /
tar -xjf kicad-{version}.tbz2
tar -xjf kicad-doc-{version}.tbz2
tar -xjf kicad-library-{version}.tbz2
The main program is '/usr/bin/kicad'.
Windows KiCad tree
------------------
kicad/bin - Binaries (executable files).
kicad/doc - Various documentation.
kicad/doc/help - Interactive help.
kicad/share/demos - Sample schematics and printed boards.
kicad/share/internat - Interface localization files.
kicad/share/library - Libraries for schematic.
kicad/share/modules - Module libraries for printed boards.
kicad/share/modules/packages3d - 3D component models (.wrl and .wings format).
Files '*.mod' are libraries, and files '*.brd' are printed boards you can
view with pcbnew.
Files *.brd show the existing modules (and 3D shapes) in libraries.
Linux KiCad tree
cd /
----------------
tar -xjf kicad-{version}.tbz2
KiCad can use the Windows tree or the below tree.
tar -xjf kicad-doc-{version}.tbz2
When Kicad is coming from Linux distribution, the tree is:
tar -xjf kicad-library-{version}.tbz2
/usr/bin - Binaries (executable files).
The main program is '/usr/bin/kicad'.
/usr/share/doc/kicad/ - Various documentation.
/usr/share/doc/kicad/help - Interactive help.
/usr/share/kicad/demos - Sample schematics and printed boards.
/usr/share/kicad/internat - Dictionaries for interface localization.
/usr/share/kicad/library - Interface localization files.
/usr/share/kicad/modules - Module libraries for printed boards.
/usr/share/kicad/modules/packages3d - 3D component models (.wrl and .wings format).
if KiCad does not found its files in usr/share, the search is made in
/usr/local/kicad
and kicad uses the same tree as the Windows KiCad tree above
*** When KiCad comes from .tgz archive from http://iut-tice.ujf-grenoble.fr/cao/,
Linux and Windows KiCad install tree
it must me installed in /usr/local and uses the Windows tree ***.
-------------------------------------
${prefix}/bin - Binaries (executable files).
${prefix}/share/doc/kicad/ - Various documentation.
${prefix}/share/doc/kicad/help - Interactive help.
${prefix}/share/kicad/demos - Sample schematics and printed boards.
${prefix}/share/kicad/internat - Dictionaries for interface localization.
${prefix}/share/kicad/library - Interface localization files.
${prefix}/share/kicad/modules - Module libraries for printed boards.
${prefix}/share/kicad/modules/packages3d - 3D component models (.wrl and .wings format).
Files '*.mod' are the libraries, and files '*.brd' are printed boards you can
KiCad searches for the libraries, templates, 3D models, etc. bin/../share.
view with pcbnew.
Files *.brd show the existing modules (and 3D shapes) in libraries.
Warning:
Warning:
Do not change the KiCad tree, or the location of binary files
,
Do not change the KiCad tree, or the location of binary files
. Otherwise
else KiCad will not be able to find its required files (configuration,
KiCad may not be able to find some or all of its required files.
libraries, etc.).
Mac OS X KiCad tree
Mac OS X KiCad tree
-------------------
-------------------
...
@@ -122,35 +78,35 @@ User files can be the same as the system wide files but only inside the users ho
...
@@ -122,35 +78,35 @@ User files can be the same as the system wide files but only inside the users ho
$HOME/Library/Application Support/kicad
$HOME/Library/Application Support/kicad
Warning:
Warning:
These paths are hardcoded into KiCad, if you put them somewhere else KiCad will not find
them when a new
These paths are hardcoded into KiCad, if you put them somewhere else KiCad will not find
project is created.
them when a new
project is created.
Installation from source code
Installation from source code
-----------------------------
-----------------------------
Some dependencies must be satisfied for the correct installation of KiCad:
Some dependencies must be satisfied for the correct installation of KiCad:
under Linux:
wxWidgets >= 2.8.11 http://www.wxwidgets.org/
(needs to be compiled with unicode support)
under Windows:MacOSX
wxWidgets >= 2.9.4 http://www.wxwidgets.org/
CMake >= 2.8.1 http://www.cmake.org/
wxWidgets >= 3.0.0 http://www.wxwidgets.org/
CMake >= 2.8.4 http://www.cmake.org/
Boost C++ Libraries:
Boost C++ Libraries:
files used by kicad are autmatically downloaded and patched if needed
files used by kicad are autmatically downloaded and patched if needed
from boost site ( http://www.boost.org/ )
from boost site ( http://www.boost.org/ )
OpenGL
OpenGL
Linux: Mesa 3D Graphics Library http://www.mesa3d.org/
Linux: Mesa 3D Graphics Library http://www.mesa3d.org/
Windows: built-in
Windows: built-in
Zlib Compression Library http://www.zlib.net/
Zlib Compression Library http://www.zlib.net/
In source-tree-build are mostly unwanted, so make a subdir called "build" and
In source-tree-build are mostly unwanted, so make a subdir called "build" and
change to it.
change to it.
Call cmake with the path to KiCad. E.g., when your build-folder is "build"
Call cmake with the path to KiCad. E.g., when your build-folder is "build"
within source-tree, type "cmake ../".
within source-tree, type "cmake ../".
Now your system get checked if it is able compiling KiCad and cmake generates
Now your system get checked if it is able compiling KiCad and cmake generates
the Makefiles.
the Makefiles.
After calling cmake just type "make" and build begins.
After calling cmake just type "make" and build begins.
...
@@ -185,14 +141,6 @@ Required for Windows platform.
...
@@ -185,14 +141,6 @@ Required for Windows platform.
-DwxWidgets_USE_DEBUG=ON
-DwxWidgets_USE_DEBUG=ON
Can be used only with -DCMAKE_BUILD_TYPE=Debug
Can be used only with -DCMAKE_BUILD_TYPE=Debug
-DwxWidgets_USE_STATIC=ON
For building statically linked executables. Can be used only if wxWidgets
configured and builded with "--enable-monolithic --disable-shared" parameters.
-DwxWidgets_USE_STATIC=OFF
For building dinamically linked executables. Can be used only if wxWidgets
configured and builded with "--disable-monolithic --enable-shared" parameters.
-DKICAD_KEEPCASE=ON
-DKICAD_KEEPCASE=ON
Build the KiCad with no component name conversion to uppercase (if you want your
Build the KiCad with no component name conversion to uppercase (if you want your
ADuC.../Si.../bq... components named as just so).
ADuC.../Si.../bq... components named as just so).
...
@@ -207,7 +155,7 @@ When more output is wanted use this cmake parameter or call "make VERBOSE=1".
...
@@ -207,7 +155,7 @@ When more output is wanted use this cmake parameter or call "make VERBOSE=1".
Extra CFLAGS and linker flags
Extra CFLAGS and linker flags
-----------------------------
-----------------------------
If you require extra flags for compiler and linker you may give them via
If you require extra flags for compiler and linker you may give them via
environment variables
environment variables
"CXXFLAGS" (c++ compiler)
"CXXFLAGS" (c++ compiler)
"LDFLAGS" (for linker)
"LDFLAGS" (for linker)
...
...
common/common_plotGERBER_functions.cpp
View file @
2c9b84a7
...
@@ -119,8 +119,7 @@ bool GERBER_PLOTTER::StartPlot()
...
@@ -119,8 +119,7 @@ bool GERBER_PLOTTER::StartPlot()
if
(
!
m_attribFunction
.
IsEmpty
()
)
if
(
!
m_attribFunction
.
IsEmpty
()
)
{
{
fprintf
(
outputFile
,
"%%TF.FileFunction,%s*%%
\n
"
,
fprintf
(
outputFile
,
"%s
\n
"
,
TO_UTF8
(
m_attribFunction
)
);
TO_UTF8
(
m_attribFunction
)
);
}
}
// Set coordinate format to 3.6 or 4.5 absolute, leading zero omitted
// Set coordinate format to 3.6 or 4.5 absolute, leading zero omitted
...
...
eeschema/plot_schematic_DXF.cpp
View file @
2c9b84a7
...
@@ -98,9 +98,9 @@ void DIALOG_PLOT_SCHEMATIC::CreateDXFFile( bool aPlotAll, bool aPlotFrameRef )
...
@@ -98,9 +98,9 @@ void DIALOG_PLOT_SCHEMATIC::CreateDXFFile( bool aPlotAll, bool aPlotFrameRef )
m_MessagesBox
->
AppendText
(
msg
);
m_MessagesBox
->
AppendText
(
msg
);
}
}
catch
(
IO_ERROR
&
e
)
catch
(
IO_ERROR
&
e
)
{
{
msg
.
Printf
(
_
(
"DXF Plotter Exception : '%s'"
),
wxString
(
e
.
errorText
)
);
msg
.
Printf
(
wxT
(
"DXF Plotter Exception : '%s'"
),
GetChars
(
e
.
errorText
)
);
m_MessagesBox
->
AppendText
(
msg
);
m_MessagesBox
->
AppendText
(
msg
);
schframe
->
SetCurrentSheet
(
oldsheetpath
);
schframe
->
SetCurrentSheet
(
oldsheetpath
);
schframe
->
GetCurrentSheet
().
UpdateAllScreenReferences
();
schframe
->
GetCurrentSheet
().
UpdateAllScreenReferences
();
...
...
eeschema/plot_schematic_HPGL.cpp
View file @
2c9b84a7
...
@@ -195,9 +195,9 @@ void DIALOG_PLOT_SCHEMATIC::createHPGLFile( bool aPlotAll, bool aPlotFrameRef )
...
@@ -195,9 +195,9 @@ void DIALOG_PLOT_SCHEMATIC::createHPGLFile( bool aPlotAll, bool aPlotFrameRef )
if
(
!
aPlotAll
)
if
(
!
aPlotAll
)
break
;
break
;
}
}
catch
(
IO_ERROR
&
e
)
catch
(
IO_ERROR
&
e
)
{
{
msg
.
Printf
(
_
(
"HPGL Plotter Exception : '%s'"
),
wxString
(
e
.
errorText
)
);
msg
.
Printf
(
wxT
(
"HPGL Plotter Exception : '%s'"
),
GetChars
(
e
.
errorText
)
);
m_MessagesBox
->
AppendText
(
msg
);
m_MessagesBox
->
AppendText
(
msg
);
}
}
...
...
eeschema/plot_schematic_PDF.cpp
View file @
2c9b84a7
...
@@ -110,10 +110,10 @@ void DIALOG_PLOT_SCHEMATIC::createPDFFile( bool aPlotAll, bool aPlotFrameRef )
...
@@ -110,10 +110,10 @@ void DIALOG_PLOT_SCHEMATIC::createPDFFile( bool aPlotAll, bool aPlotFrameRef )
first_page
=
false
;
first_page
=
false
;
}
}
catch
(
const
IO_ERROR
&
e
)
catch
(
const
IO_ERROR
&
e
)
{
{
// Cannot plot PDF file
// Cannot plot PDF file
msg
.
Printf
(
_
(
"PDF Plotter Exception : <%s>"
),
wxString
(
e
.
errorText
)
);
msg
.
Printf
(
wxT
(
"PDF Plotter Exception : <%s>"
),
GetChars
(
e
.
errorText
)
);
restoreEnvironment
(
plotter
,
oldsheetpath
,
msg
);
restoreEnvironment
(
plotter
,
oldsheetpath
,
msg
);
return
;
return
;
}
}
...
...
eeschema/plot_schematic_PS.cpp
View file @
2c9b84a7
...
@@ -129,9 +129,9 @@ void DIALOG_PLOT_SCHEMATIC::createPSFile( bool aPlotAll, bool aPlotFrameRef )
...
@@ -129,9 +129,9 @@ void DIALOG_PLOT_SCHEMATIC::createPSFile( bool aPlotAll, bool aPlotFrameRef )
m_MessagesBox
->
AppendText
(
msg
);
m_MessagesBox
->
AppendText
(
msg
);
}
}
catch
(
IO_ERROR
&
e
)
catch
(
IO_ERROR
&
e
)
{
{
msg
.
Printf
(
_
(
"PS Plotter Exception : '%s'"
),
wxString
(
e
.
errorText
)
);
msg
.
Printf
(
wxT
(
"PS Plotter Exception : '%s'"
),
GetChars
(
e
.
errorText
)
);
m_MessagesBox
->
AppendText
(
msg
);
m_MessagesBox
->
AppendText
(
msg
);
}
}
...
...
eeschema/plot_schematic_SVG.cpp
View file @
2c9b84a7
...
@@ -101,10 +101,10 @@ void DIALOG_PLOT_SCHEMATIC::createSVGFile( bool aPrintAll, bool aPrintFrameRef )
...
@@ -101,10 +101,10 @@ void DIALOG_PLOT_SCHEMATIC::createSVGFile( bool aPrintAll, bool aPrintFrameRef )
m_MessagesBox
->
AppendText
(
msg
);
m_MessagesBox
->
AppendText
(
msg
);
}
}
catch
(
const
IO_ERROR
&
e
)
catch
(
const
IO_ERROR
&
e
)
{
{
// Cannot plot SVG file
// Cannot plot SVG file
msg
.
Printf
(
_
(
"SVG Plotter Exception : '%s'"
),
wxString
(
e
.
errorText
)
);
msg
.
Printf
(
wxT
(
"SVG Plotter Exception : '%s'"
),
GetChars
(
e
.
errorText
)
);
m_MessagesBox
->
AppendText
(
msg
);
m_MessagesBox
->
AppendText
(
msg
);
m_parent
->
SetCurrentSheet
(
oldsheetpath
);
m_parent
->
SetCurrentSheet
(
oldsheetpath
);
...
@@ -143,10 +143,10 @@ void DIALOG_PLOT_SCHEMATIC::createSVGFile( bool aPrintAll, bool aPrintFrameRef )
...
@@ -143,10 +143,10 @@ void DIALOG_PLOT_SCHEMATIC::createSVGFile( bool aPrintAll, bool aPrintFrameRef )
}
}
m_MessagesBox
->
AppendText
(
msg
);
m_MessagesBox
->
AppendText
(
msg
);
}
}
catch
(
const
IO_ERROR
&
e
)
catch
(
const
IO_ERROR
&
e
)
{
{
// Cannot plot SVG file
// Cannot plot SVG file
msg
.
Printf
(
_
(
"SVG Plotter Exception : <%s>"
),
wxString
(
e
.
errorText
)
);
msg
.
Printf
(
wxT
(
"SVG Plotter Exception : <%s>"
),
GetChars
(
e
.
errorText
)
);
m_MessagesBox
->
AppendText
(
msg
);
m_MessagesBox
->
AppendText
(
msg
);
return
;
return
;
}
}
...
...
pcbnew/exporters/gen_modules_placefile.cpp
View file @
2c9b84a7
...
@@ -493,7 +493,7 @@ int PCB_EDIT_FRAME::DoGenFootprintsPositionFile( const wxString& aFullFileName,
...
@@ -493,7 +493,7 @@ int PCB_EDIT_FRAME::DoGenFootprintsPositionFile( const wxString& aFullFileName,
const
wxString
&
ref
=
list
[
ii
].
m_Reference
;
const
wxString
&
ref
=
list
[
ii
].
m_Reference
;
const
wxString
&
val
=
list
[
ii
].
m_Value
;
const
wxString
&
val
=
list
[
ii
].
m_Value
;
const
wxString
&
pkg
=
list
[
ii
].
m_Module
->
GetFPID
().
Format
();
const
wxString
&
pkg
=
list
[
ii
].
m_Module
->
GetFPID
().
GetFootprintName
();
sprintf
(
line
,
"%-8.8s %-16.16s %-16.16s"
,
sprintf
(
line
,
"%-8.8s %-16.16s %-16.16s"
,
TO_UTF8
(
ref
),
TO_UTF8
(
val
),
TO_UTF8
(
pkg
)
);
TO_UTF8
(
ref
),
TO_UTF8
(
val
),
TO_UTF8
(
pkg
)
);
...
...
pcbnew/pcbframe.cpp
View file @
2c9b84a7
...
@@ -79,6 +79,7 @@
...
@@ -79,6 +79,7 @@
#include <tools/placement_tool.h>
#include <tools/placement_tool.h>
#include <tools/common_actions.h>
#include <tools/common_actions.h>
#include <scripting/python_console_frame.h>
#if defined(KICAD_SCRIPTING) || defined(KICAD_SCRIPTING_WXPYTHON)
#if defined(KICAD_SCRIPTING) || defined(KICAD_SCRIPTING_WXPYTHON)
#include <python_scripting.h>
#include <python_scripting.h>
...
@@ -211,11 +212,12 @@ BEGIN_EVENT_TABLE( PCB_EDIT_FRAME, PCB_BASE_FRAME )
...
@@ -211,11 +212,12 @@ BEGIN_EVENT_TABLE( PCB_EDIT_FRAME, PCB_BASE_FRAME )
EVT_TOOL
(
ID_TOOLBARH_PCB_MODE_MODULE
,
PCB_EDIT_FRAME
::
OnSelectAutoPlaceMode
)
EVT_TOOL
(
ID_TOOLBARH_PCB_MODE_MODULE
,
PCB_EDIT_FRAME
::
OnSelectAutoPlaceMode
)
EVT_TOOL
(
ID_TOOLBARH_PCB_MODE_TRACKS
,
PCB_EDIT_FRAME
::
OnSelectAutoPlaceMode
)
EVT_TOOL
(
ID_TOOLBARH_PCB_MODE_TRACKS
,
PCB_EDIT_FRAME
::
OnSelectAutoPlaceMode
)
EVT_TOOL
(
ID_TOOLBARH_PCB_FREEROUTE_ACCESS
,
PCB_EDIT_FRAME
::
Access_to_External_Tool
)
EVT_TOOL
(
ID_TOOLBARH_PCB_FREEROUTE_ACCESS
,
PCB_EDIT_FRAME
::
Access_to_External_Tool
)
#ifdef KICAD_SCRIPTING_WXPYTHON
// has meaning only with KICAD_SCRIPTING_WXPYTHON enabled
EVT_TOOL
(
ID_TOOLBARH_PCB_SCRIPTING_CONSOLE
,
PCB_EDIT_FRAME
::
ScriptingConsoleEnableDisable
)
EVT_TOOL
(
ID_TOOLBARH_PCB_SCRIPTING_CONSOLE
,
PCB_EDIT_FRAME
::
ScriptingConsoleEnableDisable
)
EVT_UPDATE_UI
(
ID_TOOLBARH_PCB_SCRIPTING_CONSOLE
,
EVT_UPDATE_UI
(
ID_TOOLBARH_PCB_SCRIPTING_CONSOLE
,
PCB_EDIT_FRAME
::
OnUpdateScriptingConsoleState
)
PCB_EDIT_FRAME
::
OnUpdateScriptingConsoleState
)
#endif
// Option toolbar
// Option toolbar
EVT_TOOL
(
ID_TB_OPTIONS_DRC_OFF
,
EVT_TOOL
(
ID_TB_OPTIONS_DRC_OFF
,
PCB_EDIT_FRAME
::
OnSelectOptionToolbar
)
PCB_EDIT_FRAME
::
OnSelectOptionToolbar
)
...
@@ -992,34 +994,23 @@ void PCB_EDIT_FRAME::UpdateTitle()
...
@@ -992,34 +994,23 @@ void PCB_EDIT_FRAME::UpdateTitle()
}
}
#if defined(KICAD_SCRIPTING_WXPYTHON)
wxSize
PYTHON_CONSOLE_FRAME
::
m_frameSize
;
///< The size of the PYTHON_CONSOLE_FRAME frame, stored during a session
wxPoint
PYTHON_CONSOLE_FRAME
::
m_framePos
;
///< The position ofPYTHON_CONSOLE_FRAME the frame, stored during a session
void
PCB_EDIT_FRAME
::
ScriptingConsoleEnableDisable
(
wxCommandEvent
&
aEvent
)
void
PCB_EDIT_FRAME
::
ScriptingConsoleEnableDisable
(
wxCommandEvent
&
aEvent
)
{
{
wx
MiniFrame
*
pythonPanelFrame
=
(
wxMiniFrame
*
)
findPythonConsole
();
wx
Window
*
pythonPanelFrame
=
findPythonConsole
();
bool
pythonPanelShown
=
false
;
bool
pythonPanelShown
=
false
;
if
(
pythonPanelFrame
==
NULL
)
if
(
pythonPanelFrame
==
NULL
)
{
pythonPanelFrame
=
new
PYTHON_CONSOLE_FRAME
(
this
,
pythonConsoleNameId
()
);
long
style
=
wxCAPTION
|
wxCLOSE_BOX
|
wxMINIMIZE_BOX
|
wxMAXIMIZE_BOX
|
wxRESIZE_BORDER
|
wxFRAME_FLOAT_ON_PARENT
;
pythonPanelFrame
=
new
wxMiniFrame
(
this
,
wxID_ANY
,
wxT
(
"Python console"
),
wxDefaultPosition
,
wxDefaultSize
,
style
,
pythonConsoleNameId
()
);
wxBoxSizer
*
sizer
=
new
wxBoxSizer
(
wxVERTICAL
);
wxWindow
*
pythonPanel
=
CreatePythonShellWindow
(
pythonPanelFrame
);
sizer
->
Add
(
pythonPanel
,
1
,
wxEXPAND
|
wxALL
,
5
);
pythonPanelFrame
->
SetSizer
(
sizer
);
pythonPanelFrame
->
SetSize
(
wxSize
(
600
,
300
)
);
pythonPanelFrame
->
Layout
();
pythonPanelFrame
->
Centre
();
}
else
else
pythonPanelShown
=
pythonPanelFrame
->
IsShown
();
pythonPanelShown
=
pythonPanelFrame
->
IsShown
();
pythonPanelShown
=
!
pythonPanelShown
;
pythonPanelShown
=
!
pythonPanelShown
;
pythonPanelFrame
->
Show
(
pythonPanelShown
);
pythonPanelFrame
->
Show
(
pythonPanelShown
);
}
}
#endif
void
PCB_EDIT_FRAME
::
OnSelectAutoPlaceMode
(
wxCommandEvent
&
aEvent
)
void
PCB_EDIT_FRAME
::
OnSelectAutoPlaceMode
(
wxCommandEvent
&
aEvent
)
...
...
pcbnew/pcbplot.cpp
View file @
2c9b84a7
...
@@ -84,9 +84,10 @@ const wxString GetGerberExtension( LAYER_NUM aLayer )
...
@@ -84,9 +84,10 @@ const wxString GetGerberExtension( LAYER_NUM aLayer )
}
}
wxString
GetGerberFileFunction
(
const
BOARD
*
aBoard
,
LAYER_NUM
aLayer
)
wxString
GetGerberFileFunction
(
const
BOARD
*
aBoard
,
LAYER_NUM
aLayer
,
bool
aUseX1CompatibilityMode
)
{
{
wxString
attrib
=
wxEmptyString
;
wxString
attrib
;
switch
(
aLayer
)
switch
(
aLayer
)
{
{
...
@@ -178,11 +179,18 @@ wxString GetGerberFileFunction( const BOARD *aBoard, LAYER_NUM aLayer )
...
@@ -178,11 +179,18 @@ wxString GetGerberFileFunction( const BOARD *aBoard, LAYER_NUM aLayer )
attrib
+=
wxString
(
wxT
(
",Mixed"
)
);
attrib
+=
wxString
(
wxT
(
",Mixed"
)
);
break
;
break
;
default:
default:
;
// do nothing (but avoid a warning for unhandled LAYER_T values from GCC)
break
;
// do nothing (but avoid a warning for unhandled LAYER_T values from GCC)
}
}
}
}
return
attrib
;
wxString
fileFct
;
if
(
aUseX1CompatibilityMode
)
fileFct
.
Printf
(
"G04 #@! TF.FileFunction,%s*"
,
GetChars
(
attrib
)
);
else
fileFct
.
Printf
(
"%%TF.FileFunction,%s*%%"
,
GetChars
(
attrib
)
);
return
fileFct
;
}
}
...
...
pcbnew/pcbplot.h
View file @
2c9b84a7
...
@@ -258,9 +258,12 @@ const wxString GetGerberExtension( LAYER_NUM aLayer );
...
@@ -258,9 +258,12 @@ const wxString GetGerberExtension( LAYER_NUM aLayer );
* the "%TF.FileFunction" attribute prefix and the "*%" suffix.
* the "%TF.FileFunction" attribute prefix and the "*%" suffix.
* @param aBoard = the board, needed to get the total count of copper layers
* @param aBoard = the board, needed to get the total count of copper layers
* @param aLayer = the layer number to create the attribute for
* @param aLayer = the layer number to create the attribute for
* @param aUseX1CompatibilityMode = true to use a file function attribute like G04 comment
* , compatible with X1 (rx274) notation (G04#@!TF.FileFunction)
* @return The attribute, as a text string
* @return The attribute, as a text string
*/
*/
extern
wxString
GetGerberFileFunction
(
const
BOARD
*
aBoard
,
LAYER_NUM
aLayer
);
extern
wxString
GetGerberFileFunction
(
const
BOARD
*
aBoard
,
LAYER_NUM
aLayer
,
bool
aUseX1CompatibilityMode
);
// PLOTGERB.CPP
// PLOTGERB.CPP
void
SelectD_CODE_For_LineDraw
(
PLOTTER
*
plotter
,
int
aSize
);
void
SelectD_CODE_For_LineDraw
(
PLOTTER
*
plotter
,
int
aSize
);
...
...
pcbnew/plot_board_layers.cpp
View file @
2c9b84a7
...
@@ -1005,8 +1005,12 @@ PLOTTER* StartPlotBoard( BOARD *aBoard, PCB_PLOT_PARAMS *aPlotOpts,
...
@@ -1005,8 +1005,12 @@ PLOTTER* StartPlotBoard( BOARD *aBoard, PCB_PLOT_PARAMS *aPlotOpts,
if
(
plotter
->
OpenFile
(
aFullFileName
)
)
if
(
plotter
->
OpenFile
(
aFullFileName
)
)
{
{
// For the Gerber "file function" attribute, set the layer number
// For the Gerber "file function" attribute, set the layer number
if
(
plotter
->
GetPlotterType
()
==
PLOT_FORMAT_GERBER
&&
plotOpts
.
GetUseGerberAttributes
()
)
if
(
plotter
->
GetPlotterType
()
==
PLOT_FORMAT_GERBER
)
plotter
->
SetLayerAttribFunction
(
GetGerberFileFunction
(
aBoard
,
aLayer
)
);
{
bool
useX2mode
=
plotOpts
.
GetUseGerberAttributes
();
plotter
->
SetLayerAttribFunction
(
GetGerberFileFunction
(
aBoard
,
aLayer
,
useX2mode
?
false
:
true
)
);
}
plotter
->
StartPlot
();
plotter
->
StartPlot
();
...
...
pcbnew/scripting/python_console_frame.h
0 → 100644
View file @
2c9b84a7
/*
* This program source code file is part of KiCad, a free EDA CAD application.
*
* Copyright (C) 2014 Jean-Pierre Charras, jp.charras at wanadoo.fr
* Copyright (C) 2004-2014 KiCad Developers, see change_log.txt for contributors.
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, you may find one here:
* http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
* or you may search the http://www.gnu.org website for the version 2 license,
* or you may write to the Free Software Foundation, Inc.,
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
*/
/**
* @file python_console_frame.h
*/
#ifndef PYTHON_CONSOLE_FRAME_H_
#define PYTHON_CONSOLE_FRAME_H_
#if defined(KICAD_SCRIPTING) || defined(KICAD_SCRIPTING_WXPYTHON)
#include <python_scripting.h>
#endif
/**
* Class PYTHON_CONSOLE_FRAME is a simple derived class from wxMiniFrame
* to handle the scripting python console
*/
class
PYTHON_CONSOLE_FRAME
:
public
wxMiniFrame
{
private
:
static
wxSize
m_frameSize
;
///< The size of the frame, stored during a session
static
wxPoint
m_framePos
;
///< The position of the frame, stored during a session
public
:
PYTHON_CONSOLE_FRAME
(
wxWindow
*
aParent
,
const
wxString
&
aFramenameId
)
:
wxMiniFrame
(
aParent
,
wxID_ANY
,
wxT
(
"Python console"
),
wxDefaultPosition
,
wxDefaultSize
,
wxCAPTION
|
wxCLOSE_BOX
|
wxRESIZE_BORDER
|
wxFRAME_FLOAT_ON_PARENT
,
aFramenameId
)
{
wxBoxSizer
*
sizer
=
new
wxBoxSizer
(
wxVERTICAL
);
#if defined(KICAD_SCRIPTING_WXPYTHON)
wxWindow
*
pythonPanel
=
CreatePythonShellWindow
(
this
);
sizer
->
Add
(
pythonPanel
,
1
,
wxEXPAND
|
wxALL
,
5
);
#endif
SetSizer
(
sizer
);
SetMinSize
(
wxSize
(
400
,
200
)
);
if
(
m_frameSize
.
x
<=
0
||
m_frameSize
.
y
<=
0
)
SetSize
(
wxSize
(
600
,
300
)
);
else
SetSize
(
m_frameSize
);
if
(
m_framePos
.
x
==
0
&&
m_framePos
.
y
==
0
)
Centre
();
else
SetPosition
(
m_framePos
);
Layout
();
// Connect Events
this
->
Connect
(
wxEVT_CLOSE_WINDOW
,
wxCloseEventHandler
(
PYTHON_CONSOLE_FRAME
::
OnClose
)
);
}
~
PYTHON_CONSOLE_FRAME
()
{
// Disconnect Events
this
->
Disconnect
(
wxEVT_CLOSE_WINDOW
,
wxCloseEventHandler
(
PYTHON_CONSOLE_FRAME
::
OnClose
)
);
}
private
:
void
OnClose
(
wxCloseEvent
&
event
)
{
if
(
!
IsIconized
()
)
{
m_frameSize
=
GetSize
();
m_framePos
=
GetPosition
();
}
event
.
Skip
();
}
};
#endif // PYTHON_CONSOLE_FRAME_H_
pcbnew/tool_pcb.cpp
View file @
2c9b84a7
...
@@ -309,7 +309,7 @@ void PCB_EDIT_FRAME::ReCreateHToolbar()
...
@@ -309,7 +309,7 @@ void PCB_EDIT_FRAME::ReCreateHToolbar()
_
(
"Fast access to the Web Based FreeROUTE advanced router"
)
);
_
(
"Fast access to the Web Based FreeROUTE advanced router"
)
);
// Access to the scripting console
// Access to the scripting console
#if
def KICAD_SCRIPTING_WXPYTHON
#if
defined(KICAD_SCRIPTING_WXPYTHON)
m_mainToolBar
->
AddSeparator
();
m_mainToolBar
->
AddSeparator
();
m_mainToolBar
->
AddTool
(
ID_TOOLBARH_PCB_SCRIPTING_CONSOLE
,
wxEmptyString
,
m_mainToolBar
->
AddTool
(
ID_TOOLBARH_PCB_SCRIPTING_CONSOLE
,
wxEmptyString
,
...
@@ -631,7 +631,7 @@ void PCB_EDIT_FRAME::updateTraceWidthSelectBox()
...
@@ -631,7 +631,7 @@ void PCB_EDIT_FRAME::updateTraceWidthSelectBox()
msg
=
_
(
"Track "
)
+
CoordinateToString
(
GetDesignSettings
().
m_TrackWidthList
[
ii
],
true
);
msg
=
_
(
"Track "
)
+
CoordinateToString
(
GetDesignSettings
().
m_TrackWidthList
[
ii
],
true
);
if
(
ii
==
0
)
if
(
ii
==
0
)
msg
<<
_
(
" *"
);
msg
<<
wxT
(
" *"
);
m_SelTrackWidthBox
->
Append
(
msg
);
m_SelTrackWidthBox
->
Append
(
msg
);
}
}
...
@@ -662,7 +662,7 @@ void PCB_EDIT_FRAME::updateViaSizeSelectBox()
...
@@ -662,7 +662,7 @@ void PCB_EDIT_FRAME::updateViaSizeSelectBox()
<<
CoordinateToString
(
GetDesignSettings
().
m_ViasDimensionsList
[
ii
].
m_Drill
,
true
);
<<
CoordinateToString
(
GetDesignSettings
().
m_ViasDimensionsList
[
ii
].
m_Drill
,
true
);
if
(
ii
==
0
)
if
(
ii
==
0
)
msg
<<
_
(
" *"
);
msg
<<
wxT
(
" *"
);
m_SelViaSizeBox
->
Append
(
msg
);
m_SelViaSizeBox
->
Append
(
msg
);
}
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment