Skip to content
This repository has been archived by the owner on Jul 26, 2022. It is now read-only.

Building

Pim Otte edited this page Dec 16, 2018 · 11 revisions

Build and test Syncany

0. Requirements: Syncany is based on Java 8 and we use Gradle for dependency management and as build tool. Gradle does all the dependency magic. All you need to build Syncany is a JDK 8.

On a Debian-based system that would be:

    $ sudo apt-get install openjdk-8-jdk

1. Checkout code and build

    git clone https://github.com/syncany/syncany
    cd syncany        
    ./gradlew installDist         (on Linux / Mac OS)
    gradlew installDist           (on Windows)

This compiles and installs the Syncany command line client to syncany-cli/build/install/syncany/bin/syncany. You can run it from there.

2. Install command line client (to run syncany from anywhere)

To be able to run syncany (or short: sy) from anywhere, you can install a symbolic link on your system. On Linux, the link is placed in /usr/local/bin, on Windows, a batch file is placed in C:\Windows. To do this, run the following commands:

On Linux / Mac OS:

    sudo ./gradlew fakeinstall   (on Linux / Mac OS)

On Windows:

  • Click Start, type cmd, and then press CTRL+SHIFT+ENTER. If a warning appears, click Yes.

  • In the command box, cd to your checkout directory and run

    gradlew --stop              (stops Gradle daemon, if running)          
    gradlew fakeinstall
    

Please note: There is no easy way to permanently install Syncany on your system, yet. We're working on an installer for Windows, and packages for Linux.

3. Run it!

    syncany --help        

Setup IntelliJ for development

  1. File->Open... build.gradle in root project.
  2. Choose "Use gradle wrapper task configuration"
  3. Enjoy!

Setup Eclipse IDE for development

  1. Checkout Syncany on the command line:

     cd /home/user/workspace
     git clone http://github.com/binwiederhier/syncany
     cd syncany
    
  2. Generate Eclipse project files and download dependencies:

     ./gradlew eclipse      (on Linux / Mac OS)
     gradlew eclipse        (on Windows)   
    
  3. Open Eclipse and create a new workspace, e.g. at "/home/user/workspace"

  4. In Eclipse: File -> Import -> Existing Projects Into Workspace -> Select Root Directory --> Browse

    • Select "/home/user/workspace/syncany"
    • Tick the Search nested projects checkbox (only available in Eclipse Kepler)
  5. Click "Finish"

Continuous integration, code coverage and tests

We're building snapshots of the latest master-branch commit as soon as they are committed (older snapshots are removed). At the moment, the build process outputs a *.tar.gz and a *.zip archive, as well as an executable for Windows (*.exe installer) and a Debian/Ubuntu package (*.deb).

To download it, check out the latest builds!
The corresponding JavaDoc, the JUnit test reports and the Cobertura coverage reports are also available.

Please note: These builds are created from unstable, sometimes erroneous code. Things might change very often and newer versions might not support older repositories. Please do NOT use these builds for important files.

Dependencies for building from source (Linux packages)

Dependency Version
Gradle >= 1.18
Apache Commons IO 2.4
Bouncycastle 1.51
Simple-XML 2.7.1
Guava 15.0
Apache Commons Codec 1.8
HSQLDB 2.3.1
Java SemVer 0.7.2
Undertow 1.1.0.CR3
jpathwatch 0.95
JUnit 4.9
Apache HttpComponents HttpClient 4.3.4
google-gson 2.3