GSoC/2019/StatusReports/WeixuanXiao: Difference between revisions

From KDE Community Wiki
< GSoC‎ | 2019‎ | StatusReports
No edit summary
 
(27 intermediate revisions by the same user not shown)
Line 4: Line 4:
KDE Connect works well on Linux and is built with KDE Frameworks and Qt. There is already “Continuity” on macOS for iPhone and iPad running iOS. But there is no support, and there will never be official support for Android phone on macOS. It makes sense to use KDE Connect on macOS to give Android users a better experience.
KDE Connect works well on Linux and is built with KDE Frameworks and Qt. There is already “Continuity” on macOS for iPhone and iPad running iOS. But there is no support, and there will never be official support for Android phone on macOS. It makes sense to use KDE Connect on macOS to give Android users a better experience.


The work has two main parts:
During Google Summer of Code 2019, a port of KDE Connect for macOS comes up! And the codes I've done during Google Summer of Code are categorized by features in the Contributions Section below.
* Packaging KDE Connect on macOS
* Making plugins work on macOS


== Progress ==
=== Introduction ===
 
 
This is the main page of KDE Connect, we can open it from the indicator in the tray bar of macOS. All available plugins are here, you can enable/disable or configure them.
 
Available devices will be listed on the left, you can choose them to pair/unpair with them/it.
 
 
[[File:Kdeconnect-configuration.png|600px|center|KDE Connect KCM]]
 
 
The text that you copy on your Mac will be shared to your phone, and those you copy on your phone will be also synchronized to your Mac.
 
 
[[File:Kdeconnect-clipboard-sync.png|600px|center|KDE Connect Clipboard]]
 
 
With KNotifications support for macOS, you can receive notification from your Android phones and react to them. You can ping your Mac to test whether they are well connected.
 
 
[[File:Kdeconnect-notification.png|600px|center|KDE Connect Notification]]
 
 
Except the functions shown, you can also do these from your Android phone:
* Keep your Mac awake when your phone is connected
* Share files and links between devices
* Control the volume of your Mac from the phone
* Use your phone as Trackpad and Keyboard to control your Mac
* Use your phone to control your slides during a presentation
 
You can do these from your Mac:
* Check the battery level of your phone
* Ring your phone to help find it
* Send and receive SMS via your phone
* Browse and manipulate files in your phone
 
 
If you're interested in what KDE Connect can do, rather than what I've done during Google Summer of Code, please move to [https://kde.inoki.cc/2019/09/01/KDE-Connect-macOS-GSoC-Final-Release/ My Blog - KDE Connect macOS Release].
 
=== Release ===
 
The release can be found in [https://github.com/Inokinoki/kde-blog/releases/tag/20190901 Release page of my blog] and KDE Community FTP.
 
You will be able to get more exciting functions from Nightly Build on [https://binary-factory.kde.org/view/MacOS/job/kdeconnect-kde_Nightly_macos/ KDE Binary Factory].
 
=== Build from source code ===
 
Currently, those releases only support macOS 10.14 Mojave, but you can build one from the source code on your Mac to benefit it. Since Qt 5.10 supports down to 10.9, KDE Connect for macOS should also work on it!
 
The codes can be found in [https://invent.kde.org/wxiao/kdeconnect-kde Weixuan XIAO's KDE Connect repository].
 
You can follow instructions in [https://community.kde.org/KDEConnect/Build_MacOS Build on macOS - KDE Connect Wiki] to build your own version of KDE Connect.
 
 
 
In the following paragraphs, there are some details of my work this summer.
 
== Tasks and Milestones ==




=== [Done] Before May 6 ===
=== [Done] Before May 6 ===
* Keep investigating the causes of failure of interface boot and try to fix it√
* Keep investigating the causes of failure of interface boot and try to fix it
* Finish a HOW-TO wiki for building current version of KDE Connect on macOS√
* Finish a HOW-TO wiki for building current version of KDE Connect on macOS


=== [Done] May 6 – May 26 (Before the official coding time) ===
=== [Done] May 6 – May 26 ===
* Keep track of development discussion on IRC, mailing list and telegram group to get deeper knowledge of KDE Connect and KDE Community√
* Keep track of development discussion on IRC, mailing list and telegram group
* Fix nightly build of macOS building on KDE Connect Jenkins√
* Fix nightly build of macOS building on KDE Connect Jenkins
* Try to fix the failure of interface boot
* Try to fix the failure of interface boot


=== [Done] May 27 – June 16 (Official coding period starts, 3 weeks) ===
=== [Done] May 27 – June 16 ===
* Add vlc library blueprint of macOS version into Craft bin(I’ve still finished it, maybe for further using and for other project in KDE) √
* Add vlc library blueprint of macOS version into Craft bin
* Fix the failure of interface boot by packaging it to a dmg(1 week, May 27 - June 2) √
* Fix the failure of interface boot by packaging it to a DMG file
* May 28 - June 1 Use dbus in Craft rather than installing dbus with Homebrew
* Use dbus in Craft rather than installing dbus with Homebrew
* Fix scripts of “package” option in Craft to build a dmg image (1 week and a half) √
* Fix scripts of “package” option in Craft to build a dmg image
* Package kdeconnect-indicator, kdeconnectd, kdeconnect-cli to DMG package (3 days) √
* Package kdeconnect-indicator, kdeconnectd, kdeconnect-cli to DMG package
* June 1 - June 2 Fix dependencies of kdeconnect-indicator, kdeconnectd, kdeconnect-cli in DMG package
* Fix dependencies of kdeconnect-indicator, kdeconnectd, kdeconnect-cli in DMG package
* June 3 - June 9 Dbus integration (make a wrapper and make kdeconnect boot the dbus) √
* ✅ DBus integration
* June 10 - June 17 Private DBus
* Private DBus Support


=== [Done] June 17  – June 28 ===
=== [Done] June 17  – June 28 ===
* Inhibit screensaver implemented by macOS native command (3 days)√
* Inhibit screensaver implemented by macOS native command
* Implement system volume plugin by coding a native plugin on macOS (4 days)√
* Implement system volume plugin for macOS


=== [Done] June 24 MID TERM EVALUATION ===  
=== [Done] June 24 MID TERM EVALUATION ===  
Line 40: Line 95:
----
----


=== [Done] June 24 – July 21 (4 weeks) ===
=== [Done] June 24 – July 21 ===
* June 28 - July 7 Implement native notifications on macOS (1 week and a half)√
* Implement native notifications on macOS
* [Delayed] July 8  - July 14 Make the sftp plugin work by adding a stfp browser(1 week)
* Integrate KDE Connect with macOS finder extension, which allows users to send files directly from Finder, this is implemented by a native assistant application, user can install it as they wish
* July 15  - July 17 Integrate KDE Connect with macOS finder extension, which allows users to send files directly from Finder√
* Make clipboard plugin work on macOS
* July 18  - July 21 Make a clipboard plugin work on macOS√
* The documentation should be written during the coding √


=== [Done] July 22 MID TERM EVALUATION ===  
=== [Done] July 22 MID TERM EVALUATION ===  
Line 51: Line 104:
----
----


=== July 22 – August 11 (2 weeks) ===  
=== [Done] July 22 – August 18 ===  
* Implement virtual input plugin by fixing X11 or by coding another backend for macOS (4 days)√
* Implement virtual input plugin by coding another backend for macOS
* Debug and fix share and receive plugin on both Android and macOS sides (2 days)
* Debug and fix share and receive plugin on both Android and macOS sides(this is resolved by adding kioslave executable into app package)
* Make the sftp plugin work by adding a stfp browser
* Make the sftp plugin work by adding an integrated stfp browser
* 2 days for unit test of new added, macOS-specific codes
* Release a production-ready install package of dmg format(CodeSign)
 
=== August 12 – August 18 (1 week) ===
* Finish all documentation and clear up
* Release a production-ready install package of dmg format


----
----


=== Conclusion​ ===
== Contributions ==
* [Done] Milestone 1 (Bootstrap) and Milestone 2 (Basic package) will be done before evaluation 1, to make the application run normally without tedious configuration like now.
 
* [Done] Milestone 3 (Native system Functionalities) will be done for evaluation 2. Meanwhile, Milestone 4  (Plugin Functionalities) should be started on mid-July, before the evaluation 2.
 
* [WIP] Milestone 4 (Plugin Functionalities) and Milestone 5 (Complete package) will be done for final evaluation. And it will be a full deliverable version which is product-ready.
 
== Work In Progress ==
 
* Implement native notifications on macOS [https://github.com/Inokinoki/knotifications/tree/Inokinoki/macos-notification-center-backend working on getting it merge-able]
* Make the sftp plugin work by adding a stfp browser
* Code sign for preventing KDE Connect from inhibiting by Gatekeeper on macOS [https://github.com/Inokinoki/kde-blog/releases/tag/20190707 an experimental release]
 
== Accepted changes ==


KDE Connect:
During 3 months, I contributed to several projects in KDE Community, not only to make KDE Connect work on macOS but also for a workable solution for KDE apps on macOS. Here are some of the projects that I've contributed to. Links are the branches or the Merge Requests which the features are linked to.


=== KDE Connect ===
* Use a private dbus for KDE Connect on mac OS [https://invent.kde.org/wxiao/kdeconnect-kde/tree/macos-private-dbus macos-private-dbus branch]
* Use a private dbus for KDE Connect on mac OS [https://invent.kde.org/wxiao/kdeconnect-kde/tree/macos-private-dbus macos-private-dbus branch]
* [https://invent.kde.org/kde/kdeconnect-kde/merge_requests/95 Allow kdeconnectd auto launch from kdeconnect-indicator on macOS]
* [https://invent.kde.org/kde/kdeconnect-kde/merge_requests/95 Allow kdeconnectd auto launch from kdeconnect-indicator on macOS]
Line 91: Line 128:
* [https://invent.kde.org/wxiao/kde-connect-share-extension/tree/with-kdeconnect-cli Integrate KDE Connect with macOS finder extension, which allows users to send files directly from Finder]
* [https://invent.kde.org/wxiao/kde-connect-share-extension/tree/with-kdeconnect-cli Integrate KDE Connect with macOS finder extension, which allows users to send files directly from Finder]
* [https://invent.kde.org/kde/kdeconnect-kde/merge_requests/131 Hide icon and set HighRes feature]
* [https://invent.kde.org/kde/kdeconnect-kde/merge_requests/131 Hide icon and set HighRes feature]
* [https://invent.kde.org/kde/kdeconnect-kde/merge_requests/163 Integrated SFTP browser]


=== KNotifications ===
* Implement native notifications on macOS [https://github.com/Inokinoki/knotifications/tree/Inokinoki/macos-notification-center-backend repository on GitHub]


Craft Blueprints:
=== Craft Blueprints ===
* [https://cgit.kde.org/craft-blueprints-kde.git/commit/?id=129433423e9883ac91e017d78c9920130867602b Add dbus-daemon to kdeconnect]
* [https://cgit.kde.org/craft-blueprints-kde.git/commit/?id=129433423e9883ac91e017d78c9920130867602b Add dbus-daemon to kdeconnect]
* [https://cgit.kde.org/craft-blueprints-kde.git/commit/?id=e440d6d988aa267bcf9fb35635e02aea1357546f Add KDE Connect components for macOS]
* [https://cgit.kde.org/craft-blueprints-kde.git/commit/?id=e440d6d988aa267bcf9fb35635e02aea1357546f Add KDE Connect components for macOS]
Line 101: Line 141:
* [https://phabricator.kde.org/D22644 Add kpeoplevcard blueprint]
* [https://phabricator.kde.org/D22644 Add kpeoplevcard blueprint]


 
=== Craft ===
Craft:
* [https://cgit.kde.org/craft.git/commit/?id=a11fdfe43708d11c74ad77fe597887c4dbd2e6d4 Use macdeloyqt to fix all deps of exec in macOS package]
* [https://cgit.kde.org/craft.git/commit/?id=a11fdfe43708d11c74ad77fe597887c4dbd2e6d4 Use macdeloyqt to fix all deps of exec in macOS package]
* [https://phabricator.kde.org/D22558 Copy kioslave into package to fix "Debug and fix share and receive plugin on both Android and macOS sides"]
* [https://phabricator.kde.org/D22558 Copy kioslave into package to fix "Debug and fix share and receive plugin on both Android and macOS sides"]
* [https://phabricator.kde.org/D22615 Add qml dirs definitions into MacOSDMGPackager to make qml app correctly deploy]
* [https://phabricator.kde.org/D22615 Add qml dirs definitions into MacOSDMGPackager to make qml app correctly deploy]
=== Other KDE projects ===
* [https://phabricator.kde.org/D22364 Fix dependencies and kio-slave in Dolphin on macOS]


== Posts and Resources ==
== Posts and Resources ==
Line 112: Line 154:
* [https://community.kde.org/KDEConnect/Build_MacOS Build KDE Connect on macOS]
* [https://community.kde.org/KDEConnect/Build_MacOS Build KDE Connect on macOS]
* [https://binary-factory.kde.org/view/MacOS/job/kdeconnect-kde_Nightly_macos/ Get KDE Connect nightly building for macOS on KDE Binary Factory]
* [https://binary-factory.kde.org/view/MacOS/job/kdeconnect-kde_Nightly_macos/ Get KDE Connect nightly building for macOS on KDE Binary Factory]
 
* [https://invent.kde.org/wxiao/kdeconnect-kde KDE Invent - KDE Connect repository of Weixuan XIAO]


Posts:
Posts:
* [https://kde.inoki.cc/2019/09/01/KDE-Connect-macOS-GSoC-Final-Release/ KDE Connect macOS Release]
* [https://kde.inoki.cc/2019/07/18/KDE-Connect-macOS-plugin-notification/ Enable Notification of KDE Connect on macOS]
* [https://kde.inoki.cc/2019/07/18/KDE-Connect-macOS-plugin-notification/ Enable Notification of KDE Connect on macOS]
* [https://kde.inoki.cc/2019/07/16/KDE-Connect-macOS/ KDE Connect for macOS]
* [https://kde.inoki.cc/2019/07/16/KDE-Connect-macOS/ KDE Connect for macOS]
* [https://kde.inoki.cc/2019/05/26/Craft-packager/ Craft packager analysis]
* [https://kde.inoki.cc/2019/05/26/Craft-packager/ Craft packager analysis]
* [https://kde.inoki.cc/2019/05/19/Craft-vlc/ Craft VLC fix]
* [https://kde.inoki.cc/2019/05/19/Craft-vlc/ Craft VLC fix]
== Previews ==
Due to technical limitations, thumbnails of high resolution GIF images will not be animated.
'''Please click on the images to see the original animated images'''
[[File:KDEConnect-macOS-Launch.gif|600px|center|KDE Connect on macOS]]
Launch KDE Connect on macOS
[[File:KDEConnect-macOS-PairNotification.gif|600px|center|KDE Connect pair notification on macOS]]
Show pair notification on macOS
[[File:KDEConnect-macOS-SendFile.gif|600px|center|KDE Connect macOS Send File]]
Share your file on your Mac with your Android phone
[[File:KDEConnect-macOS-SFTPBrowser.gif‎|600px|center|KDE Connect macOS SFTP browser]]
Browse and upload/download files to/from your Android phone through integrated SFTP file browser
[[File:KDEConnect-macOS-Volume.gif|600px|center|KDE Connect macOS System Volume]]
Change system volume of your Mac from your Android Phone
[[File:KDEConnect-macOS-SMS.gif|600px|center|KDE Connect macOS System SMS]]
Send and receive your SMS from your Mac
[[File:KDEConnect-macOS-OpenMouseKeyboard.gif|600px|center|KDE Connect macOS open mouse keyboard control]]
Allow your Android phone to control the cursor and make input on your Mac
[[File:KDEConnect-macOS-RunCommand.gif|600px|center|KDE Connect run command on macOS]]
Run command from your Android phone(I believe that using AppleScript, more and more things that KDE Connect can do on macOS, will be discovered)

Latest revision as of 14:48, 1 September 2019

KDE Connect for macOS port

KDE Connect works well on Linux and is built with KDE Frameworks and Qt. There is already “Continuity” on macOS for iPhone and iPad running iOS. But there is no support, and there will never be official support for Android phone on macOS. It makes sense to use KDE Connect on macOS to give Android users a better experience.

During Google Summer of Code 2019, a port of KDE Connect for macOS comes up! And the codes I've done during Google Summer of Code are categorized by features in the Contributions Section below.

Introduction

This is the main page of KDE Connect, we can open it from the indicator in the tray bar of macOS. All available plugins are here, you can enable/disable or configure them.

Available devices will be listed on the left, you can choose them to pair/unpair with them/it.


KDE Connect KCM
KDE Connect KCM


The text that you copy on your Mac will be shared to your phone, and those you copy on your phone will be also synchronized to your Mac.


KDE Connect Clipboard
KDE Connect Clipboard


With KNotifications support for macOS, you can receive notification from your Android phones and react to them. You can ping your Mac to test whether they are well connected.


KDE Connect Notification
KDE Connect Notification


Except the functions shown, you can also do these from your Android phone:

  • Keep your Mac awake when your phone is connected
  • Share files and links between devices
  • Control the volume of your Mac from the phone
  • Use your phone as Trackpad and Keyboard to control your Mac
  • Use your phone to control your slides during a presentation

You can do these from your Mac:

  • Check the battery level of your phone
  • Ring your phone to help find it
  • Send and receive SMS via your phone
  • Browse and manipulate files in your phone


If you're interested in what KDE Connect can do, rather than what I've done during Google Summer of Code, please move to My Blog - KDE Connect macOS Release.

Release

The release can be found in Release page of my blog and KDE Community FTP.

You will be able to get more exciting functions from Nightly Build on KDE Binary Factory.

Build from source code

Currently, those releases only support macOS 10.14 Mojave, but you can build one from the source code on your Mac to benefit it. Since Qt 5.10 supports down to 10.9, KDE Connect for macOS should also work on it!

The codes can be found in Weixuan XIAO's KDE Connect repository.

You can follow instructions in Build on macOS - KDE Connect Wiki to build your own version of KDE Connect.


In the following paragraphs, there are some details of my work this summer.

Tasks and Milestones

[Done] Before May 6

  • ✅ Keep investigating the causes of failure of interface boot and try to fix it
  • ✅ Finish a HOW-TO wiki for building current version of KDE Connect on macOS

[Done] May 6 – May 26

  • ✅ Keep track of development discussion on IRC, mailing list and telegram group
  • ✅ Fix nightly build of macOS building on KDE Connect Jenkins
  • ✅ Try to fix the failure of interface boot

[Done] May 27 – June 16

  • ✅ Add vlc library blueprint of macOS version into Craft bin
  • ✅ Fix the failure of interface boot by packaging it to a DMG file
  • ✅ Use dbus in Craft rather than installing dbus with Homebrew
  • ✅ Fix scripts of “package” option in Craft to build a dmg image
  • ✅ Package kdeconnect-indicator, kdeconnectd, kdeconnect-cli to DMG package
  • ✅ Fix dependencies of kdeconnect-indicator, kdeconnectd, kdeconnect-cli in DMG package
  • ✅ DBus integration
  • ✅ Private DBus Support

[Done] June 17 – June 28

  • ✅ Inhibit screensaver implemented by macOS native command
  • ✅ Implement system volume plugin for macOS

[Done] June 24 MID TERM EVALUATION

Up to first evaluation, KDE Connect could be started without explicit configuration. User could use it as a normal application.


[Done] June 24 – July 21

  • ✅ Implement native notifications on macOS
  • ✅ Integrate KDE Connect with macOS finder extension, which allows users to send files directly from Finder, this is implemented by a native assistant application, user can install it as they wish
  • ✅ Make clipboard plugin work on macOS

[Done] July 22 MID TERM EVALUATION


[Done] July 22 – August 18

  • ✅ Implement virtual input plugin by coding another backend for macOS
  • ✅ Debug and fix share and receive plugin on both Android and macOS sides(this is resolved by adding kioslave executable into app package)
  • ✅ Make the sftp plugin work by adding an integrated stfp browser
  • Release a production-ready install package of dmg format(CodeSign)

Contributions

During 3 months, I contributed to several projects in KDE Community, not only to make KDE Connect work on macOS but also for a workable solution for KDE apps on macOS. Here are some of the projects that I've contributed to. Links are the branches or the Merge Requests which the features are linked to.

KDE Connect

KNotifications

Craft Blueprints

Craft

Other KDE projects

Posts and Resources

Useful links:

Posts:

Previews

Due to technical limitations, thumbnails of high resolution GIF images will not be animated. Please click on the images to see the original animated images


KDE Connect on macOS
KDE Connect on macOS

Launch KDE Connect on macOS


KDE Connect pair notification on macOS
KDE Connect pair notification on macOS

Show pair notification on macOS


KDE Connect macOS Send File
KDE Connect macOS Send File

Share your file on your Mac with your Android phone


KDE Connect macOS SFTP browser
KDE Connect macOS SFTP browser

Browse and upload/download files to/from your Android phone through integrated SFTP file browser


KDE Connect macOS System Volume
KDE Connect macOS System Volume

Change system volume of your Mac from your Android Phone


KDE Connect macOS System SMS
KDE Connect macOS System SMS

Send and receive your SMS from your Mac


KDE Connect macOS open mouse keyboard control
KDE Connect macOS open mouse keyboard control

Allow your Android phone to control the cursor and make input on your Mac


KDE Connect run command on macOS
KDE Connect run command on macOS

Run command from your Android phone(I believe that using AppleScript, more and more things that KDE Connect can do on macOS, will be discovered)