@@ -1,31 +1,31 | |||||
1 | #!/bin/bash |
|
1 | #!/bin/bash | |
2 | # guess using centos 7 as build host |
|
2 | # guess using centos 7 as build host | |
3 | yum install -y gtk3 openssl-devel.x86_64 ncurses-devel.x86_64 sqlite-devel.x86_64 tkinter.x86_64 readline-devel.x86_64 xz-devel.x86_64 gdbm-devel.x86_64 bzip2-devel.x86_64 tk-devel.x86_64 libffi-devel.x86_64 make |
|
3 | yum install -y gtk3 openssl-devel.x86_64 ncurses-devel.x86_64 sqlite-devel.x86_64 tkinter.x86_64 readline-devel.x86_64 xz-devel.x86_64 gdbm-devel.x86_64 bzip2-devel.x86_64 tk-devel.x86_64 libffi-devel.x86_64 make | |
4 | HERE="$(dirname "$(readlink -f "${0}")")" |
|
4 | HERE="$(dirname "$(readlink -f "${0}")")" | |
5 | SCIQLOP_SCR=$HERE/../../ |
|
5 | SCIQLOP_SCR=$HERE/../../ | |
6 | SCIQLOP_BUILD=$SCIQLOP_SCR/build/ |
|
6 | SCIQLOP_BUILD=$SCIQLOP_SCR/build/ | |
7 | SCIQLOP_APPDIR=$SCIQLOP_BUILD/AppDir |
|
7 | SCIQLOP_APPDIR=$SCIQLOP_BUILD/AppDir | |
8 | mkdir $SCIQLOP_BUILD |
|
8 | mkdir $SCIQLOP_BUILD | |
9 | cd $SCIQLOP_BUILD |
|
9 | cd $SCIQLOP_BUILD | |
10 | # need to build python to easily install/relocate in AppImage |
|
10 | # need to build python to easily install/relocate in AppImage | |
11 | wget https://www.python.org/ftp/python/3.7.3/Python-3.7.3.tgz |
|
11 | wget https://www.python.org/ftp/python/3.7.3/Python-3.7.3.tgz | |
12 | tar -xf Python-3.7.3.tgz |
|
12 | tar -xf Python-3.7.3.tgz | |
13 | cd Python-3.7.3 |
|
13 | cd Python-3.7.3 | |
14 | # Optimisation is damn slow maybe enabled later |
|
14 | # Optimisation is damn slow maybe enabled later | |
15 | ./configure --enable-shared --prefix=/usr |
|
15 | ./configure --enable-shared --prefix=/usr | |
16 | make -j |
|
16 | make -j | |
17 | DESTDIR=$SCIQLOP_BUILD/AppDir make install |
|
17 | DESTDIR=$SCIQLOP_BUILD/AppDir make install | |
18 | cd .. |
|
18 | cd .. | |
19 | cp $HERE/AppRun $SCIQLOP_APPDIR/ |
|
19 | cp $HERE/AppRun $SCIQLOP_APPDIR/ | |
20 | chmod +x $SCIQLOP_APPDIR/AppRun |
|
20 | chmod +x $SCIQLOP_APPDIR/AppRun | |
21 | # Tweak to find custom python from build dir |
|
21 | # Tweak to find custom python from build dir | |
22 | sed "s|/usr|$SCIQLOP_APPDIR/usr|" -i $SCIQLOP_APPDIR/usr/lib/pkgconfig/python3.pc |
|
22 | sed "s|/usr|$SCIQLOP_APPDIR/usr|" -i $SCIQLOP_APPDIR/usr/lib/pkgconfig/python3.pc | |
23 | LD_PRELOAD=$SCIQLOP_APPDIR/usr/lib/libpython3.7m.so.1.0 PATH=$SCIQLOP_APPDIR/usr/bin/:/usr/bin/ LD_LIBRARY_PATH=AppDir/usr/lib/:AppDir/usr/lib/python3.7/ $SCIQLOP_APPDIR/usr/bin/python3 $SCIQLOP_APPDIR/usr/bin/pip3 install git+https://github.com/jeandet/spwc |
|
23 | LD_PRELOAD=$SCIQLOP_APPDIR/usr/lib/libpython3.7m.so.1.0 PATH=$SCIQLOP_APPDIR/usr/bin/:/usr/bin/ LD_LIBRARY_PATH=AppDir/usr/lib/:AppDir/usr/lib/python3.7/ $SCIQLOP_APPDIR/usr/bin/python3 $SCIQLOP_APPDIR/usr/bin/pip3 install git+https://github.com/jeandet/spwc | |
24 | LD_LIBRARY_PATH=$SCIQLOP_APPDIR/usr/lib/ PKG_CONFIG_PATH=$SCIQLOP_APPDIR/usr/lib/pkgconfig/:$PKG_CONFIG_PATH PATH=$SCIQLOP_APPDIR/usr/bin/:$PATH meson --prefix=/usr .. |
|
24 | LD_LIBRARY_PATH=$SCIQLOP_APPDIR/usr/lib/ PKG_CONFIG_PATH=$SCIQLOP_APPDIR/usr/lib/pkgconfig/:$PKG_CONFIG_PATH PATH=$SCIQLOP_APPDIR/usr/bin/:$PATH meson --prefix=/usr .. | |
25 | ninja |
|
25 | ninja | |
26 |
DESTDIR= |
|
26 | DESTDIR=$SCIQLOP_APPDIR ninja install | |
27 | cp -rf $SCIQLOP_APPDIR/usr/lib64/* $SCIQLOP_APPDIR/usr/lib/ |
|
27 | cp -rf $SCIQLOP_APPDIR/usr/lib64/* $SCIQLOP_APPDIR/usr/lib/ | |
28 | rm -rf $SCIQLOP_APPDIR/usr/lib64/ |
|
28 | rm -rf $SCIQLOP_APPDIR/usr/lib64/ | |
29 | wget https://github.com/probonopd/linuxdeployqt/releases/download/continuous/linuxdeployqt-continuous-x86_64.AppImage |
|
29 | wget https://github.com/probonopd/linuxdeployqt/releases/download/continuous/linuxdeployqt-continuous-x86_64.AppImage | |
30 | chmod +x linuxdeployqt-continuous-x86_64.AppImage && ./linuxdeployqt-continuous-x86_64.AppImage --appimage-extract |
|
30 | chmod +x linuxdeployqt-continuous-x86_64.AppImage && ./linuxdeployqt-continuous-x86_64.AppImage --appimage-extract | |
31 | LD_LIBRARY_PATH=$SCIQLOP_APPDIR/usr/lib:$SCIQLOP_APPDIR/usr/lib/SciQLop/:$SCIQLOP_APPDIR/usr/lib/python3.7/site-packages/numpy/.libs/ ./squashfs-root/AppRun $SCIQLOP_APPDIR/usr/share/applications/*.desktop -appimage -extra-plugins=iconengines,platformthemes/libqgtk3.so |
|
31 | LD_LIBRARY_PATH=$SCIQLOP_APPDIR/usr/lib:$SCIQLOP_APPDIR/usr/lib/SciQLop/:$SCIQLOP_APPDIR/usr/lib/python3.7/site-packages/numpy/.libs/ ./squashfs-root/AppRun $SCIQLOP_APPDIR/usr/share/applications/*.desktop -appimage -extra-plugins=iconengines,platformthemes/libqgtk3.so |
General Comments 0
You need to be logged in to leave comments.
Login now