diff --git a/configure b/configure index 6e313f866..f726cf4bc 100755 --- a/configure +++ b/configure @@ -338,7 +338,7 @@ public: bool exec() { if(!conf->getenv("QC_DISABLE_GUI").isEmpty()) { - conf->addDefine("DISABLE_GUI"); + conf->addExtra("CONFIG += nox"); } return(QT_VERSION >= 0x040500); } diff --git a/macxconf.pri b/macxconf.pri new file mode 100644 index 000000000..68c69c32f --- /dev/null +++ b/macxconf.pri @@ -0,0 +1,16 @@ +PREFIX = /usr/local +BINDIR = /usr/local/bin +DATADIR = /usr/local/share + +INCLUDEPATH += /usr/local/include/libtorrent /usr/include/openssl /usr/include /opt/local/include/boost /opt/local/include +LIBS += -ltorrent-rasterbar -lcrypto -L/opt/local/lib -lboost_system-mt -lboost_filesystem-mt -lboost_thread-mt -framework Cocoa -framework Carbon + +document_icon.path = Contents/Resources +document_icon.files = Icons/qBitTorrentDocument.icns + +QMAKE_BUNDLE_DATA += document_icon +ICON = Icons/qbittorrent_mac.icns +QMAKE_INFO_PLIST = Info.plist + +DEFINES += WITH_GEOIP_EMBEDDED +message("On Mac OS X, GeoIP database must be embedded.") diff --git a/os2conf.pri b/os2conf.pri new file mode 100644 index 000000000..a282a63c1 --- /dev/null +++ b/os2conf.pri @@ -0,0 +1,10 @@ +LIBS += -ltorrent-rasterbar \ + -lboost_thread \ + -lboost_system \ + -lboost_filesystem \ + -lssl -lcrypto -lidn -lpthread + +RC_FILE = qbittorrent_os2.rc + +DEFINES += WITH_GEOIP_EMBEDDED +message("On eCS(OS/2), GeoIP database must be embedded.") diff --git a/qcm/qt4.qcm b/qcm/qt4.qcm index 5cff0af06..d7b4d228d 100644 --- a/qcm/qt4.qcm +++ b/qcm/qt4.qcm @@ -13,7 +13,7 @@ public: bool exec() { if(!conf->getenv("QC_DISABLE_GUI").isEmpty()) { - conf->addDefine("DISABLE_GUI"); + conf->addExtra("CONFIG += nox"); } return(QT_VERSION >= 0x040500); } diff --git a/src/ui/about.ui b/src/about.ui similarity index 100% rename from src/ui/about.ui rename to src/about.ui diff --git a/src/ui/bandwidth_limit.ui b/src/bandwidth_limit.ui similarity index 100% rename from src/ui/bandwidth_limit.ui rename to src/bandwidth_limit.ui diff --git a/src/ui/confirmdeletiondlg.ui b/src/confirmdeletiondlg.ui similarity index 100% rename from src/ui/confirmdeletiondlg.ui rename to src/confirmdeletiondlg.ui diff --git a/src/ui/console.ui b/src/console.ui similarity index 100% rename from src/ui/console.ui rename to src/console.ui diff --git a/src/ui/downloadfromurldlg.ui b/src/downloadfromurldlg.ui similarity index 100% rename from src/ui/downloadfromurldlg.ui rename to src/downloadfromurldlg.ui diff --git a/src/geoip.qrc b/src/geoip.qrc deleted file mode 100644 index ecd5ebef5..000000000 --- a/src/geoip.qrc +++ /dev/null @@ -1,5 +0,0 @@ - - - geoip/GeoIP.dat - - diff --git a/src/geoip/geoip.pri b/src/geoip/geoip.pri new file mode 100644 index 000000000..96395a929 --- /dev/null +++ b/src/geoip/geoip.pri @@ -0,0 +1,19 @@ +INCLUDEPATH += $$PWD + +HEADERS += $$PWD/geoipmanager.h + +SOURCES += $$PWD/geoipmanager.cpp + +# Add GeoIP resource file if the GeoIP database +# should be embedded in qBittorrent executable +contains(DEFINES, WITH_GEOIP_EMBEDDED) { + exists("geoip/GeoIP.dat") { + message("GeoIP.dat was found in src/geoip/.") + RESOURCES += $$PWD/geoip.qrc + } else { + DEFINES -= WITH_GEOIP_EMBEDDED + error("GeoIP.dat was not found in src/geoip/ folder, please follow instructions in src/geoip/README.") + } +} else { + message("GeoIP database will not be embedded in qBittorrent executable.") +} diff --git a/src/geoip/geoip.qrc b/src/geoip/geoip.qrc new file mode 100644 index 000000000..5764e34f5 --- /dev/null +++ b/src/geoip/geoip.qrc @@ -0,0 +1,5 @@ + + + GeoIP.dat + + diff --git a/src/geoipmanager.cpp b/src/geoip/geoipmanager.cpp similarity index 100% rename from src/geoipmanager.cpp rename to src/geoip/geoipmanager.cpp diff --git a/src/geoipmanager.h b/src/geoip/geoipmanager.h similarity index 100% rename from src/geoipmanager.h rename to src/geoip/geoipmanager.h diff --git a/src/ui/login.ui b/src/login.ui similarity index 100% rename from src/ui/login.ui rename to src/login.ui diff --git a/src/ui/mainwindow.ui b/src/mainwindow.ui similarity index 100% rename from src/ui/mainwindow.ui rename to src/mainwindow.ui diff --git a/src/advancedsettings.h b/src/preferences/advancedsettings.h similarity index 100% rename from src/advancedsettings.h rename to src/preferences/advancedsettings.h diff --git a/src/ui/options.ui b/src/preferences/options.ui similarity index 100% rename from src/ui/options.ui rename to src/preferences/options.ui diff --git a/src/options_imp.cpp b/src/preferences/options_imp.cpp similarity index 100% rename from src/options_imp.cpp rename to src/preferences/options_imp.cpp diff --git a/src/options_imp.h b/src/preferences/options_imp.h similarity index 100% rename from src/options_imp.h rename to src/preferences/options_imp.h diff --git a/src/preferences.h b/src/preferences/preferences.h similarity index 100% rename from src/preferences.h rename to src/preferences/preferences.h diff --git a/src/preferences/preferences.pri b/src/preferences/preferences.pri new file mode 100644 index 000000000..0c4d80335 --- /dev/null +++ b/src/preferences/preferences.pri @@ -0,0 +1,13 @@ +INCLUDEPATH += $$PWD + +!contains(DEFINES, DISABLE_GUI) { + + HEADERS += $$PWD/options_imp.h \ + $$PWD/advancedsettings.h + + SOURCES += $$PWD/options_imp.cpp + + FORMS += $$PWD/options.ui +} + +HEADERS += $$PWD/preferences.h diff --git a/src/ui/preview.ui b/src/preview.ui similarity index 100% rename from src/ui/preview.ui rename to src/preview.ui diff --git a/src/ui/peer.ui b/src/properties/peer.ui similarity index 100% rename from src/ui/peer.ui rename to src/properties/peer.ui diff --git a/src/properties/properties.pri b/src/properties/properties.pri index 80d7321bf..6468da420 100644 --- a/src/properties/properties.pri +++ b/src/properties/properties.pri @@ -1,6 +1,8 @@ INCLUDEPATH += $$PWD -FORMS += $$PWD/propertieswidget.ui +FORMS += $$PWD/propertieswidget.ui \ + $$PWD/trackersadditiondlg.ui \ + $$PWD/peer.ui HEADERS += $$PWD/propertieswidget.h \ $$PWD/peerlistwidget.h \ diff --git a/src/ui/trackersadditiondlg.ui b/src/properties/trackersadditiondlg.ui similarity index 100% rename from src/ui/trackersadditiondlg.ui rename to src/properties/trackersadditiondlg.ui diff --git a/src/ui/pluginsource.ui b/src/searchengine/pluginsource.ui similarity index 100% rename from src/ui/pluginsource.ui rename to src/searchengine/pluginsource.ui diff --git a/src/searchengine/searchengine.pri b/src/searchengine/searchengine.pri index 7960ee43f..8a4ac7c46 100644 --- a/src/searchengine/searchengine.pri +++ b/src/searchengine/searchengine.pri @@ -1,7 +1,8 @@ INCLUDEPATH += $$PWD FORMS += $$PWD/search.ui \ - $$PWD/engineselect.ui + $$PWD/engineselect.ui \ + $$PWD/pluginsource.ui HEADERS += $$PWD/searchengine.h \ $$PWD/searchtab.h \ diff --git a/src/src.pro b/src/src.pro index 33a1affb9..ced044bfa 100644 --- a/src/src.pro +++ b/src/src.pro @@ -1,244 +1,177 @@ +# Global +TEMPLATE = app +CONFIG += qt thread + +unix:macx { + exists(../conf.pri) { + # generated by configure + include(../conf.pri) + } +} + +nox { + QT = core + TARGET = qbittorrent-nox + DEFINES += DISABLE_GUI +} else { + QT += xml + TARGET = qbittorrent +} +QT += network + # Vars LANG_PATH = lang ICONS_PATH = Icons -# Set the following variable to 1 to enable debug -DEBUG_MODE = 1 +# use "CONFIG -= debug" to disable debug +CONFIG += debug -# Global -TEMPLATE = app -CONFIG += qt \ - thread - -# Update this VERSION for each release -os2 { - DEFINES += VERSION=\'\"v2.5.0beta4\"\' -} else { - DEFINES += VERSION=\\\"v2.5.0beta4\\\" +# Disable debug output in release mode +!debug { + DEFINES += QT_NO_DEBUG_OUTPUT } -DEFINES += VERSION_MAJOR=2 -DEFINES += VERSION_MINOR=5 -DEFINES += VERSION_BUGFIX=0 -# NORMAL,ALPHA,BETA,RELEASE_CANDIDATE,DEVEL -DEFINES += VERSION_TYPE=BETA +# VERSION DEFINES +include(../version.pri) +# Windows specific configuration win32 { - exists(../winconf.pri) { - include(../winconf.pri) - } - - #DEFINES += _WIN32_WINNT=0x0601 - #DEFINES += _WIN32_IE=0x0400 - #DEFINES += _WIN32_WINDOWS - - #QMAKE_CXXFLAGS_STL_ON = -EHs - #QMAKE_CXXFLAGS_EXCEPTIONS_ON = -EHs - - DEFINES += BOOST_ALL_NO_LIB BOOST_ASIO_HASH_MAP_BUCKETS=1021 BOOST_EXCEPTION_DISABLE - DEFINES += BOOST_FILESYSTEM_STATIC_LINK=1 BOOST_MULTI_INDEX_DISABLE_SERIALIZATION - DEFINES += BOOST_SYSTEM_STATIC_LINK=1 BOOST_THREAD_USE_LIB BOOST_THREAD_USE_LIB=1 - DEFINES += TORRENT_USE_OPENSSL UNICODE WIN32 WIN32_LEAN_AND_MEAN - DEFINES += _CRT_SECURE_NO_DEPRECATE _FILE_OFFSET_BITS=64 _SCL_SECURE_NO_DEPRECATE - DEFINES += _UNICODE _WIN32 _WIN32_WINNT=0x0500 __USE_W32_SOCKETS - - contains(DEBUG_MODE, 1) { - DEFINES += TORRENT_DEBUG - } - - contains(DEBUG_MODE, 0) { - DEFINES += NDEBUG - } -} - -# !mac:QMAKE_LFLAGS += -Wl,--as-needed -contains(DEBUG_MODE, 1) { - CONFIG += debug - CONFIG -= release - message(Debug build!) -} -contains(DEBUG_MODE, 0) { - CONFIG -= debug - CONFIG += release - DEFINES += QT_NO_DEBUG_OUTPUT - message(Release build!) + include(../winconf.pri) } # Mac specific configuration macx { - PREFIX = /usr/local - BINDIR = /usr/local/bin - DATADIR = /usr/local/share - - INCLUDEPATH += /usr/local/include/libtorrent /usr/include/openssl /usr/include /opt/local/include/boost /opt/local/include - LIBS += -ltorrent-rasterbar -lcrypto -L/opt/local/lib -lboost_system-mt -lboost_filesystem-mt -lboost_thread-mt -framework Cocoa -framework Carbon - - document_icon.path = Contents/Resources - document_icon.files = Icons/qBitTorrentDocument.icns - - QMAKE_BUNDLE_DATA += document_icon - ICON = Icons/qbittorrent_mac.icns - QMAKE_INFO_PLIST = Info.plist + include(../macxconf.pri) } -# Install -!win32 { - # Binary - exists(../conf.pri) { - include(../conf.pri) - - # Target - # target.path = $$BINDIR - target.path = $$PREFIX/bin/ - INSTALLS += target - } - - # Man page - contains(DEFINES, DISABLE_GUI):man.files = ../doc/qbittorrent-nox.1 - else:man.files = ../doc/qbittorrent.1 - man.path = $$PREFIX/share/man/man1/ - INSTALLS += man - - # Menu Icon - !contains(DEFINES, DISABLE_GUI) { - menuicon.files = Icons/qBittorrent.desktop - menuicon.path = $$PREFIX/share/applications/ - INSTALLS += menuicon - icon16.files = menuicons/16x16/apps/qbittorrent.png - icon16.path = $$PREFIX/share/icons/hicolor/16x16/apps/ - icon22.files = menuicons/22x22/apps/qbittorrent.png - icon22.path = $$PREFIX/share/icons/hicolor/22x22/apps/ - icon24.files = menuicons/24x24/apps/qbittorrent.png - icon24.path = $$PREFIX/share/icons/hicolor/24x24/apps/ - icon32.files = menuicons/32x32/apps/qbittorrent.png - icon32.path = $$PREFIX/share/icons/hicolor/32x32/apps/ - icon36.files = menuicons/36x36/apps/qbittorrent.png - icon36.path = $$PREFIX/share/icons/hicolor/36x36/apps/ - icon48.files = menuicons/48x48/apps/qbittorrent.png - icon48.path = $$PREFIX/share/icons/hicolor/48x48/apps/ - icon64.files = menuicons/64x64/apps/qbittorrent.png - icon64.path = $$PREFIX/share/icons/hicolor/64x64/apps/ - icon72.files = menuicons/72x72/apps/qbittorrent.png - icon72.path = $$PREFIX/share/icons/hicolor/72x72/apps/ - icon96.files = menuicons/96x96/apps/qbittorrent.png - icon96.path = $$PREFIX/share/icons/hicolor/96x96/apps/ - icon128.files = menuicons/128x128/apps/qbittorrent.png - icon128.path = $$PREFIX/share/icons/hicolor/128x128/apps/ - icon192.files = menuicons/192x192/apps/qbittorrent.png - icon192.path = $$PREFIX/share/icons/hicolor/192x192/apps/ - INSTALLS += icon16 \ - icon22 \ - icon24 \ - icon32 \ - icon36 \ - icon48 \ - icon64 \ - icon72 \ - icon96 \ - icon128 \ - icon192 - } -} - -contains(DEFINES, DISABLE_GUI) { - QT = core - TARGET = qbittorrent-nox -} else { - TARGET = qbittorrent -} - -unix:QMAKE_LFLAGS_APP += -rdynamic - -unix { - CONFIG += link_pkgconfig - PKGCONFIG += "libtorrent-rasterbar" -} - -QT += network -!contains(DEFINES, DISABLE_GUI):QT += xml +# Unix specific configuration unix:!macx { - QT += dbus + include(../unixconf.pri) +} + +# eCS(OS/2) specific configuration +os2 { + include(../os2conf.pri) } DEFINES += QT_NO_CAST_TO_ASCII - # Fast concatenation (Qt >= 4.6) DEFINES += QT_USE_FAST_CONCATENATION QT_USE_FAST_OPERATOR_PLUS -# Windows -win32 { - RC_FILE = qbittorrent.rc - - #LIBS += "/nodefaultlib:"msvcrt.lib" - #LIBS += "/nodefaultlib:"msvcrtd.lib" - #contains(DEBUG_MODE, 1) { - # LIBS += "/nodefaultlib:"libcmt.lib" - #} - - contains(DEBUG_MODE, 1) { - LIBS += libtorrentd.lib \ - libboost_system-vc90-mt-gd.lib \ - libboost_filesystem-vc90-mt-gd.lib \ - libboost_thread-vc90-mt-gd.lib - } - contains(DEBUG_MODE, 0) { - 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 - -} - -os2 { - LIBS += -ltorrent-rasterbar \ - -lboost_thread \ - -lboost_system \ - -lboost_filesystem \ - -lssl -lcrypto -lidn -lpthread - - RC_FILE = qbittorrent_os2.rc -} - -!contains(DEFINES, DISABLE_GUI) { - win32 { - DEFINES += WITH_GEOIP_EMBEDDED - message("On Windows, GeoIP database must be embedded.") - } - os2 { - DEFINES += WITH_GEOIP_EMBEDDED - message("On eCS(OS/2), GeoIP database must be embedded.") - } - macx { - DEFINES += WITH_GEOIP_EMBEDDED - message("On Mac OS X, GeoIP database must be embedded.") - } - unix:!macx:contains(DEFINES, WITH_GEOIP_EMBEDDED):message("You chose to embed GeoIP database in qBittorrent executable.") -} # Resource files RESOURCES += icons.qrc \ lang.qrc \ about.qrc -# Add GeoIP resource file if the GeoIP database -# should be embedded in qBittorrent executable -contains(DEFINES, WITH_GEOIP_EMBEDDED) { - exists("geoip/GeoIP.dat") { - message("GeoIP.dat was found in src/geoip/.") - RESOURCES += geoip.qrc - } - else { - DEFINES -= WITH_GEOIP_EMBEDDED - error("GeoIP.dat was not found in src/geoip/ folder, please follow instructions in src/geoip/README.") +# Source code +contains(DEFINES, USE_SYSTEM_QTSINGLEAPPLICATION) { + nox { + CONFIG += qtsinglecoreapplication + } else { + CONFIG += qtsingleapplication } } else { - message("GeoIP database will not be embedded in qBittorrent executable.") + nox { + include(qtsingleapp/qtsinglecoreapplication.pri) + } else { + include(qtsingleapp/qtsingleapplication.pri) + } } +include(qtlibtorrent/qtlibtorrent.pri) +include(webui/webui.pri) +include(tracker/tracker.pri) +include (preferences/preferences.pri) + +!nox { + include(lineedit/lineedit.pri) + include(properties/properties.pri) + include(searchengine/searchengine.pri) + include(rss/rss.pri) + include(torrentcreator/torrentcreator.pri) + include(geoip/geoip.pri) +} + +HEADERS += misc.h \ + downloadthread.h \ + filterparserthread.h \ + stacktrace.h \ + torrentpersistentdata.h \ + filesystemwatcher.h \ + scannedfoldersmodel.h \ + qinisettings.h \ + smtp.h + +SOURCES += main.cpp \ + downloadthread.cpp \ + scannedfoldersmodel.cpp \ + misc.cpp \ + smtp.cpp + +nox { + HEADERS += headlessloader.h +} else { + HEADERS += mainwindow.h\ + transferlistwidget.h \ + transferlistdelegate.h \ + transferlistfilterswidget.h \ + torrentfilesmodel.h \ + deletionconfirmationdlg.h \ + statusbar.h \ + reverseresolution.h \ + console_imp.h \ + ico.h \ + speedlimitdlg.h \ + about_imp.h \ + previewselect.h \ + previewlistdelegate.h \ + downloadfromurldlg.h \ + torrentadditiondlg.h \ + trackerlogin.h \ + hidabletabwidget.h \ + sessionapplication.h \ + torrentimportdlg.h + + SOURCES += mainwindow.cpp \ + ico.cpp \ + transferlistwidget.cpp \ + torrentadditiondlg.cpp \ + sessionapplication.cpp \ + torrentimportdlg.cpp + + win32 { + HEADERS += programupdater.h + SOURCES += programupdater.cpp + } + + macx { + HEADERS += qmacapplication.h \ + programupdater.h + + SOURCES += qmacapplication.cpp \ + programupdater.cpp + } + + FORMS += mainwindow.ui \ + about.ui \ + preview.ui \ + login.ui \ + downloadfromurldlg.ui \ + torrentadditiondlg.ui \ + bandwidth_limit.ui \ + console.ui \ + confirmdeletiondlg.ui \ + torrentimportdlg.ui +} + +DESTDIR = . + +# OS specific config +OTHER_FILES += ../winconf.pri ../macxconf.pri ../unixconf.pri ../os2conf.pri +# version file +OTHER_FILES += ../version.pri + # Translations TRANSLATIONS = $$LANG_PATH/qbittorrent_fr.ts \ $$LANG_PATH/qbittorrent_zh.ts \ @@ -270,127 +203,3 @@ TRANSLATIONS = $$LANG_PATH/qbittorrent_fr.ts \ $$LANG_PATH/qbittorrent_sr.ts \ $$LANG_PATH/qbittorrent_ar.ts \ $$LANG_PATH/qbittorrent_hr.ts - -# Source code -HEADERS += misc.h \ - downloadthread.h \ - filterparserthread.h \ - stacktrace.h \ - torrentpersistentdata.h \ - filesystemwatcher.h \ - preferences.h \ - scannedfoldersmodel.h \ - qinisettings.h \ - smtp.h - -contains(DEFINES, DISABLE_GUI) { - HEADERS += headlessloader.h -} else { - HEADERS += mainwindow.h\ - transferlistwidget.h \ - transferlistdelegate.h \ - transferlistfilterswidget.h \ - torrentfilesmodel.h \ - deletionconfirmationdlg.h \ - statusbar.h \ - reverseresolution.h \ - console_imp.h \ - ico.h \ - speedlimitdlg.h \ - options_imp.h \ - about_imp.h \ - previewselect.h \ - previewlistdelegate.h \ - downloadfromurldlg.h \ - torrentadditiondlg.h \ - trackerlogin.h \ - advancedsettings.h \ - hidabletabwidget.h \ - sessionapplication.h \ - torrentimportdlg.h \ - geoipmanager.h - - win32 { - HEADERS += programupdater.h - } - - macx { - HEADERS += qmacapplication.h \ - programupdater.h - } -} - -contains(DEFINES, USE_SYSTEM_QTSINGLEAPPLICATION) { - message("Using the system's qtsingleapplication library") - contains(DEFINES, DISABLE_GUI) { - CONFIG += qtsinglecoreapplication - } else { - CONFIG += qtsingleapplication - } -} else { - message("Using the shipped qtsingleapplication library") - contains(DEFINES, DISABLE_GUI) { - include(qtsingleapp/qtsinglecoreapplication.pri) - } else { - include(qtsingleapp/qtsingleapplication.pri) - } -} - -!contains(DEFINES, DISABLE_GUI) { - include(lineedit/lineedit.pri) -} - -include(qtlibtorrent/qtlibtorrent.pri) -include(webui/webui.pri) -include(tracker/tracker.pri) -!contains(DEFINES, DISABLE_GUI) { - include(properties/properties.pri) - include(searchengine/searchengine.pri) - include(rss/rss.pri) - include(torrentcreator/torrentcreator.pri) -} - -!contains(DEFINES, DISABLE_GUI) { - FORMS += ui/mainwindow.ui \ - ui/options.ui \ - ui/about.ui \ - ui/preview.ui \ - ui/login.ui \ - ui/downloadfromurldlg.ui \ - ui/torrentadditiondlg.ui \ - ui/bandwidth_limit.ui \ - ui/pluginsource.ui \ - ui/trackersadditiondlg.ui \ - ui/console.ui \ - ui/peer.ui \ - ui/confirmdeletiondlg.ui \ - ui/torrentimportdlg.ui -} - -SOURCES += main.cpp \ - downloadthread.cpp \ - scannedfoldersmodel.cpp \ - misc.cpp \ - smtp.cpp - -!contains(DEFINES, DISABLE_GUI) { - SOURCES += mainwindow.cpp \ - options_imp.cpp \ - ico.cpp \ - transferlistwidget.cpp \ - torrentadditiondlg.cpp \ - sessionapplication.cpp \ - torrentimportdlg.cpp \ - geoipmanager.cpp - - win32 { - SOURCES += programupdater.cpp - } - - macx { - SOURCES += qmacapplication.cpp \ - programupdater.cpp - } -} - -DESTDIR = . diff --git a/src/ui/torrentadditiondlg.ui b/src/torrentadditiondlg.ui similarity index 100% rename from src/ui/torrentadditiondlg.ui rename to src/torrentadditiondlg.ui diff --git a/src/ui/torrentimportdlg.ui b/src/torrentimportdlg.ui similarity index 100% rename from src/ui/torrentimportdlg.ui rename to src/torrentimportdlg.ui diff --git a/unixconf.pri b/unixconf.pri new file mode 100644 index 000000000..66a7c31fb --- /dev/null +++ b/unixconf.pri @@ -0,0 +1,66 @@ +# COMPILATION SPECIFIC +QT += dbus +QMAKE_LFLAGS_APP += -rdynamic +CONFIG += link_pkgconfig +PKGCONFIG += libtorrent-rasterbar + +# Man page +nox { + man.files = ../doc/qbittorrent-nox.1 +} else { + man.files = ../doc/qbittorrent.1 +} +man.path = $$PREFIX/share/man/man1/ +INSTALLS += man + +# Menu Icon +!nox { + menuicon.files = Icons/qBittorrent.desktop + menuicon.path = $$PREFIX/share/applications/ + INSTALLS += menuicon + icon16.files = menuicons/16x16/apps/qbittorrent.png + icon16.path = $$PREFIX/share/icons/hicolor/16x16/apps/ + icon22.files = menuicons/22x22/apps/qbittorrent.png + icon22.path = $$PREFIX/share/icons/hicolor/22x22/apps/ + icon24.files = menuicons/24x24/apps/qbittorrent.png + icon24.path = $$PREFIX/share/icons/hicolor/24x24/apps/ + icon32.files = menuicons/32x32/apps/qbittorrent.png + icon32.path = $$PREFIX/share/icons/hicolor/32x32/apps/ + icon36.files = menuicons/36x36/apps/qbittorrent.png + icon36.path = $$PREFIX/share/icons/hicolor/36x36/apps/ + icon48.files = menuicons/48x48/apps/qbittorrent.png + icon48.path = $$PREFIX/share/icons/hicolor/48x48/apps/ + icon64.files = menuicons/64x64/apps/qbittorrent.png + icon64.path = $$PREFIX/share/icons/hicolor/64x64/apps/ + icon72.files = menuicons/72x72/apps/qbittorrent.png + icon72.path = $$PREFIX/share/icons/hicolor/72x72/apps/ + icon96.files = menuicons/96x96/apps/qbittorrent.png + icon96.path = $$PREFIX/share/icons/hicolor/96x96/apps/ + icon128.files = menuicons/128x128/apps/qbittorrent.png + icon128.path = $$PREFIX/share/icons/hicolor/128x128/apps/ + icon192.files = menuicons/192x192/apps/qbittorrent.png + icon192.path = $$PREFIX/share/icons/hicolor/192x192/apps/ + + INSTALLS += icon16 \ + icon22 \ + icon24 \ + icon32 \ + icon36 \ + icon48 \ + icon64 \ + icon72 \ + icon96 \ + icon128 \ + icon192 +} + +# INSTALL +target.path = $$PREFIX/bin/ +INSTALLS += target + +!nox { + # DEFINE added by configure + contains(DEFINES, WITH_GEOIP_EMBEDDED) { + message("You chose to embed GeoIP database in qBittorrent executable.") + } +} diff --git a/version.pri b/version.pri new file mode 100644 index 000000000..c2fdae619 --- /dev/null +++ b/version.pri @@ -0,0 +1,11 @@ +os2 { + DEFINES += VERSION=\'\"v2.5.0beta5\"\' +} else { + DEFINES += VERSION=\\\"v2.5.0beta5\\\" +} +DEFINES += VERSION_MAJOR=2 +DEFINES += VERSION_MINOR=5 +DEFINES += VERSION_BUGFIX=0 + +# NORMAL,ALPHA,BETA,RELEASE_CANDIDATE,DEVEL +DEFINES += VERSION_TYPE=BETA diff --git a/winconf.pri b/winconf.pri index 826a2c4b8..611869f56 100644 --- a/winconf.pri +++ b/winconf.pri @@ -6,3 +6,37 @@ INCLUDEPATH += $$quote(C:/OpenSSL/include) LIBS += $$quote(-LC:/OpenSSL/lib/VC) LIBS += $$quote(-L$$PWD/libs) + +# LIBTORRENT DEFINES +DEFINES += BOOST_ALL_NO_LIB BOOST_ASIO_HASH_MAP_BUCKETS=1021 BOOST_EXCEPTION_DISABLE +DEFINES += BOOST_FILESYSTEM_STATIC_LINK=1 BOOST_MULTI_INDEX_DISABLE_SERIALIZATION +DEFINES += BOOST_SYSTEM_STATIC_LINK=1 BOOST_THREAD_USE_LIB BOOST_THREAD_USE_LIB=1 +DEFINES += TORRENT_USE_OPENSSL UNICODE WIN32 WIN32_LEAN_AND_MEAN +DEFINES += _CRT_SECURE_NO_DEPRECATE _FILE_OFFSET_BITS=64 _SCL_SECURE_NO_DEPRECATE +DEFINES += _UNICODE _WIN32 _WIN32_WINNT=0x0500 __USE_W32_SOCKETS + +debug { + DEFINES += TORRENT_DEBUG +} else { + DEFINES += NDEBUG +} + +RC_FILE = qbittorrent.rc + +debug { + 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 + +DEFINES += WITH_GEOIP_EMBEDDED +message("On Windows, GeoIP database must be embedded.")