Skip to content

Commit

Permalink
Merge pull request #14 from chrisandreae/appimage
Browse files Browse the repository at this point in the history
AppImage support
  • Loading branch information
chrisandreae authored May 18, 2018
2 parents b81a8cf + 1c56785 commit f00ef2d
Show file tree
Hide file tree
Showing 13 changed files with 129 additions and 3 deletions.
49 changes: 46 additions & 3 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,9 @@ matrix:
stage: firmware

# GUI client
- script:
- stage: client
os: osx
script:
- brew install qt5 ghc cabal-install
- cabal update
- export QT5=/usr/local/opt/qt5
Expand All @@ -40,8 +42,49 @@ matrix:
- make
- $QT5/bin/macdeployqt KeyboardClient.app -dmg
- mv KeyboardClient.dmg $out/
stage: client
os: osx

- stage: client
os: linux
dist: trusty
language: cpp
compiler: gcc
sudo: require

before_install:
- sudo add-apt-repository ppa:beineri/opt-qt593-trusty -y
- sudo add-apt-repository ppa:hvr/ghc -y
# sudo add-apt-repository ppa:jonathonf/ghc-8.0.2
- sudo apt-get update -qq

install:
- sudo apt-get -y install qt59base libusb-1.0-0-dev ghc-8.0.2 cabal-install-1.24 # ghc cabal-install
- source /opt/qt*/bin/qt*-env.sh
- export PATH="$PATH:/opt/cabal/bin:/opt/ghc/bin"
- cabal update

script:
# Haskell compiler
- cd $BUILD_ROOT/compiler
- cabal install --only-dependencies
- cabal configure
- cabal build

# Qt client
- cd $BUILD_ROOT/qtclient
- GHC=/opt/ghc/8.0.2 ./integrate-compiler.sh > compiler.pri

- qmake USE_COMPILER=1 CONFIG+=release PREFIX=/usr
- make -j$(nproc)
- make INSTALL_ROOT=appdir -j$(nproc) install

- wget -c -nv "https://github.com/probonopd/linuxdeployqt/releases/download/continuous/linuxdeployqt-continuous-x86_64.AppImage"
- chmod a+x linuxdeployqt-continuous-x86_64.AppImage
- unset QTDIR; unset QT_PLUGIN_PATH ; unset LD_LIBRARY_PATH
- export VERSION=$(git rev-parse --short HEAD) # linuxdeployqt uses this for naming the file
- ./linuxdeployqt-continuous-x86_64.AppImage appdir/usr/share/applications/*.desktop -bundle-non-qt-libs -no-translations -appimage

- mv KeyboardClient*.AppImage $out/


before_script:
- export BUILD_ROOT=$PWD
Expand Down
4 changes: 4 additions & 0 deletions qtclient/.gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
Makefile
moc_*.cpp
qrc_*.cpp
compiler.pri
appdir
KeyboardClient
KeyboardClient*.AppImage
7 changes: 7 additions & 0 deletions qtclient/KeyboardClient.desktop
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
[Desktop Entry]
Type=Application
Name=KeyboardClient
Comment=Keyboard Settings Client
Exec=KeyboardClient
Icon=KeyboardClient
Categories=Utility;
Binary file added qtclient/icon/1024x1024/KeyboardClient.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added qtclient/icon/128x128/KeyboardClient.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added qtclient/icon/16x16/KeyboardClient.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added qtclient/icon/256x256/KeyboardClient.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added qtclient/icon/32x32/KeyboardClient.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added qtclient/icon/512x512/KeyboardClient.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added qtclient/icon/64x64/KeyboardClient.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added qtclient/icon/KeyboardClient.icns
Binary file not shown.
60 changes: 60 additions & 0 deletions qtclient/icon/scalable/KeyboardClient.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
12 changes: 12 additions & 0 deletions qtclient/qtclient.pro
Original file line number Diff line number Diff line change
Expand Up @@ -82,11 +82,23 @@ mac {
QT_CONFIG -= no-pkg-config
CONFIG += link_pkgconfig
PKGCONFIG += libusb-1.0
ICON = icon/KeyboardClient.icns
}

linux-* {
CONFIG += link_pkgconfig
PKGCONFIG += libusb-1.0

target.path = /usr/bin/
INSTALLS += target

desktop.path = /usr/share/applications
desktop.files = KeyboardClient.desktop
INSTALLS += desktop

icons.path = /usr/share/icons/hicolor/scalable/apps
icons.files = icon/scalable/KeyboardClient.svg
INSTALLS += icons
}

freebsd-* {
Expand Down

0 comments on commit f00ef2d

Please sign in to comment.