improved project files
This commit is contained in:
parent
faecd5b2fa
commit
63f8860f8b
205
CMakeLists.txt
205
CMakeLists.txt
|
@ -1,46 +1,168 @@
|
||||||
cmake_minimum_required(VERSION 3.1.0 FATAL_ERROR)
|
cmake_minimum_required(VERSION 3.1.0 FATAL_ERROR)
|
||||||
|
|
||||||
|
# add project files
|
||||||
|
set(HEADER_FILES
|
||||||
|
application/main.h
|
||||||
|
application/utils.h
|
||||||
|
cli/clidownloadinteraction.h
|
||||||
|
cli/mainfeatures.h
|
||||||
|
model/downloadfinderresultsmodel.h
|
||||||
|
model/downloadmodel.h
|
||||||
|
network/authenticationcredentials.h
|
||||||
|
network/bitsharedownload.h
|
||||||
|
network/download.h
|
||||||
|
network/downloadrange.h
|
||||||
|
network/filenukedownload.h
|
||||||
|
network/finder/downloadfinder.h
|
||||||
|
network/finder/groovesharksearcher.h
|
||||||
|
network/finder/linkfinder.h
|
||||||
|
network/finder/youtubeplaylist.h
|
||||||
|
network/groovesharkdownload.h
|
||||||
|
network/httpdownload.h
|
||||||
|
network/httpdownloadwithinforequst.h
|
||||||
|
network/misc/contentdispositionparser.h
|
||||||
|
network/optiondata.h
|
||||||
|
network/permissionstatus.h
|
||||||
|
network/socksharedownload.h
|
||||||
|
network/spotifydownload.h
|
||||||
|
network/testdownload.h
|
||||||
|
network/vimeodownload.h
|
||||||
|
network/youtubedownload.h
|
||||||
|
)
|
||||||
|
set(SRC_FILES
|
||||||
|
application/main.cpp
|
||||||
|
application/utils.cpp
|
||||||
|
cli/clidownloadinteraction.cpp
|
||||||
|
cli/mainfeatures.cpp
|
||||||
|
model/downloadfinderresultsmodel.cpp
|
||||||
|
model/downloadmodel.cpp
|
||||||
|
network/bitsharedownload.cpp
|
||||||
|
network/download.cpp
|
||||||
|
network/downloadrange.cpp
|
||||||
|
network/filenukedownload.cpp
|
||||||
|
network/finder/downloadfinder.cpp
|
||||||
|
network/finder/groovesharksearcher.cpp
|
||||||
|
network/finder/linkfinder.cpp
|
||||||
|
network/finder/youtubeplaylist.cpp
|
||||||
|
network/groovesharkdownload.cpp
|
||||||
|
network/httpdownload.cpp
|
||||||
|
network/httpdownloadwithinforequst.cpp
|
||||||
|
network/misc/contentdispositionparser.cpp
|
||||||
|
network/optiondata.cpp
|
||||||
|
network/socksharedownload.cpp
|
||||||
|
network/spotifydownload.cpp
|
||||||
|
network/testdownload.cpp
|
||||||
|
network/vimeodownload.cpp
|
||||||
|
network/youtubedownload.cpp
|
||||||
|
|
||||||
|
)
|
||||||
|
set(WIDGETS_HEADER_FILES
|
||||||
|
gui/downloadwidget.h
|
||||||
|
gui/adddownloaddialog.h
|
||||||
|
gui/addmultipledownloadswizard.h
|
||||||
|
gui/downloadinteraction.h
|
||||||
|
gui/initiate.h
|
||||||
|
gui/mainwindow.h
|
||||||
|
gui/setrangedialog.h
|
||||||
|
gui/settings.h
|
||||||
|
model/downloadfinderresultsmodel.h
|
||||||
|
model/downloadmodel.h
|
||||||
|
)
|
||||||
|
set(WIDGETS_SRC_FILES
|
||||||
|
gui/adddownloaddialog.cpp
|
||||||
|
gui/addmultipledownloadswizard.cpp
|
||||||
|
gui/downloadinteraction.cpp
|
||||||
|
gui/downloadwidget.cpp
|
||||||
|
gui/initiate.cpp
|
||||||
|
gui/mainwindow.cpp
|
||||||
|
gui/setrangedialog.cpp
|
||||||
|
gui/settings.cpp
|
||||||
|
itemdelegates/comboboxitemdelegate.cpp
|
||||||
|
itemdelegates/progressbaritemdelegate.cpp
|
||||||
|
resources/icons.qrc
|
||||||
|
)
|
||||||
|
#set(QUICK_HEADER_FILES
|
||||||
|
#)
|
||||||
|
#set(QUICK_SRC_FILES
|
||||||
|
#)
|
||||||
|
#set(TS_FILES
|
||||||
|
# translations/${META_PROJECT_NAME}_de_DE.ts
|
||||||
|
# translations/${META_PROJECT_NAME}_en_US.ts
|
||||||
|
#)
|
||||||
|
|
||||||
# meta data
|
# meta data
|
||||||
set(META_PROJECT_NAME videodownloader)
|
set(META_PROJECT_NAME videodownloader)
|
||||||
set(META_APP_NAME "Video Downloader")
|
set(META_APP_NAME "Video Downloader")
|
||||||
set(META_APP_AUTHOR "Martchus")
|
set(META_APP_AUTHOR "Martchus")
|
||||||
set(META_APP_URL "https://github.com/${META_APP_AUTHOR}/${META_PROJECT_NAME}")
|
set(META_APP_URL "https://github.com/${META_APP_AUTHOR}/${META_PROJECT_NAME}")
|
||||||
set(META APP_DESCRIPTION "A video downloader with Qt GUI (currently only YouTube and Vimeo are maintained).")
|
set(META_APP_DESCRIPTION "A video downloader with Qt GUI (currently only YouTube and Vimeo are maintained).")
|
||||||
set(META_VERSION_MAJOR 1)
|
set(META_VERSION_MAJOR 1)
|
||||||
set(META_VERSION_MINOR 2)
|
set(META_VERSION_MINOR 2)
|
||||||
set(META_VERSION_PATCH 1)
|
set(META_VERSION_PATCH 1)
|
||||||
|
|
||||||
# define project
|
|
||||||
project(${META_PROJECT_NAME})
|
|
||||||
|
|
||||||
# stringification of meta data
|
# stringification of meta data
|
||||||
set(META_PROJECT_NAME_STR "\"${META_PROJECT_NAME}\"")
|
set(META_PROJECT_NAME_STR "\"${META_PROJECT_NAME}\"")
|
||||||
set(META_APP_NAME_STR "\"${META_APP_NAME}\"")
|
set(META_APP_NAME_STR "\"${META_APP_NAME}\"")
|
||||||
set(META_APP_AUTHOR_STR "\"${META_APP_AUTHOR}\"")
|
set(META_APP_AUTHOR_STR "\"${META_APP_AUTHOR}\"")
|
||||||
set(META_APP_URL_STR "\"${META_APP_URL}\"")
|
set(META_APP_URL_STR "\"${META_APP_URL}\"")
|
||||||
set(APP_DESCRIPTION_STR "\"${APP_DESCRIPTION}\"")
|
set(META_APP_DESCRIPTION_STR "\"${META_APP_DESCRIPTION}\"")
|
||||||
set(META_APP_VERSION_STR "\"${META_VERSION_MAJOR}.${META_VERSION_MINOR}.${META_VERSION_PATCH}\"")
|
set(META_APP_VERSION ${META_VERSION_MAJOR}.${META_VERSION_MINOR}.${META_VERSION_PATCH})
|
||||||
|
set(META_APP_VERSION_STR "\"${META_APP_VERSION}\"")
|
||||||
|
|
||||||
|
# define project
|
||||||
|
project(${META_PROJECT_NAME})
|
||||||
|
|
||||||
# add configuration header
|
# add configuration header
|
||||||
configure_file (
|
configure_file(
|
||||||
"${PROJECT_SOURCE_DIR}/config.h.in"
|
"${PROJECT_SOURCE_DIR}/resources/config.h.in"
|
||||||
"${PROJECT_BINARY_DIR}/config.h"
|
"${PROJECT_BINARY_DIR}/resources/config.h"
|
||||||
)
|
)
|
||||||
include_directories("${PROJECT_BINARY_DIR}")
|
include_directories("${PROJECT_BINARY_DIR}")
|
||||||
|
|
||||||
# add source and header files
|
# set "GUI-type" to WIN32 to hide console under windows
|
||||||
file(GLOB_RECURSE SRC_FILES RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} "application/*.cpp" "cli/*.cpp" "model/*.cpp" "network/*.cpp" "resources/json.qrc")
|
if(WIN32)
|
||||||
file(GLOB_RECURSE WIDGETS_SRC_FILES RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} "gui/*.cpp" "itemdelegates/*.cpp" "resources/icons.qrc")
|
set(GUI_TYPE WIN32)
|
||||||
file(GLOB_RECURSE HEADER_FILES RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} "application/*.h" "cli/*.h" "model/*.h" "network/*.h")
|
endif(WIN32)
|
||||||
file(GLOB_RECURSE WIDGETS_HEADER_FILES RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} "gui/*.h" "itemdelegates/*.h")
|
|
||||||
|
|
||||||
# enable only Qt Widgets GUI
|
# add windows resource file
|
||||||
add_definitions(-DGUI_QTWIDGETS -DMODEL_UNDO_SUPPORT)
|
if(MINGW)
|
||||||
|
# creation windows icon from png with ffmpeg if available
|
||||||
|
find_program(FFMPEG_BIN ffmpeg avconv)
|
||||||
|
if(FFMPEG_BIN)
|
||||||
|
set(PNG_ICON_PATH "${PROJECT_SOURCE_DIR}/resources/icons/hicolor/128x128/apps/${META_PROJECT_NAME}.png")
|
||||||
|
if(EXISTS ${PNG_ICON_PATH})
|
||||||
|
set(WINDOWS_ICON_PATH "${PROJECT_BINARY_DIR}/${META_PROJECT_NAME}.ico")
|
||||||
|
set(WINDOWS_ICON_RC_ENTRY "IDI_ICON1 ICON DISCARDABLE \"${WINDOWS_ICON_PATH}\"")
|
||||||
|
add_custom_command(
|
||||||
|
OUTPUT "${WINDOWS_ICON_PATH}"
|
||||||
|
COMMAND ${FFMPEG_BIN} -y -i "${PNG_ICON_PATH}" -vf crop=iw-20:ih-20:10:10,scale=64:64 "${WINDOWS_ICON_PATH}"
|
||||||
|
)
|
||||||
|
endif()
|
||||||
|
endif(FFMPEG_BIN)
|
||||||
|
# create windows rc file from template
|
||||||
|
set(WINDOWS_EXT "exe")
|
||||||
|
configure_file(
|
||||||
|
"${PROJECT_SOURCE_DIR}/resources/windows.rc.in"
|
||||||
|
"${PROJECT_BINARY_DIR}/resources/windows.rc"
|
||||||
|
)
|
||||||
|
# set windres as resource compiler
|
||||||
|
set(RES_FILES "${PROJECT_BINARY_DIR}/resources/windows.rc")
|
||||||
|
set(CMAKE_RC_COMPILER_INIT windres)
|
||||||
|
set(CMAKE_RC_COMPILE_OBJECT "<CMAKE_RC_COMPILER> <FLAGS> -O coff <DEFINES> -i <SOURCE> -o <OBJECT>")
|
||||||
|
enable_language(RC)
|
||||||
|
endif(MINGW)
|
||||||
|
|
||||||
|
# enable Qt Widgets GUI
|
||||||
|
add_definitions(
|
||||||
|
-DGUI_QTWIDGETS
|
||||||
|
-DMODEL_UNDO_SUPPORT
|
||||||
|
)
|
||||||
|
|
||||||
# check required Qt 5 modules
|
# check required Qt 5 modules
|
||||||
find_package(Qt5Core REQUIRED)
|
find_package(Qt5Core REQUIRED)
|
||||||
find_package(Qt5Gui REQUIRED)
|
find_package(Qt5Gui REQUIRED)
|
||||||
find_package(Qt5Widgets REQUIRED)
|
find_package(Qt5Widgets REQUIRED)
|
||||||
|
find_package(Qt5LinguistTools REQUIRED)
|
||||||
find_package(Qt5Network REQUIRED)
|
find_package(Qt5Network REQUIRED)
|
||||||
|
|
||||||
# enable moc, uic and rcc
|
# enable moc, uic and rcc
|
||||||
|
@ -49,28 +171,65 @@ set(CMAKE_AUTOUIC ON)
|
||||||
set(CMAKE_AUTORCC ON)
|
set(CMAKE_AUTORCC ON)
|
||||||
set(CMAKE_INCLUDE_CURRENT_DIR ON)
|
set(CMAKE_INCLUDE_CURRENT_DIR ON)
|
||||||
|
|
||||||
# executable and linking
|
# enable lrelease
|
||||||
add_executable(${META_PROJECT_NAME} ${HEADER_FILES} ${SRC_FILES} ${WIDGETS_HEADER_FILES} ${WIDGETS_SRC_FILES})
|
qt5_add_translation(QM_FILES ${TS_FILES})
|
||||||
target_link_libraries(${META_PROJECT_NAME} c++utilities qtutilities Qt5::Core Qt5::Widgets Qt5::Network)
|
ADD_CUSTOM_TARGET(translations ALL DEPENDS ${QM_FILES})
|
||||||
|
|
||||||
# enable C++11
|
# executable and linking
|
||||||
set_property(TARGET ${META_PROJECT_NAME} PROPERTY CXX_STANDARD 11)
|
add_executable(${META_PROJECT_NAME} ${GUI_TYPE} ${HEADER_FILES} ${SRC_FILES} ${WIDGETS_HEADER_FILES} ${WIDGETS_SRC_FILES} ${QM_FILES} ${RES_FILES} ${WINDOWS_ICON_PATH})
|
||||||
|
target_link_libraries(${META_PROJECT_NAME} c++utilities qtutilities Qt5::Core Qt5::Widgets Qt5::Network)
|
||||||
|
set_target_properties(${META_PROJECT_NAME} PROPERTIES
|
||||||
|
CXX_STANDARD 11
|
||||||
|
)
|
||||||
|
|
||||||
# add install target
|
# add install target
|
||||||
install(TARGETS ${META_PROJECT_NAME}
|
install(TARGETS ${META_PROJECT_NAME}
|
||||||
RUNTIME DESTINATION bin
|
RUNTIME DESTINATION bin
|
||||||
LIBRARY DESTINATION lib
|
COMPONENT binary
|
||||||
ARCHIVE DESTINATION lib
|
|
||||||
)
|
)
|
||||||
install(FILES resources/icons/hicolor/scalable/apps/${META_PROJECT_NAME}.svg
|
install(FILES resources/icons/hicolor/scalable/apps/${META_PROJECT_NAME}.svg
|
||||||
DESTINATION share/icons/hicolor/scalable/apps
|
DESTINATION share/icons/hicolor/scalable/apps
|
||||||
|
COMPONENT desktop
|
||||||
)
|
)
|
||||||
install(FILES resources/desktop/applications/${META_PROJECT_NAME}.desktop
|
install(FILES resources/desktop/applications/${META_PROJECT_NAME}.desktop
|
||||||
DESTINATION share/applications
|
DESTINATION share/applications
|
||||||
|
COMPONENT desktop
|
||||||
|
)
|
||||||
|
install(FILES ${QM_FILES}
|
||||||
|
DESTINATION share/${META_PROJECT_NAME}/translations
|
||||||
|
COMPONENT localization
|
||||||
)
|
)
|
||||||
install(FILES resources/json/groovesharkauthenticationinfo.json
|
install(FILES resources/json/groovesharkauthenticationinfo.json
|
||||||
DESTINATION share/${META_PROJECT_NAME}/json
|
DESTINATION share/${META_PROJECT_NAME}/json
|
||||||
|
COMPONENT config
|
||||||
)
|
)
|
||||||
install(FILES resources/json/itaginfo.json
|
install(FILES resources/json/itaginfo.json
|
||||||
DESTINATION share/${META_PROJECT_NAME}/json
|
DESTINATION share/${META_PROJECT_NAME}/json
|
||||||
|
COMPONENT config
|
||||||
|
)
|
||||||
|
add_custom_target(install-binary
|
||||||
|
DEPENDS ${META_PROJECT_NAME}
|
||||||
|
COMMAND "${CMAKE_COMMAND}" -DCMAKE_INSTALL_COMPONENT=binary -P "${CMAKE_BINARY_DIR}/cmake_install.cmake"
|
||||||
|
)
|
||||||
|
add_custom_target(install-desktop
|
||||||
|
DEPENDS ${META_PROJECT_NAME}
|
||||||
|
COMMAND "${CMAKE_COMMAND}" -DCMAKE_INSTALL_COMPONENT=desktop -P "${CMAKE_BINARY_DIR}/cmake_install.cmake"
|
||||||
|
)
|
||||||
|
add_custom_target(install-localization
|
||||||
|
DEPENDS ${META_PROJECT_NAME}
|
||||||
|
COMMAND "${CMAKE_COMMAND}" -DCMAKE_INSTALL_COMPONENT=localization -P "${CMAKE_BINARY_DIR}/cmake_install.cmake"
|
||||||
|
)
|
||||||
|
add_custom_target(install-config
|
||||||
|
DEPENDS ${META_PROJECT_NAME}
|
||||||
|
COMMAND "${CMAKE_COMMAND}" -DCMAKE_INSTALL_COMPONENT=config -P "${CMAKE_BINARY_DIR}/cmake_install.cmake"
|
||||||
|
)
|
||||||
|
add_custom_target(install-mingw-w64
|
||||||
|
DEPENDS install-binary install-localization install-config
|
||||||
|
)
|
||||||
|
add_custom_target(install-binary-strip
|
||||||
|
DEPENDS ${META_PROJECT_NAME}
|
||||||
|
COMMAND "${CMAKE_COMMAND}" -DCMAKE_INSTALL_DO_STRIP=1 -DCMAKE_INSTALL_COMPONENT=binary -P "${CMAKE_BINARY_DIR}/cmake_install.cmake"
|
||||||
|
)
|
||||||
|
add_custom_target(install-mingw-w64-strip
|
||||||
|
DEPENDS install-binary-strip install-localization install-config
|
||||||
)
|
)
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
|
|
||||||
// include configuration from separate header file when building with CMake
|
// include configuration from separate header file when building with CMake
|
||||||
#ifndef APP_METADATA_AVAIL
|
#ifndef APP_METADATA_AVAIL
|
||||||
#include "config.h"
|
#include "resources/config.h"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if defined(GUI_QTWIDGETS) || defined(GUI_QTQUICK)
|
#if defined(GUI_QTWIDGETS) || defined(GUI_QTQUICK)
|
||||||
|
|
|
@ -1,9 +0,0 @@
|
||||||
#ifndef APP_METADATA_AVAIL
|
|
||||||
#define APP_METADATA_AVAIL
|
|
||||||
#define PROJECT_NAME @META_PROJECT_NAME_STR@
|
|
||||||
#define APP_NAME @META_APP_NAME_STR@
|
|
||||||
#define APP_VERSION @META_APP_VERSION_STR@
|
|
||||||
#define APP_AUTHOR @META_APP_AUTHOR_STR@
|
|
||||||
#define APP_URL @META_APP_URL_STR@
|
|
||||||
#define APP_DESCRIPTION @META_APP_DESCRIPTION_STR@
|
|
||||||
#endif // APP_METADATA_AVAIL
|
|
56
general.pri
56
general.pri
|
@ -1,28 +1,12 @@
|
||||||
#dirs
|
# specify build directories for moc, object and rcc files
|
||||||
MOC_DIR = ./moc
|
MOC_DIR = ./moc
|
||||||
OBJECTS_DIR = ./obj
|
OBJECTS_DIR = ./obj
|
||||||
RCC_DIR = ./res
|
RCC_DIR = ./res
|
||||||
# compiler flags
|
|
||||||
|
# compiler flags: enable C++11
|
||||||
QMAKE_CXXFLAGS += -std=c++11
|
QMAKE_CXXFLAGS += -std=c++11
|
||||||
QMAKE_LFLAGS += -std=c++11
|
QMAKE_LFLAGS += -std=c++11
|
||||||
# prefix
|
|
||||||
targetprefix = $$(TARGET_PREFIX)
|
|
||||||
message("Using target prefix \"$${targetprefix}\".")
|
|
||||||
# print install root
|
|
||||||
message("Using install root \"$$(INSTALL_ROOT)\".")
|
|
||||||
# target
|
|
||||||
CONFIG(debug, debug|release) {
|
|
||||||
TARGET = $${targetprefix}$${projectname}d
|
|
||||||
} else {
|
|
||||||
TARGET = $${targetprefix}$${projectname}
|
|
||||||
}
|
|
||||||
# add defines
|
|
||||||
DEFINES += "APP_METADATA_AVAIL"
|
|
||||||
DEFINES += "'PROJECT_NAME=\"$${projectname}\"'"
|
|
||||||
DEFINES += "'APP_NAME=\"$${appname}\"'"
|
|
||||||
DEFINES += "'APP_AUTHOR=\"$${appauthor}\"'"
|
|
||||||
DEFINES += "'APP_URL=\"$${appurl}\"'"
|
|
||||||
DEFINES += "'APP_VERSION=\"$${VERSION}\"'"
|
|
||||||
# variables to check target architecture
|
# variables to check target architecture
|
||||||
win32-g++:QMAKE_TARGET.arch = $$QMAKE_HOST.arch
|
win32-g++:QMAKE_TARGET.arch = $$QMAKE_HOST.arch
|
||||||
win32-g++-32:QMAKE_TARGET.arch = x86
|
win32-g++-32:QMAKE_TARGET.arch = x86
|
||||||
|
@ -30,7 +14,30 @@ win32-g++-64:QMAKE_TARGET.arch = x86_64
|
||||||
linux-g++:QMAKE_TARGET.arch = $$QMAKE_HOST.arch
|
linux-g++:QMAKE_TARGET.arch = $$QMAKE_HOST.arch
|
||||||
linux-g++-32:QMAKE_TARGET.arch = x86
|
linux-g++-32:QMAKE_TARGET.arch = x86
|
||||||
linux-g++-64:QMAKE_TARGET.arch = x86_64
|
linux-g++-64:QMAKE_TARGET.arch = x86_64
|
||||||
# configuration
|
|
||||||
|
# determine and print target prefix
|
||||||
|
targetprefix = $$(TARGET_PREFIX)
|
||||||
|
message("Using target prefix \"$${targetprefix}\".")
|
||||||
|
|
||||||
|
# print install root
|
||||||
|
message("Using install root \"$$(INSTALL_ROOT)\".")
|
||||||
|
|
||||||
|
# set target
|
||||||
|
CONFIG(debug, debug|release) {
|
||||||
|
TARGET = $${targetprefix}$${projectname}d
|
||||||
|
} else {
|
||||||
|
TARGET = $${targetprefix}$${projectname}
|
||||||
|
}
|
||||||
|
|
||||||
|
# add defines for meta data
|
||||||
|
DEFINES += "APP_METADATA_AVAIL"
|
||||||
|
DEFINES += "'PROJECT_NAME=\"$${projectname}\"'"
|
||||||
|
DEFINES += "'APP_NAME=\"$${appname}\"'"
|
||||||
|
DEFINES += "'APP_AUTHOR=\"$${appauthor}\"'"
|
||||||
|
DEFINES += "'APP_URL=\"$${appurl}\"'"
|
||||||
|
DEFINES += "'APP_VERSION=\"$${VERSION}\"'"
|
||||||
|
|
||||||
|
# configure Qt modules and defines
|
||||||
mobile {
|
mobile {
|
||||||
DEFINES += CONFIG_MOBILE
|
DEFINES += CONFIG_MOBILE
|
||||||
} else:desktop {
|
} else:desktop {
|
||||||
|
@ -61,7 +68,7 @@ no-gui {
|
||||||
}
|
}
|
||||||
guiqtquick {
|
guiqtquick {
|
||||||
message("Configured for Qt Quick GUI support.")
|
message("Configured for Qt Quick GUI support.")
|
||||||
greaterThan(QT_MAJOR_VERSION, 4): QT += quick
|
QT += quick
|
||||||
CONFIG(debug, debug|release) {
|
CONFIG(debug, debug|release) {
|
||||||
CONFIG += qml_debug
|
CONFIG += qml_debug
|
||||||
}
|
}
|
||||||
|
@ -69,11 +76,12 @@ guiqtquick {
|
||||||
}
|
}
|
||||||
guiqtwidgets {
|
guiqtwidgets {
|
||||||
message("Configured for Qt widgets GUI support.")
|
message("Configured for Qt widgets GUI support.")
|
||||||
greaterThan(QT_MAJOR_VERSION, 4): QT += widgets
|
QT += widgets
|
||||||
DEFINES += GUI_QTWIDGETS
|
DEFINES += GUI_QTWIDGETS
|
||||||
DEFINES += MODEL_UNDO_SUPPORT
|
DEFINES += MODEL_UNDO_SUPPORT
|
||||||
}
|
}
|
||||||
# Windows stuff: configuration for cross compliation with mingw-w64
|
|
||||||
|
# configuration for cross compliation with mingw-w64
|
||||||
win32 {
|
win32 {
|
||||||
QMAKE_TARGET_PRODUCT = "$${appname}"
|
QMAKE_TARGET_PRODUCT = "$${appname}"
|
||||||
QMAKE_TARGET_COPYRIGHT = "by $${appauthor}"
|
QMAKE_TARGET_COPYRIGHT = "by $${appauthor}"
|
||||||
|
|
|
@ -4,7 +4,7 @@
|
||||||
|
|
||||||
// include configuration from separate header file when building with CMake
|
// include configuration from separate header file when building with CMake
|
||||||
#ifndef APP_METADATA_AVAIL
|
#ifndef APP_METADATA_AVAIL
|
||||||
#include "config.h"
|
#include "resources/config.h"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#include <qtutilities/resources/qtconfigarguments.h>
|
#include <qtutilities/resources/qtconfigarguments.h>
|
||||||
|
|
|
@ -5,7 +5,7 @@
|
||||||
|
|
||||||
// include configuration from separate header file when building with CMake
|
// include configuration from separate header file when building with CMake
|
||||||
#ifndef APP_METADATA_AVAIL
|
#ifndef APP_METADATA_AVAIL
|
||||||
#include "config.h"
|
#include "resources/config.h"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#include <qtutilities/resources/resources.h>
|
#include <qtutilities/resources/resources.h>
|
||||||
|
|
|
@ -4,7 +4,7 @@
|
||||||
|
|
||||||
// include configuration from separate header file when building with CMake
|
// include configuration from separate header file when building with CMake
|
||||||
#ifndef APP_METADATA_AVAIL
|
#ifndef APP_METADATA_AVAIL
|
||||||
#include "config.h"
|
#include "resources/config.h"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#include <QUrlQuery>
|
#include <QUrlQuery>
|
||||||
|
|
|
@ -4,7 +4,7 @@
|
||||||
|
|
||||||
// include configuration from separate header file when building with CMake
|
// include configuration from separate header file when building with CMake
|
||||||
#ifndef APP_METADATA_AVAIL
|
#ifndef APP_METADATA_AVAIL
|
||||||
#include "config.h"
|
#include "resources/config.h"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#include <qtutilities/resources/resources.h>
|
#include <qtutilities/resources/resources.h>
|
||||||
|
|
|
@ -1 +0,0 @@
|
||||||
IDI_ICON1 ICON DISCARDABLE "resources/applicationicon.ico"
|
|
|
@ -1,3 +1,4 @@
|
||||||
|
# meta data
|
||||||
projectname = videodownloader
|
projectname = videodownloader
|
||||||
appname = "Video Downloader"
|
appname = "Video Downloader"
|
||||||
appauthor = Martchus
|
appauthor = Martchus
|
||||||
|
@ -12,19 +13,17 @@ VERSION = 1.2.1
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
# basic configuration: application
|
||||||
TEMPLATE = app
|
TEMPLATE = app
|
||||||
|
QT += core gui widgets network
|
||||||
|
|
||||||
QT += core gui network
|
# add defines for configuration
|
||||||
greaterThan(QT_MAJOR_VERSION, 4): QT += widgets
|
|
||||||
|
|
||||||
testdownload {
|
testdownload {
|
||||||
DEFINES += CONFIG_TESTDOWNLOAD
|
DEFINES += CONFIG_TESTDOWNLOAD
|
||||||
}
|
}
|
||||||
|
|
||||||
underconstruction {
|
underconstruction {
|
||||||
DEFINES += UNDER_CONSTRUCTION
|
DEFINES += UNDER_CONSTRUCTION
|
||||||
}
|
}
|
||||||
|
|
||||||
!notrayicon {
|
!notrayicon {
|
||||||
DEFINES += CONFIG_USE_TRAY_ICON
|
DEFINES += CONFIG_USE_TRAY_ICON
|
||||||
usetrayiconalways {
|
usetrayiconalways {
|
||||||
|
@ -32,39 +31,7 @@ underconstruction {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
SOURCES += application/main.cpp \
|
# add project files
|
||||||
network/bitsharedownload.cpp \
|
|
||||||
network/download.cpp \
|
|
||||||
model/downloadmodel.cpp \
|
|
||||||
network/downloadrange.cpp \
|
|
||||||
network/filenukedownload.cpp \
|
|
||||||
network/finder/downloadfinder.cpp \
|
|
||||||
network/finder/groovesharksearcher.cpp \
|
|
||||||
network/finder/youtubeplaylist.cpp \
|
|
||||||
model/downloadfinderresultsmodel.cpp \
|
|
||||||
network/finder/linkfinder.cpp \
|
|
||||||
network/groovesharkdownload.cpp \
|
|
||||||
network/httpdownload.cpp \
|
|
||||||
network/httpdownloadwithinforequst.cpp \
|
|
||||||
network/misc/contentdispositionparser.cpp \
|
|
||||||
network/socksharedownload.cpp \
|
|
||||||
network/youtubedownload.cpp \
|
|
||||||
gui/adddownloaddialog.cpp \
|
|
||||||
gui/addmultipledownloadswizard.cpp \
|
|
||||||
gui/downloadwidget.cpp \
|
|
||||||
gui/mainwindow.cpp \
|
|
||||||
gui/setrangedialog.cpp \
|
|
||||||
application/utils.cpp \
|
|
||||||
itemdelegates/comboboxitemdelegate.cpp \
|
|
||||||
itemdelegates/progressbaritemdelegate.cpp \
|
|
||||||
gui/downloadinteraction.cpp \
|
|
||||||
gui/settings.cpp \
|
|
||||||
network/optiondata.cpp \
|
|
||||||
gui/initiate.cpp \
|
|
||||||
cli/mainfeatures.cpp \
|
|
||||||
cli/clidownloadinteraction.cpp \
|
|
||||||
network/vimeodownload.cpp
|
|
||||||
|
|
||||||
HEADERS += application/main.h \
|
HEADERS += application/main.h \
|
||||||
network/bitsharedownload.h \
|
network/bitsharedownload.h \
|
||||||
network/download.h \
|
network/download.h \
|
||||||
|
@ -101,20 +68,57 @@ HEADERS += application/main.h \
|
||||||
cli/clidownloadinteraction.h \
|
cli/clidownloadinteraction.h \
|
||||||
network/vimeodownload.h
|
network/vimeodownload.h
|
||||||
|
|
||||||
|
SOURCES += application/main.cpp \
|
||||||
|
network/bitsharedownload.cpp \
|
||||||
|
network/download.cpp \
|
||||||
|
model/downloadmodel.cpp \
|
||||||
|
network/downloadrange.cpp \
|
||||||
|
network/filenukedownload.cpp \
|
||||||
|
network/finder/downloadfinder.cpp \
|
||||||
|
network/finder/groovesharksearcher.cpp \
|
||||||
|
network/finder/youtubeplaylist.cpp \
|
||||||
|
model/downloadfinderresultsmodel.cpp \
|
||||||
|
network/finder/linkfinder.cpp \
|
||||||
|
network/groovesharkdownload.cpp \
|
||||||
|
network/httpdownload.cpp \
|
||||||
|
network/httpdownloadwithinforequst.cpp \
|
||||||
|
network/misc/contentdispositionparser.cpp \
|
||||||
|
network/socksharedownload.cpp \
|
||||||
|
network/youtubedownload.cpp \
|
||||||
|
gui/adddownloaddialog.cpp \
|
||||||
|
gui/addmultipledownloadswizard.cpp \
|
||||||
|
gui/downloadwidget.cpp \
|
||||||
|
gui/mainwindow.cpp \
|
||||||
|
gui/setrangedialog.cpp \
|
||||||
|
application/utils.cpp \
|
||||||
|
itemdelegates/comboboxitemdelegate.cpp \
|
||||||
|
itemdelegates/progressbaritemdelegate.cpp \
|
||||||
|
gui/downloadinteraction.cpp \
|
||||||
|
gui/settings.cpp \
|
||||||
|
network/optiondata.cpp \
|
||||||
|
gui/initiate.cpp \
|
||||||
|
cli/mainfeatures.cpp \
|
||||||
|
cli/clidownloadinteraction.cpp \
|
||||||
|
network/vimeodownload.cpp
|
||||||
|
|
||||||
testdownload {
|
testdownload {
|
||||||
SOURCES += network/testdownload.cpp
|
HEADERS += \
|
||||||
HEADERS += network/testdownload.h
|
network/testdownload.h
|
||||||
|
|
||||||
|
SOURCES += \
|
||||||
|
network/testdownload.cpp
|
||||||
}
|
}
|
||||||
|
|
||||||
underconstruction {
|
underconstruction {
|
||||||
SOURCES += \
|
SOURCES += \
|
||||||
network/spotifydownload.cpp
|
network/spotifydownload.cpp
|
||||||
|
|
||||||
HEADERS += \
|
HEADERS += \
|
||||||
network/spotifydownload.h
|
network/spotifydownload.h
|
||||||
}
|
}
|
||||||
|
|
||||||
FORMS += gui/adddownloaddialog.ui \
|
FORMS += \
|
||||||
|
gui/adddownloaddialog.ui \
|
||||||
gui/downloadwidget.ui \
|
gui/downloadwidget.ui \
|
||||||
gui/setrangedialog.ui \
|
gui/setrangedialog.ui \
|
||||||
gui/mainwindow.ui \
|
gui/mainwindow.ui \
|
||||||
|
@ -125,12 +129,17 @@ FORMS += gui/adddownloaddialog.ui \
|
||||||
RESOURCES += resources/icons.qrc \
|
RESOURCES += resources/icons.qrc \
|
||||||
resources/json.qrc
|
resources/json.qrc
|
||||||
|
|
||||||
win32:include(windowsicon.pri)
|
|
||||||
|
|
||||||
OTHER_FILES += \
|
OTHER_FILES += \
|
||||||
README.md \
|
README.md \
|
||||||
LICENSE
|
LICENSE \
|
||||||
|
CMakeLists.txt \
|
||||||
|
resources/config.h.in \
|
||||||
|
resources/windows.rc.in
|
||||||
|
|
||||||
|
# make windows icon
|
||||||
|
win32:include(windowsicon.pri)
|
||||||
|
|
||||||
|
# add libs
|
||||||
CONFIG(debug, debug|release) {
|
CONFIG(debug, debug|release) {
|
||||||
LIBS += -lc++utilitiesd
|
LIBS += -lc++utilitiesd
|
||||||
!no-gui {
|
!no-gui {
|
||||||
|
|
Loading…
Reference in New Issue