Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
pyotb
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Operate
Environments
Monitor
Incidents
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Orfeo ToolBox
pyotb
Commits
29530682
Commit
29530682
authored
1 year ago
by
Vincent Delbar
Browse files
Options
Downloads
Patches
Plain Diff
Fix Windows install custom path + hints about registry
parent
3099a5bc
No related branches found
Branches containing commit
No related tags found
Tags containing commit
2 merge requests
!108
Release 2.0.0
,
!98
Add function for interactive OTB installation
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
pyotb/install.py
+4
-3
4 additions, 3 deletions
pyotb/install.py
with
4 additions
and
3 deletions
pyotb/install.py
+
4
−
3
View file @
29530682
...
...
@@ -90,9 +90,10 @@ def update_windows_env(otb_path: Path):
winreg
.
SetValueEx
(
reg_key
,
"
OTB_ROOT
"
,
0
,
winreg
.
REG_EXPAND_SZ
,
str
(
otb_path
))
print
(
"
##### Environment variable
'
OTB_ROOT
'
added successfully to user
'
s hive.
"
"
You
'
ll need to login / logout to apply this change.
"
)
key
=
"
HKEY_CURRENT_USER
\\
Environment
\\
OTB_ROOT
"
print
(
f
"
To undo this permanent setting, use
'
reg
.exe delete
\"
{
key
}
\"
'"
)
reg_cmd
=
"
reg.exe delete
HKEY_CURRENT_USER
\\
Environment
/v
OTB_ROOT
/f
"
print
(
f
"
To undo this permanent setting, use
'
{
reg
_cmd
}
'"
)
def
recompile_python_bindings
(
path
:
Path
,
cmd
:
str
):
...
...
@@ -174,7 +175,7 @@ def install_otb(version: str = "latest", path: str = "", edit_env: bool = False)
if
sysname
==
"
Win64
"
:
with
zipfile
.
ZipFile
(
tmpfile
)
as
zipf
:
print
(
"
##### Extracting zip file...
\n
"
)
zipf
.
extractall
(
path
.
parent
)
zipf
.
extractall
(
path
.
parent
if
default_path
else
path
)
else
:
install_cmd
=
f
"
{
cmd
}
{
tmpfile
}
--target
{
path
}
--accept
"
print
(
f
"
##### Executing
'
{
install_cmd
}
'
\n
"
)
...
...
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