Commit 32e962e8 authored by Maciej Suminski's avatar Maciej Suminski

Merged upstream and Mac OS X build fixes.

parents a7e963bd 379f04af
include/boost
boost_root
.downloads-by-cmake
common/netlist_keywords.*
common/netlist_lexer.h
......
......@@ -2,7 +2,6 @@ add_definitions(-DPCBNEW)
include_directories(BEFORE ${INC_BEFORE})
include_directories(
${Boost_INCLUDE_DIR}
../pcbnew
../polygon
${INC_AFTER}
......
This diff is collapsed.
......@@ -75,17 +75,14 @@
#cmakedefine USE_IMAGES_IN_MENUS 1
/// Definitions to enable the s-expression file formats and nanometer units.
#cmakedefine USE_PCBNEW_NANOMETRES
/// The legacy file format revision of the *.brd file created by this build
#if defined(USE_PCBNEW_NANOMETRES)
#define LEGACY_BOARD_FILE_VERSION 2
#else
#define LEGACY_BOARD_FILE_VERSION 1
#endif
/// Definition to compile with Pcbnew footprint library table implementation.
#cmakedefine USE_FP_LIB_TABLE
/// When defined, build the GITHUB_PLUGIN for pcbnew.
#cmakedefine BUILD_GITHUB_PLUGIN
#endif // CONFIG_H_
......@@ -22,11 +22,43 @@
# Download and patch boost headers to a particular version.
# Assumes include( ExternalProject ) was done inline previous to this file.
# Download a particular boost version, and patch it [and build it if BUILD_GITHUB_PLUGIN].
# Assumes include( ExternalProject ) was done inline previous to this file
# and that set( DOWNLOAD_DIR ... ) was set in a higher context.
#-----<configure>----------------------------------------------------------------
if( false )
set( BOOST_RELEASE 1.53.0 )
set( BOOST_MD5 a00d22605d5dbcfb4c9936a9b35bc4c2 ) # re-calc this on every RELEASE change
else()
set( BOOST_RELEASE 1.54.0 )
set( BOOST_MD5 15cb8c0803064faef0c4ddf5bc5ca279 ) # re-calc this on every RELEASE change
endif()
# The boost headers [and static libs if built] go here, at the top of KiCad
# source tree in boost_root.
set( BOOST_ROOT "${PROJECT_SOURCE_DIR}/boost_root" )
if( BUILD_GITHUB_PLUGIN )
# Space separated list which indicates the subset of boost libraries to compile.
set( BOOST_LIBS_BUILT
#filesystem
system
#regex
#program_options
#date_time
#thread
#exception
unit_test_framework
)
endif()
#-----</configure>---------------------------------------------------------------
set( BOOST_RELEASE 1.53.0 )
set( BOOST_MD5 a00d22605d5dbcfb4c9936a9b35bc4c2 ) # re-calc this on every RELEASE change
string( REGEX REPLACE "\\." "_" BOOST_VERS "${BOOST_RELEASE}" )
set( PREFIX ${DOWNLOAD_DIR}/boost_${BOOST_VERS} )
......@@ -36,27 +68,102 @@ set( PREFIX ${DOWNLOAD_DIR}/boost_${BOOST_VERS} )
# download, the patch is applied. This lets you regenerate a new patch at any time
# easily, simply by editing the working tree in <SOURCE_DIR> and doing "bzr diff" in there.
# include only the headers in the repo.
# repo = "${headers}/../.bzr" = "<SOURCE_DIR>/.bzr"
set( headers ${PREFIX}/src/boost/boost )
# path to the boost headers in the repo.
# repo = "${headers_src}/../.bzr" = "<SOURCE_DIR>/.bzr"
set( headers_src "${PREFIX}/src/boost/boost" )
# don't look at this:
function( set_boost_lib_names libs output )
foreach( lib ${libs} )
set( fullpath_lib, "${BOOST_ROOT}/lib/libboost_${lib}.a" )
message( STATUS "fullpath_lib:${fullpath_lib}" )
set( output ${output} ${fullpath_lib} )
endforeach()
endfunction()
if( BUILD_GITHUB_PLUGIN )
# (BTW "test" yields "unit_test_framework" when passed to bootstrap.{sh,bat} ).
message( STATUS "BOOST_LIBS_BUILT:${BOOST_LIBS_BUILT}" )
string( REPLACE "unit_test_framework" "test" libs_csv "${BOOST_LIBS_BUILT}" )
message( STATUS "REPLACE libs_csv:${libs_csv}" )
string( REGEX REPLACE "\\;" "," libs_csv "${libs_csv}" )
message( STATUS "libs_csv:${libs_csv}" )
if( MINGW )
set( bootstrap "bootstart.bat mingw" )
else()
set( bootstrap bootstrap.sh )
endif()
ExternalProject_Add( boost
PREFIX "${PREFIX}"
DOWNLOAD_DIR "${DOWNLOAD_DIR}"
URL http://downloads.sourceforge.net/project/boost/boost/${BOOST_RELEASE}/boost_${BOOST_VERS}.tar.bz2
URL_MD5 ${BOOST_MD5}
# The patch command executes with the working directory set to <SOURCE_DIR>
PATCH_COMMAND bzr patch -p0 "${PROJECT_SOURCE_DIR}/patches/boost.patch"
# [Mis-]use this step to erase all the boost headers and libraries before
# replacing them below.
UPDATE_COMMAND ${CMAKE_COMMAND} -E remove_directory "${BOOST_ROOT}"
BINARY_DIR "${PREFIX}/src/boost/"
CONFIGURE_COMMAND ${bootstrap}
--with-libraries=${libs_csv}
BUILD_COMMAND b2
variant=release
threading=multi
toolset=gcc
link=static
--prefix=${BOOST_ROOT}
install
INSTALL_COMMAND ""
)
file( GLOB boost_libs "${BOOST_ROOT}/lib/*" )
#message( STATUS BOOST_ROOT:${BOOST_ROOT} boost_libs:${boost_libs} )
set( Boost_LIBRARIES ${boost_libs} CACHE FILEPATH "Boost libraries directory" )
set( Boost_INCLUDE_DIR "${BOOST_ROOT}/include" CACHE FILEPATH "Boost include directory" )
ExternalProject_Add( boost
PREFIX ${PREFIX}
DOWNLOAD_DIR ${DOWNLOAD_DIR}
else( BUILD_GITHUB_PLUGIN )
ExternalProject_Add( boost
PREFIX "${PREFIX}"
DOWNLOAD_DIR "${DOWNLOAD_DIR}"
URL http://downloads.sourceforge.net/project/boost/boost/${BOOST_RELEASE}/boost_${BOOST_VERS}.tar.bz2
URL_MD5 ${BOOST_MD5}
# The patch command executes with the working directory set to <SOURCE_DIR>
PATCH_COMMAND bzr patch -p0 ${PROJECT_SOURCE_DIR}/patches/boost.patch
PATCH_COMMAND bzr patch -p0 "${PROJECT_SOURCE_DIR}/patches/boost.patch"
# Dick 18-Aug-2013:
# [mis-]use this UPDATE_COMMAND opportunity to remove the old place of boost headers.
# Can eventually remove this step after headers are moved from <kicad_src>/include/boost
# to <kicad_src>/boost_root/include/boost over the next several months.
UPDATE_COMMAND ${CMAKE_COMMAND} -E remove_directory "${PROJECT_SOURCE_DIR}/include/boost"
CONFIGURE_COMMAND ""
# remove then re-copy into the include/boost directory during next two steps:
BUILD_COMMAND ${CMAKE_COMMAND} -E remove_directory ${PROJECT_SOURCE_DIR}/include/boost
INSTALL_COMMAND ${CMAKE_COMMAND} -E copy_directory ${headers} ${PROJECT_SOURCE_DIR}/include/boost
BUILD_COMMAND ${CMAKE_COMMAND} -E remove_directory ${BOOST_ROOT}
INSTALL_COMMAND ${CMAKE_COMMAND} -E copy_directory "${headers_src}" "${BOOST_ROOT}/include/boost"
)
# Until my find_package() support is done for my boost.
set( Boost_INCLUDE_DIR "${BOOST_ROOT}/include" CACHE FILEPATH "Boost include directory" )
endif( BUILD_GITHUB_PLUGIN )
ExternalProject_Add_Step( boost bzr_commit_boost
COMMAND bzr ci -q -m pristine <SOURCE_DIR>
......@@ -66,8 +173,8 @@ ExternalProject_Add_Step( boost bzr_commit_boost
ExternalProject_Add_Step( boost bzr_add_boost
# add only the headers to the scratch repo, repo = "../.bzr" from ${headers}
COMMAND bzr add -q ${headers}
# add only the headers to the scratch repo, repo = "../.bzr" from ${headers_src}
COMMAND bzr add -q ${headers_src}
COMMENT "adding pristine boost files to 'boost scratch repo'"
DEPENDERS bzr_commit_boost
)
......@@ -79,3 +186,4 @@ ExternalProject_Add_Step( boost bzr_init_boost
DEPENDERS bzr_add_boost
DEPENDEES download
)
......@@ -111,10 +111,6 @@ This option is used to enable or disable building KiCad with images in menu
items. If this is not defined when CMake is used to create the build files,
images will be included in menu items on all platforms except OSX.
USE_PCBNEW_NANOMETRES (ON/OFF)
This option is used to enable or disable the nano-meter internal units for
Pcbnew. The default is ON.
KICAD_GOST (ON/OFF)
-------------------
This option is used to enable or disable the GOST notation for multiple gates
......
......@@ -25,10 +25,10 @@ Contribute to KiCad (under Linux)
6) Compile:
cd kicad_john
mkdir build; cd build
cmake ../ -DKICAD_TESTING_VERSION=ON -DCMAKE_BUILD_TYPE=Debug
cmake ../ -DCMAKE_BUILD_TYPE=Debug
to build a debug version
or
cmake ../ -DKICAD_TESTING_VERSION=ON -DCMAKE_BUILD_TYPE=Release
cmake ../ -DCMAKE_BUILD_TYPE=Release
to build a release version
make
......
......@@ -3,7 +3,6 @@ include_directories(BEFORE ${INC_BEFORE})
include_directories(
./dialogs
./dialog_about
${Boost_INCLUDE_DIR}
${CAIRO_INCLUDE_DIR}
${GLEW_INCLUDE_DIR}
../3d-viewer
......
......@@ -502,13 +502,6 @@ void EDA_BASE_FRAME::CopyVersionInfoToClipboard( wxCommandEvent& event )
tmp << wxT( "Boost version: " ) << ( BOOST_VERSION / 100000 ) << wxT( "." )
<< ( BOOST_VERSION / 100 % 1000 ) << wxT( "." ) << ( BOOST_VERSION % 100 ) << wxT( "\n" );
tmp << wxT( "Options: USE_PCBNEW_NANOMETRES=" );
#ifdef USE_PCBNEW_NANOMETRES
tmp << wxT( "ON\n" );
#else
tmp << wxT( "OFF\n" );
#endif
tmp << wxT( " USE_WX_GRAPHICS_CONTEXT=" );
#ifdef USE_WX_GRAPHICS_CONTEXT
tmp << wxT( "ON\n" );
......
......@@ -10,15 +10,10 @@
#endif
#if defined KICAD_TESTING_VERSION
# define VERSION_STABILITY "testing"
#elif defined KICAD_STABLE_VERSION
#if defined KICAD_STABLE_VERSION
# define VERSION_STABILITY "stable"
#else
# define VERSION_STABILITY "unknown"
# warning "unknown version stability"
# warning "please: when running CMAKE, add -DKICAD_TESTING_VERSION=ON"
# warning "or -DKICAD_STABLE_VERSION=ON option"
# define VERSION_STABILITY "product"
#endif
/**
......@@ -27,8 +22,11 @@
*/
wxString GetBuildVersion()
{
static wxString msg;
msg.Printf( wxT("%s-%s"),
wxT( KICAD_BUILD_VERSION ), wxT( VERSION_STABILITY ));
wxString msg = wxString::Format(
wxT( "%s-%s" ),
wxT( KICAD_BUILD_VERSION ),
wxT( VERSION_STABILITY )
);
return msg;
}
This diff is collapsed.
This diff is collapsed.
......@@ -36,6 +36,7 @@
#include <wxstruct.h>
#include <worksheet_shape_builder.h>
#include <class_base_screen.h>
#include <wildcards_and_files_ext.h>
#include <wx/valgen.h>
#include <wx/tokenzr.h>
......@@ -125,8 +126,7 @@ void DIALOG_PAGES_SETTINGS::initDialog()
}
// initialize the page layout descr filename
m_plDescrFileName = BASE_SCREEN::m_PageLayoutDescrFileName;
m_filePicker->SetPath( m_plDescrFileName );
SetWksFileName( BASE_SCREEN::m_PageLayoutDescrFileName );
#ifdef EESCHEMA
......@@ -401,13 +401,13 @@ bool DIALOG_PAGES_SETTINGS::SavePageSettings()
{
bool retSuccess = false;
m_plDescrFileName = m_filePicker->GetPath();
wxString fileName = GetWksFileName();
if( m_plDescrFileName != BASE_SCREEN::m_PageLayoutDescrFileName )
if( fileName != BASE_SCREEN::m_PageLayoutDescrFileName )
{
if( !m_plDescrFileName.IsEmpty() )
if( !fileName.IsEmpty() )
{
wxString fullFileName = WORKSHEET_LAYOUT::MakeFullFileName( m_plDescrFileName );
wxString fullFileName = WORKSHEET_LAYOUT::MakeFullFileName( fileName );
if( !wxFileExists( fullFileName ) )
{
wxString msg;
......@@ -418,26 +418,9 @@ bool DIALOG_PAGES_SETTINGS::SavePageSettings()
}
}
// Try to remove the path, if the path is the current working dir,
// or the dir of kicad.pro (template)
wxString shortFileName = WORKSHEET_LAYOUT::MakeShortFileName( m_plDescrFileName );
wxFileName fn = shortFileName;
// For Win/Linux/macOS compatibility, a relative path is a good idea
if( fn.IsAbsolute() )
{
fn.MakeRelativeTo( wxGetCwd() );
wxString msg;
msg.Printf( _( "The page layout descr filename has changed\n"
"Do you want to use the relative path:\n%s"),
fn.GetFullPath().GetData() );
if( IsOK( this, msg ) )
shortFileName = fn.GetFullPath();
}
BASE_SCREEN::m_PageLayoutDescrFileName = shortFileName;
BASE_SCREEN::m_PageLayoutDescrFileName = fileName;
WORKSHEET_LAYOUT& pglayout = WORKSHEET_LAYOUT::GetTheInstance();
pglayout.SetPageLayout( shortFileName );
pglayout.SetPageLayout( fileName );
m_localPrjConfigChanged = true;
}
......@@ -793,7 +776,35 @@ void DIALOG_PAGES_SETTINGS::GetCustomSizeMilsFromDialog()
}
// Called on .kicad_wks file description selection change
void DIALOG_PAGES_SETTINGS::OnWksFileSelection( wxFileDirPickerEvent& event )
void DIALOG_PAGES_SETTINGS::OnWksFileSelection( wxCommandEvent& event )
{
// Currently: Nothing to do.
// Display a file picker dialog
wxFileDialog fileDialog( this, _( "Select Page Layout Descr File" ),
wxGetCwd(), GetWksFileName(),
PageLayoutDescrFileWildcard,
wxFD_DEFAULT_STYLE | wxFD_FILE_MUST_EXIST );
if( fileDialog.ShowModal() != wxID_OK )
return;
wxString fileName = fileDialog.GetPath();
// Try to remove the path, if the path is the current working dir,
// or the dir of kicad.pro (template)
wxString shortFileName = WORKSHEET_LAYOUT::MakeShortFileName( fileName );
wxFileName fn = shortFileName;
// For Win/Linux/macOS compatibility, a relative path is a good idea
if( fn.IsAbsolute() && fileName != GetWksFileName() )
{
fn.MakeRelativeTo( wxGetCwd() );
wxString msg;
msg.Printf( _( "The page layout descr filename has changed\n"
"Do you want to use the relative path:\n%s"),
fn.GetFullPath().GetData() );
if( IsOK( this, msg ) )
shortFileName = fn.GetFullPath();
}
SetWksFileName( shortFileName );
}
......@@ -45,9 +45,6 @@ private:
PAGE_INFO m_pageInfo; /// Temporary page info.
bool m_customFmt; /// true if the page selection is custom
TITLE_BLOCK m_tb; /// Temporary title block (basic inscriptions).
wxString m_plDescrFileName; /// Temporary BASE_SCREEN::m_PageLayoutDescrFileName copy
public:
DIALOG_PAGES_SETTINGS( EDA_DRAW_FRAME* parent );
......@@ -55,24 +52,23 @@ public:
const wxString GetWksFileName()
{
return m_filePicker->GetPath();
return m_textCtrlFilePicker->GetValue();
}
void SetWksFileName(const wxString& aFilename )
{
m_filePicker->SetPath( aFilename );
m_textCtrlFilePicker->SetValue( aFilename );
}
void EnableWksFileNamePicker( bool aEnable )
{
m_filePicker->Enable( aEnable );
m_textCtrlFilePicker->Enable( aEnable );
m_buttonBrowse->Enable( aEnable );
}
private:
void initDialog(); // Initialisation of member variables
// void OnCloseWindow( wxCloseEvent& event );
// event handler for wxID_OK
void OnOkClick( wxCommandEvent& event );
......@@ -99,7 +95,7 @@ private:
void OnDateApplyClick( wxCommandEvent& event );
// .kicad_wks file description selection
void OnWksFileSelection( wxFileDirPickerEvent& event );
void OnWksFileSelection( wxCommandEvent& event );
// Save in the current title block the new page settings
// return true if changes are made, or false if not
......
......@@ -350,8 +350,11 @@ DIALOG_PAGES_SETTINGS_BASE::DIALOG_PAGES_SETTINGS_BASE( wxWindow* parent, wxWind
wxBoxSizer* bSizerfileSelection;
bSizerfileSelection = new wxBoxSizer( wxHORIZONTAL );
m_filePicker = new wxFilePickerCtrl( this, wxID_ANY, wxEmptyString, _("Select a file"), wxT("*.kicad_wks"), wxDefaultPosition, wxDefaultSize, wxFLP_OPEN|wxFLP_USE_TEXTCTRL );
bSizerfileSelection->Add( m_filePicker, 1, wxBOTTOM|wxRIGHT|wxLEFT, 5 );
m_textCtrlFilePicker = new wxTextCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
bSizerfileSelection->Add( m_textCtrlFilePicker, 1, wxBOTTOM|wxRIGHT|wxLEFT|wxALIGN_CENTER_VERTICAL, 5 );
m_buttonBrowse = new wxButton( this, wxID_ANY, _("Browse"), wxDefaultPosition, wxDefaultSize, wxBU_EXACTFIT );
bSizerfileSelection->Add( m_buttonBrowse, 0, wxALIGN_CENTER_VERTICAL|wxBOTTOM|wxRIGHT|wxLEFT, 5 );
bSizerFilename->Add( bSizerfileSelection, 1, wxEXPAND, 5 );
......@@ -393,7 +396,7 @@ DIALOG_PAGES_SETTINGS_BASE::DIALOG_PAGES_SETTINGS_BASE( wxWindow* parent, wxWind
m_TextComment2->Connect( wxEVT_COMMAND_TEXT_UPDATED, wxCommandEventHandler( DIALOG_PAGES_SETTINGS_BASE::OnComment2TextUpdated ), NULL, this );
m_TextComment3->Connect( wxEVT_COMMAND_TEXT_UPDATED, wxCommandEventHandler( DIALOG_PAGES_SETTINGS_BASE::OnComment3TextUpdated ), NULL, this );
m_TextComment4->Connect( wxEVT_COMMAND_TEXT_UPDATED, wxCommandEventHandler( DIALOG_PAGES_SETTINGS_BASE::OnComment4TextUpdated ), NULL, this );
m_filePicker->Connect( wxEVT_COMMAND_FILEPICKER_CHANGED, wxFileDirPickerEventHandler( DIALOG_PAGES_SETTINGS_BASE::OnWksFileSelection ), NULL, this );
m_buttonBrowse->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_PAGES_SETTINGS_BASE::OnWksFileSelection ), NULL, this );
m_sdbSizer1Cancel->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_PAGES_SETTINGS_BASE::OnCancelClick ), NULL, this );
m_sdbSizer1OK->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_PAGES_SETTINGS_BASE::OnOkClick ), NULL, this );
}
......@@ -415,7 +418,7 @@ DIALOG_PAGES_SETTINGS_BASE::~DIALOG_PAGES_SETTINGS_BASE()
m_TextComment2->Disconnect( wxEVT_COMMAND_TEXT_UPDATED, wxCommandEventHandler( DIALOG_PAGES_SETTINGS_BASE::OnComment2TextUpdated ), NULL, this );
m_TextComment3->Disconnect( wxEVT_COMMAND_TEXT_UPDATED, wxCommandEventHandler( DIALOG_PAGES_SETTINGS_BASE::OnComment3TextUpdated ), NULL, this );
m_TextComment4->Disconnect( wxEVT_COMMAND_TEXT_UPDATED, wxCommandEventHandler( DIALOG_PAGES_SETTINGS_BASE::OnComment4TextUpdated ), NULL, this );
m_filePicker->Disconnect( wxEVT_COMMAND_FILEPICKER_CHANGED, wxFileDirPickerEventHandler( DIALOG_PAGES_SETTINGS_BASE::OnWksFileSelection ), NULL, this );
m_buttonBrowse->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_PAGES_SETTINGS_BASE::OnWksFileSelection ), NULL, this );
m_sdbSizer1Cancel->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_PAGES_SETTINGS_BASE::OnCancelClick ), NULL, this );
m_sdbSizer1OK->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_PAGES_SETTINGS_BASE::OnOkClick ), NULL, this );
......
......@@ -33,7 +33,6 @@ class DIALOG_SHIM;
#include <wx/datectrl.h>
#include <wx/dateevt.h>
#include <wx/checkbox.h>
#include <wx/filepicker.h>
#include <wx/dialog.h>
///////////////////////////////////////////////////////////////////////////
......@@ -113,7 +112,8 @@ class DIALOG_PAGES_SETTINGS_BASE : public DIALOG_SHIM
wxTextCtrl* m_TextComment4;
wxCheckBox* m_Comment4Export;
wxStaticText* m_staticTextfilename;
wxFilePickerCtrl* m_filePicker;
wxTextCtrl* m_textCtrlFilePicker;
wxButton* m_buttonBrowse;
wxStdDialogButtonSizer* m_sdbSizer1;
wxButton* m_sdbSizer1OK;
wxButton* m_sdbSizer1Cancel;
......@@ -133,7 +133,7 @@ class DIALOG_PAGES_SETTINGS_BASE : public DIALOG_SHIM
virtual void OnComment2TextUpdated( wxCommandEvent& event ) { event.Skip(); }
virtual void OnComment3TextUpdated( wxCommandEvent& event ) { event.Skip(); }
virtual void OnComment4TextUpdated( wxCommandEvent& event ) { event.Skip(); }
virtual void OnWksFileSelection( wxFileDirPickerEvent& event ) { event.Skip(); }
virtual void OnWksFileSelection( wxCommandEvent& event ) { event.Skip(); }
virtual void OnCancelClick( wxCommandEvent& event ) { event.Skip(); }
virtual void OnOkClick( wxCommandEvent& event ) { event.Skip(); }
......
......@@ -786,7 +786,6 @@ void EDA_DRAW_FRAME::AdjustScrollBars( const wxPoint& aCenterPositionIU )
DBOX clientRectIU( wxPoint( xIU, yIU ), wxSize( clientSizeIU.x, clientSizeIU.y ) );
wxPoint centerPositionIU;
#if 1 || defined( USE_PCBNEW_NANOMETRES )
// put "int" limits on the clientRect
if( clientRectIU.GetLeft() < VIRT_MIN )
clientRectIU.MoveLeftTo( VIRT_MIN );
......@@ -796,7 +795,6 @@ void EDA_DRAW_FRAME::AdjustScrollBars( const wxPoint& aCenterPositionIU )
clientRectIU.MoveRightTo( VIRT_MAX );
if( clientRectIU.GetBottom() > VIRT_MAX )
clientRectIU.MoveBottomTo( VIRT_MAX );
#endif
centerPositionIU.x = KiROUND( clientRectIU.GetX() + clientRectIU.GetWidth() / 2 );
centerPositionIU.y = KiROUND( clientRectIU.GetY() + clientRectIU.GetHeight() / 2 );
......@@ -869,11 +867,9 @@ void EDA_DRAW_FRAME::AdjustScrollBars( const wxPoint& aCenterPositionIU )
}
}
#if 1 || defined( USE_PCBNEW_NANOMETRES )
// put "int" limits on the virtualSizeIU
virtualSizeIU.x = std::min( virtualSizeIU.x, MAX_AXIS );
virtualSizeIU.y = std::min( virtualSizeIU.y, MAX_AXIS );
#endif
if( screen->m_Center )
{
......
......@@ -146,9 +146,11 @@ EDA_DRAW_PANEL::~EDA_DRAW_PANEL()
wxGetApp().GetSettings()->Write( ENBL_AUTO_PAN_KEY, m_enableAutoPan );
}
EDA_DRAW_FRAME* EDA_DRAW_PANEL::GetParent()
{
return ( EDA_DRAW_FRAME* ) wxWindow::GetParent();
wxWindow* mom = wxScrolledWindow::GetParent();
return (EDA_DRAW_FRAME*) mom;
}
......
......@@ -462,6 +462,43 @@ void WORKSHEET_DATAITEM_TEXT::IncrementLabel( int aIncr )
m_FullText << (wxChar) ( aIncr + lbchar );
}
// Replace the '\''n' sequence by EOL
// and the sequence '\''\' by only one '\' in m_FullText
// if m_FullTextis a multiline text (i;e.contains '\n') return true
bool WORKSHEET_DATAITEM_TEXT::ReplaceAntiSlashSequence()
{
bool multiline = false;
for( unsigned ii = 0; ii < m_FullText.Len(); ii++ )
{
if( m_FullText[ii] == '\n' )
multiline = true;
else if( m_FullText[ii] == '\\' )
{
if( ++ii >= m_FullText.Len() )
break;
if( m_FullText[ii] == '\\' )
{
// a double \\ sequence is replaced by a single \ char
m_FullText.Remove(ii, 1);
ii--;
}
else if( m_FullText[ii] == 'n' )
{
// Replace the "\n" sequence by a EOL char
multiline = true;
m_FullText[ii] = '\n';
m_FullText.Remove(ii-1, 1);
ii--;
}
}
}
return multiline;
}
void WORKSHEET_DATAITEM_TEXT::SetConstrainedTextSize()
{
m_ConstrainedTextSize = m_TextSize;
......@@ -501,3 +538,4 @@ void WORKSHEET_DATAITEM_TEXT::SetConstrainedTextSize()
m_ConstrainedTextSize.y *= m_BoundingBoxSize.y / size.y;
}
}
......@@ -152,8 +152,7 @@ void WS_DRAW_ITEM_LIST::BuildWorkSheetGraphicList(
else
{
wsText->m_FullText = BuildFullText( wsText->m_TextBase );
if( wsText->m_FullText.Replace( wxT("\\n" ), wxT("\n") ) > 0 )
multilines = true;
multilines = wsText->ReplaceAntiSlashSequence();
}
if( wsText->m_FullText.IsEmpty() )
......
......@@ -28,7 +28,6 @@
#include <macros.h>
#include <reporter.h>
REPORTER& REPORTER::Report( const char* aText )
{
Report( FROM_UTF8( aText ) );
......
......@@ -136,8 +136,8 @@ wxString WS_DRAW_ITEM_LIST::BuildFullText( const wxString& aTextbase )
msg << aTextbase[ii];
continue;
}
ii++;
if( ii >= aTextbase.Len() )
if( ++ii >= aTextbase.Len() )
break;
wxChar format = aTextbase[ii];
......@@ -174,7 +174,7 @@ wxString WS_DRAW_ITEM_LIST::BuildFullText( const wxString& aTextbase )
case 'F':
{
wxFileName fn( *m_fileName );
wxFileName fn( m_fileName );
msg += fn.GetFullName();
}
break;
......
add_definitions(-DCVPCB)
add_definitions( -DCVPCB )
###
# Includes
###
include_directories(BEFORE ${INC_BEFORE})
include_directories( BEFORE ${INC_BEFORE} )
include_directories(
./dialogs
${Boost_INCLUDE_DIR}
../3d-viewer
../pcbnew
../polygon
......@@ -18,14 +17,14 @@ include_directories(
###
# Sources
###
set(CVPCB_DIALOGS
set( CVPCB_DIALOGS
dialogs/dialog_cvpcb_config.cpp
dialogs/dialog_cvpcb_config_fbp.cpp
dialogs/dialog_display_options.cpp
dialogs/dialog_display_options_base.cpp
)
set(CVPCB_SRCS
set( CVPCB_SRCS
../common/base_units.cpp
../pcbnew/board_items_to_polygon_shape_transform.cpp
../pcbnew/class_drc_item.cpp
......@@ -46,32 +45,35 @@ set(CVPCB_SRCS
###
# Windows resource file
###
if(WIN32)
if(MINGW)
if( WIN32 )
if( MINGW )
# CVPCB_RESOURCES variable is set by the macro.
mingw_resource_compiler(cvpcb)
else(MINGW)
set(CVPCB_RESOURCES cvpcb.rc)
endif(MINGW)
endif(WIN32)
mingw_resource_compiler( cvpcb )
else()
set( CVPCB_RESOURCES cvpcb.rc )
endif()
endif()
###
# Apple resource files
###
if(APPLE)
set(CVPCB_RESOURCES cvpcb.icns cvpcb_doc.icns)
set_source_files_properties("${CMAKE_CURRENT_SOURCE_DIR}/cvpcb.icns"
PROPERTIES MACOSX_PACKAGE_LOCATION Resources)
set_source_files_properties("${CMAKE_CURRENT_SOURCE_DIR}/cvpcb_doc.icns"
PROPERTIES MACOSX_PACKAGE_LOCATION Resources)
set(MACOSX_BUNDLE_ICON_FILE cvpcb.icns)
set(MACOSX_BUNDLE_GUI_IDENTIFIER org.kicad-eda.cvpcb)
endif(APPLE)
if( APPLE )
set( CVPCB_RESOURCES cvpcb.icns cvpcb_doc.icns )
set_source_files_properties( "${CMAKE_CURRENT_SOURCE_DIR}/cvpcb.icns"
PROPERTIES MACOSX_PACKAGE_LOCATION Resources )
set_source_files_properties( "${CMAKE_CURRENT_SOURCE_DIR}/cvpcb_doc.icns"
PROPERTIES MACOSX_PACKAGE_LOCATION Resources )
set( MACOSX_BUNDLE_ICON_FILE cvpcb.icns )
set( MACOSX_BUNDLE_GUI_IDENTIFIER org.kicad-eda.cvpcb )
endif()
###
# Create the cvpcb executable
###
add_executable(cvpcb WIN32 MACOSX_BUNDLE
add_executable( cvpcb WIN32 MACOSX_BUNDLE
${CVPCB_SRCS}
${CVPCB_DIALOGS}
${CVPCB_RESOURCES}
......@@ -80,14 +82,14 @@ add_executable(cvpcb WIN32 MACOSX_BUNDLE
###
# Set properties for APPLE on cvpcb target
###
if(APPLE)
set_target_properties(cvpcb PROPERTIES MACOSX_BUNDLE_INFO_PLIST ${CMAKE_CURRENT_SOURCE_DIR}/Info.plist)
endif(APPLE)
if( APPLE )
set_target_properties( cvpcb PROPERTIES MACOSX_BUNDLE_INFO_PLIST ${CMAKE_CURRENT_SOURCE_DIR}/Info.plist )
endif()
###
# Link executable target cvpcb with correct libraries
###
target_link_libraries(cvpcb
target_link_libraries( cvpcb
3d-viewer
pcbcommon
pcad2kicadpcb
......@@ -117,6 +119,7 @@ endif(WIN32 AND MSYS)
###
# Add cvpcb as install target
###
install(TARGETS cvpcb
install( TARGETS cvpcb
DESTINATION ${KICAD_BIN}
COMPONENT binary)
COMPONENT binary
)
EESchema-LIBRARY Version 2.3 Date: 18/12/2011 10:04:44
EESchema-LIBRARY Version 2.3
#encoding utf-8
#
# 4003APG120
#
DEF 4003APG120 U 0 40 Y Y 1 F N
F0 "U" 0 100 70 H V C CNN
F1 "4003APG120" 0 -100 70 H V C CNN
F0 "U" 400 2800 70 H V C CNN
F1 "4003APG120" 0 -2850 70 H V C CNN
F2 "PGA120" 0 -2950 40 H V C CNN
F3 "" 400 2800 60 H V C CNN
ALIAS 4003PG120
DRAW
S -800 -2700 800 2700 0 1 0 N
......@@ -134,6 +136,8 @@ ENDDEF
DEF 628128 U 0 40 Y Y 1 F N
F0 "U" 50 0 70 H V C CNN
F1 "628128" 300 -1200 70 H V C CNN
F2 "" 0 0 60 H V C CNN
F3 "" 0 0 60 H V C CNN
DRAW
X VCC 32 0 1100 0 D 60 60 0 0 W N
X GND 16 0 -1100 0 U 60 60 0 0 W N
......@@ -175,6 +179,8 @@ ENDDEF
DEF 74LS245 U 0 10 Y Y 1 F N
F0 "U" 100 575 60 H V L BNN
F1 "74LS245" 50 -575 60 H V L TNN
F2 "" 0 0 60 H V C CNN
F3 "" 0 0 60 H V C CNN
ALIAS 74HC245
DRAW
X GND 10 0 -550 0 U 60 60 0 0 W N
......@@ -208,6 +214,8 @@ ENDDEF
DEF 74LS541 U 0 30 Y Y 1 F N
F0 "U" 0 575 60 H V C BNN
F1 "74LS541" 0 -575 60 H V C TNN
F2 "" 0 0 60 H V C CNN
F3 "" 0 0 60 H V C CNN
DRAW
X GND 10 -200 -550 0 U 60 60 0 0 W N
X VCC 20 -200 550 0 D 60 60 0 0 W N
......@@ -243,6 +251,8 @@ ENDDEF
DEF 74LS688 U 0 40 Y Y 1 F N
F0 "U" 0 950 60 H V C CNN
F1 "74LS688" 0 -950 60 H V C CNN
F2 "" 0 0 60 H V C CNN
F3 "" 0 0 60 H V C CNN
DRAW
X GND 10 -300 -900 0 R 60 60 0 0 W N
X VCC 20 -300 900 0 R 60 60 0 0 W N
......@@ -273,6 +283,8 @@ ENDDEF
DEF BUSPC BUS 0 40 Y Y 1 F N
F0 "BUS" 0 100 70 H V C CNN
F1 "BUSPC" 0 -100 70 H V C CNN
F2 "" 0 0 60 H V C CNN
F3 "" 0 0 60 H V C CNN
DRAW
S -600 -1600 600 1600 0 1 0 N
X GND 1 -900 1500 300 R 60 60 1 1 P
......@@ -343,16 +355,18 @@ ENDDEF
# C
#
DEF C C 0 10 N Y 1 F N
F0 "C" 50 100 50 H V L CNN
F1 "C" 50 -100 50 H V L CNN
F0 "C" 0 100 40 H V L CNN
F1 "C" 6 -85 40 H V L CNN
F2 "" 38 -150 30 H V C CNN
F3 "" 0 0 60 H V C CNN
$FPLIST
SM*
C?
C1-1
$ENDFPLIST
DRAW
P 2 0 1 20 -100 -30 100 -30 N
P 2 0 1 20 -100 30 100 30 N
P 2 0 1 20 -80 -30 80 -30 N
P 2 0 1 20 -80 30 80 30 N
X ~ 1 0 200 170 D 40 40 1 1 P
X ~ 2 0 -200 170 U 40 40 1 1 P
ENDDRAW
......@@ -363,6 +377,8 @@ ENDDEF
DEF CONN_8X2 P 0 40 Y Y 1 F N
F0 "P" 0 450 60 H V C CNN
F1 "CONN_8X2" 0 0 50 V V C CNN
F2 "" 0 0 60 H V C CNN
F3 "" 0 0 60 H V C CNN
DRAW
S -100 400 100 -400 0 1 0 N
X ~ 1 -400 350 300 R 60 60 1 1 P I
......@@ -387,15 +403,17 @@ ENDDEF
# CP
#
DEF CP C 0 10 N N 1 F N
F0 "C" 50 100 50 H V L CNN
F1 "CP" 50 -100 50 H V L CNN
F0 "C" 50 100 40 H V L CNN
F1 "CP" 50 -100 40 H V L CNN
F2 "" 100 -150 30 H V C CNN
F3 "" 0 0 300 H V C CNN
ALIAS CAPAPOL
$FPLIST
CP*
SM*
$ENDFPLIST
DRAW
P 4 0 1 8 -100 50 -100 -50 100 -50 100 50 N
P 4 0 1 8 -80 50 -80 -50 80 -50 80 50 N
P 4 0 1 0 -50 50 -50 -20 50 -20 50 50 F
X ~ 1 0 200 150 D 40 40 1 1 P
X ~ 2 0 -200 150 U 40 40 1 1 P
......@@ -407,6 +425,8 @@ ENDDEF
DEF CRYSTAL X 0 40 N N 1 F N
F0 "X" 0 150 60 H V C CNN
F1 "CRYSTAL" 0 -150 60 H V C CNN
F2 "" 0 0 60 H V C CNN
F3 "" 0 0 60 H V C CNN
DRAW
P 2 0 1 16 -100 100 -100 -100 N
P 2 0 1 16 100 100 100 -100 N
......@@ -421,6 +441,8 @@ ENDDEF
DEF DB25 J 0 40 Y N 1 F N
F0 "J" 50 1350 70 H V C CNN
F1 "DB25" -50 -1350 70 H V C CNN
F2 "" 0 0 60 H V C CNN
F3 "" 0 0 60 H V C CNN
$FPLIST
DB25*
$ENDFPLIST
......@@ -516,6 +538,8 @@ ENDDEF
DEF EP600 U 0 40 Y Y 1 F N
F0 "U" 0 100 70 H V C CNN
F1 "EP600" 0 -500 70 H V C CNN
F2 "" 0 0 60 H V C CNN
F3 "" 0 0 60 H V C CNN
DRAW
S -500 -850 500 850 0 1 0 N
X CLK1 1 -800 750 300 R 60 60 1 1 I C
......@@ -550,6 +574,8 @@ ENDDEF
DEF ~GND #PWR 0 0 Y Y 1 F P
F0 "#PWR" 0 0 30 H I C CNN
F1 "GND" 0 -70 30 H I C CNN
F2 "" 0 0 60 H V C CNN
F3 "" 0 0 60 H V C CNN
DRAW
P 4 0 1 0 -50 0 0 -50 50 0 -50 0 N
X GND 1 0 0 0 U 30 30 1 1 W N
......@@ -561,6 +587,8 @@ ENDDEF
DEF LED D 0 40 Y N 1 F N
F0 "D" 0 100 50 H V C CNN
F1 "LED" 0 -100 50 H V C CNN
F2 "" 0 0 60 H V C CNN
F3 "" 0 0 60 H V C CNN
$FPLIST
LED-3MM
LED-5MM
......@@ -585,6 +613,8 @@ ENDDEF
DEF PWR_FLAG #FLG 0 0 N N 1 F P
F0 "#FLG" 0 95 30 H I C CNN
F1 "PWR_FLAG" 0 180 30 H V C CNN
F2 "" 0 0 60 H V C CNN
F3 "" 0 0 60 H V C CNN
DRAW
X pwr 1 0 0 0 U 20 20 0 0 w
P 6 0 1 0 0 0 0 50 -75 100 0 150 75 100 0 50 N
......@@ -594,8 +624,10 @@ ENDDEF
# R
#
DEF R R 0 0 N Y 1 F N
F0 "R" 80 0 50 V V C CNN
F1 "R" 0 0 50 V V C CNN
F0 "R" 80 0 40 V V C CNN
F1 "R" 7 1 40 V V C CNN
F2 "" -70 0 30 V V C CNN
F3 "" 0 0 30 H V C CNN
$FPLIST
R?
SM0603
......@@ -615,6 +647,8 @@ ENDDEF
DEF RR9 RR 0 40 Y N 1 F N
F0 "RR" 50 600 70 H V C CNN
F1 "RR9" 30 0 70 V V C CNN
F2 "" 0 0 60 H V C CNN
F3 "" 0 0 60 H V C CNN
DRAW
P 6 0 1 0 -50 -450 -50 550 50 550 100 500 100 -450 -50 -450 N
X COM 1 -350 500 300 R 60 60 1 1 P I
......@@ -635,6 +669,8 @@ ENDDEF
DEF VCC #PWR 0 0 Y Y 1 F P
F0 "#PWR" 0 100 30 H I C CNN
F1 "VCC" 0 100 30 H V C CNN
F2 "" 0 0 60 H V C CNN
F3 "" 0 0 60 H V C CNN
DRAW
X VCC 1 0 0 0 U 20 20 0 0 W N
C 0 50 20 0 1 0 N
......
Cmp-Mod V01 Created by CvPCB (2011-03-30 BZR 2935)-testing date = 02/04/2011 13:22:13
Cmp-Mod V01 Created by CvPcb (2013-08-20 BZR 4294)-product date = 21/08/2013 18:12:43
BeginCmp
TimeStamp = /322D3011;
......
This diff is collapsed.
This diff is collapsed.
update=02/04/2011 15:02:30
update=07/08/2013 15:44:03
version=1
last_client=pcbnew
[common]
......@@ -14,31 +14,11 @@ NetIExt=net
EquName1=devcms
[eeschema]
version=1
PageLayoutDescrFile=pagelayout_logo.kicad_wks
SubpartIdSeparator=0
SubpartFirstId=65
LibDir=
NetFmt=1
HPGLSpd=20
HPGLDm=15
HPGLNum=1
offX_A4=0
offY_A4=0
offX_A3=0
offY_A3=0
offX_A2=0
offY_A2=0
offX_A1=0
offY_A1=0
offX_A0=0
offY_A0=0
offX_A=0
offY_A=0
offX_B=0
offY_B=0
offX_C=0
offY_C=0
offX_D=0
offY_D=0
offX_E=0
offY_E=0
NetFmtName=
RptD_X=0
RptD_Y=100
RptLab=1
......@@ -58,21 +38,24 @@ LibName11=special
LibName12=image
[pcbnew]
version=1
PadDrlX=354
PadDimH=550
PadDimV=550
BoardThickness=630
TxtPcbV=800
TxtPcbH=600
TxtModV=600
TxtModH=600
TxtModW=120
VEgarde=100
DrawLar=150
EdgeLar=50
TxtLar=170
MSegLar=150
PageLayoutDescrFile=pagelayout_logo.kicad_wks
LastNetListRead=interf_u.net
UseCmpFile=1
PadDrill=0.89916
PadDrillOvalY=0.89916
PadSizeH=1.397
PadSizeV=1.397
PcbTextSizeV=2.032
PcbTextSizeH=1.524
PcbTextThickness=0.4318
ModuleTextSizeV=1.524
ModuleTextSizeH=1.524
ModuleTextSizeThickness=0.3048
SolderMaskClearance=0.254
SolderMaskMinWidth=0
DrawSegmentWidth=0.381
BoardOutlineThickness=0.127
ModuleOutlineThickness=0.381
[pcbnew/libraries]
LibDir=
LibName1=connect
......
This diff is collapsed.
This diff is collapsed.
......@@ -6,7 +6,6 @@ include_directories(
./dialogs
../common
../common/dialogs
${Boost_INCLUDE_DIR}
${INC_AFTER}
)
......
This diff is collapsed.
......@@ -731,7 +731,7 @@ bool CMP_LIBRARY::SaveDocs( OUTPUTFORMATTER& aFormatter )
try
{
aFormatter.Print( 0, "%s Date: %s\n", DOCFILE_IDENT, TO_UTF8( DateAndTime() ) );
aFormatter.Print( 0, "%s\n", DOCFILE_IDENT );
for( LIB_ALIAS_MAP::iterator it=aliases.begin(); it!=aliases.end(); it++ )
{
......@@ -752,8 +752,8 @@ bool CMP_LIBRARY::SaveDocs( OUTPUTFORMATTER& aFormatter )
bool CMP_LIBRARY::SaveHeader( OUTPUTFORMATTER& aFormatter )
{
aFormatter.Print( 0, "%s %d.%d Date: %s\n", LIBFILE_IDENT,
LIB_VERSION_MAJOR, LIB_VERSION_MINOR, TO_UTF8( DateAndTime() ) );
aFormatter.Print( 0, "%s %d.%d\n", LIBFILE_IDENT,
LIB_VERSION_MAJOR, LIB_VERSION_MINOR );
aFormatter.Print( 0, "#encoding utf-8\n");
......
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment