KWrite on Mac – Application Bundle

Hi,

after one week of patching frameworks (and KWrite/Kate), the first success can be seen: a kind of working application bundle for KWrite.

Still no icons, need to set icon theme + search paths right and bundle that, too, but need to investigate more how the icon lookup works.

KWrite on Mac

You can build the stuff on your own just following kate.git/mac.txt and calling once the macdeployqt tool afterwards on the /Applications/KDE/kwrite.app bundle (with -dmg to get the disk image file).

For Kate, the macdeployqt still misses an additional switch to deploy own plugins in addition, will add that in the next days, I hope. Have already some local hack, but want to have some patch I can hand in to Qt Company.

Here a link to the version you see above in the screenshot (not tested below Mac OS 10.10):

http://kate-editor.org/download/kwrite-alpha-no-icons.dmg

A colleague tested it for me on a Mac without any dbus/macports/homebrew/co. stuff installed and it seems to work and not eat all his data ;=) But this is ALPHA quality,  this means all things can happen, I didn’t test it that much beside using it for my last kate.git commit and starting it up for that screenshot above, not more ;=)

The good things: This stuff needs no patched Qt nor any patches to any KF5 stuff, this uses plain Qt 5.5.0 from the Qt Company installer and all modifications for frameworks are inside our master branch of framworks already.

The bad things: e.g. KIO doesn’t work atm (even if the io slaves would be in the bundle), therefore only local file support.

8 thoughts on “KWrite on Mac – Application Bundle

    1. For more complex things like Kate or KDevelop, I will first need to fixup my macdeployqt hack to deploy the KF5 + kate/kdevelop plugins and for stuff like “KIO should work” we need much more things, like e.g. moving away from .protocol files and bundle them inside the plugins like we do it for other plugin things and use the qt plugin loader meta info tricks. but at least KWrite, which uses already a lot of non-trivial frameworks does something, after my first not that great impressions start of this year that is more than I would have thought we could achieve this year.

  1. I get this when I try to start it on osx 10.7.5 with Qt 5.5.1 installed

    Process: launchd [5266]
    Path: /Applications/kwrite.app/Contents/MacOS/kwrite
    Identifier: launchd
    Version: ??? (???)
    Code Type: X86-64 (Native)
    Parent Process: launchd [124]

    Date/Time: 2015-10-19 15:55:47.362 +0200
    OS Version: Mac OS X 10.7.5 (11G63)
    Report Version: 9

    Interval Since Last Report: 362168 sec
    Crashes Since Last Report: 29
    Per-App Crashes Since Last Report: 4
    Anonymous UUID: 2D8A1BB2-C7AE-4911-85A5-B520FC00BAC1

    Crashed Thread: Unknown

    Exception Type: EXC_BAD_ACCESS (SIGSEGV)
    Exception Codes: KERN_INVALID_ADDRESS at 0x00007fff5fc01028

    Backtrace not available

    Unknown thread crashed with X86 Thread State (64-bit):
    rax: 0x0000000000000055 rbx: 0x0000000000000000 rcx: 0x0000000000000000 rdx: 0x0000000000000000
    rdi: 0x0000000000000000 rsi: 0x0000000000000000 rbp: 0x0000000000000000 rsp: 0x0000000000000000
    r8: 0x0000000000000000 r9: 0x0000000000000000 r10: 0x0000000000000000 r11: 0x0000000000000000
    r12: 0x0000000000000000 r13: 0x0000000000000000 r14: 0x0000000000000000 r15: 0x0000000000000000
    rip: 0x00007fff5fc01028 rfl: 0x0000000000010203 cr2: 0x00007fff5fc01028
    Logical CPU: 0

    Binary images description not available

    External Modification Summary:
    Calls made by other processes targeting this process:
    task_for_pid: 1
    thread_create: 0
    thread_set_state: 0
    Calls made by this process:
    task_for_pid: 0
    thread_create: 0
    thread_set_state: 0
    Calls made by all processes on this machine:
    task_for_pid: 4159
    thread_create: 0
    thread_set_state: 0

    Model: MacBookPro5,3, BootROM MBP53.00AC.B03, 2 processors, Intel Core 2 Duo, 3.06 GHz, 8 GB, SMC 1.48f2
    Graphics: NVIDIA GeForce 9600M GT, NVIDIA GeForce 9600M GT, PCIe, 512 MB
    Graphics: NVIDIA GeForce 9400M, NVIDIA GeForce 9400M, PCI, 256 MB
    Memory Module: BANK 0/DIMM0, 4 GB, DDR3, 1067 MHz, 0x80AD, 0x484D5434353153364D4D5238432D47372020
    Memory Module: BANK 1/DIMM0, 4 GB, DDR3, 1067 MHz, 0x80CE, 0x4D34373142353237334248312D4346382020
    AirPort: spairport_wireless_card_type_airport_extreme (0x14E4, 0x8D), Broadcom BCM43xx 1.0 (5.106.198.19.22)
    Bluetooth: Version 4.0.8f17, 2 service, 11 devices, 1 incoming serial ports
    Network Service: Ethernet, Ethernet, en0
    Network Service: Wi-Fi, AirPort, en1
    Serial ATA Device: ST9500420ASG, 500,11 GB
    Serial ATA Device: HL-DT-ST DVDRW GS23N
    USB Device: hub_device, 0x0424 (SMSC), 0x2514, 0x24100000 / 3
    USB Device: hub_device, 0x0409 (NEC Corporation), 0x005a, 0x24120000 / 6
    USB Device: Das Keyboard Model S, 0x24f0, 0x0137, 0x24130000 / 5
    USB Device: hub_device, 0x0424 (SMSC), 0x2640, 0x24110000 / 4
    USB Device: Ultra Fast Media Reader, 0x0424 (SMSC), 0x4060, 0x24111000 / 7
    USB Device: Built-in iSight, apple_vendor_id, 0x8507, 0x24400000 / 2
    USB Device: Internal Memory Card Reader, apple_vendor_id, 0x8403, 0x26500000 / 2
    USB Device: Apple Internal Keyboard / Trackpad, apple_vendor_id, 0x0237, 0x04600000 / 4
    USB Device: IR Receiver, apple_vendor_id, 0x8242, 0x04500000 / 3
    USB Device: USB Receiver, 0x046d (Logitech Inc.), 0xc52b, 0x06200000 / 3
    USB Device: BRCM2046 Hub, 0x0a5c (Broadcom Corp.), 0x4500, 0x06100000 / 2
    USB Device: Bluetooth USB Host Controller, apple_vendor_id, 0x8217, 0x06110000 / 5

  2. Hi Christoph, a knowledge from porting to Windows but:
    With the official LGPL Qt (which I believe should be supported by apps that use KF5), kicontheme isn’t used, so (prefereably in main()) this is needed:

    main() {
    // …
    QIcon::setThemeSearchPaths(QStringList() << "C:\\yourprefix\\share\\icons");
    QIcon::setThemeName("breeze"); // can be oxygen, etc.
    // …
    }

    Note that icon inheritance from hicolor to breeze or oxygen is implemented in kicontheme, so the above solution doesn't support inheritance; instead for now apps can use a single icons dir with icons files from 2 or more themes merged by hand by copying.

    1. Thanks for this hint! That is more or less what I thought is needed from reading the Qt docs and that should just work ok for Windows and Mac (just with differents paths relative to the application executable directory).

  3. note that i have created recently a sonnet nsspellcheck plugin that allows us to use dictionaries shipped by default with os x plus i have modified hunspell plugin to pick up dictionaries installed along with libreoffice 5

    1. the only problem is that i only wrote qmake-based project files for them (tested with static building only), so if you build with cmake then additional actions need to be taken

Leave a Reply

Your email address will not be published. Required fields are marked *

Scroll to top