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
d79fff5d
Commit
d79fff5d
authored
Apr 11, 2009
by
charras
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
eeschema library cache name changed from <root_name>.cache.lib to <root_name>-cache.lib.
Needed with the new code using wxFileName
parent
cfc3d919
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
27 additions
and
6 deletions
+27
-6
eelibs_read_libraryfiles.cpp
eeschema/eelibs_read_libraryfiles.cpp
+2
-2
files-io.cpp
eeschema/files-io.cpp
+25
-4
No files found.
eeschema/eelibs_read_libraryfiles.cpp
View file @
d79fff5d
...
@@ -115,7 +115,7 @@ void LoadLibraries (WinEDA_DrawFrame* frame)
...
@@ -115,7 +115,7 @@ void LoadLibraries (WinEDA_DrawFrame* frame)
frame
->
PrintMsg
(
_
(
"Loading schematic component libraries"
)
);
frame
->
PrintMsg
(
_
(
"Loading schematic component libraries"
)
);
// Free the unwanted libraries (i.e. not in list) but keep the
.
cache lib
// Free the unwanted libraries (i.e. not in list) but keep the cache lib
LibraryStruct
*
nextlib
,
*
lib
=
g_LibraryList
;
LibraryStruct
*
nextlib
,
*
lib
=
g_LibraryList
;
for
(
;
lib
!=
NULL
;
lib
=
nextlib
)
for
(
;
lib
!=
NULL
;
lib
=
nextlib
)
...
@@ -164,7 +164,7 @@ void LoadLibraries (WinEDA_DrawFrame* frame)
...
@@ -164,7 +164,7 @@ void LoadLibraries (WinEDA_DrawFrame* frame)
else
else
msg
+=
_
(
" error!"
);
msg
+=
_
(
" error!"
);
frame
->
PrintMsg
(
msg
);
frame
->
PrintMsg
(
msg
);
}
}
// reorder the linked list to match the order filename list:
// reorder the linked list to match the order filename list:
...
...
eeschema/files-io.cpp
View file @
d79fff5d
...
@@ -150,10 +150,22 @@ int WinEDA_SchematicFrame::LoadOneEEProject( const wxString& FileName,
...
@@ -150,10 +150,22 @@ int WinEDA_SchematicFrame::LoadOneEEProject( const wxString& FileName,
return
1
;
return
1
;
}
}
// Loading the project library cache
/* Loading the project library cache
* until apr 2009 the lib is named <root_name>.cache.lib
* and after (due to code change): <root_name>-cache.lib
* so if the <name>-cache.lib is not foun, the od way will be tried
*/
bool
use_oldcachename
=
false
;
wxFileName
fn
=
g_RootSheet
->
m_AssociatedScreen
->
m_FileName
;
wxFileName
fn
=
g_RootSheet
->
m_AssociatedScreen
->
m_FileName
;
fn
.
SetExt
(
wxT
(
"cache.lib"
)
);
wxString
cachename
=
fn
.
GetName
()
+
wxT
(
"-cache"
);
fn
.
SetName
(
cachename
);
fn
.
SetExt
(
CompLibFileExtension
);
if
(
!
fn
.
FileExists
()
)
{
fn
=
g_RootSheet
->
m_AssociatedScreen
->
m_FileName
;
fn
.
SetExt
(
wxT
(
"cache.lib"
)
);
use_oldcachename
=
true
;
}
if
(
fn
.
FileExists
()
)
if
(
fn
.
FileExists
()
)
{
{
wxLogDebug
(
wxT
(
"Load schematic cache library file <%s>"
),
wxLogDebug
(
wxT
(
"Load schematic cache library file <%s>"
),
...
@@ -165,6 +177,13 @@ int WinEDA_SchematicFrame::LoadOneEEProject( const wxString& FileName,
...
@@ -165,6 +177,13 @@ int WinEDA_SchematicFrame::LoadOneEEProject( const wxString& FileName,
{
{
LibCache
->
m_IsLibCache
=
TRUE
;
LibCache
->
m_IsLibCache
=
TRUE
;
msg
+=
wxT
(
" OK"
);
msg
+=
wxT
(
" OK"
);
if
(
use_oldcachename
)
// set the new name
{
fn
.
SetName
(
cachename
);
fn
.
SetExt
(
CompLibFileExtension
);
LibCache
->
m_Name
=
fn
.
GetName
();
LibCache
->
m_FullFileName
=
fn
.
GetFullPath
();
}
}
}
else
else
msg
+=
wxT
(
" ->Error"
);
msg
+=
wxT
(
" ->Error"
);
...
@@ -241,7 +260,9 @@ void WinEDA_SchematicFrame::SaveProject()
...
@@ -241,7 +260,9 @@ void WinEDA_SchematicFrame::SaveProject()
/* Creation du fichier d'archivage composants en repertoire courant */
/* Creation du fichier d'archivage composants en repertoire courant */
fn
=
g_RootSheet
->
GetFileName
();
fn
=
g_RootSheet
->
GetFileName
();
fn
.
SetExt
(
wxT
(
"cache."
)
+
CompLibFileExtension
);
wxString
cachename
=
fn
.
GetName
()
+
wxT
(
"-cache"
);
fn
.
SetName
(
cachename
);
fn
.
SetExt
(
CompLibFileExtension
);
LibArchive
(
this
,
fn
.
GetFullPath
()
);
LibArchive
(
this
,
fn
.
GetFullPath
()
);
}
}
...
...
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