Skip to content

Commit

Permalink
qmake: support make install
Browse files Browse the repository at this point in the history
  • Loading branch information
eszlari committed May 8, 2020
1 parent 47a8e01 commit 1e0842a
Show file tree
Hide file tree
Showing 10 changed files with 28 additions and 4 deletions.
7 changes: 4 additions & 3 deletions .travis_linux_script.sh
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
INSTALL_PREFIX=$PWD/build/AppDir/usr

cd build
wget https://github.com/probonopd/linuxdeployqt/releases/download/6/linuxdeployqt-6-x86_64.AppImage
chmod +x linuxdeployqt-6-x86_64.AppImage
Expand All @@ -18,16 +20,15 @@ LATEST_COMMIT_DATE=\"$(git log -1 --format=%ai)\"
echo "#ifndef LATEST_COMMIT_DATE" >> $enveSplash
echo "#define LATEST_COMMIT_DATE $LATEST_COMMIT_DATE" >> $enveSplash
echo "#endif" >> $enveSplash
qmake CONFIG+=build_examples ../../enve.pro
qmake PREFIX=$INSTALL_PREFIX CONFIG+=build_examples ../../enve.pro
make -j 2 CC=gcc-7 CPP=g++-7 CXX=g++-7 LD=g++-7
make install
cd ..

# Generate AppImage
cp AppRun AppDir/
cp exec.so AppDir/usr/optional
mkdir AppDir/usr/optional/libstdc++
cp /usr/lib/x86_64-linux-gnu/libstdc++.so.6 AppDir/usr/optional/libstdc++/
cp Release/src/app/enve AppDir/usr/bin/
cp -av Release/src/core/*.so* AppDir/usr/lib/
cp -av ../third_party/gperftools/.libs/libtcmalloc.so* AppDir/usr/lib/
./linuxdeployqt-6-x86_64.AppImage AppDir/usr/share/applications/enve.desktop -appimage
File renamed without changes.
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
23 changes: 23 additions & 0 deletions src/app/app.pro
Original file line number Diff line number Diff line change
Expand Up @@ -393,3 +393,26 @@ macx {
# Use -appstore-compliant flag to workaround the inclusion of OBDC and PostgreSQL plugins.
CONFIG(release, debug|release): QMAKE_POST_LINK += && macdeployqt $$MAC_APP_FOLDER -appstore-compliant -dmg
}

unix:!macx {
target.path = $$PREFIX/bin

metainfo.files = XDGData/io.github.maurycyliebner.enve.metainfo.xml
metainfo.path = $$PREFIX/share/metainfo

desktop.files = XDGData/enve.desktop
desktop.path = $$PREFIX/share/applications

icon16.files = XDGData/icons/16x16/enve.png
icon16.path = $$PREFIX/share/icons/hicolor/16x16/apps
icon32.files = XDGData/icons/32x32/enve.png
icon32.path = $$PREFIX/share/icons/hicolor/32x32/apps
icon48.files = XDGData/icons/48x48/enve.png
icon48.path = $$PREFIX/share/icons/hicolor/48x48/apps
icon256.files = XDGData/icons/256x256/enve.png
icon256.path = $$PREFIX/share/icons/hicolor/256x256/apps
iconsvg.files = XDGData/icons/scalable/enve.svg
iconsvg.path = $$PREFIX/share/icons/hicolor/scalable/apps

INSTALLS += target metainfo desktop icon16 icon32 icon48 icon256 iconsvg
}
2 changes: 1 addition & 1 deletion src/core/core.pro
Original file line number Diff line number Diff line change
Expand Up @@ -688,7 +688,7 @@ HEADERS += \
zipfilesaver.h

unix {
target.path = /usr/lib
target.path = $$PREFIX/lib
INSTALLS += target
}

Expand Down

0 comments on commit 1e0842a

Please sign in to comment.