Alwayse deploy QM files to test directory.

--HG--
branch : develop
This commit is contained in:
Roman Telezhynskyi 2015-10-21 12:35:52 +03:00
parent 69f65cf4e7
commit a7f656a412
2 changed files with 27 additions and 3 deletions

View File

@ -64,6 +64,31 @@ defineTest(copyToDestdir) {
message("----------------------------------------------end---------------------------------------------------")
}
# Alwayse copies the given files to the destination directory
defineTest(forceCopyToDestdir) {
files = $$1
DDIR = $$2
mkpath($$DDIR)
message("----------------------------------------------begin------------------------------------------------")
message("Copy to" $$DDIR "after link")
for(FILE, files) {
# Replace slashes in paths with backslashes for Windows
win32{
FILE ~= s,/,\\,g
DDIR ~= s,/,\\,g
}
QMAKE_POST_LINK += $$QMAKE_COPY $$quote($$FILE) $$quote($$DDIR) $$escape_expand(\\n\\t)
message("Command:" $$QMAKE_COPY $$quote($$FILE) $$quote($$DDIR))
QMAKE_CLEAN += $$DDIR/$$basename(FILE)
}
export(QMAKE_POST_LINK)
export(QMAKE_CLEAN)
message("----------------------------------------------end---------------------------------------------------")
}
# We use precompiled headers for more fast compilation source code.
defineReplace(set_PCH){
macx:clang*{

View File

@ -2034,12 +2034,11 @@ for(_translation_name, INSTALL_TRANSLATIONS) {
system($$shell_path($$[QT_INSTALL_BINS]/$$LRELEASE) $$shell_path($${PWD}/$${TRANSLATIONS_PATH}/$$_translation_name_ts) -qm $$shell_path($${PWD}/$$_translation_name))
unix {
exists($${OUT_PWD}/$$DESTDIR/valentina) {
system(rm -fv $${OUT_PWD}/$$DESTDIR/valentina)
system(rm -fv $${OUT_PWD}/$$DESTDIR/valentina) # force to call linking
}
system(rm -fv $${OUT_PWD}/$$DESTDIR/translations/*.qm)
}
}
QMAKE_CLEAN += $${PWD}/$$_translation_name
}
for(DIR, INSTALL_TRANSLATIONS) {
@ -2050,7 +2049,7 @@ for(DIR, INSTALL_TRANSLATIONS) {
}
# Make possible run program even you do not install it. Seek files in local directory.
copyToDestdir($$tr_path, $$shell_path($${OUT_PWD}/$$DESTDIR/translations))
forceCopyToDestdir($$tr_path, $$shell_path($${OUT_PWD}/$$DESTDIR/translations))
for(DIR, INSTALL_STANDARD_MEASHUREMENTS) {
#add these absolute paths to a variable which