Skip to content

Commit 253cec2

Browse files
committed
Merge branch 'devcontainer' of https://github.com/MJohnson459/ODM into devcontainer
2 parents e19bd0a + d574ab2 commit 253cec2

5 files changed

Lines changed: 16 additions & 19 deletions

File tree

.devcontainer/devcontainer.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,5 @@
77
"features": {
88
"ghcr.io/devcontainers/features/common-utils:2": {}
99
},
10-
1110
"postCreateCommand": "apt install python3-gdal"
1211
}

SuperBuild/cmake/External-Ceres.cmake

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ ExternalProject_Add(${_proj_name}
1111
URL http://ceres-solver.org/ceres-solver-2.0.0.tar.gz
1212
#--Update/Patch step----------
1313
UPDATE_COMMAND ""
14-
PATCH_COMMAND git apply ${CMAKE_MODULE_PATH}/ceres.patch
14+
PATCH_COMMAND patch -p1 < ${CMAKE_MODULE_PATH}/ceres.patch
1515
#--Configure step-------------
1616
SOURCE_DIR ${SB_SOURCE_DIR}/${_proj_name}
1717
CMAKE_ARGS

SuperBuild/cmake/External-GDAL.cmake

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,8 @@ ExternalProject_Add(${_proj_name}
1616
CMAKE_ARGS
1717
-DCMAKE_BUILD_TYPE=${CMAKE_BUILD_TYPE}
1818
-DCMAKE_INSTALL_PREFIX:PATH=${SB_INSTALL_DIR}
19-
-DGDAL_PYTHON_INSTALL_PREFIX=${SB_INSTALL_DIR}
19+
-DGDAL_PYTHON_INSTALL_PREFIX=${PYTHON_HOME}
20+
-DPython_EXECUTABLE=${PYTHON_EXE_PATH}
2021
-DBUILD_PYTHON_BINDINGS=ON
2122
${WIN32_CMAKE_ARGS}
2223
#--Build step-----------------

configure.sh

Lines changed: 12 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
# Ensure the DEBIAN_FRONTEND environment variable is set for apt-get calls
44
APT_GET="env DEBIAN_FRONTEND=noninteractive $(command -v apt-get)"
55

6-
check_version(){
6+
check_version(){
77
UBUNTU_VERSION=$(lsb_release -r)
88
case "$UBUNTU_VERSION" in
99
*"20.04"*|*"21.04"*|*"24.04"*)
@@ -107,15 +107,15 @@ installruntimedepsonly() {
107107

108108
installreqs() {
109109
cd /code
110-
110+
111111
## Set up library paths
112112
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$RUNPATH/SuperBuild/install/lib
113113

114114
## Before installing
115115
echo "Updating the system"
116116
ensure_prereqs
117117
check_version
118-
118+
119119
echo "Installing Required Requisites"
120120
installdepsfromsnapcraft build prereqs
121121
echo "Installing OpenCV Dependencies"
@@ -126,7 +126,7 @@ installreqs() {
126126
installdepsfromsnapcraft build openmvs
127127
echo "Installing GDAL Dependencies"
128128
installdepsfromsnapcraft build gdal
129-
129+
130130
set -e
131131

132132
# edt requires numpy to build
@@ -135,15 +135,13 @@ installreqs() {
135135
}
136136

137137
installpython() {
138-
echo "Installing Python requirements with compiled GDAL"
138+
echo "Installing Python requirements"
139139
cd /code
140-
export GDAL_CONFIG=${RUNPATH}/SuperBuild/install/bin/gdal-config
141-
142140
set -e
143141
venv/bin/pip install -r requirements.txt --ignore-installed
144142
set +e
145143
}
146-
144+
147145
install() {
148146
installreqs
149147

@@ -160,21 +158,20 @@ install() {
160158
fi
161159

162160
set -eo pipefail
163-
164161
echo "Compiling SuperBuild"
165162
cd ${RUNPATH}/SuperBuild
166163
mkdir -p build && cd build
167-
cmake .. \
168-
-DBUILD_PYTHON_BINDINGS=ON \
169-
-DPython_ROOT=/code/venv \
170-
-DPython_FIND_VIRTUALENV=ONLY \
171-
&& make -j$processes
164+
cmake .. && make -j$processes
165+
166+
# Reset terminal state
167+
cd ${RUNPATH}
168+
set +eo pipefail
172169

173170
installpython
174171

175172
echo "Configuration Finished"
176173
}
177-
174+
178175
uninstall() {
179176
check_version
180177

innosetup.iss

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ Source: "opendm\*"; DestDir: "{app}\opendm"; Excludes: "__pycache__"; Flags: ign
4848
Source: "stages\*"; DestDir: "{app}\stages"; Excludes: "__pycache__"; Flags: ignoreversion recursesubdirs createallsubdirs
4949
Source: "SuperBuild\install\bin\*"; DestDir: "{app}\SuperBuild\install\bin"; Excludes: "__pycache__"; Flags: ignoreversion recursesubdirs createallsubdirs
5050
Source: "SuperBuild\install\lib\python3.12\*"; DestDir: "{app}\SuperBuild\install\lib\python3.12"; Excludes: "__pycache__"; Flags: ignoreversion recursesubdirs createallsubdirs
51-
Source: "venv\*"; DestDir: "{app}\venv"; Excludes: "__pycache__,pyvenv.cfg"; Flags: ignoreversion recursesubdirs createallsubdirs
51+
Source: "venv\*"; DestDir: "{app}\venv"; Excludes: "__pycache__"; Flags: ignoreversion recursesubdirs createallsubdirs
5252
Source: "python312\*"; DestDir: "{app}\venv\Scripts"; Excludes: "__pycache__"; Flags: ignoreversion recursesubdirs createallsubdirs
5353
Source: "console.bat"; DestDir: "{app}"; Flags: ignoreversion
5454
Source: "VERSION"; DestDir: "{app}"; Flags: ignoreversion

0 commit comments

Comments
 (0)