Commit 88ef9586 authored by Matthieu Boileau's avatar Matthieu Boileau
Browse files

Add Qt5

parent b3b98b61
Loading
Loading
Loading
Loading

qt/install.sh

0 → 100755
+61 −0
Original line number Diff line number Diff line
#!/bin/bash

set -x 
LIB_NAME="qt"
LIB_VERSION_SHORT=5.6
LIB_VERSION=${LIB_VERSION_SHORT}.2

LIB_FULLNAME=${LIB_NAME}-${LIB_VERSION}
LIB_VERSION_VERYSHORT="${LIB_VERSION_SHORT//.}"
SUB_DIR=${LIB_NAME}/${LIB_VERSION_SHORT}
WORK_DIR=/data/software/sources/${SUB_DIR}
BUILD_SCRIPT=qt-opensource-linux-x64-${LIB_VERSION}.run
QS_SCRIPT_PREFIX=qt-installer-noninteractive
URL="http://download.qt.io/official_releases/qt/${LIB_VERSION_SHORT}/${LIB_VERSION}/${BUILD_SCRIPT}"
INSTALL_DIR=/data/software/install/${SUB_DIR}
SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
MODULE_DIR=/data/software/modules/tools/${LIB_NAME}
MODULE_PATH=${MODULE_DIR}/${LIB_VERSION}_${GCC_SHORT}_${MPI_SHORT}

install_lib()
{

if [[ ! -f ${WORK_DIR}/${BUILD_SCRIPT} ]]; then
  mkdir -p $WORK_DIR
  cd $WORK_DIR
  wget $URL
fi

export LIB_VERSION_VERYSHORT
export INSTALL_DIR
envtpl  --keep-template -o ${WORK_DIR}/qt-installer-noninteractive.qs qt-installer-noninteractive.tmpl || exit 1
cd $WORK_DIR
chmod u+x $BUILD_SCRIPT
./$BUILD_SCRIPT --script qt-installer-noninteractive.qs

}

install_module()
{
cd $SCRIPT_DIR
mkdir -p ${MODULE_DIR}

export LIB_NAME
export LIB_VERSION_SHORT
export LIB_VERSION
export INSTALL_DIR
export GCC_VERSION
export GCC_VERSION_SHORT
export MPI_LIB
export MPI_VERSION
envtpl  --keep-template -o $MODULE_PATH module.tmpl
}

if [[ $1 == "module" ]]
then
  install_module
else
  install_lib
#  install_module
fi
+69 −0
Original line number Diff line number Diff line
// Emacs mode hint: -*- mode: JavaScript -*-

function Controller() {
    installer.autoRejectMessageBoxes();
    installer.installationFinished.connect(function() {
        gui.clickButton(buttons.NextButton);
    })
}

Controller.prototype.WelcomePageCallback = function() {
    gui.clickButton(buttons.NextButton);
}

Controller.prototype.CredentialsPageCallback = function() {
    gui.clickButton(buttons.NextButton);
}

Controller.prototype.IntroductionPageCallback = function() {
    gui.clickButton(buttons.NextButton);
}

Controller.prototype.TargetDirectoryPageCallback = function()
{
    gui.currentPageWidget().TargetDirectoryLineEdit.setText(installer.value("RootDir") + "{{ INSTALL_DIR }}");
    gui.clickButton(buttons.NextButton);
}

Controller.prototype.ComponentSelectionPageCallback = function() {
    var widget = gui.currentPageWidget();

    widget.deselectAll();
    widget.selectComponent("qt.{{ LIB_VERSION_VERYSHORT }}.gcc_64");
    widget.selectComponent("qt.{{ LIB_VERSION_VERYSHORT }}.qtquickcontrols");

    // widget.deselectComponent("qt.tools.qtcreator");
    // widget.deselectComponent("qt.55.qt3d");
    // widget.deselectComponent("qt.55.qtcanvas3d");
    // widget.deselectComponent("qt.55.qtlocation");
    // widget.deselectComponent("qt.55.qtquick1");
    // widget.deselectComponent("qt.55.qtscript");
    // widget.deselectComponent("qt.55.qtwebengine");
    // widget.deselectComponent("qt.extras");
    // widget.deselectComponent("qt.tools.doc");
    // widget.deselectComponent("qt.tools.examples");

    gui.clickButton(buttons.NextButton);
}

Controller.prototype.LicenseAgreementPageCallback = function() {
    gui.currentPageWidget().AcceptLicenseRadioButton.setChecked(true);
    gui.clickButton(buttons.NextButton);
}

Controller.prototype.StartMenuDirectoryPageCallback = function() {
    gui.clickButton(buttons.NextButton);
}

Controller.prototype.ReadyForInstallationPageCallback = function()
{
    gui.clickButton(buttons.NextButton);
}

Controller.prototype.FinishedPageCallback = function() {
var checkBoxForm = gui.currentPageWidget().LaunchQtCreatorCheckBoxForm
if (checkBoxForm && checkBoxForm.launchQtCreatorCheckBox) {
    checkBoxForm.launchQtCreatorCheckBox.checked = false;
}
    gui.clickButton(buttons.FinishButton);
}