~fboucault/ubuntu-calendar-app/snappy-launch

« back to all changes in this revision

Viewing changes to ubuntu-calendar-app.wrapper

  • Committer: Florian Boucault
  • Date: 2016-09-29 14:38:08 UTC
  • Revision ID: florian.boucault@canonical.com-20160929143808-066bkbunan9r8y3f
Simplified snap wrapper

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
#!/bin/bash
2
 
if [ "$SNAP_ARCH" == "amd64" ]; then
3
 
        ARCH="x86_64-linux-gnu"
4
 
elif [ "$SNAP_ARCH" == "armhf" ]; then
5
 
        ARCH="arm-linux-gnueabihf"
 
1
#!/bin/sh
 
2
 
 
3
if [ "$SNAP_ARCH" = "amd64" ]; then
 
4
  ARCH="x86_64-linux-gnu"
 
5
elif [ "$SNAP_ARCH" = "armhf" ]; then
 
6
  ARCH="arm-linux-gnueabihf"
6
7
else
7
 
        ARCH="$SNAP_ARCH-linux-gnu"
 
8
  ARCH="$SNAP_ARCH-linux-gnu"
8
9
fi
9
 
export LD_LIBRARY_PATH=$SNAP/usr/lib/$ARCH:$LD_LIBRARY_PATH
10
 
 
11
 
# XKB config
12
 
export XKB_CONFIG_ROOT=$SNAP/usr/share/X11/xkb
13
 
 
14
 
# Qt Platform to Mir
 
10
 
15
11
export QTCHOOSER_NO_GLOBAL_DIR=1
16
12
export QT_SELECT=snappy-qt5
17
13
 
18
 
if [ "QT_QPA_PLATFORM" == "ubuntumirclient" ]; then
19
 
        # Mir runtime
20
 
        export MIR_SOCKET=$XDG_RUNTIME_DIR/mir_socket
21
 
        export MIR_CLIENT_PLATFORM_PATH=$SNAP/usr/lib/$ARCH/mir/client-platform
22
 
fi
23
 
 
24
14
# Qt Libs
25
15
export LD_LIBRARY_PATH=$SNAP/usr/lib/$ARCH/qt5/libs:$LD_LIBRARY_PATH
26
 
export LD_LIBRARY_PATH=$SNAP/usr/lib/$ARCH/pulseaudio:$LD_LIBRARY_PATH
27
16
 
28
17
# Qt Modules
29
18
export QT_PLUGIN_PATH=$SNAP/usr/lib/$ARCH/qt5/plugins
33
22
# Necessary for the SDK to find the translations directory
34
23
export APP_DIR=$SNAP
35
24
 
36
 
# Mesa Libs
37
 
export LD_LIBRARY_PATH=$SNAP/usr/lib/$ARCH/mesa:$LD_LIBRARY_PATH
38
 
export LD_LIBRARY_PATH=$SNAP/usr/lib/$ARCH/mesa-egl:$LD_LIBRARY_PATH
39
 
 
40
 
# Tell libGL where to find the drivers
41
 
export LIBGL_DRIVERS_PATH=$SNAP/usr/lib/$ARCH/dri
42
 
# ensure the snappy gl libs win
43
 
export LD_LIBRARY_PATH="$SNAP_LIBRARY_PATH:$LD_LIBRARY_PATH"
44
 
 
45
 
cd $SNAP
46
 
exec $SNAP/usr/lib/$ARCH/qt5/bin/qmlscene "$@" $SNAP/usr/share/calendar-app/calendar.qml
 
25
exec "$SNAP/bin/desktop-launch" "$SNAP/usr/lib/$ARCH/qt5/bin/qmlscene" --desktop_file_hint=unity8 "$@" $SNAP/usr/share/calendar-app/calendar.qml
47
26