Commit a397c4b2 authored by CHARRAS's avatar CHARRAS

gestfich.cpp change (A problem under windows already solved, but change was lost)

parent 75ce1923
......@@ -37,6 +37,7 @@ static wxString s_HelpPathList[] = {
#ifdef __WINDOWS__
wxT("c:/kicad/help/"),
wxT("d:/kicad/help/"),
wxT("c:/Program Files/kicad/help/"),
#else
wxT("/usr/share/doc/kicad/"),
wxT("/usr/local/share/doc/kicad/"),
......@@ -52,6 +53,7 @@ static wxString s_KicadDataPathList[] = {
#ifdef __WINDOWS__
wxT("c:/kicad/"),
wxT("d:/kicad/"),
wxT("c:/Program Files/kicad/"),
#else
wxT("/usr/share/kicad/"),
wxT("/usr/local/share/kicad/"),
......@@ -332,7 +334,11 @@ bool PathFound = FALSE;
FullPath += wxT("/help/");
LocaleString = EDA_Appl->m_Locale->GetCanonicalName();
if ( FullPath.Contains( wxT("kicad")) )
wxString path_tmp = FullPath;
#ifdef __WINDOWS__
path_tmp.MakeLower();
#endif
if ( path_tmp.Contains( wxT("kicad")) )
{
if ( wxDirExists(FullPath) ) PathFound = TRUE;
}
......@@ -520,8 +526,14 @@ wxString data_path;
else // Chemin cherche par le chemin des executables
{ // le chemin est bindir../
wxString tmp = EDA_Appl->m_BinDir;
#ifdef __WINDOWS__
tmp.MakeLower();
#endif
if ( tmp.Contains( wxT("kicad") ) )
{
#ifdef __WINDOWS__
tmp = EDA_Appl->m_BinDir;
#endif
if ( tmp.Last() == '/' ) tmp.RemoveLast();
data_path = tmp.BeforeLast('/'); // id cd ../
data_path += UNIX_STRING_DIR_SEP;
......
......@@ -82,15 +82,18 @@ bool WinEDA_AnnotateFrame::Create( wxWindow* parent, wxWindowID id, const wxStri
////@begin WinEDA_AnnotateFrame member initialisation
m_AnnotProjetCtrl = NULL;
m_AnnotNewCmpCtrl = NULL;
m_AnnotSortCmpCtrl = NULL;
////@end WinEDA_AnnotateFrame member initialisation
////@begin WinEDA_AnnotateFrame creation
SetExtraStyle(GetExtraStyle()|wxWS_EX_BLOCK_EVENTS);
SetExtraStyle(wxWS_EX_BLOCK_EVENTS);
wxDialog::Create( parent, id, caption, pos, size, style );
CreateControls();
GetSizer()->Fit(this);
GetSizer()->SetSizeHints(this);
if (GetSizer())
{
GetSizer()->SetSizeHints(this);
}
Centre();
////@end WinEDA_AnnotateFrame creation
return true;
......@@ -105,7 +108,7 @@ void WinEDA_AnnotateFrame::CreateControls()
SetFont(*g_DialogFont);
////@begin WinEDA_AnnotateFrame content construction
// Generated by DialogBlocks, 05/02/2006 12:40:51 (unregistered)
// Generated by DialogBlocks, 05/07/2007 21:07:04 (unregistered)
WinEDA_AnnotateFrame* itemDialog1 = this;
......@@ -115,41 +118,41 @@ void WinEDA_AnnotateFrame::CreateControls()
wxBoxSizer* itemBoxSizer3 = new wxBoxSizer(wxVERTICAL);
itemBoxSizer2->Add(itemBoxSizer3, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT|wxTOP|wxBOTTOM, 5);
wxString m_AnnotProjetCtrlStrings[] = {
_("Hierarchy"),
_("Current sheet")
};
m_AnnotProjetCtrl = new wxRadioBox( itemDialog1, ID_RADIOBOX, _("annotate:"), wxDefaultPosition, wxDefaultSize, 2, m_AnnotProjetCtrlStrings, 1, wxRA_SPECIFY_COLS );
itemBoxSizer3->Add(m_AnnotProjetCtrl, 0, wxALIGN_LEFT|wxALL, 5);
wxString m_AnnotNewCmpCtrlStrings[] = {
_("all components"),
_("new components only")
};
m_AnnotNewCmpCtrl = new wxRadioBox( itemDialog1, ID_RADIOBOX1, _("select items:"), wxDefaultPosition, wxDefaultSize, 2, m_AnnotNewCmpCtrlStrings, 1, wxRA_SPECIFY_COLS );
itemBoxSizer3->Add(m_AnnotNewCmpCtrl, 0, wxALIGN_LEFT|wxALL, 5);
wxString m_AnnotSortCmpCtrlStrings[] = {
_("by position"),
_("by value")
};
m_AnnotSortCmpCtrl = new wxRadioBox( itemDialog1, ID_RADIOBOX2, _("sorting:"), wxDefaultPosition, wxDefaultSize, 2, m_AnnotSortCmpCtrlStrings, 1, wxRA_SPECIFY_COLS );
itemBoxSizer3->Add(m_AnnotSortCmpCtrl, 0, wxALIGN_LEFT|wxALL, 5);
wxBoxSizer* itemBoxSizer6 = new wxBoxSizer(wxVERTICAL);
itemBoxSizer2->Add(itemBoxSizer6, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5);
wxButton* itemButton7 = new wxButton( itemDialog1, ID_ANNOTATE_CMP, _("&Annotate"), wxDefaultPosition, wxDefaultSize, 0 );
itemButton7->SetDefault();
itemButton7->SetForegroundColour(wxColour(198, 0, 0));
itemBoxSizer6->Add(itemButton7, 0, wxGROW|wxALL, 5);
wxButton* itemButton8 = new wxButton( itemDialog1, ID_DEANNOTATE_CMP, _("&Del Annotate"), wxDefaultPosition, wxDefaultSize, 0 );
itemButton8->SetForegroundColour(wxColour(0, 0, 230));
itemBoxSizer6->Add(itemButton8, 0, wxGROW|wxALL, 5);
wxButton* itemButton9 = new wxButton( itemDialog1, wxID_CLOSE, _("&Close"), wxDefaultPosition, wxDefaultSize, 0 );
itemBoxSizer6->Add(itemButton9, 0, wxGROW|wxALL, 5);
wxArrayString m_AnnotProjetCtrlStrings;
m_AnnotProjetCtrlStrings.Add(_("Hierarchy"));
m_AnnotProjetCtrlStrings.Add(_("Current sheet"));
m_AnnotProjetCtrl = new wxRadioBox( itemDialog1, ID_RADIOBOX, _("annotate:"), wxDefaultPosition, wxDefaultSize, m_AnnotProjetCtrlStrings, 1, wxRA_SPECIFY_COLS );
m_AnnotProjetCtrl->SetSelection(0);
itemBoxSizer3->Add(m_AnnotProjetCtrl, 0, wxGROW|wxALL, 5);
wxArrayString m_AnnotNewCmpCtrlStrings;
m_AnnotNewCmpCtrlStrings.Add(_("all components"));
m_AnnotNewCmpCtrlStrings.Add(_("new components only"));
m_AnnotNewCmpCtrl = new wxRadioBox( itemDialog1, ID_RADIOBOX1, _("select items:"), wxDefaultPosition, wxDefaultSize, m_AnnotNewCmpCtrlStrings, 1, wxRA_SPECIFY_COLS );
m_AnnotNewCmpCtrl->SetSelection(0);
itemBoxSizer3->Add(m_AnnotNewCmpCtrl, 0, wxGROW|wxALL, 5);
wxArrayString m_AnnotSortCmpCtrlStrings;
m_AnnotSortCmpCtrlStrings.Add(_("by position"));
m_AnnotSortCmpCtrlStrings.Add(_("by value"));
m_AnnotSortCmpCtrl = new wxRadioBox( itemDialog1, ID_RADIOBOX2, _("sorting:"), wxDefaultPosition, wxDefaultSize, m_AnnotSortCmpCtrlStrings, 1, wxRA_SPECIFY_COLS );
m_AnnotSortCmpCtrl->SetSelection(0);
itemBoxSizer3->Add(m_AnnotSortCmpCtrl, 0, wxGROW|wxALL, 5);
wxBoxSizer* itemBoxSizer7 = new wxBoxSizer(wxVERTICAL);
itemBoxSizer2->Add(itemBoxSizer7, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5);
wxButton* itemButton8 = new wxButton( itemDialog1, ID_ANNOTATE_CMP, _("&Annotate"), wxDefaultPosition, wxDefaultSize, 0 );
itemButton8->SetDefault();
itemButton8->SetForegroundColour(wxColour(198, 0, 0));
itemBoxSizer7->Add(itemButton8, 0, wxGROW|wxALL, 5);
wxButton* itemButton9 = new wxButton( itemDialog1, ID_DEANNOTATE_CMP, _("&Del Annotate"), wxDefaultPosition, wxDefaultSize, 0 );
itemButton9->SetForegroundColour(wxColour(0, 0, 230));
itemBoxSizer7->Add(itemButton9, 0, wxGROW|wxALL, 5);
wxButton* itemButton10 = new wxButton( itemDialog1, wxID_CLOSE, _("&Close"), wxDefaultPosition, wxDefaultSize, 0 );
itemBoxSizer7->Add(itemButton10, 0, wxGROW|wxALL, 5);
////@end WinEDA_AnnotateFrame content construction
}
......
......@@ -44,16 +44,16 @@
////@begin control identifiers
#define ID_DIALOG 10000
#define ID_RADIOBOX 10001
#define ID_RADIOBOX1 10002
#define ID_RADIOBOX2 10005
#define ID_ANNOTATE_CMP 10003
#define ID_DEANNOTATE_CMP 10004
#define SYMBOL_WINEDA_ANNOTATEFRAME_STYLE wxCAPTION|wxRESIZE_BORDER|wxSYSTEM_MENU|wxCLOSE_BOX
#define SYMBOL_WINEDA_ANNOTATEFRAME_TITLE _("EESchema Annotation")
#define SYMBOL_WINEDA_ANNOTATEFRAME_IDNAME ID_DIALOG
#define SYMBOL_WINEDA_ANNOTATEFRAME_SIZE wxSize(400, 500)
#define SYMBOL_WINEDA_ANNOTATEFRAME_SIZE wxSize(400, 300)
#define SYMBOL_WINEDA_ANNOTATEFRAME_POSITION wxDefaultPosition
#define ID_RADIOBOX 10001
#define ID_RADIOBOX1 10002
#define ID_RADIOBOX2 10003
#define ID_ANNOTATE_CMP 10004
#define ID_DEANNOTATE_CMP 10005
////@end control identifiers
/*!
......@@ -112,7 +112,7 @@ public:
////@begin WinEDA_AnnotateFrame member variables
wxRadioBox* m_AnnotProjetCtrl;
wxRadioBox* m_AnnotNewCmpCtrl;
wxRadioBox* m_AnnotSortCmpCtrl;
wxRadioBox* m_AnnotSortCmpCtrl;
////@end WinEDA_AnnotateFrame member variables
WinEDA_SchematicFrame * m_Parent;
......
This diff is collapsed.
......@@ -162,7 +162,7 @@ int LineWidth = g_DrawMinimunLineWidth;
GRRect(&panel->m_ClipBox, DC, pos.x, pos.y,
pos.x + m_Size.x, pos.y + m_Size.y, LineWidth, color);
/* Trace des textes : SheetName */
/* Draw text : SheetName */
if( Color > 0 ) txtcolor = Color;
else txtcolor = ReturnLayerColor(LAYER_SHEETNAME);
......@@ -172,7 +172,7 @@ int LineWidth = g_DrawMinimunLineWidth;
Text, TEXT_ORIENT_HORIZ, wxSize(m_SheetNameSize,m_SheetNameSize),
GR_TEXT_HJUSTIFY_LEFT, GR_TEXT_VJUSTIFY_BOTTOM, LineWidth);
/* Trace des textes : FileName */
/* Draw text : FileName */
if( Color >= 0 ) txtcolor = Color;
else txtcolor = ReturnLayerColor(LAYER_SHEETFILENAME);
Text = wxT("File: ") + m_FileName;
......@@ -183,7 +183,7 @@ int LineWidth = g_DrawMinimunLineWidth;
GR_TEXT_HJUSTIFY_LEFT, GR_TEXT_VJUSTIFY_TOP, LineWidth);
/* Trace des textes : SheetLabel */
/* Draw text : SheetLabel */
SheetLabelStruct = m_Label;
while( SheetLabelStruct != NULL )
{
......@@ -193,7 +193,7 @@ int LineWidth = g_DrawMinimunLineWidth;
}
/************************/
/************************/
/* DrawSheetLabelStruct */
/************************/
......
......@@ -5,7 +5,7 @@
COMMON_GLOBL wxString g_BuildVersion
#ifdef EDA_BASE
(wxT("(2007-07-02)"))
(wxT("(2007-07-09)"))
#endif
;
......
No preview for this file type
This diff is collapsed.
......@@ -14,7 +14,7 @@ STD_INSTALL = 1
ifeq ($(STD_INSTALL), 1)
PREFIX = /usr
KICAD_BIN = $(PREFIX)/bin
KICAD_BIN = $(PREFIX)/linux
KICAD_PLUGINS = $(PREFIX)/lib/kicad/plugins
KICAD_DOCS=$(PREFIX)/share/doc/kicad
KICAD_DATA=$(PREFIX)/share/kicad
......@@ -23,8 +23,8 @@ KICAD_LIBRARY=$(KICAD_DATA)/library
KICAD_INTERNAT=$(KICAD_DATA)/internat
KICAD_TEMPLATE=$(KICAD_DATA)/template
# used by myself (JP Charras) to build a staticcaly linked distribution intalled in /usr/local (with STD_INSTALL = 0)
else
# used by myself (JP Charras) to build a statically linked distribution intalled in /usr/local (with STD_INSTALL = 0)
PREFIX = /usr/local/linux
KICAD_BIN = $(PREFIX)/bin
KICAD_PLUGINS = $(PREFIX)/linux/plugins
......@@ -38,7 +38,6 @@ endif
# http://www.gnu.org/software/autoconf/manual/make/Catalogue-of-Rules.html#Catalogue-of-Rules
CXX = g++
LD = g++
SRCSUFF = .cpp
......@@ -46,8 +45,8 @@ OBJSUFF = .o
FINAL = 1
# turn on debugging for all executables, only tested without KICAD_PYTHON
DEBUG = 1
# turn on/OFF debugging for all executables, only tested without KICAD_PYTHON
DEBUG = 0
# common CPPFLAGS to all components, further CPPFLAGS customization in
......@@ -67,9 +66,17 @@ endif
# You must uncomment these lines for static link (or build with "make -f makefile.gtk KICAD_STATIC_LINK=1")
# dynamic link is less difficult than static link and is what you would normally want
# to use if kicad is running only on your system or one with same level of libraries.
#ifndef KICAD_PYTHON
#KICAD_STATIC_LINK = 1
#endif
ifndef KICAD_PYTHON
ifeq ($(STD_INSTALL), 0)
KICAD_STATIC_LINK = 1
endif
endif
ifeq ($(KICAD_STATIC_LINK), 1)
LD = gcc
else
LD = g++
endif
ifdef KICAD_PYTHON
PYTHON_VERSION=2.5
......
# File: winmake.env
# File: libs.win
#binaries path:
KICAD_BIN = /f/kicad/winexe
......@@ -12,6 +12,7 @@ KICAD_BIN = /f/kicad/winexe
# DLL use wxWin STATIC 0 0 1
#
#comment this for static wxWidgets link
#WXUSINGDLL = 1
#Define the wxWidget path (if not found in environment variables):
......@@ -21,9 +22,6 @@ endif
LIBVERSION = 2.8
#comment this for static wxWidgets link
#WXUSINGDLL = 1
# You must comment or uncomment this line to disable/enable python support
#KICAD_PYTHON = 1
......
**************************************************************
Update 02 jul 2007
All:
Window version only:
problem solved in autoinstall package fo XP (help files and others filse not found)
This problem was already solved, but changes were lost in last release.
**************************************************************
Update 02 jul 2007
pcbnew:
......
......@@ -17,12 +17,6 @@
#define PSCALE 1
/* routines externes */
int ReadListeSegmentDescr(wxDC * DC, FILE * File,
TRACK * PtSegm,DrawStructureType ItemType,
int * LineNum, int NumSegm);
/* routines internes */
static void Out_Pads(BOARD * Pcb, FILE * outfile);
static int GenEdges(BOARD * Pcb, FILE * outfile);
......@@ -513,8 +507,14 @@ void WinEDA_PcbFrame::ReadAutoroutedTracks(wxDC * DC)
{
char Line[1024];
wxString FullFileName, msg;
int LineNum = 0, nbtracks, NbTrack = 0;
int LineNum = 0, NbTrack = 0, NetCode = 0;
FILE * File;
TRACK * NewTrack;
SEGVIA * NewVia;
int track_count, track_layer, image, track_width;
int via_layer1, via_layer2, via_size;
wxPoint track_start, track_end;
int max_layer = m_Pcb->m_BoardSettings->m_CopperLayerCount;
/* Calcule du nom du fichier intermediaire de communication */
FullFileName = m_CurrentScreen->m_FileName;
......@@ -532,37 +532,85 @@ FILE * File;
Affiche_Message(msg);
}
nbtracks = 0;
while( GetLine(File, Line, &LineNum ) != NULL )
{
if(strnicmp(Line,"$EndPCB",6) == 0) break;
if(strnicmp(Line,"$TRACK",6) == 0)
{
TRACK * StartTrack = m_Pcb->m_Track;
for( ;StartTrack != NULL; StartTrack = (TRACK*)StartTrack->Pnext)
{
if( StartTrack->Pnext == NULL ) break;
}
setlocale(LC_NUMERIC, "C");
nbtracks = ReadListeSegmentDescr(DC, File, StartTrack, TYPETRACK,
&LineNum, NbTrack);
m_Pcb->m_NbSegmTrack += nbtracks;
break;
}
}
track_width = g_DesignSettings.m_CurrentTrackWidth;
via_size = g_DesignSettings.m_CurrentViaSize;
while( GetLine(File, Line, &LineNum ) != NULL )
{
char ident = Line[0];
switch ( ident )
{
case 'j': // Header, not used
break;
case 'R': // Net record
sscanf(Line+2, "%d", & NetCode);
break;
case 'V': // via record: fmt = V symbol pos_x pos_y layer1 layer2
sscanf(Line+2, "%d %d %d %d %d", & image,
& track_start.x, & track_start.y, & via_layer1, &via_layer2);
via_layer1--; via_layer2--;
if ( via_layer1 == max_layer-1 ) via_layer1 = CMP_N;
if ( via_layer2 == max_layer-1 ) via_layer2 = CMP_N;
NewVia = new SEGVIA(m_Pcb);
NewVia->m_Start = NewVia->m_End = track_start;
NewVia->m_Width = via_size;
NewVia->m_Layer = via_layer1 + (via_layer2<<4);
if ( NewVia->m_Layer == 0x0F || NewVia->m_Layer == 0xF0)
NewVia->m_Shape = VIA_NORMALE;
else NewVia->m_Shape = VIA_ENTERREE;
NewVia->Insert(m_Pcb, NULL);
NbTrack++;
break;
case 'T': // Track list start: fmt = T image layer t_count
sscanf(Line+2, "%d %d %d", & image, & track_layer, & track_count);
track_layer--;
if ( track_layer == max_layer-1 ) track_layer = CMP_N;
// Read corners: fmt = C x_pos y_pos
for ( int ii = 0; ii < track_count; ii++ )
{
if( GetLine(File, Line, &LineNum ) != NULL )
{
if ( Line[0] != 'C' ) break;
if ( ii == 0 )
sscanf(Line+2, "%d %d", & track_start.x, & track_start.y);
else
{
sscanf(Line+2, "%d %d", & track_end.x, & track_end.y);
NewTrack = new TRACK(m_Pcb);
NewTrack->m_Width = track_width;
NewTrack->m_Layer = track_layer;
NewTrack->m_Start = track_start;
NewTrack->m_End = track_end;
track_start = track_end;
NewTrack->Insert(m_Pcb, NULL);
NbTrack++;
}
}
else break;
}
break;
default:
break;
}
}
fclose(File);
if( nbtracks == 0 ) DisplayError(this, wxT("Warning: No tracks"), 10);
setlocale(LC_NUMERIC, "");
if( NbTrack == 0 ) DisplayError(this, wxT("Warning: No tracks"), 10);
else
{
m_Pcb->m_Status_Pcb = 0;
m_CurrentScreen->SetModify();
}
{
m_Pcb->m_Status_Pcb = 0;
m_CurrentScreen->SetModify();
}
Compile_Ratsnest(DC, TRUE);
if( nbtracks ) m_CurrentScreen->SetRefreshReq();
if( NbTrack ) m_CurrentScreen->SetRefreshReq();
}
release version:
02 jul 2007
09 jul 2007
files (.zip,.tgz):
kicad-2007-07-02
kicad-2007-07-09
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