4 # This file is licensed under the terms of the MIT license.
6 # Bundle PulseView and its dependencies as an AppImage for x86_64 Linux
7 # TODO: Change it to use build products and libraries from a more mature
8 # distribution such as Debian oldstable, CentOS 6 or Ubuntu Trusty or older.
15 mkdir -p ./$APP/$APP.AppDir/usr/bin ./$APP/$APP.AppDir/usr/lib
18 wget -q https://github.com/probonopd/AppImages/raw/master/functions.sh -O ./functions.sh
21 ########################################################################
22 # Get build products from Jenkins
23 # FIXME: Do the actual building here instead
24 ########################################################################
26 wget http://sigrok.org/jenkins/job/pulseview/buildtype=shared,compiler=gcc,platform=native-amd64/ws/_inst/bin/*zip*/bin.zip
29 FW=$(wget -q "http://sigrok.org/download/binary/sigrok-firmware-fx2lafw/?C=M;O=D" -O - | grep .tar.gz | head -n 1 | cut -d '"' -f 13 | cut -d ">" -f 2 | cut -d "<" -f 1)
30 wget -c "http://sigrok.org/download/binary/sigrok-firmware-fx2lafw/$FW"
31 tar xf sigrok-firmware-fx2lafw-bin-*.tar.gz
32 rm sigrok-firmware-fx2lafw-bin-*.tar.gz
36 mv ../bin/pulseview usr/bin/
40 wget http://sigrok.org/jenkins/job/libsigrok/buildtype=shared,compiler=gcc,platform=native-amd64/ws/_inst/lib/libsigrok.so.3
41 wget http://sigrok.org/jenkins/job/libsigrok/buildtype=shared,compiler=gcc,platform=native-amd64/ws/_inst/lib/libsigrokcxx.so.3
42 wget http://sigrok.org/jenkins/job/libserialport/buildtype=shared,compiler=gcc,platform=native-amd64/lastSuccessfulBuild/artifact/_inst/lib/libserialport.so.0
45 wget "http://sigrok.org/jenkins/job/libsigrokdecode/buildtype=shared,compiler=gcc,platform=native-amd64/lastSuccessfulBuild/artifact/*zip*/archive.zip"
47 mv archive/_inst/share/libsigrokdecode usr/share/libsigrokdecode
48 mv archive/_inst/lib/libsigrokdecode.so.3 usr/lib/
55 ########################################################################
56 # AppRun is the main launcher that gets executed when AppImage is run
57 ########################################################################
61 ########################################################################
62 # Copy desktop and icon file to AppDir for AppRun to pick them up
63 ########################################################################
65 wget http://sigrok.org/jenkins/job/pulseview/buildtype=shared,compiler=gcc,platform=native-amd64/ws/contrib/pulseview.desktop
66 wget -q "http://sigrok.org/gitweb/?p=pulseview.git;a=blob_plain;f=icons/sigrok-logo-notext.png" -O sigrok-logo-notext.png
68 ########################################################################
69 # Patch away absolute paths; it would be nice if they were relative
70 ########################################################################
72 sed -i -e 's|/home/jenkins_slave/fsroot/workspace/libsigrokdecode/buildtype/shared/compiler/gcc/platform/native-amd64/_inst/share/|.//////////////////////////////////////////////////////////////////////////////////////////////////////////////share/|g' usr/lib/libsigrokdecode.so.3
74 ########################################################################
75 # Copy in the dependencies that cannot be assumed to be available
76 # on all target systems
77 ########################################################################
80 mv ../sigrok-firmware-* usr/share/sigrok-firmware
84 ########################################################################
85 # Delete stuff that should not go into the AppImage
86 ########################################################################
90 mv ./usr/lib/x86_64-linux-gnu/* usr/lib/
91 rm -r ./usr/lib/x86_64-linux-gnu/
93 ########################################################################
94 # Determine the version of the app; also include needed glibc version
95 ########################################################################
97 VER1=$(./AppRun --version | cut -d " " -f 2)
98 GLIBC_NEEDED=$(glibc_needed)
99 VERSION=$VER1.glibc$GLIBC_NEEDED
102 ########################################################################
103 # Patch away absolute paths; it would be nice if they were relative
104 ########################################################################
108 ########################################################################
110 # Now packaging it as an AppImage
111 ########################################################################