Loading .bzrignore +1 −0 Original line number Diff line number Diff line boost_root .downloads-by-cmake Build common/netlist_keywords.* common/netlist_lexer.h common/pcb_plot_params_lexer.h Loading 3d-viewer/3d_read_mesh.cpp +34 −2 Original line number Diff line number Diff line Loading @@ -59,6 +59,39 @@ S3D_MODEL_PARSER* S3D_MODEL_PARSER::Create( S3D_MASTER* aMaster, } } const wxString S3D_MASTER::GetShape3DFullFilename() { wxString shapeName; // Expand any environment variables embedded in footprint's m_Shape3DName field. // To ensure compatibility with most of footprint's m_Shape3DName field, // if the m_Shape3DName is not an absolute path the default path // given by the environment variable KISYS3DMOD will be used if( m_Shape3DName.StartsWith( wxT("${") ) ) shapeName = wxExpandEnvVars( m_Shape3DName ); else shapeName = m_Shape3DName; wxFileName fn( shapeName ); if( fn.IsAbsolute() || shapeName.StartsWith( wxT(".") ) ) return shapeName; wxString default_path; wxGetEnv( wxT( KISYS3DMOD ), &default_path ); if( default_path.IsEmpty() ) return shapeName; if( !default_path.EndsWith( wxT("/") ) && !default_path.EndsWith( wxT("\\") ) ) default_path += wxT("/"); default_path += shapeName; return default_path; } int S3D_MASTER::ReadData() { Loading @@ -67,8 +100,7 @@ int S3D_MASTER::ReadData() return 1; } // Expand any environment variables embedded in footprint's m_Shape3DName field. wxString filename = wxExpandEnvVars( m_Shape3DName ); wxString filename = GetShape3DFullFilename(); #ifdef __WINDOWS__ filename.Replace( wxT( "/" ), wxT( "\\" ) ); Loading 3d-viewer/3d_struct.h +8 −0 Original line number Diff line number Diff line Loading @@ -144,6 +144,14 @@ public: return m_Shape3DName; } /** * Function GetShape3DFullFilename * @return the full filename of the 3D shape, * expanding environment variable (if any ) and/or adding default 3D path * given by environment variable KISYS3DMOD */ const wxString GetShape3DFullFilename(); void SetShape3DName( const wxString& aShapeName ); }; Loading 3d-viewer/3d_viewer.h +3 −0 Original line number Diff line number Diff line Loading @@ -48,6 +48,9 @@ # include <GL/glu.h> #endif #define KISYS3DMOD "KISYS3DMOD" #include <3d_struct.h> class EDA_3D_CANVAS; Loading CMakeLists.txt +80 −20 Original line number Diff line number Diff line Loading @@ -58,9 +58,16 @@ option( KICAD_SCRIPTING_WXPYTHON ) option( KICAD_BUILD_STATIC "Builds Kicad and all libraries static (except wx-widgets)" "Builds Kicad and all libraries static" ) option( KICAD_BUILD_DYNAMIC "Builds Kicad and all libraries dynamic (required for wxPython)" ) # WARNING: KiCad developers strongly advise you to build Boost with supplied patches, # as it is known to work with KiCad. Other versions may contain bugs that may result # WARNING: KiCad developers strongly advise you to build Boost with supplied patches, # as it is known to work with KiCad. Other versions may contain bugs that may result # in KiCad errors. Loading Loading @@ -190,9 +197,11 @@ if( CMAKE_COMPILER_IS_GNUCXX OR CMAKE_CXX_COMPILER_ID MATCHES "Clang" ) set( TO_LINKER -Wl ) endif() # Thou shalt not link vaporware and tell us it's a valid DSO: # Thou shalt not link vaporware and tell us it's a valid DSO (apple ld doesn't support it) if( NOT APPLE ) set( CMAKE_SHARED_LINKER_FLAGS "${TO_LINKER},--no-undefined" ) set( CMAKE_MODULE_LINKER_FLAGS "${TO_LINKER},--no-undefined" ) endif() set( CMAKE_EXE_LINKER_FLAGS_RELEASE "-s" ) endif() Loading Loading @@ -341,8 +350,19 @@ add_definitions(-DWX_COMPATIBILITY) find_package( OpenGL QUIET ) check_find_package_result( OPENGL_FOUND "OpenGL" ) # Handle target used to specify if a target needs wx-widgets or other libraries # Always defined, empty if no libraries are to be build add_custom_target( lib-dependencies ) if( KICAD_BUILD_STATIC OR KICAD_BUILD_DYNAMIC ) # This should be build in all cases, if swig exec is not avaiable # will be impossible also enable SCRIPTING being for PCBNEW required immediatly include( download_pcre ) include( download_swig ) #set(CMAKE_FIND_LIBRARY_SUFFIXES ".a;.so;.dylib;.dll") if( KICAD_BUILD_STATIC AND KICAD_BUILD_DYNAMIC ) Loading @@ -351,26 +371,49 @@ if( KICAD_BUILD_STATIC OR KICAD_BUILD_DYNAMIC ) if( KICAD_BUILD_STATIC ) message(STATUS "KICAD_BUILD_STATIC set") if( KICAD_SCRIPTING OR KICAD_SCRIPTING_WXPYTHON OR KICAD_SCRIPTING_MODULES ) message(FATAL_ERROR "KICAD_SCRIPTING* is not supported with KICAD_BUILD_STATIC, please select KICAD_BUILD_DYNAMIC" ) endif() endif() if( KICAD_BUILD_DYNAMIC ) message(STATUS "KICAD_BUILD_DYNAMIC set") # TODO - Library packaging/relocation endif() add_custom_target( lib-dependencies DEPENDS boost cairo glew libpng pixman pkgconfig ) include( download_libpng ) if( KICAD_SCRIPTING OR KICAD_SCRIPTING_WXPYTHON OR KICAD_SCRIPTING_MODULES ) message(STATUS "Scripting ENABLED") include( download_wxpython ) set( SWIG_EXECUTABLE ${SWIG_ROOT}/bin/swig ) set( SWIG_INCLUDE ${SWIG_ROOT}/include ) set( PYTHON_DEST ${LIBWXPYTHON_ROOT}/wxPython/lib/python2.6/site-packages ) if( NOT EXISTS ${SWIG_EXECUTABLE} ) set(KICAD_SCRIPTING CACHE OFF FORCE "Disabling KICAD_SCRIPTING") message( STATUS "KICAD_SCRIPTING Enabled but SWIG not found, please disable and before reenabling execute: make swig") message( FATAL_ERROR "Missing SWIG!") endif() message(STATUS "SWIG_EXECUTABLE: ${SWIG_EXECUTABLE}") set( PYTHON_DEST ${LIBWXPYTHON_ROOT}/wxPython/lib/python2.6/site-packages ) set(wxWidgets_BIN_DIR ${LIBWXPYTHON_ROOT}/bin/wxrc ) set(wxWidgets_CONFIG_EXECUTABLE ${LIBWXPYTHON_ROOT}/bin/wx-config ) set(wxWidgets_INCLUDE_DIRS ${LIBWXPYTHON_ROOT}/include/wx-3.0 ) set(wxWidgets_LIBRARY_DIRS ${LIBWXPYTHON_ROOT}/lib ) add_dependencies( lib-dependencies libwxpython ) add_dependencies( lib-dependencies swig ) if( KICAD_SCRIPTING_WXPYTHON ) message( FATAL_ERROR "KICAD_BUILD_* and SCRIPTING Not Implemented Yet!" ) else() include( download_wxwidgets ) add_dependencies( lib-dependencies libwx ) endif() include( download_libpng ) include( download_pkgconfig ) set( PKG_CONFIG_EXECUTABLE "${PKGCONFIG_ROOT}/bin/pkg-config" ) include( download_glew ) Loading @@ -382,6 +425,12 @@ if( KICAD_BUILD_STATIC OR KICAD_BUILD_DYNAMIC ) set( CAIRO_INCLUDE_DIR "${CAIRO_ROOT}/include/cairo" ) set( CAIRO_LIBRARY "${CAIRO_ROOT}/lib/libcairo.a" ) add_dependencies( lib-dependencies boost ) add_dependencies( lib-dependencies cairo ) add_dependencies( lib-dependencies libpng ) add_dependencies( lib-dependencies pixman ) add_dependencies( lib-dependencies pkgconfig ) if( KICAD_BUILD_DYNAMIC AND APPLE ) add_custom_target( osx_fix_bundles ALL DEPENDS cvpcb eeschema gerbview kicad pcbnew bitmap2component pcb_calculator pl_editor) add_custom_command(TARGET osx_fix_bundles POST_BUILD COMMAND scripts/osx_fixbundle.sh COMMENT "Migrating dylibs to bundles") Loading Loading @@ -428,7 +477,7 @@ endif() # On Apple only wxwidgets 2.9 or higher doesn't need to find aui part of base # Seems no more needed on wx-3 if( APPLE AND NOT (KICAD_BUILD_STATIC OR KICAD_BUILD_DYNAMIC) ) if( APPLE AND ( KICAD_SCRIPTING OR KICAD_SCRIPTING_MODULES OR KICAD_SCRIPTING_WXPYTHON) ) find_package( wxWidgets COMPONENTS gl adv html core net base xml QUIET ) else() find_package( wxWidgets COMPONENTS gl aui adv html core net base xml QUIET ) Loading Loading @@ -477,10 +526,25 @@ set( INC_AFTER # Find Python and other scripting resources if( KICAD_SCRIPTING OR KICAD_SCRIPTING_MODULES ) set( PythonInterp_FIND_VERSION ) if( APPLE ) set( PYTHON_LIBRARY /System/Library/Frameworks/Python.framework/Versions/2.6/Python ) set( PYTHON_INCLUDE_DIR /System/Library/Frameworks/Python.framework/Versions//2.6/include/python2.6 ) set( PythonInterp_FIND_VERSION 2.6 ) set( PythonLibs_FIND_VERSION 2.6 ) endif() # force a python version < 3.0 set( PythonInterp_FIND_VERSION 2.6) set( PythonLibs_FIND_VERSION 2.6 ) find_package( PythonInterp ) check_find_package_result( PYTHONINTERP_FOUND "Python Interpreter" ) if( NOT PYTHON_VERSION_MAJOR EQUAL 2 ) message( FATAL_ERROR "Python 2.x is required." ) endif() # Get the correct Python site package install path from the Python interpreter found by # FindPythonInterp unless the user specifically defined a custom path. if( NOT PYTHON_SITE_PACKAGE_PATH ) Loading @@ -498,7 +562,7 @@ if( KICAD_SCRIPTING OR KICAD_SCRIPTING_MODULES ) mark_as_advanced( PYTHON_DEST ) message( STATUS "Python module install path: ${PYTHON_DEST}" ) find_package( PythonLibs ) find_package( PythonLibs 2.6 ) #message( STATUS "PYTHON_INCLUDE_DIRS:${PYTHON_INCLUDE_DIRS}" ) Loading Loading @@ -573,17 +637,13 @@ if ( KICAD_BUILD_STATIC OR KICAD_BUILD_DYNAMIC ) add_dependencies( pcbnew lib-dependencies ) add_dependencies( eeschema lib-dependencies ) add_dependencies( cvpcb lib-dependencies ) add_dependencies( gal lib-dependencies ) add_dependencies( common lib-dependencies ) add_dependencies( gal lib-dependencies ) add_dependencies( pcbcommon lib-dependencies ) add_dependencies( 3d-viewer lib-dependencies ) add_dependencies( pcad2kicadpcb lib-dependencies ) add_dependencies( polygon lib-dependencies ) add_dependencies( pl_editor lib-dependencies ) add_dependencies( pnsrouter lib-dependencies ) if ( BUILD_GITHUB_PLUGIN ) add_dependencies( github_plugin lib-dependencies ) endif() endif() if ( KICAD_BUILD_DYNAMIC ) Loading Loading
.bzrignore +1 −0 Original line number Diff line number Diff line boost_root .downloads-by-cmake Build common/netlist_keywords.* common/netlist_lexer.h common/pcb_plot_params_lexer.h Loading
3d-viewer/3d_read_mesh.cpp +34 −2 Original line number Diff line number Diff line Loading @@ -59,6 +59,39 @@ S3D_MODEL_PARSER* S3D_MODEL_PARSER::Create( S3D_MASTER* aMaster, } } const wxString S3D_MASTER::GetShape3DFullFilename() { wxString shapeName; // Expand any environment variables embedded in footprint's m_Shape3DName field. // To ensure compatibility with most of footprint's m_Shape3DName field, // if the m_Shape3DName is not an absolute path the default path // given by the environment variable KISYS3DMOD will be used if( m_Shape3DName.StartsWith( wxT("${") ) ) shapeName = wxExpandEnvVars( m_Shape3DName ); else shapeName = m_Shape3DName; wxFileName fn( shapeName ); if( fn.IsAbsolute() || shapeName.StartsWith( wxT(".") ) ) return shapeName; wxString default_path; wxGetEnv( wxT( KISYS3DMOD ), &default_path ); if( default_path.IsEmpty() ) return shapeName; if( !default_path.EndsWith( wxT("/") ) && !default_path.EndsWith( wxT("\\") ) ) default_path += wxT("/"); default_path += shapeName; return default_path; } int S3D_MASTER::ReadData() { Loading @@ -67,8 +100,7 @@ int S3D_MASTER::ReadData() return 1; } // Expand any environment variables embedded in footprint's m_Shape3DName field. wxString filename = wxExpandEnvVars( m_Shape3DName ); wxString filename = GetShape3DFullFilename(); #ifdef __WINDOWS__ filename.Replace( wxT( "/" ), wxT( "\\" ) ); Loading
3d-viewer/3d_struct.h +8 −0 Original line number Diff line number Diff line Loading @@ -144,6 +144,14 @@ public: return m_Shape3DName; } /** * Function GetShape3DFullFilename * @return the full filename of the 3D shape, * expanding environment variable (if any ) and/or adding default 3D path * given by environment variable KISYS3DMOD */ const wxString GetShape3DFullFilename(); void SetShape3DName( const wxString& aShapeName ); }; Loading
3d-viewer/3d_viewer.h +3 −0 Original line number Diff line number Diff line Loading @@ -48,6 +48,9 @@ # include <GL/glu.h> #endif #define KISYS3DMOD "KISYS3DMOD" #include <3d_struct.h> class EDA_3D_CANVAS; Loading
CMakeLists.txt +80 −20 Original line number Diff line number Diff line Loading @@ -58,9 +58,16 @@ option( KICAD_SCRIPTING_WXPYTHON ) option( KICAD_BUILD_STATIC "Builds Kicad and all libraries static (except wx-widgets)" "Builds Kicad and all libraries static" ) option( KICAD_BUILD_DYNAMIC "Builds Kicad and all libraries dynamic (required for wxPython)" ) # WARNING: KiCad developers strongly advise you to build Boost with supplied patches, # as it is known to work with KiCad. Other versions may contain bugs that may result # WARNING: KiCad developers strongly advise you to build Boost with supplied patches, # as it is known to work with KiCad. Other versions may contain bugs that may result # in KiCad errors. Loading Loading @@ -190,9 +197,11 @@ if( CMAKE_COMPILER_IS_GNUCXX OR CMAKE_CXX_COMPILER_ID MATCHES "Clang" ) set( TO_LINKER -Wl ) endif() # Thou shalt not link vaporware and tell us it's a valid DSO: # Thou shalt not link vaporware and tell us it's a valid DSO (apple ld doesn't support it) if( NOT APPLE ) set( CMAKE_SHARED_LINKER_FLAGS "${TO_LINKER},--no-undefined" ) set( CMAKE_MODULE_LINKER_FLAGS "${TO_LINKER},--no-undefined" ) endif() set( CMAKE_EXE_LINKER_FLAGS_RELEASE "-s" ) endif() Loading Loading @@ -341,8 +350,19 @@ add_definitions(-DWX_COMPATIBILITY) find_package( OpenGL QUIET ) check_find_package_result( OPENGL_FOUND "OpenGL" ) # Handle target used to specify if a target needs wx-widgets or other libraries # Always defined, empty if no libraries are to be build add_custom_target( lib-dependencies ) if( KICAD_BUILD_STATIC OR KICAD_BUILD_DYNAMIC ) # This should be build in all cases, if swig exec is not avaiable # will be impossible also enable SCRIPTING being for PCBNEW required immediatly include( download_pcre ) include( download_swig ) #set(CMAKE_FIND_LIBRARY_SUFFIXES ".a;.so;.dylib;.dll") if( KICAD_BUILD_STATIC AND KICAD_BUILD_DYNAMIC ) Loading @@ -351,26 +371,49 @@ if( KICAD_BUILD_STATIC OR KICAD_BUILD_DYNAMIC ) if( KICAD_BUILD_STATIC ) message(STATUS "KICAD_BUILD_STATIC set") if( KICAD_SCRIPTING OR KICAD_SCRIPTING_WXPYTHON OR KICAD_SCRIPTING_MODULES ) message(FATAL_ERROR "KICAD_SCRIPTING* is not supported with KICAD_BUILD_STATIC, please select KICAD_BUILD_DYNAMIC" ) endif() endif() if( KICAD_BUILD_DYNAMIC ) message(STATUS "KICAD_BUILD_DYNAMIC set") # TODO - Library packaging/relocation endif() add_custom_target( lib-dependencies DEPENDS boost cairo glew libpng pixman pkgconfig ) include( download_libpng ) if( KICAD_SCRIPTING OR KICAD_SCRIPTING_WXPYTHON OR KICAD_SCRIPTING_MODULES ) message(STATUS "Scripting ENABLED") include( download_wxpython ) set( SWIG_EXECUTABLE ${SWIG_ROOT}/bin/swig ) set( SWIG_INCLUDE ${SWIG_ROOT}/include ) set( PYTHON_DEST ${LIBWXPYTHON_ROOT}/wxPython/lib/python2.6/site-packages ) if( NOT EXISTS ${SWIG_EXECUTABLE} ) set(KICAD_SCRIPTING CACHE OFF FORCE "Disabling KICAD_SCRIPTING") message( STATUS "KICAD_SCRIPTING Enabled but SWIG not found, please disable and before reenabling execute: make swig") message( FATAL_ERROR "Missing SWIG!") endif() message(STATUS "SWIG_EXECUTABLE: ${SWIG_EXECUTABLE}") set( PYTHON_DEST ${LIBWXPYTHON_ROOT}/wxPython/lib/python2.6/site-packages ) set(wxWidgets_BIN_DIR ${LIBWXPYTHON_ROOT}/bin/wxrc ) set(wxWidgets_CONFIG_EXECUTABLE ${LIBWXPYTHON_ROOT}/bin/wx-config ) set(wxWidgets_INCLUDE_DIRS ${LIBWXPYTHON_ROOT}/include/wx-3.0 ) set(wxWidgets_LIBRARY_DIRS ${LIBWXPYTHON_ROOT}/lib ) add_dependencies( lib-dependencies libwxpython ) add_dependencies( lib-dependencies swig ) if( KICAD_SCRIPTING_WXPYTHON ) message( FATAL_ERROR "KICAD_BUILD_* and SCRIPTING Not Implemented Yet!" ) else() include( download_wxwidgets ) add_dependencies( lib-dependencies libwx ) endif() include( download_libpng ) include( download_pkgconfig ) set( PKG_CONFIG_EXECUTABLE "${PKGCONFIG_ROOT}/bin/pkg-config" ) include( download_glew ) Loading @@ -382,6 +425,12 @@ if( KICAD_BUILD_STATIC OR KICAD_BUILD_DYNAMIC ) set( CAIRO_INCLUDE_DIR "${CAIRO_ROOT}/include/cairo" ) set( CAIRO_LIBRARY "${CAIRO_ROOT}/lib/libcairo.a" ) add_dependencies( lib-dependencies boost ) add_dependencies( lib-dependencies cairo ) add_dependencies( lib-dependencies libpng ) add_dependencies( lib-dependencies pixman ) add_dependencies( lib-dependencies pkgconfig ) if( KICAD_BUILD_DYNAMIC AND APPLE ) add_custom_target( osx_fix_bundles ALL DEPENDS cvpcb eeschema gerbview kicad pcbnew bitmap2component pcb_calculator pl_editor) add_custom_command(TARGET osx_fix_bundles POST_BUILD COMMAND scripts/osx_fixbundle.sh COMMENT "Migrating dylibs to bundles") Loading Loading @@ -428,7 +477,7 @@ endif() # On Apple only wxwidgets 2.9 or higher doesn't need to find aui part of base # Seems no more needed on wx-3 if( APPLE AND NOT (KICAD_BUILD_STATIC OR KICAD_BUILD_DYNAMIC) ) if( APPLE AND ( KICAD_SCRIPTING OR KICAD_SCRIPTING_MODULES OR KICAD_SCRIPTING_WXPYTHON) ) find_package( wxWidgets COMPONENTS gl adv html core net base xml QUIET ) else() find_package( wxWidgets COMPONENTS gl aui adv html core net base xml QUIET ) Loading Loading @@ -477,10 +526,25 @@ set( INC_AFTER # Find Python and other scripting resources if( KICAD_SCRIPTING OR KICAD_SCRIPTING_MODULES ) set( PythonInterp_FIND_VERSION ) if( APPLE ) set( PYTHON_LIBRARY /System/Library/Frameworks/Python.framework/Versions/2.6/Python ) set( PYTHON_INCLUDE_DIR /System/Library/Frameworks/Python.framework/Versions//2.6/include/python2.6 ) set( PythonInterp_FIND_VERSION 2.6 ) set( PythonLibs_FIND_VERSION 2.6 ) endif() # force a python version < 3.0 set( PythonInterp_FIND_VERSION 2.6) set( PythonLibs_FIND_VERSION 2.6 ) find_package( PythonInterp ) check_find_package_result( PYTHONINTERP_FOUND "Python Interpreter" ) if( NOT PYTHON_VERSION_MAJOR EQUAL 2 ) message( FATAL_ERROR "Python 2.x is required." ) endif() # Get the correct Python site package install path from the Python interpreter found by # FindPythonInterp unless the user specifically defined a custom path. if( NOT PYTHON_SITE_PACKAGE_PATH ) Loading @@ -498,7 +562,7 @@ if( KICAD_SCRIPTING OR KICAD_SCRIPTING_MODULES ) mark_as_advanced( PYTHON_DEST ) message( STATUS "Python module install path: ${PYTHON_DEST}" ) find_package( PythonLibs ) find_package( PythonLibs 2.6 ) #message( STATUS "PYTHON_INCLUDE_DIRS:${PYTHON_INCLUDE_DIRS}" ) Loading Loading @@ -573,17 +637,13 @@ if ( KICAD_BUILD_STATIC OR KICAD_BUILD_DYNAMIC ) add_dependencies( pcbnew lib-dependencies ) add_dependencies( eeschema lib-dependencies ) add_dependencies( cvpcb lib-dependencies ) add_dependencies( gal lib-dependencies ) add_dependencies( common lib-dependencies ) add_dependencies( gal lib-dependencies ) add_dependencies( pcbcommon lib-dependencies ) add_dependencies( 3d-viewer lib-dependencies ) add_dependencies( pcad2kicadpcb lib-dependencies ) add_dependencies( polygon lib-dependencies ) add_dependencies( pl_editor lib-dependencies ) add_dependencies( pnsrouter lib-dependencies ) if ( BUILD_GITHUB_PLUGIN ) add_dependencies( github_plugin lib-dependencies ) endif() endif() if ( KICAD_BUILD_DYNAMIC ) Loading