Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

project file allow installation in another dir than "/usr" #758

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 12 additions & 6 deletions app/app.pro
Original file line number Diff line number Diff line change
Expand Up @@ -16,23 +16,29 @@ macx:ICON = icons/crt.icns
RESOURCES += qml/resources.qrc

#########################################
## INTALLS
## INSTALLS
#########################################

target.path += /usr/bin/
PREFIX = $$(PREFIX) # Pass the make install PREFIX via environment variable. E.g. "PREFIX=/path/to/my/dir qmake".
isEmpty(PREFIX) {
message(No prefix given. Using /usr.)
PREFIX=/usr
}

target.path = $$PREFIX/bin

INSTALLS += target

# Install icons
unix {
icon32.files = icons/32x32/cool-retro-term.png
icon32.path = /usr/share/icons/hicolor/32x32/apps
icon32.path = $$PREFIX/share/icons/hicolor/32x32/apps
icon64.files = icons/64x64/cool-retro-term.png
icon64.path = /usr/share/icons/hicolor/64x64/apps
icon64.path = $$PREFIX/share/icons/hicolor/64x64/apps
icon128.files = icons/128x128/cool-retro-term.png
icon128.path = /usr/share/icons/hicolor/128x128/apps
icon128.path = $$PREFIX/share/icons/hicolor/128x128/apps
icon256.files = icons/256x256/cool-retro-term.png
icon256.path = /usr/share/icons/hicolor/256x256/apps
icon256.path = $$PREFIX/share/icons/hicolor/256x256/apps

INSTALLS += icon32 icon64 icon128 icon256
}
12 changes: 11 additions & 1 deletion cool-retro-term.pro
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,17 @@ CONFIG += ordered
SUBDIRS += qmltermwidget
SUBDIRS += app

#########################################
## INSTALLS
#########################################

PREFIX = $$(PREFIX) # Pass the make install PREFIX via environment variable. E.g. "PREFIX=/path/to/my/dir qmake".
isEmpty(PREFIX) {
message(No prefix given. Using /usr.)
PREFIX=/usr
}

desktop.files += cool-retro-term.desktop
desktop.path += /usr/share/applications
desktop.path += $$PREFIX/share/applications

INSTALLS += desktop