Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
otb
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
David Youssefi
otb
Commits
3c7d5d02
Commit
3c7d5d02
authored
15 years ago
by
Emmanuel Christophe
Browse files
Options
Downloads
Patches
Plain Diff
ENH: rename config file to otb.conf, fix exception due to OTB_LANG instead of LANG in config file
parent
0b7a346e
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
CMake/GenerateConfigProperties.cpp
+9
-9
9 additions, 9 deletions
CMake/GenerateConfigProperties.cpp
CMakeLists.txt
+6
-6
6 additions, 6 deletions
CMakeLists.txt
Code/Common/otbConfigurationFile.h
+13
-12
13 additions, 12 deletions
Code/Common/otbConfigurationFile.h
with
28 additions
and
27 deletions
CMake/
g
enerate
-c
onfig
-p
roperties.cpp
→
CMake/
G
enerate
C
onfig
P
roperties.cpp
+
9
−
9
View file @
3c7d5d02
...
...
@@ -24,11 +24,11 @@ PURPOSE. See the above copyright notices for more information.
#include
<iostream>
/**
* @brief main application for generating the otb_config.inp file.
*
* @param argv[1] Path to OTB_BINARY_DIR/otb_config.inp
* @brief main application for generating the otb.conf file.
*
* @param argv[2] language parameter
* @param argv[1] Path to OTB_BINARY_DIR/otb.conf
*
* @param argv[2] language parameter
*/
int
main
(
int
argc
,
char
*
argv
[])
{
...
...
@@ -52,7 +52,7 @@ int main(int argc, char* argv[])
std::string releaseVersion = "0";
std::string::size_type pos1 = std::string::npos;
std::string::size_type pos2 = std::string::npos;
pos1 = versionNumber.find(".", 0);
if(pos1 != std::string::npos)
{
...
...
@@ -104,17 +104,17 @@ int main(int argc, char* argv[])
<< std::endl;
*/
std
::
string
language
(
argv
[
2
]);
os
<<
"#Auto generated by config-properties
\n
"
<<
"#Language
\n
"
<<
"OTB_LANG="
<<
language
<<
"
\n
"
<<
"# end of config file properties generation"
<<
std
::
endl
;
<<
std
::
endl
;
os
.
close
();
std
::
cout
<<
"wrote file: "
<<
argv
[
1
]
<<
std
::
endl
;
exit
(
0
);
...
...
This diff is collapsed.
Click to expand it.
CMakeLists.txt
+
6
−
6
View file @
3c7d5d02
...
...
@@ -1127,14 +1127,14 @@ INCLUDE(CPack)
ENDIF
(
OTB_USE_CPACK
)
FILE
(
GLOB otbconfigfileCreation_SRCS
"
${
OTB_SOURCE_DIR
}
/CMake/
g
enerate
-c
onfig
-p
roperties.cpp"
)
SET
(
otbconfigfile_DEFAULT
"
${
OTB_BINARY_DIR
}
/otb
_
conf
ig.inp
"
)
FILE
(
GLOB otbconfigfileCreation_SRCS
"
${
OTB_SOURCE_DIR
}
/CMake/
G
enerate
C
onfig
P
roperties.cpp"
)
SET
(
otbconfigfile_DEFAULT
"
${
OTB_BINARY_DIR
}
/otb
.
conf"
)
ADD_EXECUTABLE
(
g
enerate
-c
onfig
-p
roperties
${
otbconfigfileCreation_SRCS
}
)
ADD_EXECUTABLE
(
G
enerate
C
onfig
P
roperties
${
otbconfigfileCreation_SRCS
}
)
ADD_CUSTOM_COMMAND
(
TARGET
g
enerate
-c
onfig
-p
roperties
TARGET
G
enerate
C
onfig
P
roperties
POST_BUILD
COMMAND
g
enerate
-c
onfig
-p
roperties
COMMAND
G
enerate
C
onfig
P
roperties
ARGS
"
${
otbconfigfile_DEFAULT
}
"
"
${
OTB_LANG
}
"
COMMENT
"Generating otb
_
config
.inp
"
)
COMMENT
"Generating
${
otbconfig
file_DEFAULT
}
"
)
This diff is collapsed.
Click to expand it.
Code/Common/otbConfigurationFile.h
+
13
−
12
View file @
3c7d5d02
...
...
@@ -30,24 +30,24 @@ namespace otb
/** \class ConfigurationFile
* \brief Manage OTB ConfigurationFile file
*/
class
ConfigurationFile
:
public
itk
::
Object
{
public:
/** Standard class typedef */
typedef
ConfigurationFile
Self
;
typedef
itk
::
Object
Superclass
;
typedef
itk
::
SmartPointer
<
Self
>
Pointer
;
typedef
itk
::
SmartPointer
<
const
Self
>
ConstPointer
;
/** Standard macro */
itkTypeMacro
(
ConfigurationFile
,
Object
);
/** This is protected for the singleton. Use GetInstance() instead. */
itkNewMacro
(
Self
);
/** Get the unique instanc1e of the model */
// static Pointer GetInstance()
// {
...
...
@@ -57,24 +57,25 @@ namespace otb
// }
// return Instance;
// };
ConfigFile
*
GetOTBConfig
()
{
return
m_OTBConfig
;
};
std
::
string
GetLanguage
()
{
return
m_OTBConfig
->
read
<
std
::
string
>
(
"LANG"
);
return
m_OTBConfig
->
read
<
std
::
string
>
(
"
OTB_
LANG"
);
};
// std::string lib(OTB_CONFIG);
protected
:
/** Constructor */
ConfigurationFile
(){
ConfigurationFile
()
{
std
::
string
OTBBinDir
(
OTB_CONFIG
);
m_OTBConfig
=
new
ConfigFile
(
OTBBinDir
+
"/otb
_
conf
ig.inp
"
);
m_OTBConfig
=
new
ConfigFile
(
OTBBinDir
+
"/otb
.
conf"
);
}
;
/** Destructor */
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment