The project is compiled with success, the problem is when i try copy all dlls to destination path
Would you care to share what the problem is? Exactly what commands are executed? What are the error messages?
IIRC there have been issues with INSTALLS and generated copy commands on Windows. I don't know if there still are, or if any of these apply to you.
and put the icon in .EXE file, like i do with mac final binary.
Nothing in your PRO file even attempts this. You put the application icon into the Windows application using a Windows resource file (RC_FILE) and an icon in Windows ICO format. That information is in the Qt docs.
Here is the offending PRO file for those not willing to clone the git repo:
TEMPLATE = app
CONFIG += console
CONFIG -= qt
SOURCES += main.cpp
###############################################
# CONFIGURATION
###############################################
CONFIG_APP_NAME = sfml-project
macx {
CONFIG_PLATFORM_PATH = mac
CONFIG_ICON_EXTENSION = icns
}
win32 {
CONFIG_PLATFORM_PATH = win32
CONFIG_ICON_EXTENSION = png
}
unix:!macx {
CONFIG_PLATFORM_PATH = unix
CONFIG_ICON_EXTENSION = png
}
ICON = $${PWD}/resources/$${CONFIG_PLATFORM_PATH}/app.$${CONFIG_ICON_EXTENSION}
TARGET = $${CONFIG_APP_NAME}
###############################################
# SFML LIBRARY
###############################################
INCLUDEPATH += "$${PWD}/library/sfml/$${CONFIG_PLATFORM_PATH}/include"
LIBS += -L"$${PWD}/library/sfml/$${CONFIG_PLATFORM_PATH}/lib" \
-lsfml-system \
-lsfml-window \
-lsfml-graphics \
-lsfml-audio \
-lsfml-network
macx {
sfml-library.path = Contents/Frameworks
sfml-library.files = $${PWD}/library/sfml/$${CONFIG_PLATFORM_PATH}/lib/
QMAKE_BUNDLE_DATA += sfml-library
}
win32 {
sfml-library.path = $${DESTDIR}
sfml-library.files = $${PWD}/library/sfml/$${CONFIG_PLATFORM_PATH}/bin/
INSTALLS += sfml-library
#QMAKE_BUNDLE_DATA += sfml-library
#PRE_TARGETDEPS += $${PWD}/library/sfml/$${CONFIG_PLATFORM_PATH}/bin/*
#copyfiles.commands += copy /y $${PWD}\\library\\sfml\\$${CONFIG_PLATFORM_PATH}\\bin\\sfml-system-2.dll debug
#QMAKE_EXTRA_TARGETS += copyfiles
}
unix:!macx {
# need implement
}
TEMPLATE = app
CONFIG += console
CONFIG -= qt
SOURCES += main.cpp
###############################################
# CONFIGURATION
###############################################
CONFIG_APP_NAME = sfml-project
macx {
CONFIG_PLATFORM_PATH = mac
CONFIG_ICON_EXTENSION = icns
}
win32 {
CONFIG_PLATFORM_PATH = win32
CONFIG_ICON_EXTENSION = png
}
unix:!macx {
CONFIG_PLATFORM_PATH = unix
CONFIG_ICON_EXTENSION = png
}
ICON = $${PWD}/resources/$${CONFIG_PLATFORM_PATH}/app.$${CONFIG_ICON_EXTENSION}
TARGET = $${CONFIG_APP_NAME}
###############################################
# SFML LIBRARY
###############################################
INCLUDEPATH += "$${PWD}/library/sfml/$${CONFIG_PLATFORM_PATH}/include"
LIBS += -L"$${PWD}/library/sfml/$${CONFIG_PLATFORM_PATH}/lib" \
-lsfml-system \
-lsfml-window \
-lsfml-graphics \
-lsfml-audio \
-lsfml-network
macx {
sfml-library.path = Contents/Frameworks
sfml-library.files = $${PWD}/library/sfml/$${CONFIG_PLATFORM_PATH}/lib/
QMAKE_BUNDLE_DATA += sfml-library
}
win32 {
sfml-library.path = $${DESTDIR}
sfml-library.files = $${PWD}/library/sfml/$${CONFIG_PLATFORM_PATH}/bin/
INSTALLS += sfml-library
#QMAKE_BUNDLE_DATA += sfml-library
#PRE_TARGETDEPS += $${PWD}/library/sfml/$${CONFIG_PLATFORM_PATH}/bin/*
#copyfiles.commands += copy /y $${PWD}\\library\\sfml\\$${CONFIG_PLATFORM_PATH}\\bin\\sfml-system-2.dll debug
#QMAKE_EXTRA_TARGETS += copyfiles
}
unix:!macx {
# need implement
}
To copy to clipboard, switch view to plain text mode
Bookmarks