Skip to content

Commit

Permalink
Bullet from vcpkg and update to 3.17 (#18)
Browse files Browse the repository at this point in the history
* Bullet from vcpkg and update to 3.17

Signed-off-by: Shane Loretz <sloretz@osrfoundation.org>

* Keep debug folder

Signed-off-by: Shane Loretz <sloretz@osrfoundation.org>
  • Loading branch information
sloretz authored Mar 15, 2022
1 parent 3c6b274 commit 45edd84
Show file tree
Hide file tree
Showing 5 changed files with 29 additions and 89 deletions.
37 changes: 27 additions & 10 deletions package/bullet/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,30 @@ tutorial application which requires it.

To build the package, follow these steps.

You need Git, Visual Studio 2017 Command line tools, CMake, Chocolatey, and a text editor.

- Clone or download https://github.com/bulletphysics/bullet3
- Create a CMake build directory and run `cmake -G "Visual Studio 15 2017 Win64" PATH_TO_BULLET_SOURCE -DBUILD_SHARED_LIBS=ON -DUSE_DOUBLE_PRECISION=ON -DBUILD_CPU_DEMOS=OFF -DBUILD_BULLET2_DEMOS=OFF -DBUILD_OPENGL3_DEMOS=OFF -DBUILD_UNIT_TESTS=OFF -DBUILD_EXTRAS=OFF`.
- Run `msbuild ALL_BUILD.sln /p:Configuration=Release`
- Copy `Bullet*.lib` and `Bullet*.dll` located under `lib/Release` files to the package `lib/` directory.
- Run `msbuild ALL_BUILD.sln /p:Configuration=Debug`
- Copy `Bullet*_Debug.lib`, `Bullet*_Debug.dll` and `Bullet*_Debug.pdb` located under `lib/Debug` files to the package `lib/` directory.
- Run `choco pack`.
- Test the package and if it's good upload it somewhere your end users can reach it.
You need Git, Visual Studio 2019 Command line tools, CMake, Chocolatey, and a text editor.

Building bullet from source on windows is difficult.
The vcpkg team has already done it, so run these commands to get vcpkg and make it build bullet.

```
git clone https://github.com/Microsoft/vcpkg.git --depth 1 -b 2022.02.23
cd vcpkg
call bootstrap-vcpkg.bat
vcpkg install bullet3
```

Copy all files from these directories to the directories of the same name in this repository `packages/bullet`.

* `vcpkg\packages\bullet3_x86-windows\debug`
* `vcpkg\packages\bullet3_x86-windows\include`
* `vcpkg\packages\bullet3_x86-windows\lib`
* `vcpkg\packages\bullet3_x86-windows\share`

Make the chocolately package

```
choco pack
```

There should now be a file called `bullet.3.17.nupkg` in the same directory.
Test the package and if it's good upload it somewhere your end users can reach it.
3 changes: 2 additions & 1 deletion package/bullet/bullet.nuspec
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ This is a nuspec. It mostly adheres to https://docs.nuget.org/create/Nuspec-Refe
<!-- version should MATCH as closely as possible with the underlying software -->
<!-- Is the version a prerelease of a version? https://docs.nuget.org/create/versioning#creating-prerelease-packages -->
<!-- Note that unstable versions like 0.0.1 can be considered a released version, but it's possible that one can release a 0.0.1-beta before you release a 0.0.1 version. If the version number is final, that is considered a released version and not a prerelease. -->
<version>2.89.0</version>
<version>3.17</version>
<packageSourceUrl>https://github.com/ros2/choco-packages/tree/latest/package/bullet</packageSourceUrl>
<owners>Alejandro Hernández</owners>
<!-- ============================== -->
Expand All @@ -49,6 +49,7 @@ This is a nuspec. It mostly adheres to https://docs.nuget.org/create/Nuspec-Refe
<files>
<!-- this section controls what actually gets packaged into the Chocolatey package -->
<file src="tools\**" target="tools" />
<file src="debug\**" target="debug" />
<file src="include\**" target="include" />
<file src="lib\**" target="lib" />
<file src="share\**" target="share" />
Expand Down
Empty file added package/bullet/debug/.gitkeep
Empty file.
Empty file added package/bullet/share/.gitkeep
Empty file.
78 changes: 0 additions & 78 deletions package/bullet/share/cmake/BulletConfig.cmake

This file was deleted.

0 comments on commit 45edd84

Please sign in to comment.