Compare commits

...

5 Commits
0.1.3 ... 0.1.4

Author SHA1 Message Date
Jonas Kvinge
6b1ae5d5ac Release 0.1.4 2018-05-14 19:37:32 +02:00
Jonas Kvinge
e84681f93a Update README 2018-05-14 18:14:15 +02:00
Jonas Kvinge
7356344136 Fix compile with clang and openbsd 2018-05-14 17:57:37 +02:00
Jonas Kvinge
4746922e9f Change spelling 2018-05-12 20:31:24 +02:00
Jonas Kvinge
54c2ad13a9 Change to target_link_libraries in makefiles 2018-05-12 20:30:16 +02:00
20 changed files with 522 additions and 610 deletions

View File

@@ -1,3 +1,6 @@
cmake_minimum_required(VERSION 2.8.11)
set(CMAKE_CXX_STANDARD 11)
set(SOURCES)
set(HEADERS
@@ -26,7 +29,5 @@ else()
qt5_add_resources(RESOURCES_SOURCES ${RESOURCES})
endif()
add_library(Qocoa STATIC
${SOURCES} ${MOC_SOURCES} ${RESOURCES_SOURCES}
)
add_library(Qocoa STATIC ${SOURCES} ${MOC_SOURCES} ${RESOURCES_SOURCES})
target_link_libraries(Qocoa ${QT_LIBRARIES})

View File

@@ -1,4 +1,5 @@
cmake_minimum_required(VERSION 2.8.11)
set(CMAKE_CXX_STANDARD 11)
set(SINGLEAPP-SOURCES
qtlocalpeer.cpp
@@ -25,4 +26,4 @@ ADD_LIBRARY(qtsingleapplication STATIC
${SINGLEAPP-SOURCES-MOC}
)
QT5_USE_MODULES(qtsingleapplication Core Widgets Network)
target_link_libraries(qtsingleapplication Qt5::Core Qt5::Widgets Qt5::Network)

View File

@@ -1,4 +1,5 @@
cmake_minimum_required(VERSION 2.8.11)
set(CMAKE_CXX_STANDARD 11)
set(QTWIN-SOURCES
qtwin.cpp

View File

@@ -1,4 +1,5 @@
cmake_minimum_required(VERSION 2.8.11)
set(CMAKE_CXX_STANDARD 11)
set(QXT-SOURCES
qxtglobal.cpp
@@ -29,7 +30,7 @@ ADD_LIBRARY(qxt STATIC
)
if(WIN32)
QT5_USE_MODULES(qxt Core Widgets)
target_link_libraries(qxt Qt5::Core Qt5::Widgets)
else(WIN32)
QT5_USE_MODULES(qxt Core Widgets X11Extras)
target_link_libraries(qxt Qt5::Core Qt5::Widgets Qt5::X11Extras)
endif(WIN32)

View File

@@ -1,3 +1,4 @@
cmake_minimum_required(VERSION 2.8.11)
set(CMAKE_CXX_STANDARD 11)
add_library(sha2 STATIC sha2.cpp)

View File

@@ -1,3 +1,5 @@
cmake_minimum_required(VERSION 2.8.11)
set(CMAKE_CXX_STANDARD 11)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-delete-non-virtual-dtor")
set(TAGLIB_SOVERSION_CURRENT 17)

View File

@@ -1 +1,2 @@
cmake_minimum_required(VERSION 2.8.11)
set(CMAKE_CXX_STANDARD 11)

View File

@@ -29,9 +29,19 @@ include(cmake/Summary.cmake)
include(cmake/OptionalSource.cmake)
include(cmake/Rpm.cmake)
#set(CMAKE_BUILD_TYPE Debug)
if (${CMAKE_SYSTEM_NAME} STREQUAL "Linux")
set(LINUX 1)
endif()
if (${CMAKE_SYSTEM_NAME} STREQUAL "FreeBSD")
set(FREEBSD 1)
endif()
if (${CMAKE_SYSTEM_NAME} STREQUAL "OpenBSD")
set(OPENBSD 1)
endif()
set(CMAKE_CXX_STANDARD 11)
set(CMAKE_MODULE_PATH ${CMAKE_SOURCE_DIR}/cmake)
#set(CMAKE_BUILD_TYPE Debug)
if(${CMAKE_BUILD_TYPE} MATCHES "Release")
add_definitions(-DNDEBUG)
@@ -42,11 +52,11 @@ endif(${CMAKE_BUILD_TYPE} MATCHES "Release")
if (CMAKE_CXX_COMPILER MATCHES ".*clang")
set(CMAKE_COMPILER_IS_CLANGXX 1)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-uninitialized")
endif ()
endif()
if (APPLE)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} --stdlib=libc++")
endif ()
endif(APPLE)
find_program(CCACHE_EXECUTABLE NAMES ccache)
if (CCACHE_EXECUTABLE)
@@ -57,10 +67,6 @@ endif ()
find_program(QT_LCONVERT_EXECUTABLE NAMES lconvert lconvert-qt5 PATHS ${QT_BINARY_DIR} NO_DEFAULT_PATH)
find_program(QT_LCONVERT_EXECUTABLE NAMES lconvert lconvert-qt5)
if (UNIX AND NOT APPLE)
set(LINUX 1)
endif (UNIX AND NOT APPLE)
find_package(PkgConfig REQUIRED)
pkg_check_modules(GLIB REQUIRED glib-2.0)
pkg_check_modules(GIO REQUIRED gio-2.0)
@@ -72,7 +78,12 @@ find_package(Protobuf REQUIRED)
find_library(PROTOBUF_STATIC_LIBRARY libprotobuf.a libprotobuf)
if(LINUX)
find_package(ALSA REQUIRED)
else(LINUX)
find_package(ALSA)
endif(LINUX)
if(ALSA_FOUND)
set(HAVE_ALSA ON)
endif()
find_package(X11)
pkg_check_modules(GSTREAMER gstreamer-1.0)
pkg_check_modules(GSTREAMER_BASE gstreamer-base-1.0)
@@ -95,9 +106,9 @@ pkg_check_modules(IMOBILEDEVICE libimobiledevice-1.0)
pkg_check_modules(USBMUXD libusbmuxd)
pkg_check_modules(PLIST libplist)
if (WIN32)
if(WIN32)
find_package(ZLIB REQUIRED)
endif (WIN32)
endif(WIN32)
# QT
set(QT_MIN_VERSION 5.6.0)
@@ -223,7 +234,7 @@ optional_component(LIBGPOD ON "Devices: iPod classic support"
optional_component(GIO ON "Devices: GIO device backend"
DEPENDS "libgio" GIO_FOUND
DEPENDS "Linux or Windows" "NOT APPLE"
DEPENDS "Unix or Windows" "NOT APPLE"
)
optional_component(IMOBILEDEVICE ON "Devices: iPod Touch, iPhone, iPad support"
@@ -242,7 +253,7 @@ optional_component(LIBLASTFM ON "Last.fm support"
)
optional_component(DBUS ON "D-Bus support"
DEPENDS "Linux" LINUX
DEPENDS "Unix" "NOT APPLE"
)
optional_component(DEVICEKIT ON "Devices: DeviceKit backend"
@@ -326,6 +337,7 @@ else (USE_SYSTEM_QXT)
endif (USE_SYSTEM_QXT)
# Qocoa
set(QOCOA_LIBRARIES Qocoa)
add_subdirectory(3rdparty/qocoa)
#if(IMOBILEDEVICE_FOUND AND PLIST_FOUND)

View File

@@ -19,7 +19,7 @@ It's written in C++ and Qt5. The name is inspired by the band Strawbs.
You can obtain and view the sourcecode on github at: https://github.com/jonaski/strawberry
It has so far been tested on Linux and cross compiled for Windows. I have not had a chance to test it on Mac OS X since I don't have a mac.
It has so far been tested on Linux, OpenBSD and cross compiled for Windows. I have not had a chance to test it on Mac OS X since I don't have a mac.
Requirements

View File

@@ -1,6 +1,6 @@
set(STRAWBERRY_VERSION_MAJOR 0)
set(STRAWBERRY_VERSION_MINOR 1)
set(STRAWBERRY_VERSION_PATCH 3)
set(STRAWBERRY_VERSION_PATCH 4)
#set(STRAWBERRY_VERSION_PRERELEASE rc1)
set(INCLUDE_GIT_REVISION OFF)

File diff suppressed because it is too large Load Diff

View File

@@ -38,4 +38,4 @@ target_link_libraries(libstrawberry-common
${CMAKE_THREAD_LIBS_INIT}
)
QT5_USE_MODULES(libstrawberry-common Core Network)
target_link_libraries(libstrawberry-common Qt5::Core Qt5::Network)

View File

@@ -16,8 +16,9 @@
# You should have received a copy of the GNU General Public License
# along with Strawberry. If not, see <http://www.gnu.org/licenses/>.
set(CMAKE_CXX_STANDARD 11)
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wall")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -Woverloaded-virtual -Wno-sign-compare -Wno-deprecated-declarations -Wno-unused-local-typedefs -fpermissive --std=c++0x -U__STRICT_ANSI__")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -Woverloaded-virtual -Wno-sign-compare -Wno-deprecated-declarations -Wno-unused-local-typedefs -fpermissive --std=c++11 -U__STRICT_ANSI__")
option(BUILD_WERROR "Build with -Werror" ON)
@@ -504,7 +505,7 @@ optional_source(HAVE_LIBLASTFM
)
# Platform specific - Linux
optional_source(LINUX
optional_source(HAVE_ALSA
SOURCES
engine/alsadevicefinder.cpp
)
@@ -535,7 +536,7 @@ optional_source(APPLE
globalshortcuts/macglobalshortcutbackend.h
)
if(APPLE)
if (APPLE)
optional_source(HAVE_LIBMTP
SOURCES
device/macdevicelister.mm
@@ -552,9 +553,9 @@ optional_source(WIN32
)
# Platform specific - X11
optional_source(LINUX SOURCES widgets/osd_x11.cpp)
optional_source(UNIX SOURCES widgets/osd_x11.cpp)
# DBUS and MPRIS - Linux specific
# DBUS and MPRIS - Unix specific
if(HAVE_DBUS)
file(MAKE_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/dbus)
@@ -827,7 +828,6 @@ add_library(strawberry_lib STATIC
target_link_libraries(strawberry_lib
libstrawberry-common
libstrawberry-tagreader
#gstafc
${GLIB_LIBRARIES}
${GIO_LIBRARIES}
${SHA2_LIBRARIES}
@@ -839,13 +839,13 @@ target_link_libraries(strawberry_lib
${QTSINGLEAPPLICATION_LIBRARIES}
${CMAKE_THREAD_LIBS_INIT}
${SQLITE_LIBRARIES}
${QOCOA_LIBRARIES}
z
Qocoa
)
if(LINUX)
if(HAVE_ALSA)
target_link_libraries(strawberry_lib ${ALSA_LIBRARIES})
endif(LINUX)
endif(HAVE_ALSA)
if(HAVE_LIBLASTFM)
target_link_libraries(strawberry_lib ${LASTFM5_LIBRARIES})
@@ -910,13 +910,11 @@ if (WIN32)
endif (WIN32)
if (UNIX AND NOT APPLE)
# Hack: the Gold linker pays attention to the order that libraries are
# specified on the link line. -lX11 and -ldl are provided earlier in the link
# command but they're actually used by libraries that appear after them, so
# they end up getting ignored. This appends them to the very end of the link
# line, ensuring they're always used.
# Hack: the Gold linker pays attention to the order that libraries are specified on the link line.
# -lX11 and -ldl are provided earlier in the link command but they're actually used by libraries that appear after them, so they end up getting ignored.
# This appends them to the very end of the link line, ensuring they're always used.
find_package(X11)
if (${CMAKE_SYSTEM_NAME} MATCHES "FreeBSD")
if (FREEBSD)
target_link_libraries(strawberry_lib ${X11_X11_LIB})
else ()
target_link_libraries(strawberry_lib ${X11_X11_LIB} ${CMAKE_DL_LIBS})
@@ -948,9 +946,9 @@ add_executable(strawberry
core/main.cpp
)
if (${CMAKE_SYSTEM_NAME} MATCHES "FreeBSD")
if(FREEBSD)
target_link_libraries(strawberry execinfo)
endif (${CMAKE_SYSTEM_NAME} MATCHES "FreeBSD")
endif()
target_link_libraries(strawberry
strawberry_lib

View File

@@ -167,16 +167,13 @@ bool CommandlineOptions::Parse() {
.arg(tr("Skip backwards in playlist"),
tr("Skip forwards in playlist"),
tr("Set the volume to <value> percent"),
tr("Increase the volume by 4%"),
tr("Decrease the volume by 4%"),
tr("Increase the volume by 4 precent"),
tr("Decrease the volume by 4 precent"),
tr("Increase the volume by <value> percent"),
tr("Decrease the volume by <value> percent"))
.arg(tr("Seek the currently playing track to an absolute "
"position"),
tr("Seek the currently playing track by a relative "
"amount"),
tr("Restart the track, or play the previous track if "
"within 8 seconds of start."),
.arg(tr("Seek the currently playing track to an absolute position"),
tr("Seek the currently playing track by a relative amount"),
tr("Restart the track, or play the previous track if within 8 seconds of start."),
tr("Playlist options"),
tr("Create a new playlist with files"),
tr("Append files/URLs to the playlist"),

View File

@@ -647,6 +647,7 @@ MainWindow::MainWindow(Application *app, SystemTrayIcon *tray_icon, OSD *osd, co
FancyTabWidget::Mode default_mode = FancyTabWidget::Mode_LargeSidebar;
ui_->tabs->SetMode(FancyTabWidget::Mode(settings_.value("tab_mode", default_mode).toInt()));
file_view_->SetPath(settings_.value("file_path", QDir::homePath()).toString());
TabSwitched();
// Users often collapse one side of the splitter by mistake and don't know how to restore it. This must be set after the state is restored above.
@@ -729,7 +730,6 @@ void MainWindow::ReloadSettings() {
doubleclick_playlist_addmode_ = PlaylistAddBehaviour(settings.value("doubleclick_playlist_addmode", PlaylistAddBehaviour_Play).toInt());
menu_playmode_ = PlayBehaviour(settings.value("menu_playmode", PlayBehaviour_IfStopped).toInt());
settings.endGroup();
}
void MainWindow::ReloadAllSettings() {

View File

@@ -365,9 +365,9 @@ QString Song::TextForFiletype(FileType type) {
switch (type) {
case Song::Type_Wav: return QObject::tr("Wav");
case Song::Type_Flac: return QObject::tr("Flac");
case Song::Type_Flac: return QObject::tr("FLAC");
case Song::Type_WavPack: return QObject::tr("WavPack");
case Song::Type_OggFlac: return QObject::tr("Ogg Flac");
case Song::Type_OggFlac: return QObject::tr("Ogg FLAC");
case Song::Type_OggVorbis: return QObject::tr("Ogg Vorbis");
case Song::Type_OggOpus: return QObject::tr("Ogg Opus");
case Song::Type_OggSpeex: return QObject::tr("Ogg Speex");

View File

@@ -124,7 +124,7 @@ QVariantMap DeviceKitLister::DeviceHardwareInfo(const QString &id) {
if (!device_data_.contains(id)) return ret;
const DeviceData &data = device_data_[id];
ret[QT_TR_NOOP("DBus path")] = data.dbus_path;
ret[QT_TR_NOOP("D-Bus path")] = data.dbus_path;
ret[QT_TR_NOOP("Serial number")] = data.drive_serial;
ret[QT_TR_NOOP("Mount points")] = data.device_mount_paths.join(", ");
ret[QT_TR_NOOP("Device")] = data.device_file;

View File

@@ -100,7 +100,7 @@ QVariantMap Udisks2Lister::DeviceHardwareInfo(const QString &id) {
QVariantMap result;
const auto &data = device_data_[id];
result[QT_TR_NOOP("DBus path")] = data.dbus_path;
result[QT_TR_NOOP("D-Bus path")] = data.dbus_path;
result[QT_TR_NOOP("Serial number")] = data.serial;
result[QT_TR_NOOP("Mount points")] = data.mount_paths.join(", ");
result[QT_TR_NOOP("Partition label")] = data.label;

View File

@@ -239,7 +239,7 @@ TranscoderPreset Transcoder::PresetForFileType(Song::FileType type) {
switch (type) {
case Song::Type_Flac:
return TranscoderPreset(type, tr("Flac"), "flac", "audio/x-flac");
return TranscoderPreset(type, tr("FLAC"), "flac", "audio/x-flac");
case Song::Type_Mp4:
return TranscoderPreset(type, tr("M4A AAC"), "mp4", "audio/mpeg, mpegversion=(int)4", "audio/mp4");
case Song::Type_Mpeg:
@@ -247,7 +247,7 @@ TranscoderPreset Transcoder::PresetForFileType(Song::FileType type) {
case Song::Type_OggVorbis:
return TranscoderPreset(type, tr("Ogg Vorbis"), "ogg", "audio/x-vorbis", "application/ogg");
case Song::Type_OggFlac:
return TranscoderPreset(type, tr("Ogg Flac"), "ogg", "audio/x-flac", "application/ogg");
return TranscoderPreset(type, tr("Ogg FLAC"), "ogg", "audio/x-flac", "application/ogg");
case Song::Type_OggSpeex:
return TranscoderPreset(type, tr("Ogg Speex"), "spx", "audio/x-speex", "application/ogg");
case Song::Type_OggOpus:

View File

@@ -87,7 +87,7 @@ StatusView::StatusView(CollectionViewContainer *collectionviewcontainer, QWidget
show_hide_animation_(new QTimeLine(500, this)),
fade_animation_(new QTimeLine(1000, this)),
image_blank_(""),
image_nosong_(":/icons/full/strawberry.png"),
image_nosong_(":/pictures/strawberry.png"),
widgetstate_(None),
menu_(new QMenu(this))
{
@@ -348,7 +348,7 @@ void StatusView::NoSong() {
//qLog(Debug) << __PRETTY_FUNCTION__;
QString html;
QImage image_logo(":/icons/full/strawberry.png");
QImage image_logo(":/pictures/strawberry.png");
QImage image_logo_scaled = image_logo.scaled(300, 300, Qt::KeepAspectRatio);
QPixmap pixmap_logo(QPixmap::fromImage(image_logo_scaled));