You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+40-5Lines changed: 40 additions & 5 deletions
Original file line number
Diff line number
Diff line change
@@ -11,9 +11,10 @@ Initially generated with [xmlpg](https://github.com/open-dis/xmlpg).
11
11
It can be downloaded and installed from http://cmake.org/
12
12
13
13
* SDL2 and SDL2_net are required libraries to compile the examples.
14
-
These can usually be install via linux package managers.
14
+
These can usually be install via Linux package managers.
15
15
More details, and instructions for Windows are included [below](#SDL2-and-SDL2_net-Install-Instructions).
16
-
**NOTE:** Windows users will need to either add the DLL folders to their path, or copy the DLLs to the output directory (`Debug`).
16
+
17
+
**NOTE:** Windows users will need to either add the DLL folders to their path, or copy the DLLs to the output directory (`Debug`).
17
18
18
19
### Linux / GNU Makefiles
19
20
@@ -23,13 +24,41 @@ Initially generated with [xmlpg](https://github.com/open-dis/xmlpg).
23
24
1. Optionally, `-DCMAKE_INSTALL_PREFIX=<custom-path-to-install>` to set a custom directory to install the bin, include, and lib output directories.
24
25
1. Run `make` - this will output the libOpenDIS6.so, and libOpenDIS7.so libraries in the build directory along with the Example Applications.
25
26
1. The below steps are optional
26
-
1. Run `make package` to build linux package files. Currently this will produce a RedHat RPM package, Debian DEB package, and 2 compressed tarball (XZ, GZ).
27
+
1. Run `make package` to build Linux package files. Currently this will produce a Red Hat RPM package, Debian DEB package, and 2 compressed tarball (XZ, GZ).
27
28
1. Run `make install` to install bin, lib, and dir, into `CMAKE_INSTALL_PREFIX`
28
29
WARNING: `CMAKE_INSTALL_PREFIX` default can to somewhere `/usr/local/`, if not specified with the `-D` flag as shown in Step 3.1.
29
30
If you're unsure where to install, and want to keep your `/usr/local/` directory clean, run `cmake .. -DCMAKE_INSTALL_PREFIX=./install`.
30
31
This will cause `make install` to create a local install directory, from which you can move files elsewhere at a later date.
31
32
32
-
33
+
#### Windows with Visual Studio
34
+
1. Open `CMake (cmake-gui)` via the the start menu.
35
+
2. Enter the open-dis-cpp directory path into the Source and Build fields.
36
+
3. Click the `+ Add Entry` button and enter the following details:
37
+
Name: `SDL_INC_DIR`
38
+
Type: `PATH`
39
+
Value: `<SDL2-install-folder>/include`
40
+
(if you follow the below [SDL2 Windows Install Instruction](#Windows-Install-Instructions) this will be `C:/SDL2/include`)
41
+
3. Click the `+ Add Entry` button and enter the following details:
42
+
Name: `SDL_LIB_DIR`
43
+
Type: `PATH`
44
+
Value: `<SDL2-install-folder>/lib/x64` (64 bit) or `<SDL2-install-folder>/lib/x86` (32 bit)
45
+
(if you follow the below [SDL2 Windows Install Instruction](#Windows-Install-Instructions) this will be `C:/SDL2/lib/x64`)
46
+
4. Click Configure and follow the prompts, selecting the correct generator (i.e. Visual Studio version).
47
+
5. Click Generate
48
+
6. Click Open Project - This should open the generates solution file in Visual Studio
49
+
7. Build the Solution (`Ctrl + Shift + B`)
50
+
51
+
These steps were tested with Visual Studio 16 2019 (Community Edition).
52
+
Currently, only OpenDIS 6 and the Example Applications compile.
53
+
The library and executable files are output to a `Debug` directory.
54
+
55
+
To run the executables, either the value of the `SDL_LIB_DIR` variable should be added to your path,
56
+
or `SDL2.dll` and `SDL2_net.dll` need to be copied to the `Debug` directory.
57
+
58
+
### Cleaning CMake files
59
+
60
+
To quickly clean up CMake output files, use `git clean -xdf`.
61
+
**Note:** Use with care if you are actually developing open-dis-cpp, as `git clean` removes untracked files.
0 commit comments