Files
jpexs-decompiler/travis/before_install.sh
T
Jindra Petřík 73b5677307 Separating travis scripts to travis directory
Making travis build even if not on repository owner branch
(On pull requests from other users there's no website password secure 
variable available - build without making nightly build)
2016-09-20 20:36:30 +02:00

50 lines
1.9 KiB
Bash

#!/bin/bash
# where nsis-3.0-src.tar.bz2, nsis-3.0-addon.zip, launch4j-3.9-linux.tgz is located on the web
tools_mirror=https://www.free-decompiler.com/flash/travis_tools
# Exit immediately on first error
set -e
sudo apt-get -qq update
sudo apt-get install -y scons
#NSIS needs these
sudo apt-get install -y zlib1g-dev
sudo apt-get install -y lib32ncurses5 lib32z1
#For unpacking unzip :-)
sudo apt-get install -y unzip
# create directory where tools will be downloaded and installed
mkdir $tools_dir
#Download and unpack NSIS sources - Tool for making windows installers
wget -q $tools_mirror/nsis-3.0-src.tar.bz2
bzip2 -d nsis-3.0-src.tar.bz2
tar xvf nsis-3.0-src.tar -C $tools_dir >/dev/null
#Compile NSIS
cd $tools_dir/nsis-3.0-src/
scons UNICODE=yes SKIPSTUBS=all SKIPPLUGINS=all SKIPUTILS=all SKIPMISC=all NSIS_CONFIG_CONST_DATA=no PREFIX=$tools_dir/nsis-3.0-src/ install-compiler >/dev/null
mkdir share
#Make this symbolic link, otherwise it does not work
ln -s $tools_dir/nsis-3.0-src share/nsis
cd -
#Download and extract some binary additional sources which NSIS needs and are part of Windows ZIP file
wget -q $tools_mirror/nsis-3.0-addon.zip
unzip -u nsis-3.0-addon.zip -d $tools_dir/nsis-3.0-src
#Download and extract launch4j - tool for creating EXE file from Java
wget -q $tools_mirror/launch4j-3.9-linux.tgz
tar zxvf launch4j-3.9-linux.tgz -C $tools_dir >/dev/null
#Create tools.properties with paths to NSIS and launch4j
echo "nsis.path = $tools_dir/nsis-3.0-src/bin" > tools.properties
echo "launch4j.path = $tools_dir/launch4j" >> tools.properties
# Travis secure variable $website_password is not available from outside
# of jpexs repository (e.g pull requests from other users on GitHub)
if [ -z ${website_password+x} ]; then
# Store username and password for uploading releases to jpexs server
echo "username=$website_user" > jpexs_website.properties
echo "password=$website_password" >> jpexs_website.properties
fi