Skip to content

Compiling from Source

Julian Frohmüller edited this page Dec 20, 2024 · 8 revisions

💡 OpenSuperClone requires the following packages to be installed for a successful project build:

  • cmake
  • gcc (other C compilers will likely work but are not tested)
  • gettext
  • libconfig-dev
  • libgtk-3-dev
  • libusb-dev
  • pkg-config

Building the DEB/RPM Package

The recommended way of installing OpenSuperClone is via the DEB or RPM package. When working with the latest source, it is recommended to build the package and install it that way. For convenience the package.sh script is provided, which will attempt to build the DEB and RPM packages and place them in ./package.

# Build the OpenSuperClone package for Release
$ ./package.sh

Building and Running Locally

For convenience, the build.sh script is provided, which will build OpenSuperClone for Release, and install OpenSuperClone in ./Release. This will not attempt to install OSCDriver nor copy the OSCDriver sources to /usr/src, you will have to do this manually.

# Build OpenSuperClone for Release and install to ./Release
$ ./build.sh

# Run OpenSuperClone
$ sudo ./Release/opensuperclone

# Run OSCViewer
$ ./Release/oscviewer

Building and Installing to /usr/

For convenience, the install.sh script is provided, which will build OpenSuperClone for Release, install OpenSuperClone to /usr/ and attempt to install OSCDriver via dkms. This way of installation is not recommended compared to installation via the DEB or RPM package, but may be easier in some situations.

# Build OpenSuperClone for Release and install to /usr/
$ ./install.sh

# Run OpenSuperClone
$ sudo opensuperclone

# Run OSCViewer
$ oscviewer

# Uninstall OpenSuperClone (including the kernel driver)
$ ./uninstall.sh

OSCDriver

OpenSuperClone requires a kernel module to be installed for the virtual drive functionality. When installing OpenSuperClone via the DEB or RPM package, or with the install.sh script and dkms is present, the module will be automatically built and installed. When compiling from source, you may choose to either install the module via DKMS (recommended) or build and install the module manually. Substitute x.x.x with the version number of OSCDriver.

Installation with DKMS

# Copy the OSCDriver source to /usr/src
$ sudo cp -r OSCDriver-x.x.x /usr/src/

# Install OSCDriver
$ sudo dkms install OSCDriver/x.x.x

Manual Installation

$ cd ./Release/src/OSCDriver-x.x.x
$ make
$ sudo make install