Ticket #45317: baloo_file+indexer-make-agents.patch

File baloo_file+indexer-make-agents.patch, 6.0 KB (added by RJVB (René Bertin), 10 years ago)

New version of the patch, now including akonadi_baloo_indexer.app and baloo_file_extractor

  • src/file/CMakeLists.txt

    diff --git src/file/CMakeLists.txt src/file/CMakeLists.txt
    index 49a34dd..262e45f 100644
    target_link_libraries(baloo_file 
    5959    balooxapian
    6060)
    6161
     62if (APPLE)
     63    set_target_properties(baloo_file PROPERTIES MACOSX_BUNDLE_INFO_PLIST ${CMAKE_CURRENT_SOURCE_DIR}/Info.plist.template)
     64    set_target_properties(baloo_file PROPERTIES MACOSX_BUNDLE_GUI_IDENTIFIER "org.kde.baloo.file")
     65    set_target_properties(baloo_file PROPERTIES MACOSX_BUNDLE_BUNDLE_NAME "KDE Baloo File Daemon service")
     66endif (APPLE)
     67
    6268install(TARGETS baloo_file ${INSTALL_TARGETS_DEFAULT_ARGS})
    6369install(FILES baloo_file.desktop DESTINATION ${AUTOSTART_INSTALL_DIR})
    6470install(FILES org.kde.baloo.file.indexer.xml DESTINATION ${DBUS_INTERFACES_INSTALL_DIR})
  • new file src/file/Info.plist.template

    diff --git src/file/Info.plist.template src/file/Info.plist.template
    new file mode 100644
    index 0000000..c39ddb9
    - +  
     1<?xml version="1.0" encoding="UTF-8"?>
     2<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
     3<plist version="1.0">
     4<dict>
     5    <key>CFBundleDevelopmentRegion</key>
     6    <string>English</string>
     7    <key>CFBundleExecutable</key>
     8    <string>${MACOSX_BUNDLE_EXECUTABLE_NAME}</string>
     9    <key>CFBundleGetInfoString</key>
     10    <string>${MACOSX_BUNDLE_INFO_STRING}</string>
     11    <key>CFBundleIconFile</key>
     12    <string>${MACOSX_BUNDLE_ICON_FILE}</string>
     13    <key>CFBundleIdentifier</key>
     14    <string>${MACOSX_BUNDLE_GUI_IDENTIFIER}</string>
     15    <key>CFBundleInfoDictionaryVersion</key>
     16    <string>6.0</string>
     17    <key>CFBundleLongVersionString</key>
     18    <string>${MACOSX_BUNDLE_LONG_VERSION_STRING}</string>
     19    <key>CFBundleName</key>
     20    <string>${MACOSX_BUNDLE_BUNDLE_NAME}</string>
     21    <key>CFBundlePackageType</key>
     22    <string>APPL</string>
     23    <key>CFBundleShortVersionString</key>
     24    <string>${MACOSX_BUNDLE_SHORT_VERSION_STRING}</string>
     25    <key>CFBundleVersion</key>
     26    <string>${MACOSX_BUNDLE_BUNDLE_VERSION}</string>
     27    <key>CSResourcesFileMapped</key>
     28    <true/>
     29    <key>LSRequiresCarbon</key>
     30    <true/>
     31    <key>LSUIElement</key>
     32    <string>1</string>
     33    <key>NSHumanReadableCopyright</key>
     34    <string>${MACOSX_BUNDLE_COPYRIGHT}</string>
     35</dict>
     36</plist>
  • src/file/extractor/CMakeLists.txt

    diff --git src/file/extractor/CMakeLists.txt src/file/extractor/CMakeLists.txt
    index 31efc6a..7cb0596 100644
    set(EXTRACTOR_SRCS 
    1111  ../fileexcludefilters.cpp
    1212)
    1313
    14 kde4_add_executable(baloo_file_extractor ${EXTRACTOR_SRCS})
     14kde4_add_executable(baloo_file_extractor NOGUI ${EXTRACTOR_SRCS})
    1515
    1616target_link_libraries(baloo_file_extractor
    1717  ${QT_QTSQL_LIBRARY}
  • src/file/extractor/main.cpp

    diff --git src/file/extractor/main.cpp src/file/extractor/main.cpp
    index 4be2c24..30c26d8 100644
    int main(int argc, char* argv[]) 
    7171        return 1;
    7272    }
    7373
    74     QApplication app(argc, argv);
     74    QApplication app(argc, argv, false);
    7575    KComponentData data(aboutData, KComponentData::RegisterAsMainComponent);
    7676
    7777    Baloo::App appObject;
  • src/file/priority.cpp

    diff --git src/file/priority.cpp src/file/priority.cpp
    index 1c4e568..a657d32 100644
    bool lowerIOPriority() 
    7575        }
    7676    }
    7777    return true;
     78#elif defined(Q_OS_MAC)
     79        if (setiopolicy_np( IOPOL_TYPE_DISK, IOPOL_SCOPE_PROCESS, IOPOL_THROTTLE ) < 0 ) {
     80                qDebug( "cannot set io scheduling to IOPOL_THROTTLE (%s).\n", strerror(errno) );
     81                return false;
     82        }
     83        return true;
    7884#else
    7985    return false;
    8086#endif
  • src/pim/agent/CMakeLists.txt

    diff --git src/pim/agent/CMakeLists.txt src/pim/agent/CMakeLists.txt
    index cd19027..6fc7548 100644
    target_link_libraries(akonadi_baloo_indexer 
    3333    balooxapian
    3434)
    3535
     36if (APPLE)
     37    set_target_properties(akonadi_baloo_indexer PROPERTIES MACOSX_BUNDLE_INFO_PLIST ${CMAKE_CURRENT_SOURCE_DIR}/Info.plist.template)
     38    set_target_properties(akonadi_baloo_indexer PROPERTIES MACOSX_BUNDLE_GUI_IDENTIFIER "org.kde.akonadi.baloo.indexer")
     39    set_target_properties(akonadi_baloo_indexer PROPERTIES MACOSX_BUNDLE_BUNDLE_NAME "KDE Akonadi Baloo Indexing Agent")
     40endif (APPLE)
     41
    3642install(TARGETS akonadi_baloo_indexer ${INSTALL_TARGETS_DEFAULT_ARGS})
    3743install(FILES akonadibalooindexingagent.desktop
    3844        DESTINATION "${CMAKE_INSTALL_PREFIX}/share/akonadi/agents")
  • new file src/pim/agent/Info.plist.template

    diff --git src/pim/agent/Info.plist.template src/pim/agent/Info.plist.template
    new file mode 100644
    index 0000000..c39ddb9
    - +  
     1<?xml version="1.0" encoding="UTF-8"?>
     2<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
     3<plist version="1.0">
     4<dict>
     5    <key>CFBundleDevelopmentRegion</key>
     6    <string>English</string>
     7    <key>CFBundleExecutable</key>
     8    <string>${MACOSX_BUNDLE_EXECUTABLE_NAME}</string>
     9    <key>CFBundleGetInfoString</key>
     10    <string>${MACOSX_BUNDLE_INFO_STRING}</string>
     11    <key>CFBundleIconFile</key>
     12    <string>${MACOSX_BUNDLE_ICON_FILE}</string>
     13    <key>CFBundleIdentifier</key>
     14    <string>${MACOSX_BUNDLE_GUI_IDENTIFIER}</string>
     15    <key>CFBundleInfoDictionaryVersion</key>
     16    <string>6.0</string>
     17    <key>CFBundleLongVersionString</key>
     18    <string>${MACOSX_BUNDLE_LONG_VERSION_STRING}</string>
     19    <key>CFBundleName</key>
     20    <string>${MACOSX_BUNDLE_BUNDLE_NAME}</string>
     21    <key>CFBundlePackageType</key>
     22    <string>APPL</string>
     23    <key>CFBundleShortVersionString</key>
     24    <string>${MACOSX_BUNDLE_SHORT_VERSION_STRING}</string>
     25    <key>CFBundleVersion</key>
     26    <string>${MACOSX_BUNDLE_BUNDLE_VERSION}</string>
     27    <key>CSResourcesFileMapped</key>
     28    <true/>
     29    <key>LSRequiresCarbon</key>
     30    <true/>
     31    <key>LSUIElement</key>
     32    <string>1</string>
     33    <key>NSHumanReadableCopyright</key>
     34    <string>${MACOSX_BUNDLE_COPYRIGHT}</string>
     35</dict>
     36</plist>