Skip to content

Commit f93a949

Browse files
committed
vendor: Improve documentation of vtd installation
1 parent de41391 commit f93a949

File tree

3 files changed

+81
-8
lines changed

3 files changed

+81
-8
lines changed

vendor/vtd-api/README.md

+11
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
Conan VTD-API Package
2+
=====================
3+
4+
In order to separate build and runtime dependencies, the VTD API sources files
5+
are put in their own Conan package.
6+
7+
The `vtd/2.20@cloe-restricted/stable` package must be available. For
8+
instructions on how to build it, see the [README](../vtd/README.md) in the
9+
[vtd](../vtd) directory.
10+
11+
Then just run `make package`.

vendor/vtd/Makefile

+7
Original file line numberDiff line numberDiff line change
@@ -35,3 +35,10 @@ docker:
3535
-t cloe/vtd-conan-package:${PACKAGE_VERSION} \
3636
--build-arg PACKAGE_FQN=${PACKAGE_FQN} \
3737
.
38+
39+
.PHONY: extract-conan-package
40+
extract-conan-package:
41+
touch ~/.conan/data/.user_id.tmp
42+
docker run --rm -v ~/.conan/data:/mnt cloe/vtd-conan-package:2.2.0 bash -c \
43+
"cp -a /vtd/ /mnt/vtd && chown -R --reference=/mnt/.user_id.tmp /mnt/vtd"
44+
rm ~/.conan/data/.user_id.tmp

vendor/vtd/README.md

+63-8
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,73 @@
11
Conan VTD Package
22
=================
33

4-
In order to build this package and the `vtd-api` package next to this package, you will
5-
need to place the required source TGZ files in the `dl/` directory.
4+
NOTE: IT IS NOT RECOMMENDED TO USE ANY OF THE CONAN BUILD TARGETS DIRECTLY,
5+
SUCH AS `make package` OR `make all`!
6+
7+
In order to provide a VTD Conan package that is as indepedent and
8+
"cross-platform" as possible, several system libraries are bundled with the
9+
package during creation. In order for this to work, they actually have to be
10+
available on the system that is building them. Since this is unlikely to be the
11+
case, it is recommended to build the Docker image and copy the "vtd" package
12+
from the container once complete.
13+
14+
Additionally, the Docker images in `dist/docker` require the
15+
`cloe/vtd-conan-package` image generated here to work. This image can then be
16+
used to mount at build- or run-time the VTD distribution, which speeds up build
17+
times and keeps image sizes down.
18+
19+
In principle, all you need to do is run `make docker`, but first make sure you
20+
fulfill the requirements.
21+
22+
Requirements
23+
------------
24+
25+
VTD is a proprietary application from [MSC Software](https://www.mscsoftware.com/product/virtual-test-drive).
26+
In order to use the `cloe-plugin-vtd` simulator binding, you will need
27+
a license to use VTD and you will need the VTD 2.2.0 sources.
28+
Please contact MSC Software for this.
29+
30+
In order to build this package, you will need to place the required source TGZ
31+
files in the `dl/` directory.
632

733
If these are not available, this package will be skipped at the export stage.
834

9-
For the Docker images in `dist/docker` to work, you should create the
10-
`cloe/vtd-conan-package` Docker image:
35+
Building the Image
36+
------------------
37+
38+
Create `dl` directory and link or copy the source `.tgz` files:
39+
Make sure to export `VTD_TGZ_DIR` to the actual directory where they are stored.
40+
41+
export VTD_TGZ_DIR=~/vtd
42+
mkdir dl
43+
cd dl
44+
ln "${VTD_TGZ_DIR}/vtd.2.2.0.Base.20181231.tgz" ./
45+
ln "${VTD_TGZ_DIR}/vtd.2.2.0.addOns.OSI.20210120.tgz" ./
46+
ln "${VTD_TGZ_DIR}/vtd.2.2.0.addOns.ROD.Base.20190313.tgz" ./
47+
48+
Build the `cloe/vtd-conan-package` Docker image:
1149

1250
make docker
1351

14-
This also requires, as above, that the required source TGZ files are in the `dl/`
15-
directory.
52+
Extracting the Conan Packages
53+
-----------------------------
54+
55+
If you already have the `vtd/2.2.0@cloe-restricted/stable` package and you want
56+
to "refresh" it, it's recommended to delete the local copy first:
57+
58+
conan remove vtd/2.2.0@cloe-restricted/stable
59+
60+
Normally, there is no need to re-create the package though.
61+
62+
Make sure you have the `cloe/vtd-conan-package:2.2.0` Docker image available;
63+
see the previous section if you need to build it. Then mount *your* conan data
64+
home (by default, `~/.conan/data`) into the docker container.
65+
66+
touch ~/.conan/data/.user_id.tmp
67+
docker run --rm -v ~/.conan/data:/mnt cloe/vtd-conan-package:2.2.0 bash -c \
68+
"cp -a /vtd/ /mnt/vtd && chown -R --reference=/mnt/.user_id.tmp /mnt/vtd"
69+
rm ~/.conan/data/.user_id.tmp
70+
71+
For your convenience, this is also available as a make target:
1672

17-
This image can then be used to mount at build- or run-time the VTD distribution,
18-
which speeds up build times and keeps image sizes down.
73+
make extract-conan-package

0 commit comments

Comments
 (0)