From 536e86f9195f76a2585aa5d4022c68dceede721e Mon Sep 17 00:00:00 2001 From: Rasmus Karlsson Date: Tue, 7 May 2019 11:08:50 +0200 Subject: [PATCH] add a reasonable default installation path modifiable in qmake with the PREFIX argument i.e. qmake PREFIX=/usr --- chatterino.pro | 27 ++++++++++++++++++--------- 1 file changed, 18 insertions(+), 9 deletions(-) diff --git a/chatterino.pro b/chatterino.pro index 0cd93cf9..68eff956 100644 --- a/chatterino.pro +++ b/chatterino.pro @@ -1,12 +1,3 @@ -#------------------------------------------------- -# -# Project created by QtCreator 2016-12-28T18:23:35 -# -#------------------------------------------------- - -message(----) - -# define project shit QT += widgets core gui network multimedia svg concurrent CONFIG += communi COMMUNI += core model util @@ -404,3 +395,21 @@ FORMS += #win32 { # DEFINES += NOMINMAX #} + +linux:isEmpty(PREFIX) { + message("Using default installation prefix (/usr/local). Change PREFIX in qmake command") + PREFIX = /usr/local +} + +linux { + desktop.files = resources/chatterino.desktop + desktop.path = $$PREFIX/share/applications + + # TODO: fix icon + # icon.files = resources/icon.png + # icon.path = $$PREFIX/share/icons/hicolor/256x256/chatterino.png + + target.path = $$PREFIX/bin + + INSTALLS += desktop target +}