Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
no longer maintaining the app for sailfishos
Many pages are now broken since Jolla upgrade to Sailfish 4.0.
As I have no more device even time for maintaining the app for this platform,
the project is deleted from sources on the master branch.
  • Loading branch information
janbar committed Apr 10, 2021
1 parent 1814783 commit 95706ed
Show file tree
Hide file tree
Showing 122 changed files with 53 additions and 15,627 deletions.
135 changes: 49 additions & 86 deletions CMakeLists.txt
Expand Up @@ -3,9 +3,8 @@ cmake_minimum_required(VERSION 3.8.2)
set(CMAKE_MODULE_PATH "${CMAKE_SOURCE_DIR}/cmake")

option(INSTALL_TESTS "Install the tests on make install" OFF)
option(BUILD_SAILFISHOS "Build the SailfishOS application" OFF)

if(IOS OR BUILD_SAILFISHOS)
if(IOS)
set(QT_STATICPLUGIN ON CACHE BOOL "Build static plugins" FORCE)
endif()

Expand All @@ -14,21 +13,9 @@ set(APP_VERSION_CODE 73)
set(APP_ID "io.github.janbar.noson")
set(APP_NAME "noson")

if(QT_STATICPLUGIN)
if(BUILD_SAILFISHOS)
set(EXEC "harbour-noson")
set(ICON_NAME "${EXEC}")
set(APP_DESKTOP_ID "${EXEC}")
else()
set(EXEC "noson")
set(ICON_NAME "${EXEC}")
set(APP_DESKTOP_ID "${EXEC}")
endif()
else()
set(EXEC "noson-app")
set(ICON_NAME "${APP_NAME}")
set(APP_DESKTOP_ID "${APP_ID}")
endif()
set(EXEC "noson-app")
set(ICON_NAME "${APP_NAME}")
set(APP_DESKTOP_ID "${APP_ID}")

set(ICON_FILE "noson.png")
set(DESKTOP_FILE_NAME "noson.desktop")
Expand Down Expand Up @@ -60,85 +47,61 @@ if(NOT QT_STATICPLUGIN)
)
endif()

if(BUILD_SAILFISHOS)
file(WRITE ${CMAKE_CURRENT_BINARY_DIR}/${APP_DESKTOP_ID}.desktop "[Desktop Entry]
Name=${APP_NAME}
Exec=${EXEC}
Icon=${ICON_NAME}
Type=Application
Categories=AudioVideo;Audio;
X-Nemo-Application-Type=generic")

install(
FILES ${CMAKE_CURRENT_BINARY_DIR}/${APP_DESKTOP_ID}.desktop
DESTINATION ${DESKTOP_DIR}
)

install(FILES "gui/silica/images/${ICON_NAME}-86x86.png"
DESTINATION ${CMAKE_INSTALL_DATADIR}/icons/hicolor/86x86/apps RENAME "${ICON_NAME}.png")
install(FILES "gui/silica/images/${ICON_NAME}-108x108.png"
DESTINATION ${CMAKE_INSTALL_DATADIR}/icons/hicolor/108x108/apps RENAME "${ICON_NAME}.png")
install(FILES "gui/silica/images/${ICON_NAME}-128x128.png"
DESTINATION ${CMAKE_INSTALL_DATADIR}/icons/hicolor/128x128/apps RENAME "${ICON_NAME}.png")
install(FILES "gui/silica/images/${ICON_NAME}-172x172.png"
DESTINATION ${CMAKE_INSTALL_DATADIR}/icons/hicolor/172x172/apps RENAME "${ICON_NAME}.png")
else()
file(WRITE ${CMAKE_CURRENT_BINARY_DIR}/${APP_DESKTOP_ID}.desktop "[Desktop Entry]
file(WRITE ${CMAKE_CURRENT_BINARY_DIR}/${APP_DESKTOP_ID}.desktop "[Desktop Entry]
Name=${APP_NAME}
Exec=${EXEC}
Icon=${ICON_NAME}
Terminal=false
Type=Application
Categories=AudioVideo;Audio;")

install(
FILES ${CMAKE_CURRENT_BINARY_DIR}/${APP_DESKTOP_ID}.desktop
DESTINATION ${DESKTOP_DIR}
)
install(
FILES ${CMAKE_CURRENT_BINARY_DIR}/${APP_DESKTOP_ID}.desktop
DESTINATION ${DESKTOP_DIR}
)

install(FILES "gui/icons/${ICON_NAME}-8x8.png"
DESTINATION ${CMAKE_INSTALL_DATADIR}/icons/hicolor/8x8/apps RENAME "${ICON_NAME}.png")
install(FILES "gui/icons/${ICON_NAME}-16x16.png"
DESTINATION ${CMAKE_INSTALL_DATADIR}/icons/hicolor/16x16/apps RENAME "${ICON_NAME}.png")
install(FILES "gui/icons/${ICON_NAME}-22x22.png"
DESTINATION ${CMAKE_INSTALL_DATADIR}/icons/hicolor/22x22/apps RENAME "${ICON_NAME}.png")
install(FILES "gui/icons/${ICON_NAME}-24x24.png"
DESTINATION ${CMAKE_INSTALL_DATADIR}/icons/hicolor/24x24/apps RENAME "${ICON_NAME}.png")
install(FILES "gui/icons/${ICON_NAME}-32x32.png"
DESTINATION ${CMAKE_INSTALL_DATADIR}/icons/hicolor/32x32/apps RENAME "${ICON_NAME}.png")
install(FILES "gui/icons/${ICON_NAME}-36x36.png"
DESTINATION ${CMAKE_INSTALL_DATADIR}/icons/hicolor/36x36/apps RENAME "${ICON_NAME}.png")
install(FILES "gui/icons/${ICON_NAME}-42x42.png"
DESTINATION ${CMAKE_INSTALL_DATADIR}/icons/hicolor/42x42/apps RENAME "${ICON_NAME}.png")
install(FILES "gui/icons/${ICON_NAME}-48x48.png"
DESTINATION ${CMAKE_INSTALL_DATADIR}/icons/hicolor/48x48/apps RENAME "${ICON_NAME}.png")
install(FILES "gui/icons/${ICON_NAME}-64x64.png"
DESTINATION ${CMAKE_INSTALL_DATADIR}/icons/hicolor/64x64/apps RENAME "${ICON_NAME}.png")
install(FILES "gui/icons/${ICON_NAME}-72x72.png"
DESTINATION ${CMAKE_INSTALL_DATADIR}/icons/hicolor/72x72/apps RENAME "${ICON_NAME}.png")
install(FILES "gui/icons/${ICON_NAME}-80x80.png"
DESTINATION ${CMAKE_INSTALL_DATADIR}/icons/hicolor/80x80/apps RENAME "${ICON_NAME}.png")
install(FILES "gui/icons/${ICON_NAME}-96x96.png"
DESTINATION ${CMAKE_INSTALL_DATADIR}/icons/hicolor/96x96/apps RENAME "${ICON_NAME}.png")
install(FILES "gui/icons/${ICON_NAME}-128x128.png"
DESTINATION ${CMAKE_INSTALL_DATADIR}/icons/hicolor/128x128/apps RENAME "${ICON_NAME}.png")
install(FILES "gui/icons/${ICON_NAME}-192x192.png"
DESTINATION ${CMAKE_INSTALL_DATADIR}/icons/hicolor/192x192/apps RENAME "${ICON_NAME}.png")
install(FILES "gui/icons/${ICON_NAME}-256x256.png"
DESTINATION ${CMAKE_INSTALL_DATADIR}/icons/hicolor/256x256/apps RENAME "${ICON_NAME}.png")
install(FILES "gui/icons/${ICON_NAME}-512x512.png"
DESTINATION ${CMAKE_INSTALL_DATADIR}/icons/hicolor/512x512/apps RENAME "${ICON_NAME}.png")
install(FILES "gui/icons/${ICON_NAME}-8x8.png"
DESTINATION ${CMAKE_INSTALL_DATADIR}/icons/hicolor/8x8/apps RENAME "${ICON_NAME}.png")
install(FILES "gui/icons/${ICON_NAME}-16x16.png"
DESTINATION ${CMAKE_INSTALL_DATADIR}/icons/hicolor/16x16/apps RENAME "${ICON_NAME}.png")
install(FILES "gui/icons/${ICON_NAME}-22x22.png"
DESTINATION ${CMAKE_INSTALL_DATADIR}/icons/hicolor/22x22/apps RENAME "${ICON_NAME}.png")
install(FILES "gui/icons/${ICON_NAME}-24x24.png"
DESTINATION ${CMAKE_INSTALL_DATADIR}/icons/hicolor/24x24/apps RENAME "${ICON_NAME}.png")
install(FILES "gui/icons/${ICON_NAME}-32x32.png"
DESTINATION ${CMAKE_INSTALL_DATADIR}/icons/hicolor/32x32/apps RENAME "${ICON_NAME}.png")
install(FILES "gui/icons/${ICON_NAME}-36x36.png"
DESTINATION ${CMAKE_INSTALL_DATADIR}/icons/hicolor/36x36/apps RENAME "${ICON_NAME}.png")
install(FILES "gui/icons/${ICON_NAME}-42x42.png"
DESTINATION ${CMAKE_INSTALL_DATADIR}/icons/hicolor/42x42/apps RENAME "${ICON_NAME}.png")
install(FILES "gui/icons/${ICON_NAME}-48x48.png"
DESTINATION ${CMAKE_INSTALL_DATADIR}/icons/hicolor/48x48/apps RENAME "${ICON_NAME}.png")
install(FILES "gui/icons/${ICON_NAME}-64x64.png"
DESTINATION ${CMAKE_INSTALL_DATADIR}/icons/hicolor/64x64/apps RENAME "${ICON_NAME}.png")
install(FILES "gui/icons/${ICON_NAME}-72x72.png"
DESTINATION ${CMAKE_INSTALL_DATADIR}/icons/hicolor/72x72/apps RENAME "${ICON_NAME}.png")
install(FILES "gui/icons/${ICON_NAME}-80x80.png"
DESTINATION ${CMAKE_INSTALL_DATADIR}/icons/hicolor/80x80/apps RENAME "${ICON_NAME}.png")
install(FILES "gui/icons/${ICON_NAME}-96x96.png"
DESTINATION ${CMAKE_INSTALL_DATADIR}/icons/hicolor/96x96/apps RENAME "${ICON_NAME}.png")
install(FILES "gui/icons/${ICON_NAME}-128x128.png"
DESTINATION ${CMAKE_INSTALL_DATADIR}/icons/hicolor/128x128/apps RENAME "${ICON_NAME}.png")
install(FILES "gui/icons/${ICON_NAME}-192x192.png"
DESTINATION ${CMAKE_INSTALL_DATADIR}/icons/hicolor/192x192/apps RENAME "${ICON_NAME}.png")
install(FILES "gui/icons/${ICON_NAME}-256x256.png"
DESTINATION ${CMAKE_INSTALL_DATADIR}/icons/hicolor/256x256/apps RENAME "${ICON_NAME}.png")
install(FILES "gui/icons/${ICON_NAME}-512x512.png"
DESTINATION ${CMAKE_INSTALL_DATADIR}/icons/hicolor/512x512/apps RENAME "${ICON_NAME}.png")

configure_file(
${APPDATA_FILE_NAME}.in
${CMAKE_CURRENT_BINARY_DIR}/${APPDATA_FILE_NAME}
)
configure_file(
${APPDATA_FILE_NAME}.in
${CMAKE_CURRENT_BINARY_DIR}/${APPDATA_FILE_NAME}
)

install(
FILES ${CMAKE_CURRENT_BINARY_DIR}/${APPDATA_FILE_NAME}
DESTINATION ${APPDATA_DIR} RENAME ${APP_ID}.appdata.xml
)
endif()
install(
FILES ${CMAKE_CURRENT_BINARY_DIR}/${APPDATA_FILE_NAME}
DESTINATION ${APPDATA_DIR} RENAME ${APP_ID}.appdata.xml
)

if(MSVC)
include(MSVCRuntime)
Expand Down
1 change: 0 additions & 1 deletion README.md
Expand Up @@ -75,7 +75,6 @@ $ sudo make install
- To uninstall the application type `sudo make uninstall`

### Others supported platforms (without extra features*)
- Sailfish OS (>= 3.0)
- MacOSX (XCode >= 9.0)
- Android (SDK 21.0, Android >= 16 Lollipop)
- Windows (MSVC 2017)
Expand Down
2 changes: 1 addition & 1 deletion backend/CMakeLists.txt
Expand Up @@ -25,6 +25,6 @@ add_subdirectory(NosonThumbnailer)
add_subdirectory(NosonMediaScanner)

# build the cli tool for desktop only
if(NOT ANDROID AND NOT IOS AND NOT BUILD_SAILFISHOS)
if(NOT ANDROID)
add_subdirectory(cli)
endif()
25 changes: 3 additions & 22 deletions gui/CMakeLists.txt
Expand Up @@ -6,24 +6,15 @@ find_package(Qt5Core REQUIRED)
find_package(Qt5Gui REQUIRED)
find_package(Qt5Qml REQUIRED)
find_package(Qt5Quick REQUIRED)
if (BUILD_SAILFISHOS)
find_package(PkgConfig)
pkg_check_modules(LIBSAILFISHAPP REQUIRED sailfishapp)
else()
find_package(Qt5QuickControls2 REQUIRED)
endif()
find_package(Qt5Widgets REQUIRED)
find_package(Qt5Xml REQUIRED)
find_package(Qt5Svg REQUIRED)

file(GLOB QML_JS_FILES *.qml *.js)
file(GLOB APP_FILES RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} *.qml *.js *.json)

if (BUILD_SAILFISHOS)
add_subdirectory(silica)
else()
add_subdirectory(controls2)
endif()
add_subdirectory(controls2)

set(CMAKE_CXX_STANDARD_REQUIRED ON)
set(CMAKE_CXX_STANDARD 11)
Expand Down Expand Up @@ -61,11 +52,7 @@ endif()

add_definitions(-DAPP_VERSION="${APP_VERSION}")

if (BUILD_SAILFISHOS)
qt5_add_resources(noson-gui-resources noson_silica.qrc)
else()
qt5_add_resources(noson-gui-resources noson_controls2.qrc)
endif()
qt5_add_resources(noson-gui-resources noson_controls2.qrc)

if(ANDROID)
add_definitions(-frtti) # dynamic_cast: https://github.com/android/ndk/issues/519
Expand All @@ -76,13 +63,7 @@ else()
add_executable(noson-gui ${noson-gui_SOURCES} ${noson-gui-resources})
endif()

if(BUILD_SAILFISHOS)
add_definitions(-DSAILFISHOS)
include_directories(${LIBSAILFISHAPP_INCLUDE_DIRS})
target_link_libraries(noson-gui Qt5::Gui Qt5::Qml Qt5::Quick Qt5::Widgets Qt5::Xml Qt5::Svg ${LIBSAILFISHAPP_LIBRARIES})
else()
target_link_libraries(noson-gui Qt5::Gui Qt5::Qml Qt5::Quick Qt5::QuickControls2 Qt5::Widgets Qt5::Xml Qt5::Svg)
endif()
target_link_libraries(noson-gui Qt5::Gui Qt5::Qml Qt5::Quick Qt5::QuickControls2 Qt5::Widgets Qt5::Xml Qt5::Svg)

if(QT_STATICPLUGIN)
add_definitions(-DQT_STATICPLUGIN)
Expand Down
28 changes: 0 additions & 28 deletions gui/noson.cpp
Expand Up @@ -7,12 +7,7 @@
#include <QQmlApplicationEngine>
#include <QQmlContext>
#include <QSettings>
#ifdef SAILFISHOS
#include <sailfishapp/sailfishapp.h>
#include <QQuickView>
#else
#include <QtQuickControls2>
#endif
#include <QTranslator>
#include <QDebug>
#include <QDir>
Expand All @@ -24,15 +19,9 @@
#include "diskcache/diskcachefactory.h"

#define CACHE_SIZE 100000000L
#ifndef SAILFISHOS
#define ORG_NAME "janbar"
#define APP_NAME "io.github.janbar.noson"
#define APP_DISPLAY_NAME "noson"
#else
#define ORG_NAME "harbour-noson"
#define APP_NAME "harbour-noson"
#define APP_DISPLAY_NAME "noson"
#endif

#ifdef Q_OS_WIN
#include <WinSock2.h>
Expand Down Expand Up @@ -78,22 +67,6 @@ int main(int argc, char *argv[])
QGuiApplication app(argc, argv);
setupApp(app);

#if defined(SAILFISHOS)
QScopedPointer<QQuickView> view(SailfishApp::createView());

#ifdef QT_STATICPLUGIN
importStaticPlugins(view->engine());
#endif

QObject::connect(view->engine(), &QQmlApplicationEngine::quit, &app, QCoreApplication::quit);
// 100MB cache for network data
view->engine()->setNetworkAccessManagerFactory(new DiskCacheFactory(CACHE_SIZE));
// bind version string
view->engine()->rootContext()->setContextProperty("VersionString", QString(APP_VERSION));
view->setSource(QUrl("qrc:/silica/noson.qml"));
view->showFullScreen();

#else
QSettings settings;
QStringList availableStyles;
QString style = QQuickStyle::name();
Expand Down Expand Up @@ -145,7 +118,6 @@ int main(int argc, char *argv[])
qWarning() << "Failed to load QML";
return -1;
}
#endif

ret = app.exec();
#ifdef Q_OS_WIN
Expand Down

0 comments on commit 95706ed

Please sign in to comment.