KDEConnect/Build MacOS: Difference between revisions
Weixuan XIAO (talk | contribs) No edit summary |
Weixuan XIAO (talk | contribs) No edit summary |
||
Line 27: | Line 27: | ||
== Fetching source code and building == | == Fetching source code and building == | ||
Be sure you are in the Craft environment. There could be a<code>CRAFT:</code> prefix in front of your prompt, like this: | Be sure you are in the Craft environment. There could be a <code>CRAFT:</code> prefix in front of your prompt, like this: | ||
[[File:MacOS_KDEConnect_Craft_Source.png]] | [[File:MacOS_KDEConnect_Craft_Source.png]] | ||
Run <code>craft extragear/kdeconnect-kde</code> to build KDE Connect on macOS. | Run <code>craft extragear/kdeconnect-kde</code> to build KDE Connect on macOS. | ||
Line 38: | Line 36: | ||
Then you'll get your own build of KDE Connect on macOS in <code>/Users/<username>/CraftRoot/build/extragear/kdeconnect-kde/image-RelWithDebInfo-master/</code> | Then you'll get your own build of KDE Connect on macOS in <code>/Users/<username>/CraftRoot/build/extragear/kdeconnect-kde/image-RelWithDebInfo-master/</code> | ||
Run <code>craft --package extragear/kdeconnect-kde</code> to pack KDE Connect to a single application package. | |||
This will be a long process(tested on Mac Mini 2012 fusion driver, 3 minutes 25 seconds). | |||
After that, you will get a DMG image file in <code>/Users/<username>/CraftRoot/tmp/</code>. | |||
< | |||
</ | |||
== Launch on macOS == | |||
Double click to mount the DMG image, drag it into Applications folder. Then you can see it on your Dashboard. | |||
Open and enjoy the connection between your Mac and your Android phone! | |||
The build is passed on macOS 10.14.5 with Xcode 10.1. Feel easy to test it on other versions. | |||
Revision as of 17:43, 19 June 2019
[Note] Building on macOS is still an experimental feature, it's not stable and could not be launched as other applications on macOS. Please do not use it in your production environment !
Prerequisite
- Install Xcode from App Store
- Install Xcode command line tools with
xcode-select --install
- Install Python 3 from Python Homepage, Homebrew or MacPorts. Validate your python install with following command:
which python3
Setting up Craft environment
Once all prerequisites are satisfied, install Craft
curl https://raw.githubusercontent.com/KDE/craft/master/setup/CraftBootstrap.py -o setup.py && python3 setup.py --prefix ~/CraftRoot
With this command, Craft will be installed in ~/CraftRoot
. You can change the directory after --prefix
to install Craft to another directory.
After a long installation, the final output should be this:
Craft : /Users/<username>/CraftRoot Version : master ABI : macos-64-clang Download directory : /Users/<username>/CraftRoot/download Setup complete Please run the following command to get started: source /Users/<username>/CraftRoot/craft/craftenv.sh
Then, you can execute source /Users/<username>/CraftRoot/craft/craftenv.sh
to enter the Craft environment.
Fetching source code and building
Be sure you are in the Craft environment. There could be a CRAFT:
prefix in front of your prompt, like this:
Run craft extragear/kdeconnect-kde
to build KDE Connect on macOS.
If all is well, the last output could be
*** Craft all succeeded: extragear/kdeconnect-kde after 1 minute 51 seconds ***
.
Then you'll get your own build of KDE Connect on macOS in /Users/<username>/CraftRoot/build/extragear/kdeconnect-kde/image-RelWithDebInfo-master/
Run craft --package extragear/kdeconnect-kde
to pack KDE Connect to a single application package.
This will be a long process(tested on Mac Mini 2012 fusion driver, 3 minutes 25 seconds).
After that, you will get a DMG image file in /Users/<username>/CraftRoot/tmp/
.
Launch on macOS
Double click to mount the DMG image, drag it into Applications folder. Then you can see it on your Dashboard.
Open and enjoy the connection between your Mac and your Android phone!
The build is passed on macOS 10.14.5 with Xcode 10.1. Feel easy to test it on other versions.