README.md 4.1 KB
Newer Older
Stefan Pfeifer's avatar
Stefan Pfeifer committed
1
# About
2

Stefan Pfeifer's avatar
Stefan Pfeifer committed
3 4 5 6
Bow Simulator is a software tool for bow and arrow physics simulation.
It allows users to design virtual bows and simulate their static and dynamic performance.
Results include things like deformation, draw curve, material stresses, arrow velocity, degree of efficiency and more.

Stefan Pfeifer's avatar
Stefan Pfeifer committed
7
Visit http://bow-simulator.org for more information about the project.
8

Stefan Pfeifer's avatar
Stefan Pfeifer committed
9 10 11 12
# License

Bow Simulator is licensed under the GNU General Public License v3.0.

Stefan Pfeifer's avatar
Stefan Pfeifer committed
13
# Contributing
14

15 16 17 18
1. Fork this repository on GitLab and create a new branch from `develop`
2. Implement and commit your changes on your new branch
3. Create a merge request back to the `develop` branch of this repository. Add a short summary of the changes and [link any relevant issues](https://docs.gitlab.com/ce/user/project/issues/crosslinking_issues.html).
4. Your changes will be reviewed as soon as possible
19

20
# Build instructions
21

22 23 24 25
Bow Simulator is built with CMake.
The instructions below use the Qt-Creator IDE, which has built-in CMake support.
This is however not strictly necessary, you can just as well run CMake yourself.

26
The first build may take an hour or longer, depending on your hardware.
27
This is because some necessary external dependencies will be downloaded and compiled first (see `CMakeLists.txt` for details).
28

Stefan Pfeifer's avatar
Stefan Pfeifer committed
29
The instructions below mention exact version numbers for all the tools and libraries used.
30
These aren't strict requirements, just a reference for how the official releases were built.
Stefan Pfeifer's avatar
Stefan Pfeifer committed
31

32
## Windows
Stefan Pfeifer's avatar
Stefan Pfeifer committed
33

34
### Prerequisites
Stefan Pfeifer's avatar
Stefan Pfeifer committed
35

36
* [Microsoft Visual Studio 2017](https://www.visualstudio.com/downloads/). Select *Build Tools for Visual Studio 2017* if you don't want to install the whole Visual Studio IDE.
Stefan Pfeifer's avatar
Stefan Pfeifer committed
37

38 39
* [CMake 3.10.2](https://cmake.org/download/). Check the installer option to add CMake to the system path.

Stefan Pfeifer's avatar
Stefan Pfeifer committed
40
* [Qt 5.7.1 (Open Source)](https://www.qt.io/download). The necessary components depend on the target architecture:
41 42
    * Qt 5.7.1 32-bit (MSVC 2015)
    * Qt 5.7.1 64-bit (MSVC 2015)
Stefan Pfeifer's avatar
Stefan Pfeifer committed
43

44
### Compiling with Qt Creator
Stefan Pfeifer's avatar
Stefan Pfeifer committed
45

46
Download or clone this repository and open `CMakeLists.txt` with Qt Creator.
47
Pick the kit *Desktop Qt 5.7.1 MSVC2015 32bit* or *64bit* and configure the project.
48

49
Select the build type (e.g. *Release*) and perform a build.
Stefan Pfeifer's avatar
Stefan Pfeifer committed
50

51
If Qt Creator didn't auto-detect the C and C++ compiler or CMake, go to *Projects*, *Manage Kits...* and set them manually (*Microsoft Visual C++ Compiler 15.0 x86* for the 32bit Kit, *amd64* for the 64bit one).
52

53 54 55
Using the default CMake generator (*NMake Makefiles JOM*) might give you an error like this: "The C compiler ... is not able to compile a simple test program".
This can be solved by adding the directory `Qt/Tools/QtCreator/bin` of the Qt installation to the system path.

56 57 58 59
### Building the installer

Building the Windows installer requires some additional tools,

60
* [Inno Setup 5.5.9](http://www.jrsoftware.org/isdl.php). Add the installation directory to the system path.
61 62 63

* [rcedit 1.0.0](https://github.com/electron/rcedit/releases). Download the executable, rename it to `rcedit` and add its location to the system path.

64
In Qt Creator, check the target `iss-installer` under *Projects*, *Build Steps*, *Details* and perform a build.
65

66
## Linux (Debian 9.4.0)
67 68 69

### Prerequisites

70 71
* Tools: `qtcreator`, `cmake`
* Libraries: `qtbase5-dev`, `libqt5x11extras5-dev`
72 73 74 75

### Compiling with Qt Creator

Download or clone this repository and open `CMakeLists.txt` with Qt Creator.
76
Pick the kit *Desktop* and configure the project.
77

78
Select the build type (e.g. *Release*) and perform a build.
79 80 81

### Building the deb Package

82
Building the debian package requires `dpkg` to be installed. In Qt Creator, check the target `deb-package` under *Projects*, *Build Steps*, *Details* and perform a build.
83 84 85

### Building the AppImage

86 87 88
Building the AppImage requires [linuxdeployqt](https://github.com/probonopd/linuxdeployqt/releases), which is itself an AppImage.
Download it from github and make it make it executable via `chmod a+x ...`.
Ensure that it is found as `linuxdeployqt` by the command line, for example by dropping or linking it in your `/usr/local/bin/` folder.
89

90
In Qt Creator, check the target `appimage` under *Projects*, *Build Steps*, *Details* and perform a build.