updated project files

- added Opus description
- added build switches to CMake project
This commit is contained in:
Martchus 2016-01-17 23:01:57 +01:00
parent 4c61c9a9d4
commit c08d82c3b6
4 changed files with 86 additions and 25 deletions

View File

@ -5,9 +5,9 @@ set(META_PROJECT_NAME tageditor)
set(META_APP_NAME "Tag Editor") set(META_APP_NAME "Tag Editor")
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 tageditor with Qt GUI and command line interface. Supports MP4 (iTunes), ID3, Vorbis and Matroska.") set(META_APP_DESCRIPTION "A tageditor with Qt GUI and command line interface. Supports MP4 (iTunes), ID3, Vorbis, Opus and Matroska.")
set(META_VERSION_MAJOR 1) set(META_VERSION_MAJOR 1)
set(META_VERSION_MINOR 3) set(META_VERSION_MINOR 4)
set(META_VERSION_PATCH 0) set(META_VERSION_PATCH 0)
# stringification of meta data # stringification of meta data
@ -86,7 +86,7 @@ set(WIDGETS_SRC_FILES
renamingutility/filesystemitemmodel.cpp renamingutility/filesystemitemmodel.cpp
renamingutility/filteredfilesystemitemmodel.cpp renamingutility/filteredfilesystemitemmodel.cpp
renamingutility/renamingengine.cpp renamingutility/renamingengine.cpp
renamingutility/tageditorobject.h renamingutility/tageditorobject.cpp
resources/icons.qrc resources/icons.qrc
resources/scripts.qrc resources/scripts.qrc
) )
@ -143,13 +143,9 @@ if(MINGW)
enable_language(RC) enable_language(RC)
endif(MINGW) endif(MINGW)
# enable Qt Widgets GUI # read cached variables
# disable new ABI (can't catch ios_base::failure with new ABI) SET(JS_PROVIDER "auto" CACHE STRING "specifies the JavaScript provider: auto, qml or script")
add_definitions( SET(WEBVIEW_PROVIDER "auto" CACHE STRING "specifies the webview provider: auto, webkit or webengine")
-DGUI_QTWIDGETS
-DMODEL_UNDO_SUPPORT
-D_GLIBCXX_USE_CXX11_ABI=0
)
# check required Qt 5 modules # check required Qt 5 modules
find_package(Qt5Core REQUIRED) find_package(Qt5Core REQUIRED)
@ -157,13 +153,66 @@ find_package(Qt5Gui REQUIRED)
find_package(Qt5Widgets REQUIRED) find_package(Qt5Widgets REQUIRED)
find_package(Qt5LinguistTools REQUIRED) find_package(Qt5LinguistTools REQUIRED)
find_package(Qt5Script REQUIRED) find_package(Qt5Script REQUIRED)
find_package(Qt5WebKitWidgets) # select Qt module providing JavaScript (either Qt Script or Qt Qml)
if(Qt5WebKitWidgets_FOUND) if(${JS_PROVIDER} STREQUAL "auto")
set(WEBVIEW_PROVIDER Qt5::WebKitWidgets) find_package(Qt5Script)
if(Qt5Script_FOUND)
set(JS_PROVIDER Qt5::Script)
message(STATUS "No JavaScript provider explicitely specified, defaulting to Qt Script.")
else()
find_package(Qt5Qml REQUIRED)
set(JS_PROVIDER Qt5::Qml)
message(STATUS "No JavaScript provider explicitely specified, defaulting to Qt Qml.")
endif()
else() else()
find_package(Qt5WebEngineWidgets REQUIRED) if(${JS_PROVIDER} STREQUAL "script")
set(WEBVIEW_PROVIDER Qt5::Qt5WebEngineWidgets) find_package(Qt5Script REQUIRED)
set(JS_PROVIDER Qt5::Script)
message(STATUS "Using Qt Script as JavaScript provider.")
elseif(${JS_PROVIDER} STREQUAL "qml")
find_package(Qt5Qml REQUIRED)
set(JS_PROVIDER Qt5::Qml)
set(JS_DEFINITION -DTAGEDITOR_USE_JSENGINE)
message(STATUS "Using Qt Qml as JavaScript provider.")
else()
message(FATAL_ERROR "The specified JavaScript provider '${JS_PROVIDER}' is unknown.")
endif()
endif() endif()
# select Qt module providing webview (either Qt WebKit or Qt WebEngine)
if(${WEBVIEW_PROVIDER} STREQUAL "auto")
find_package(Qt5WebKitWidgets)
if(Qt5WebKitWidgets_FOUND)
set(WEBVIEW_PROVIDER Qt5::WebKitWidgets)
message(STATUS "No webview provider explicitely specified, defaulting to Qt WebKit.")
else()
find_package(Qt5WebEngineWidgets REQUIRED)
set(WEBVIEW_PROVIDER Qt5::WebEngineWidgets)
message(STATUS "No webview provider explicitely specified, defaulting to Qt WebEngine.")
endif()
else()
if(${WEBVIEW_PROVIDER} STREQUAL "webkit")
find_package(Qt5WebKitWidgets REQUIRED)
set(WEBVIEW_PROVIDER Qt5::WebKitWidgets)
message(STATUS "Using Qt WebKit as webview provider.")
elseif(${WEBVIEW_PROVIDER} STREQUAL "webengine")
find_package(Qt5WebEngineWidgets REQUIRED)
set(WEBVIEW_PROVIDER Qt5::WebEngineWidgets)
set(WEBVIEW_DEFINITION -DTAGEDITOR_USE_WEBENGINE)
message(STATUS "Using Qt WebEngine as webview provider.")
else()
message(FATAL_ERROR "The specified webview provider '${WEBVIEW_PROVIDER}' is unknown.")
endif()
endif()
# enable Qt Widgets GUI
# disable new ABI (can't catch ios_base::failure with new ABI)
add_definitions(
-DGUI_QTWIDGETS
-DMODEL_UNDO_SUPPORT
-D_GLIBCXX_USE_CXX11_ABI=0
${JS_DEFINITION}
${WEBVIEW_DEFINITION}
)
# enable moc, uic and rcc # enable moc, uic and rcc
set(CMAKE_AUTOMOC ON) set(CMAKE_AUTOMOC ON)
@ -177,7 +226,7 @@ ADD_CUSTOM_TARGET(translations ALL DEPENDS ${QM_FILES})
# executable and linking # executable and linking
add_executable(${META_PROJECT_NAME} ${GUI_TYPE} ${HEADER_FILES} ${SRC_FILES} ${WIDGETS_HEADER_FILES} ${WIDGETS_SRC_FILES} ${QM_FILES} ${RES_FILES} ${WINDOWS_ICON_PATH}) 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 tagparser pthread Qt5::Core Qt5::Widgets Qt5::Script ${WEBVIEW_PROVIDER}) target_link_libraries(${META_PROJECT_NAME} c++utilities qtutilities tagparser pthread Qt5::Core Qt5::Widgets ${JS_PROVIDER} ${WEBVIEW_PROVIDER})
set_target_properties(${META_PROJECT_NAME} PROPERTIES set_target_properties(${META_PROJECT_NAME} PROPERTIES
CXX_STANDARD 11 CXX_STANDARD 11
) )

View File

@ -5,7 +5,7 @@ A tag editor with Qt GUI and command-line interface. Supports MP4 (iTunes), ID3,
The tag editor can read and write the following tag formats: The tag editor can read and write the following tag formats:
- iTunes-style MP4 tags (MP4-DASH is supported) - iTunes-style MP4 tags (MP4-DASH is supported)
- ID3v1 and ID3v2 tags - ID3v1 and ID3v2 tags
- Vorbis comments (cover art via "METADATA_BLOCK_PICTURE" is supported) - Vorbis and Opus comments (cover art via "METADATA_BLOCK_PICTURE" is supported) in Ogg streams
- Matroska/WebM tags and attachments - Matroska/WebM tags and attachments
## Additional features ## Additional features
@ -27,6 +27,8 @@ or appending the tag. Usage of padding can be configured:
However, it is also possible to force rewriting the entire file. However, it is also possible to force rewriting the entire file.
Taking advantage of padding is currently not supported when dealing with Ogg stream.
## Download / repository ## Download / repository
I currently provide packages for Arch Linux and Windows. For more information checkout my I currently provide packages for Arch Linux and Windows. For more information checkout my
[website](http://martchus.netai.net/page.php?name=programming). [website](http://martchus.netai.net/page.php?name=programming).
@ -111,15 +113,16 @@ Here are some Bash examples which illustrate getting and setting tag information
a file has been processed. a file has been processed.
## Build instructions ## Build instructions
The application depends on c++utilities, qtutilities and tagparser and is built in the same way as these libaries. The application depends on c++utilities, qtutilities and tagparser and is built in the same way as these libaries
which are also available on my GitHub profile.
The following Qt 5 modules are requried: core gui qml/script widgets webenginewidgets/webkitwidgets The following Qt 5 modules are requried: core gui qml/script widgets webenginewidgets/webkitwidgets
If script is installed on the system, the editor will link against it. Otherwise it will link against qml. * If Qt Script is installed on the system, the editor will link against it. Otherwise it will link against qml.
To force usage of qml add "CONFIG+=forcejsengine" to the qmake arguments. To force usage of Qt Qml add "CONFIG+=forcejsengine" to the qmake arguments.
* If Qt WebKitWidgets is installed on the system, the editor will link against it. Otherwise it will link against Qt WebEngineWidgets.
If webkitwidgets is installed on the system, the editor will link against it. Otherwise it will link against webenginewidgets. To force usage of Qt WebEngineWidgets add "CONFIG+=forcewebengine" to the qmake arguments.
To force usage of webenginewidgets add "CONFIG+=forcewebengine" to the qmake arguments. * When building with CMake the Qt modules can be picked explicitely by specifying -DWEBVIEW_PROVIDER=webkit/webengine and/or -DJS_PROVIDER=script/qml.
## TODO ## TODO
- Support more tag formats (EXIF, PDF metadata, ...). - Support more tag formats (EXIF, PDF metadata, ...).

View File

@ -0,0 +1,9 @@
[Desktop Entry]
Name=Tag Editor
GenericName=Renaming utility (Tag Editor)
Comment=Tool to rename files using tag information.
Exec=tageditor qt-gui --renaming-utility
Icon=tageditor
Terminal=false
Type=Application
Categories=Utility;Audio;Video;

View File

@ -3,8 +3,8 @@ projectname = tageditor
appname = "Tag Editor" appname = "Tag Editor"
appauthor = Martchus appauthor = Martchus
appurl = "https://github.com/$${appauthor}/$${projectname}" appurl = "https://github.com/$${appauthor}/$${projectname}"
QMAKE_TARGET_DESCRIPTION = "A tageditor with Qt GUI and command line interface. Supports MP4 (iTunes), ID3, Vorbis and Matroska." QMAKE_TARGET_DESCRIPTION = "A tageditor with Qt GUI and command line interface. Supports MP4 (iTunes), ID3, Vorbis, Opus and Matroska."
VERSION = 1.3.0 VERSION = 1.4.0
# include ../../common.pri when building as part of a subdirs project; otherwise include general.pri # include ../../common.pri when building as part of a subdirs project; otherwise include general.pri
!include(../../common.pri) { !include(../../common.pri) {