I wish to use "make install" to export files from my built project to an external directory. Inserting INSTALLS to my pro file, target.path works flawlessly, my application executable file is copied there. However inserting my translations rules generates error.
...
INSTALLDIR_WIN32 = ../installer/win32_test
TS_DIR = ../translations
...
win32 {
translations.files = $$TS_DIR/*.qm
translations.path = $${INSTALLDIR_WIN32}/translations
INSTALLS += translations
}
...
...
cp d:\Users\Brazso\work\qmp3gain\translations\qmp3gai n_hu.qm d:/Users/Brazso/work/qmp3gain/src/../installer/win32_test/translations/
cp: cannot create regular file `d:/Users/Brazso/work/qmp3gain/src/../installer/win32_test/translations/d:\\Users\\Brazso\\work\\qmp3gain\\translations\\q mp3gain_hu.qm': No such file or directory
make[2]: [install_translations] Error 1 (ignored)
cp "../bin/qmp3gain.exe" "d:/Users/Brazso/work/qmp3gain/installer/win32_test/qmp3gain.exe"
...
Of course the generated Makefile already contains the backslashes:
...
install_translations: first FORCE
@$(CHK_DIR_EXISTS) d:$(INSTALL_ROOT)/Users/Brazso/work/qmp3gain/src/../installer/win32_test/translations/ || $(MKDIR) d:$(INSTALL_ROOT)/Users/Brazso/work/qmp3gain/src/../installer/win32_test/translations/
-$(INSTALL_FILE) d:\Users\Brazso\work\qmp3gain\translations\qmp3gai n_hu.qm d:$(INSTALL_ROOT)/Users/Brazso/work/qmp3gain/src/../installer/win32_test/translations/
...
I use mingw32(-make) and its cp (copy) command expects slashes in file names, but unfortunately the first (source) parameter contains a filename with backslashes. This first parameter comes from the translations.files setting. It's strange the translations.path appears in unix style but translations.files appears in windows.
How can I use own INSTALLS rules with mingw32?
Bookmarks