This reference page gives installation instructions for all methods in all supported environments.
Linux | macOS (Intel, Apple Silicon) | Windows | |
---|---|---|---|
Source code compilation | - GCC 7+ - Clang 7+ |
Apple: - Clang 7+ (no multithreading) Homebrew: - GCC 7+ - Clang 7+ |
Cygwin/MinGW/WSL: - GCC 7+ - Clang 7+ |
Standalone binary (no tab completion) |
✅ | ❌ | ❌ |
Packages | DEB/RMP | ❌ | ❌ |
Source code compilation is a recommended method of RAMPACK installation. It enables you to utilize native CPU optimizations, which usually increases the performance by around 10%. To build the project, you need the following prerequisites:
- cmake 3.10+
- gcc 7+ / clang 7+
- git (optionally)
All other dependencies are contained within the git repository as submodules. The compilation was tested on:
- Linux
- macOS (Intel, Apple Silicon)
- Windows (Cygwin, MinGW, WSL)
First, unpack the source code archive (rampack-[version]-source.tar.gz
in
Releases) or clone the project using git
. If using git
, the project
should be cloned with --recurse-submodules
option
git clone https://github.com/PKua007/rampack.git --recurse-submodules
or, if the project was already cloned without it, you should execute
git submodule update --init
Then issuing the following commands in project's root directory will install the program with tab completion scripts for
bash
and zsh
shells.
mkdir build
cd build
cmake ../
cmake --build .
sudo cmake --build . --target install
cmake ../
prepares the build. It accepts additional options to customize the build.
Autocompletion scripts will be installed only if the corresponding shell is detected. You can verify the installation by
executing
rampack --version
There are also general and project-specific CMake options to customize the build:
-
-DCMAKE_C_COMPILER=... (= as detected by CMake)
-DCMAKE_CXX_COMPILER=... (= as detected by CMake)Provides manual paths for C and C++ compilers. Useful when many compilers are available in the system.
-
-DCMAKE_INSTALL_PREFIX=... (= /usr/local)
Changes the default installation prefix. If it is set to
/prefix/path
:rampack
binary will be installed to/prefix/path/bin
bash
completion will be installed to/prefix/path/share/bash-completion/completions
zsh
completion will be installed to/prefix/path/share/zsh/site-functions
-
-DRAMPACK_STATIC_LINKING=ON/OFF (= OFF)
Turns on/off static linking. Static-linked binaries have minimal or no dependencies and should be able to be run on all versions of the same platform (unavailable on macOS).
-
-DRAMPACK_BUILD_TESTS=ON/OFF (= OFF)
Turns on/off building unit and validation tests. The tests can be executed using
ctest
command in the build folder. -
-RAMPACK_ARCH_NATIVE=ON/OFF (= ON)
Turns on/off native CPU optimizations
-march=native
(unavailable in Apple Clang on Apple Silicon).
Standalone binary is available for all Linux platforms. It is static-linked, which means that it has no dependencies and
should run on all reasonably modern versions of various Linux distributions. zsh
and bash
tab completion is not
available.
The project is also distributed as DEB (Debian/Ubuntu/...) and RPM (Red Hat/Fedora/SUSE/...) packages. The packages contain static-linked binary as well as tab completion scripts. Installation:
dpkg -i rampack-[version]-Linux.deb
rpm -i rampack-[version]-Linux.rpm