Skip to content

Commit 9fd1421

Browse files
committed
WIP: stashing before refactoring cmake project
1 parent ba86fbe commit 9fd1421

File tree

3 files changed

+69
-38
lines changed

3 files changed

+69
-38
lines changed

cmake/Dockerfile

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
# Use the latest Windows Server Core image with .NET Framework 4.8.
2+
FROM mcr.microsoft.com/windows/servercore:ltsc2019
3+
4+
# Restore the default Windows shell for correct batch processing.
5+
SHELL ["cmd", "/S", "/C"]
6+
7+
# Download and install CMake
8+
ADD https://github.com/Kitware/CMake/releases/download/v3.21.1/cmake-3.21.1-win64-x64.msi C:\\temp\\cmake.msi
9+
RUN powershell Start-Process -FilePath msiexec.exe -ArgumentList '/i', 'C:\\temp\\cmake.msi', '/quiet', '/norestart' -NoNewWindow -Wait
10+
11+
# Download and install Git
12+
ADD https://github.com/git-for-windows/git/releases/download/v2.33.0.windows.2/Git-2.33.0.2-64-bit.exe C:\\temp\\git.exe
13+
RUN powershell Start-Process -FilePath C:\\temp\\git.exe -ArgumentList '/VERYSILENT' -NoNewWindow -Wait
14+
15+
# Download and install vcpkg
16+
RUN git clone https://github.com/microsoft/vcpkg.git C:\\vcpkg
17+
RUN C:\\vcpkg\\bootstrap-vcpkg.bat
18+
19+
# Install Open3D and other dependencies with vcpkg
20+
RUN C:\\vcpkg\\vcpkg install open3d
21+
RUN C:\\vcpkg\\vcpkg integrate install
22+
23+
# Set up the working directory
24+
WORKDIR C:/project
25+
26+
# Clone the project
27+
RUN git clone https://github.com/yourusername/yourproject.git .
28+
29+
# Run the build script
30+
RUN ["cmd", "/S", "/C", "cmake -DCMAKE_TOOLCHAIN_FILE=C:\\vcpkg\\scripts\\buildsystems\\vcpkg.cmake -B build -S ."]
31+
RUN ["cmd", "/S", "/C", "cmake --build build --config Release"]
32+
33+
# Set the entrypoint to your application's main executable
34+
ENTRYPOINT ["C:\\project\\build\\YourApp.exe"]

cmake/install_open3d.bat

Lines changed: 34 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -44,46 +44,43 @@ if not exist "%targetDir%" (
4444

4545
:: Download the file
4646
echo Downloading Open3D...
47-
curl -L -o "%filePath%" "%url%"
48-
49-
:: check if the file was downloaded if not wait
50-
:wait
51-
if not exist "%filePath%" (
52-
echo Waiting for download to complete...
53-
timeout /t 5 /nobreak >nul
54-
goto wait
47+
curl -L -o "%targetDir%\open3d.zip" "%url%"
48+
49+
:: Check if the file was downloaded
50+
if not exist "%targetDir%\open3d.zip" (
51+
echo Failed to download Open3D.
52+
exit /b 1
5553
)
56-
echo File downloaded.
5754

5855
:: Extract the file
5956
echo Extracting Open3D...
6057
powershell -Command "Expand-Archive -Path '%targetDir%\open3d.zip' -DestinationPath '%targetDir%'"
6158

62-
:: Delete the downloaded zip file
63-
del "%targetDir%\open3d.zip"
64-
65-
:: Change to the target directory
66-
cd /d "%targetDir%"
67-
68-
:: Run the cmake commands
69-
echo Building Open3D...
70-
cmake -DBUILD_WEBRTC=OFF -DBUILD_SHARED_LIBS=ON -G "Visual Studio 16 2019" -A x64 -DCMAKE_INSTALL_PREFIX="%targetDir%" -S . -B build
71-
if errorlevel 1 (
72-
echo Failed to run cmake configuration command.
73-
exit /b 1
74-
)
75-
76-
cmake --build build --config Release --target ALL_BUILD
77-
if errorlevel 1 (
78-
echo Failed to build ALL_BUILD.
79-
exit /b 1
80-
)
81-
82-
cmake --build build --config Release --target INSTALL
83-
if errorlevel 1 (
84-
echo Failed to install.
85-
exit /b 1
86-
)
87-
88-
echo Done.
89-
endlocal
59+
@REM :: Delete the downloaded zip file
60+
@REM del "%targetDir%\open3d.zip"
61+
62+
@REM :: Change to the target directory
63+
@REM cd /d "%targetDir%"
64+
65+
@REM :: Run the cmake commands
66+
@REM echo Building Open3D...
67+
@REM cmake -DBUILD_WEBRTC=OFF -DBUILD_SHARED_LIBS=ON -G "Visual Studio 16 2019" -A x64 -DCMAKE_INSTALL_PREFIX="%targetDir%" -S . -B build
68+
@REM if errorlevel 1 (
69+
@REM echo Failed to run cmake configuration command.
70+
@REM exit /b 1
71+
@REM )
72+
73+
@REM cmake --build build --config Release --target ALL_BUILD
74+
@REM if errorlevel 1 (
75+
@REM echo Failed to build ALL_BUILD.
76+
@REM exit /b 1
77+
@REM )
78+
79+
@REM cmake --build build --config Release --target INSTALL
80+
@REM if errorlevel 1 (
81+
@REM echo Failed to install.
82+
@REM exit /b 1
83+
@REM )
84+
85+
@REM echo Done.
86+
@REM endlocal

deps/eigen

Submodule eigen updated from d26e197 to 77833f9

0 commit comments

Comments
 (0)