From 188a8ae4f56a55091267788d8726307dfb05ecd5 Mon Sep 17 00:00:00 2001 From: Christophe Dumez Date: Wed, 23 Mar 2011 17:02:26 +0000 Subject: [PATCH] Add MinGW-specific project file (sledgehammer999) --- src/qbittorrent.exe.manifest | 8 ++++++++ src/qbittorrent_mingw.rc | 3 +++ src/src.pro | 4 +++- winconf-mingw.pri | 21 +++++++++++++++++++++ winconf-msvc.pri | 18 ++++++++++++++++++ winconf.pri | 34 ++++++++++++++++------------------ 6 files changed, 69 insertions(+), 19 deletions(-) create mode 100644 src/qbittorrent.exe.manifest create mode 100644 src/qbittorrent_mingw.rc create mode 100644 winconf-mingw.pri create mode 100644 winconf-msvc.pri diff --git a/src/qbittorrent.exe.manifest b/src/qbittorrent.exe.manifest new file mode 100644 index 000000000..2f99a7ec8 --- /dev/null +++ b/src/qbittorrent.exe.manifest @@ -0,0 +1,8 @@ + + + + + + + + \ No newline at end of file diff --git a/src/qbittorrent_mingw.rc b/src/qbittorrent_mingw.rc new file mode 100644 index 000000000..3bae01916 --- /dev/null +++ b/src/qbittorrent_mingw.rc @@ -0,0 +1,3 @@ +IDI_ICON1 ICON DISCARDABLE "qbittorrent.ico" +IDI_ICON2 ICON DISCARDABLE "qbittorrent_file.ico" +1 24 DISCARDABLE "qbittorrent.exe.manifest" diff --git a/src/src.pro b/src/src.pro index 052e66867..ec425c003 100644 --- a/src/src.pro +++ b/src/src.pro @@ -4,7 +4,7 @@ CONFIG += qt thread # Windows specific configuration win32 { - include(../winconf.pri) + include(../winconf.pri) } # Mac specific configuration @@ -176,6 +176,8 @@ DESTDIR = . # OS specific config OTHER_FILES += ../winconf.pri ../macxconf.pri ../unixconf.pri ../os2conf.pri +# compiler specific config +OTHER_FILES += ../winconf-mingw.pri ../winconf-msvc.pri # version file OTHER_FILES += ../version.pri diff --git a/winconf-mingw.pri b/winconf-mingw.pri new file mode 100644 index 000000000..34c032eed --- /dev/null +++ b/winconf-mingw.pri @@ -0,0 +1,21 @@ +RC_FILE = qbittorrent_mingw.rc + +# Enable Wide characters +DEFINES += TORRENT_USE_WPATH + +#Adapt the lib names/versions accordingly +CONFIG(debug, debug|release) { + LIBS += libtorrent \ + libboost_system-mgw45-mt-d-1_46_1 \ + libboost_filesystem-mgw45-mt-d-1_46_1 \ + libboost_thread-mgw45-mt-d-1_46_1 +} else { + LIBS += libtorrent \ + libboost_system-mgw45-mt-1_46_1 \ + libboost_filesystem-mgw45-mt-1_46_1 \ + libboost_thread-mgw45-mt-1_46_1 +} + +LIBS += libadvapi32 libshell32 +LIBS += libcrypto.dll libssl.dll libwsock32 libws2_32 libz libiconv.dll +LIBS += libpowrprof diff --git a/winconf-msvc.pri b/winconf-msvc.pri new file mode 100644 index 000000000..1fc0c7ae0 --- /dev/null +++ b/winconf-msvc.pri @@ -0,0 +1,18 @@ +RC_FILE = qbittorrent.rc + +#Adapt the lib names/versions accordingly +CONFIG(debug, debug|release) { + LIBS += libtorrentd.lib \ + libboost_system-vc90-mt-gd.lib \ + libboost_filesystem-vc90-mt-gd.lib \ + libboost_thread-vc90-mt-gd.lib +} else { + LIBS += libtorrent.lib \ + libboost_system-vc90-mt.lib \ + libboost_filesystem-vc90-mt.lib \ + libboost_thread-vc90-mt.lib +} + +LIBS += advapi32.lib shell32.lib +LIBS += libeay32MD.lib ssleay32MD.lib +LIBS += PowrProf.lib diff --git a/winconf.pri b/winconf.pri index b87de692f..dfbb87249 100644 --- a/winconf.pri +++ b/winconf.pri @@ -1,11 +1,20 @@ # Adapt these paths on Windows + +#Point this to the boost include folder INCLUDEPATH += $$quote(C:/qBittorrent/boost_1_46_0) +#Point this to the libtorrent include folser INCLUDEPATH += $$quote(C:/qBittorrent/RC_0_15/include) +#Point this to the zlib include folder(libtorrent's if you used that) INCLUDEPATH += $$quote(C:/qBittorrent/RC_0_15/zlib) +#Point this to the openssl include folder INCLUDEPATH += $$quote(C:/OpenSSL/include) +#Point this to the openssl lib folder LIBS += $$quote(-LC:/OpenSSL/lib/VC) -LIBS += $$quote(-LC:/qBittorrent/libs) +#Point this to the libtorrent lib folder +LIBS += $$quote(-LC:/qBittorrent/RC_0_15/bin/) +#Point this to the boost lib folder +LIBS += $$quote(-LC:/qBittorrent/boost_1_46_0/stage/lib) # LIBTORRENT DEFINES DEFINES += BOOST_ALL_NO_LIB @@ -24,9 +33,9 @@ DEFINES += _SCL_SECURE_NO_DEPRECATE DEFINES += _UNICODE DEFINES += _WIN32 DEFINES += _WIN32_WINNT=0x0500 +DEFINES += _WIN32_IE=0x0500 DEFINES += __USE_W32_SOCKETS DEFINES += WITH_SHIPPED_GEOIP_H -DEFINES += TORRENT_USE_WPATH CONFIG(debug, debug|release) { DEFINES += TORRENT_DEBUG @@ -34,23 +43,12 @@ CONFIG(debug, debug|release) { DEFINES += NDEBUG } -RC_FILE = qbittorrent.rc - -CONFIG(debug, debug|release) { - LIBS += libtorrentd.lib \ - libboost_system-vc90-mt-gd.lib \ - libboost_filesystem-vc90-mt-gd.lib \ - libboost_thread-vc90-mt-gd.lib -} else { - LIBS += libtorrent.lib \ - libboost_system-vc90-mt.lib \ - libboost_filesystem-vc90-mt.lib \ - libboost_thread-vc90-mt.lib +win32-g++ { + include(winconf-mingw.pri) +} +else { + include(winconf-msvc.pri) } - -LIBS += advapi32.lib shell32.lib -LIBS += libeay32MD.lib ssleay32MD.lib -LIBS += PowrProf.lib DEFINES += WITH_GEOIP_EMBEDDED message("On Windows, GeoIP database must be embedded.")