Commit a8e57e10 authored by jean-pierre charras's avatar jean-pierre charras

Remove wxUSE_UNICODE definition from CMakeLists.txt, because this define comes...

Remove wxUSE_UNICODE definition from CMakeLists.txt, because this define comes from wxWidgets and should not be made inside kicad
Remove KICAD_GOST option because it is  now useless: the 2 GOST options are now selectable at run time and are:
* specific page layouts (now user definable, and the GOST page layouts are available in template folder)
* notation for multiple parts per package (made in eeschema, preference menu)
parent 7c340f6b
......@@ -14,10 +14,6 @@ set( CMAKE_MODULE_PATH ${PROJECT_SOURCE_DIR}/CMakeModules )
# reports.
#
# Russian GOST patch
option( wxUSE_UNICODE "enable/disable building unicode ( default OFF)" )
option( KICAD_GOST "enable/disable building using GOST notation for multiple gates per package ( default OFF)" )
#for those who bored with uppercase
option( KICAD_KEEPCASE "turn-off automatic component name conversion to uppercase if selected" )
......@@ -155,14 +151,6 @@ if( CMAKE_COMPILER_IS_GNUCXX )
endif( CMAKE_COMPILER_IS_GNUCXX )
if( wxUSE_UNICODE )
add_definitions( -DwxUSE_UNICODE )
endif()
if( KICAD_GOST )
add_definitions( -DKICAD_GOST )
endif()
if( KICAD_KEEPCASE )
add_definitions( -DKICAD_KEEPCASE )
endif()
......
......@@ -56,11 +56,7 @@ macro( create_bzr_version_header )
if( Kicad_REPO_LAST_CHANGED_DATE )
string( REGEX REPLACE "^([0-9]+)\\-([0-9]+)\\-([0-9]+)" "\\1-\\2-\\3"
_kicad_bzr_date ${Kicad_REPO_LAST_CHANGED_DATE} )
if( KICAD_GOST )
set( KICAD_BUILD_VERSION "(${_kicad_bzr_date} BZR ${Kicad_REPO_REVISION} GOST)" )
else( KICAD_GOST )
set( KICAD_BUILD_VERSION "(${_kicad_bzr_date} BZR ${Kicad_REPO_REVISION})" )
endif( KICAD_GOST )
set( KICAD_BUILD_VERSION "(${_kicad_bzr_date} BZR ${Kicad_REPO_REVISION})" )
# Definition to conditionally use date and revision returned from the
# Bazaar log command instead of hand coded date and revision in
......
......@@ -111,11 +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.
KICAD_GOST (ON/OFF)
-------------------
This option is used to enable or disable the GOST notation for multiple gates
per package in Eeschema. The default is OFF
KICAD_KEEPCASE (ON/OFF)
-----------------------
This option enables or disables turning off the automatic component name
......
......@@ -128,13 +128,17 @@ project is created.
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.3 http://www.wxwidgets.org/
CMake >= 2.6.4 http://www.cmake.org/
Boost C++ Libraries (files used by kicad are provided in kicad sources) http://www.boost.org/
wxWidgets >= 2.9.4 http://www.wxwidgets.org/
CMake >= 2.8.1 http://www.cmake.org/
Boost C++ Libraries:
files used by kicad are autmatically downloaded and patched if needed
from boost site ( http://www.boost.org/ )
OpenGL
Linux: Mesa 3D Graphics Library http://www.mesa3d.org/
Windows: built-in
......@@ -186,12 +190,6 @@ configured and builded with "--enable-monolithic --disable-shared" parameters.
For building dinamically linked executables. Can be used only if wxWidgets
configured and builded with "--disable-monolithic --enable-shared" parameters.
-DwxUSE_UNICODE=ON
Require on locale utf8 for build the KiCad with cyrillic fonts support.
-DKICAD_GOST=ON
Build the KiCad with russian GOST support.
-DKICAD_KEEPCASE=ON
Build the KiCad with no component name conversion to uppercase (if you want your
ADuC.../Si.../bq... components named as just so).
......
......@@ -258,12 +258,15 @@ void DIALOG_PAGES_SETTINGS::OnPaperSizeChoice( wxCommandEvent& event )
{
m_orientationComboBox->Enable( true );
if( paperType.Contains( wxT( "A4" ) ) && IsGOST() )
#if 0
// ForcePortrait() does not exist, but could be useful.
// so I leave these lines, which could be seen as a todo feature
if( paperType.ForcePortrait() )
{
m_orientationComboBox->SetStringSelection( _( "Portrait" ) );
m_orientationComboBox->Enable( false );
}
#endif
m_TextUserSizeX->Enable( false );
m_TextUserSizeY->Enable( false );
m_customFmt = false;
......
......@@ -630,7 +630,6 @@ void WORKSHEET_LAYOUT::SetDefaultLayout()
try
{
lp_parser.Parse( this );
SetDefaultDescrFlag( true );
}
catch( IO_ERROR ioe )
{
......@@ -652,7 +651,6 @@ void WORKSHEET_LAYOUT::SetPageLayout( const char* aPageLayout, bool Append )
try
{
lp_parser.Parse( this );
SetDefaultDescrFlag( true );
}
catch( IO_ERROR ioe )
{
......@@ -716,7 +714,6 @@ void WORKSHEET_LAYOUT::SetPageLayout( const wxString& aFullFileName, bool Append
try
{
lp_parser.Parse( this );
SetDefaultDescrFlag( false );
}
catch( IO_ERROR ioe )
{
......
......@@ -62,11 +62,6 @@
#include <class_worksheet_dataitem.h>
// Temporary include. Will be removed when a GOST page layout descr file is available
#ifdef KICAD_GOST
#include "title_block_shapes_gost.cpp"
#endif
void WS_DRAW_ITEM_LIST::BuildWorkSheetGraphicList(
const PAGE_INFO& aPageInfo,
const TITLE_BLOCK& aTitleBlock,
......@@ -74,16 +69,6 @@ void WS_DRAW_ITEM_LIST::BuildWorkSheetGraphicList(
{
WORKSHEET_LAYOUT& pglayout = WORKSHEET_LAYOUT::GetTheInstance();
// Ugly hack: will be removed when a GOST page layout descr file is available
#ifdef KICAD_GOST
if( pglayout.IsDefaultDescr() )
{
((WS_DRAW_ITEM_LIST_GOST*)this)->BuildWorkSheetGraphicListGOST( aPageInfo,
aTitleBlock, aColor, aAltColor );
return;
}
#endif
#define milsTomm (25.4/1000)
m_titleBlock = &aTitleBlock;
......
This diff is collapsed.
......@@ -364,10 +364,10 @@ PARAM_CFG_ARRAY& SCH_EDIT_FRAME::GetProjectFileParametersList()
m_projectFileParams.push_back( new PARAM_CFG_INT( wxT( "SubpartIdSeparator" ),
LIB_COMPONENT::SubpartIdSeparatorPtr(),
IsGOST() ? '.' : 0, 0, 126 ) );
0, 0, 126 ) );
m_projectFileParams.push_back( new PARAM_CFG_INT( wxT( "SubpartFirstId" ),
LIB_COMPONENT::SubpartFirstIdPtr(),
IsGOST() ? '1' : 'A', '1', 'z' ) );
'A', '1', 'z' ) );
m_projectFileParams.push_back( new PARAM_CFG_FILENAME( wxT( "LibDir" ),
&m_userLibraryPath ) );
......
......@@ -101,7 +101,7 @@ static GRID_TYPE SchematicGridList[] = {
SCH_SCREEN::SCH_SCREEN() : BASE_SCREEN( SCH_SCREEN_T ),
m_paper( wxT( "A4" ), IsGOST() )
m_paper( wxT( "A4" ) )
{
size_t i;
......
......@@ -169,17 +169,6 @@ inline int Mm2mils( double x ) { return KiROUND( x * 1000./25.4 ); }
inline int Mils2mm( double x ) { return KiROUND( x * 25.4 / 1000. ); }
/// Return whether GOST is in play
inline bool IsGOST()
{
#if defined(KICAD_GOST)
return true;
#else
return false;
#endif
}
enum EDA_UNITS_T {
INCHES = 0,
MILLIMETRES = 1,
......
......@@ -42,7 +42,10 @@ static inline wxString FROM_UTF8( const char* cstring )
* <li> standard C style char when wxUSE_UNICODE==0 </li>
* <li> wchar_t when wxUSE_UNICODE==1 (the default). </li>
* </ul>
* i.e. it depends on how the wxWidgets library was compiled. There was a period
* i.e. it depends on how the wxWidgets library was compiled.
* ( wxUSE_UNICODE is defined in wxWidgets, inside setup.h.
* for version >= 2.9 wxUSE_UNICODE is always defined to 1 )
* There was a period
* during the development of wxWidgets 2.9 when GetData() was missing, so this
* function was used to provide insulation from that design change. It may
* no longer be needed, and is harmless. GetData() seems to be an acceptable
......@@ -64,7 +67,7 @@ template<class T> inline void NEGATE( T &x ) { x = -x; }
#define DIM( x ) unsigned( sizeof(x) / sizeof( (x)[0] ) ) // not size_t
/// Exchange two values
// std::swap works only with arguments of the same type (which is saner);
// std::swap works only with arguments of the same type (which is saner);
// here the compiler will figure out what to do (I hope to get rid of
// this soon or late)
template<class T, class T2> inline void EXCHG( T& a, T2& b )
......
......@@ -476,10 +476,6 @@ class WORKSHEET_LAYOUT
double m_rightMargin; // the right page margin in mm
double m_topMargin; // the top page margin in mm
double m_bottomMargin; // the bottom page margin in mm
bool m_isDefaultDescr; // true if the internal default descr is loaded
// mainly used in Kicad GOST version, until
// a GOST page descr file is available
// to force the GOST default title block
public:
WORKSHEET_LAYOUT();
......@@ -496,9 +492,6 @@ public:
}
// Accessors:
bool IsDefaultDescr() { return m_isDefaultDescr; }
void SetDefaultDescrFlag( bool aFlg ) { m_isDefaultDescr = aFlg; }
double GetLeftMargin() { return m_leftMargin; }
double GetRightMargin() { return m_rightMargin; }
double GetTopMargin() { return m_topMargin; }
......
......@@ -96,9 +96,6 @@ void PL_EDITOR_FRAME::Files_io( wxCommandEvent& event )
{
case ID_LOAD_DEFAULT_PAGE_LAYOUT:
pglayout.SetPageLayout();
// Force DefaultDescrFlag to false in page layout editor,
// has meaning only for GOST version
pglayout.SetDefaultDescrFlag( false );
OnNewPageLayout();
break;
......@@ -106,9 +103,6 @@ void PL_EDITOR_FRAME::Files_io( wxCommandEvent& event )
pglayout.AllowVoidList( true );
SetCurrFileName( wxEmptyString );
pglayout.ClearList();
// Force DefaultDescrFlag to false in page layout editor,
// has meaning only for GOST version
pglayout.SetDefaultDescrFlag( false );
OnNewPageLayout();
break;
......
......@@ -122,9 +122,6 @@ bool EDA_APP::OnInit()
if( !descrLoaded )
{
WORKSHEET_LAYOUT::GetTheInstance().SetPageLayout();
// Force DefaultDescrFlag to false in page layout editor,
// has meaning only for GOST version
WORKSHEET_LAYOUT::GetTheInstance().SetDefaultDescrFlag( false );
frame->OnNewPageLayout();
}
......
......@@ -62,7 +62,7 @@ wxPoint BOARD_ITEM::ZeroOffset( 0, 0 );
BOARD::BOARD() :
BOARD_ITEM( (BOARD_ITEM*) NULL, PCB_T ),
m_NetInfo( this ),
m_paper( PAGE_INFO::A4, IsGOST() ),
m_paper( PAGE_INFO::A4 ),
m_NetClasses( this )
{
// we have not loaded a board yet, assume latest until then.
......
......@@ -51,7 +51,7 @@
(lib (name SI570_SI571_Oscillator_RevA_11Jun2012)(type Legacy)(uri ${KISYSMOD}/SI570_SI571_Oscillator_RevA_11Jun2012.mod)(options "")(descr ""))
(lib (name SIP9_Housing_14Jun2013)(type Legacy)(uri ${KISYSMOD}/SIP9_Housing_14Jun2013.mod)(options "")(descr ""))
(lib (name smd_capacitors)(type Legacy)(uri ${KISYSMOD}/smd_capacitors.mod)(options "")(descr ""))
(lib (name smd_crystal&oscillator)(type Legacy)(uri ${KISYSMOD}/smd_crystal&oscillator.mod)(options "")(descr ""))
(lib (name smd_crystal_and_oscillator)(type Legacy)(uri ${KISYSMOD}/smd_crystal_and_oscillator.mod)(options "")(descr ""))
(lib (name smd_resistors)(type Legacy)(uri ${KISYSMOD}/smd_resistors.mod)(options "")(descr ""))
(lib (name smd_soic_packages)(type Legacy)(uri ${KISYSMOD}/smd_soic_packages.mod)(options "")(descr ""))
(lib (name smd_ssop_packages)(type Legacy)(uri ${KISYSMOD}/smd_ssop_packages.mod)(options "")(descr ""))
......
......@@ -51,7 +51,7 @@ Resistor_Universal-Experimental_RevA,Legacy,${KISYSMOD}/Resistor_Universal-Exper
SI570_SI571_Oscillator_RevA_11Jun2012,Legacy,${KISYSMOD}/SI570_SI571_Oscillator_RevA_11Jun2012.mod,"",""
SIP9_Housing_14Jun2013,Legacy,${KISYSMOD}/SIP9_Housing_14Jun2013.mod,"",""
smd_capacitors,Legacy,${KISYSMOD}/smd_capacitors.mod,"",""
smd_crystal&oscillator,Legacy,${KISYSMOD}/smd_crystal&oscillator.mod,"",""
smd_crystal_and_oscillator,Legacy,${KISYSMOD}/smd_crystal_and_oscillator.mod,"",""
smd_resistors,Legacy,${KISYSMOD}/smd_resistors.mod,"",""
smd_soic_packages,Legacy,${KISYSMOD}/smd_soic_packages.mod,"",""
smd_ssop_packages,Legacy,${KISYSMOD}/smd_ssop_packages.mod,"",""
......
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