Easy Juce installation on Ubuntu Linux 16.04


#21

Oh not bad. Three hours, rebuilt Ubuntu, put all the dependencies in first, ran the hacked script and…all good! One slight hiccup, Steinberg SDK didn’t extract to the /home/SDKs folder. I retrieved it from /tmp and did it manually! Thanks to Jules and all.


#22

I tried this and fiddled with the original bash script a bit, there were some issues mentioned here and some others I encountered like a missing desktop icon… The following snippet worked flawlessy installing JUCE & VST SDK & All the dependencies on a fresh Ubuntu 16.04 install, and a blank plugin project compiled fine. There might be some extra dev tools included tho. :grin:

So,

  1. chmod +x installJUCE.sh
  2. sudo ./installJUCE.sh

and the file installJUCE.sh:

#!/bin/bash
## Installer for JUCE (https://www.juce.com/)

read -p "Install Dev tools & Dependencies? [Y/n]: " inst
if [ $inst = y ] || [ $inst = Y ]
then

apt-get install build-essential python-dev git npm gnome-tweak-tool openjdk-8-jdk

apt-get install --no-install-recommends gnome-panel

apt-get -y install libwebkit2gtk-4.0 libgtk-3-dev

apt-get install libwebkit2gtk-4.0-dev libwebkit2gtk-4.0-doc

wget -O - https://apt.llvm.org/llvm-snapshot.gpg.key | sudo apt-key add -
sudo apt-add-repository "deb http://apt.llvm.org/xenial/ llvm-toolchain-xenial-5.0 main"
sudo apt-get update
sudo apt-get install -y clang-5.0

update-alternatives --install /usr/bin/clang++ clang++ /usr/bin/clang++-3.8 100
update-alternatives --install /usr/bin/clang++ clang++ /usr/bin/clang++-5.0 1000
update-alternatives --install /usr/bin/clang++ clang /usr/bin/clang-3.8 100
update-alternatives --install /usr/bin/clang clang /usr/bin/clang-3.8 100
update-alternatives --install /usr/bin/clang clang /usr/bin/clang-5.0 1000

## These may not be needed.. But remember to use CLang 5.0 or greated, folks.
 update-alternatives --config clang
 update-alternatives --config clang++

fi

## Installer for JUCE (https://www.juce.com/)
read -p "Install JUCE Huckleberry? [Y/n]: " inst
if [ $inst = y ] || [ $inst = Y ]
then
    cd ~ 
    if [ -e "JUCE/Projects" ]
    then
        mv JUCE/Projects/ /tmp/tmpJUCEProjects/
    fi
    if [ -e "JUCE" ]
    then
        rm -rf JUCE
    fi

    ## https://forum.juce.com/t/freeze-when-opening-filechooser/16026/38
    echo "Cloning JUCE Huckleberry ..."
    git clone -b develop https://github.com/WeAreROLI/JUCE

    ## Install dependencies for JUCE: (https://forum.juce.com/t/juce-4-2-1-setup-on-apt-based-linux-ubuntu-16-04-lts-mint-elementary-os-freya/17164)
    sudo apt-get -q update
    sudo apt-get -y --allow-unauthenticated install llvm clang-5.0 libfreetype6-dev libx11-dev libxinerama-dev libxrandr-dev libxcursor-dev mesa-common-dev libasound2-dev freeglut3-dev libxcomposite-dev libcurl4-gnutls-dev
    
    ## change the default compiler path
    export CC=/usr/bin/clang
    export CXX=/usr/bin/clang++

    ## Create a 'Projects' folder or put the old one back
    if [ -e "/tmp/tmpJUCEProjects" ]
    then
        mv /tmp/tmpJUCEProjects/ JUCE/Projects/
    else
        mkdir JUCE/Projects
    fi

    ## Build the Projucer from Source code
    cd JUCE/extras/Projucer/Builds/LinuxMakefile
    make CONFIG=Release

    if [ ! $? -eq 0 ]
    then
        echo "Building the Projector failed."
        exit
    fi

    mv build/Projucer ~/JUCE/

    ## Create a Desktop launcher
    sudo touch /usr/share/applications/projucer.desktop
    echo "[Desktop Entry]
Name=Projucer
Comment=JUCE Huckleberry Projucer
Exec=$HOME/JUCE/Projucer
Icon=$HOME/JUCE/extras/Projucer/Source/BinaryData/Icons/juce_icon.png
Terminal=false
Type=Application
Categories=AudioVideo;Audio;Graphics;Development;IDE;ProjectManagement;" | sudo tee /usr/share/applications/projucer.desktop | sudo tee $HOME/Desktop/projucer.desktop
    sudo chmod a+x /usr/share/applications/projucer.desktop
    sudo chmod a+x $HOME/Desktop/projucer.desktop

    ## Add the MIME type to the system, so .jucer files will automatically open with the Projucer
    sudo touch /usr/share/mime/packages/juce.xml
    echo "<?xml version=\"1.0\" encoding=\"UTF-8\"?>
    <mime-info xmlns=\"http://www.freedesktop.org/standards/shared-mime-info\">
        <mime-type type=\"application/x-juce\">
            <comment>JUCE project</comment>
            <sub-class-of type=\"application/xml\"/>
            <glob pattern=\"*.jucer\"/>
        </mime-type>
    </mime-info>" | sudo tee /usr/share/mime/packages/juce.xml
    sudo update-mime-database /usr/share/mime
    echo "application/x-juce=projucer.desktop" | sudo tee --append /usr/share/applications/defaults.list
    echo "Installed"
fi

## Steinberg VST SDK 3
read -p "Download Steinberg VST SDK 3? [Y/n]: " inst
if [ $inst = y ] || [ $inst = Y ]
then
    cd /tmp/
    if [ -e vstsdk368_08_11_2017_build_121.zip ]
    then
        rm vstsdk368_08_11_2017_build_121.zip
    fi
    echo "Downloading Steinberg VST3 SDK ..."
    wget https://download.steinberg.net/sdk_downloads/vstsdk368_08_11_2017_build_121.zip
    echo "Extracting ..."
    unzip -q vstsdk368_08_11_2017_build_121.zip
    if [ ! -e "$HOME/SDKs" ]
    then
        mkdir "$HOME/SDKs"
    fi

    mv "VST_SDK" "$HOME/SDKs"

    echo "Downloaded."
fi
read -p "Run Projucer? [Y/n]: " inst
if [ $inst = y ] || [ $inst = Y ]
then
    $HOME/JUCE/Projucer
fi

#23

Really nice work!

I can propose the following improvements:

  • Clone from https://github.com/WeAreROLI/JUCE instead of from the old URL (https://github.com/julianstorer/JUCE)
  • Grapefruit was the code name of JUCE 4, let’s change it to JUCE 5’s: Huckleberry
  • Always spell JUCE all-caps in comments, not Juce
  • Download the latest VST SDK (https://download.steinberg.net/sdk_downloads/vstsdk368_08_11_2017_build_121.zip), since the develop branch doesn’t work with version 3.6.5 anymore.

#24

Thanks for the suggestions, script fixed and tested again! :slight_smile:


#25

I have a fresh 16.04 install just as you describe…except I installed Chrome. Yet, I can’t even get past the 5th line in the script:
~$ sudo ./installJUCE.sh
Install Dev tools & Dependencies? [Y/n]:
./installJUCE.sh: line 5: [: =: unary operator expected
./installJUCE.sh: line 5: [: =: unary operator expected
Install JUCE Huckleberry? [Y/n]: ^C

I copied the text above and pasted to ~/installJUCE.sh, chmod +x, then ran it. Any ideas?

(also)
~$ echo $SHELL
/bin/bash

Thanks,
Chris


#26

Hmmm that error leads to next possible solution: try to change all the []-brackets into double brackets so
if [ $inst = y ] || [ $inst = Y ]
would become
if [[ $inst = y ]] || [[ $inst = Y ]]

Strange it didn’t happen for me but you can check more on Google or https://stackoverflow.com/questions/13617843/unary-operator-expected


#27

Yeah. I forgot to reply back to this thread, but that is what fixed it for me.


#28

Hello after multiple crash of the projucer JIT compiler on Windows 10, I install Projucer with the bash supplied by “kaukomedia” on a fresh new Ubuntu 16.04 LTS installation the script look like to run smoothly but I have a white screen without any bouton.
I have only this error could them be the source of the problem?
CJUCE Assertion failure in juce_Desktop.cpp:47

Thank you for sharing your script.
Regards
Alexandre


#29

By downloading the compiled Projucer on juce.com I go core dump after sign :frowning: . (The demo runner run smoothly).

So I build the Projucer with the provided makefile everything run smoothly no more error but I have still a white screen. The terminal print:

JUCE v5.3.2


Projucer 5.3.2 — Build date: Jul 12 2018
Log started: 12 Jul 2018 11:18:44pm

Linux
CPU: 949MHz Cores: 4 3850MB
JUCE v5.3.2

Then when I perform a clic left to the screen I got:

JUCE Assertion failure in juce_String.cpp:322
Erreur de segmentation (core dumped)

I try to build from Master and Develop branch on Ubuntu 16.04 LTS it’s the same
Regards


#30

Please try the latest tip of the develop branch - I’ve just fixed an issue with similar symptoms.


#31

Thank you very much for your help. I just compile a new download of the Develop branch GIT on Ubuntu 16.04 LTS. Now the login and password screen appear. But when I log successfully I got core dump. But if I don’t log successfully, I don’t got coredump, I just got the normal message “We were unable to locate an existing user with these credentials.” And If clic 'I don’t have account" I have the page allowing me to create an account.
Finally I switch on Ubuntu 18.04 LTS, Juce 5.3 run smoothly, (install in major part with this script (kaukomedia version) ) so I will stay on 18.04 LTS.
Thank you again
Alexandre


#32

Hi there,

thanks for the effort making this installation script.
As a small annotation to it: if you’d replace the line downloading the VST3 SDK by this:

wget -o vstsdk-latest.zip https://www.steinberg.net/vst3sdk

you should always have the latest SDK downloaded, since wget resolves the redirection for you. Afterwards you could replace all the lines containing the name of the specific *.zip file by "vstsdk-latest.zip:

cd /tmp/
if [ -e vstsdk-latest.zip ]
then
rm vstsdk-latest.zip
fi
echo "Downloading Steinberg VST3 SDK ..."
wget -o vstsdk-latest.zip https://www.steinberg.net/vst3sdk
echo "Extracting ..."
unzip -q vstsdk-latest.zip

and so on.
Kind Regards!

P.S.: The -o flag is because wget would save the file to “vst3sdk” without an extention.

EDIT:
Alternatively
wget --trust-server-names https://www.steinberg.net/vst3sdk
downloads the latest sdk preserving the filename, currently “vstsdk3610_11_06_2018_build_37.zip”. You just need to tell the script which is the latest zip file, if there are more than one.