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
e44fa937
Commit
e44fa937
authored
Jul 09, 2013
by
Dick Hollenbeck
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wxStandardPaths().GetExecutablePath(); is not wx 2.9.5 compatible, formatting improvements
parent
e135b7f6
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
14 additions
and
8 deletions
+14
-8
edaappl.cpp
common/edaappl.cpp
+14
-8
No files found.
common/edaappl.cpp
View file @
e44fa937
...
@@ -452,17 +452,16 @@ bool EDA_APP::SetBinDir()
...
@@ -452,17 +452,16 @@ bool EDA_APP::SetBinDir()
m_BinDir
=
FROM_UTF8
(
native_str
);
m_BinDir
=
FROM_UTF8
(
native_str
);
delete
[]
native_str
;
delete
[]
native_str
;
// Linux and
Unix
#elif defined(__UNIX__) // Linux and non-Apple
Unix
#elif defined(__UNIX__)
m_BinDir
=
wxStandardPaths
::
Get
().
GetExecutablePath
();
m_BinDir
=
wxStandardPaths
().
GetExecutablePath
();
#else
#else
m_BinDir
=
argv
[
0
];
m_BinDir
=
argv
[
0
];
#endif
// __UNIX__
#endif
/* Use unix notation for paths. I am not sure this is a good idea,
// Use unix notation for paths. I am not sure this is a good idea,
* but it simplify compatibility between Windows and Unices
// but it simplify compatibility between Windows and Unices
* However it is a potential problem in path handling under Windows
// However it is a potential problem in path handling under Windows
*/
m_BinDir
.
Replace
(
WIN_STRING_DIR_SEP
,
UNIX_STRING_DIR_SEP
);
m_BinDir
.
Replace
(
WIN_STRING_DIR_SEP
,
UNIX_STRING_DIR_SEP
);
// Remove file name form command line:
// Remove file name form command line:
...
@@ -1133,11 +1132,13 @@ void EDA_APP::InsertLibraryPath( const wxString& aPaths, size_t aIndex )
...
@@ -1133,11 +1132,13 @@ void EDA_APP::InsertLibraryPath( const wxString& aPaths, size_t aIndex )
}
}
}
}
bool
EDA_APP
::
LockFile
(
const
wxString
&
fileName
)
bool
EDA_APP
::
LockFile
(
const
wxString
&
fileName
)
{
{
// first make absolute and normalize, to avoid that different lock files
// first make absolute and normalize, to avoid that different lock files
// for the same file can be created
// for the same file can be created
wxFileName
fn
=
fileName
;
wxFileName
fn
=
fileName
;
fn
.
MakeAbsolute
();
fn
.
MakeAbsolute
();
// semaphore to protect the edition of the file by more than one instance
// semaphore to protect the edition of the file by more than one instance
...
@@ -1146,11 +1147,16 @@ bool EDA_APP::LockFile( const wxString& fileName )
...
@@ -1146,11 +1147,16 @@ bool EDA_APP::LockFile( const wxString& fileName )
// it means that we had an open file and we are opening a different one
// it means that we had an open file and we are opening a different one
delete
m_oneInstancePerFileChecker
;
delete
m_oneInstancePerFileChecker
;
}
}
wxString
lockFileName
=
fn
.
GetFullPath
()
+
wxT
(
".lock"
);
wxString
lockFileName
=
fn
.
GetFullPath
()
+
wxT
(
".lock"
);
lockFileName
.
Replace
(
wxT
(
"/"
),
wxT
(
"_"
)
);
lockFileName
.
Replace
(
wxT
(
"/"
),
wxT
(
"_"
)
);
// We can have filenames coming from Windows, so also convert Windows separator
// We can have filenames coming from Windows, so also convert Windows separator
lockFileName
.
Replace
(
wxT
(
"
\\
"
),
wxT
(
"_"
)
);
lockFileName
.
Replace
(
wxT
(
"
\\
"
),
wxT
(
"_"
)
);
m_oneInstancePerFileChecker
=
new
wxSingleInstanceChecker
(
lockFileName
);
m_oneInstancePerFileChecker
=
new
wxSingleInstanceChecker
(
lockFileName
);
if
(
m_oneInstancePerFileChecker
&&
if
(
m_oneInstancePerFileChecker
&&
m_oneInstancePerFileChecker
->
IsAnotherRunning
()
)
m_oneInstancePerFileChecker
->
IsAnotherRunning
()
)
{
{
...
...
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