Hi @all,
the mentioned approach will work fine using unix/linux. However, what if you want to make the same for Windows?
Of course I could add a similar section for win32. But then the pathes need backslashes \ rather than forwar slashes /
(because of "copy") and if I want to use path-variables, I will have to declare them for unix and win32 separately 
It would be nice, if there would be a possibility to install a (extra) target under a different name, which is not platform dependent ...
Best,
Thorsten
TEMPLATE = app
TARGET =
DEPENDPATH += .
INCLUDEPATH += .
target.path = ../tmp/installpath # will not work for win32
win32: target.path = ..\tmp\installpath # is necessary only due to "copy"
extra_install.path =$$target.path
extra_install.files = renamed.txt
unix {
extra_install.extra = cp test.txt renamed.txt
}
win32 {
extra_install.extra = copy test.txt renamed.txt
}
INSTALLS += target
INSTALLS += extra_install
# Input
SOURCES += main.cpp
OTHER_FILES += test.txt
TEMPLATE = app
TARGET =
DEPENDPATH += .
INCLUDEPATH += .
target.path = ../tmp/installpath # will not work for win32
win32: target.path = ..\tmp\installpath # is necessary only due to "copy"
extra_install.path =$$target.path
extra_install.files = renamed.txt
unix {
extra_install.extra = cp test.txt renamed.txt
}
win32 {
extra_install.extra = copy test.txt renamed.txt
}
INSTALLS += target
INSTALLS += extra_install
# Input
SOURCES += main.cpp
OTHER_FILES += test.txt
To copy to clipboard, switch view to plain text mode
Bookmarks