KDEConnect/Build Windows: Difference between revisions
No edit summary |
Change Telegram link to Matrix |
||
(5 intermediate revisions by one other user not shown) | |||
Line 4: | Line 4: | ||
== Get a compiler == | == Get a compiler == | ||
The environment for KDE Connect on Windows simply consists of two parts- A compiler of choice and a build system. While we do have a couple of options for the compiler, our recommended build system is [https://community.kde.org/Craft Craft]. | The environment for KDE Connect on Windows simply consists of two parts- A compiler of choice and a build system. | ||
While we do have a couple of options for the compiler, our recommended build system is [https://community.kde.org/Craft Craft]. | |||
This is a comprehensive build guide. However, you should definitely refer to Craft's documentation | |||
for further information on using the build system in your development environment! | |||
=== Choose your compiler === | === Choose your compiler === | ||
<p align = "center"> [https://community.kde.org/KDEConnect/Build_Windows# | <p align = "center"> [https://community.kde.org/KDEConnect/Build_Windows#MSVC '''MSVC'''] (full-support) | [https://community.kde.org/KDEConnect/Build_Windows#minGW '''minGW'''] (partial support) </p> | ||
Right now, '''MSVC''' does the best job as a compiler for KDE Connect for Windows. | Right now, '''MSVC''' does the best job as a compiler for KDE Connect for Windows. | ||
Line 15: | Line 18: | ||
# Install Visual Studio 2019 (Community) from [https://visualstudio.microsoft.com/downloads/ '''here'''] and select '''Desktop development with C++'''. | # Install Visual Studio 2019 (Community) from [https://visualstudio.microsoft.com/downloads/ '''here'''] and select '''Desktop development with C++'''. | ||
# Install these packages. | # Install these packages. | ||
#:[[File:kdeconnect_win01.jpeg | Select these components]] | |||
[[File:kdeconnect_win01.jpeg | Select these components]] | #:<syntaxhighlight> | ||
<syntaxhighlight> | |||
* Just-in-Time debugger | * Just-in-Time debugger | ||
* VC++ 2019 version | * VC++ 2019 version | ||
Line 29: | Line 30: | ||
</syntaxhighlight> | </syntaxhighlight> | ||
==== minGW ==== | |||
==== | |||
# Install MinGW-w64 through the GUI installer located [http://www.mingw.org/wiki/Getting_Started here]. | # Install MinGW-w64 through the GUI installer located [http://www.mingw.org/wiki/Getting_Started here]. | ||
Line 37: | Line 37: | ||
Note that due to the lacking of some definitions in the minGW headers, some plugins could not be compiled with all functions on Windows using MinGW. | Note that due to the lacking of some definitions in the minGW headers, some plugins could not be compiled with all functions on Windows using MinGW. | ||
Patches are certainly welcome! | Patches are certainly welcome! | ||
=== Install Craft === | === Install Craft === | ||
Line 45: | Line 44: | ||
Set-ExecutionPolicy -Scope CurrentUser RemoteSigned | Set-ExecutionPolicy -Scope CurrentUser RemoteSigned | ||
iex ((new-object net.webclient).DownloadString('https://raw.githubusercontent.com/KDE/craft/master/setup/install_craft.ps1')) | iex ((new-object net.webclient).DownloadString('https://raw.githubusercontent.com/KDE/craft/master/setup/install_craft.ps1')) | ||
</syntaxhighlight> | |||
# During command 2, select '''Visual Studio 19''' if you chose MSVC earlier, otherwise '''Mingw-w64''' as your compiler. | # During command 2, select '''Visual Studio 19''' if you chose MSVC earlier, otherwise '''Mingw-w64''' as your compiler. | ||
#:[[File:kdeconnect_win02.jpeg|INSTALLATION 1]] | #:[[File:kdeconnect_win02.jpeg|INSTALLATION 1]] | ||
Line 53: | Line 52: | ||
Select architecture | Select architecture | ||
[0] x86 [1] x64 (Default is x64): 1 | [0] x86 [1] x64 (Default is x64): 1 | ||
</syntaxhighlight> | |||
# When the installation is done, note the Environment variables to match the ones in the top of this image:- | # When the installation is done, note the Environment variables to match the ones in the top of this image:- | ||
#:[[File:kdeconnect_win03.jpeg|env vars]] | #:[[File:kdeconnect_win03.jpeg|env vars]] | ||
Line 64: | Line 63: | ||
ABI : windows-msvc2019_64-c1 | ABI : windows-msvc2019_64-c1 | ||
Download directory : C:\CraftRoot\download | Download directory : C:\CraftRoot\download | ||
</syntaxhighlight> | |||
== Build KDE Connect == | == Build KDE Connect == | ||
Line 72: | Line 70: | ||
# Open '''Craft CraftRoot''' from search (in taskbar). | # Open '''Craft CraftRoot''' from search (in taskbar). | ||
# Head over to [https://community.kde.org/KDEConnect/Build_Craft this link] for further instructions. | |||
== [OPTIONAL] Build a redistributable installer == | == [OPTIONAL] Build a redistributable installer == | ||
# Open <code>CraftRoot/etc/CraftSettings.ini</code> | # Open <code>CraftRoot/etc/CraftSettings.ini</code> | ||
# To make an EXE | # To make an EXE installer, set <code>PackageType</code> to <code>NullsoftInstallerPackager</code>. <br/> | ||
TO make an AppX | #:TO make an AppX installer, set <code>PackageType</code> to <code>AppxPackager</code>. | ||
# Now you can use the <code>--package</code> flag to build to instruct Craft to build an installer. | # Now you can use the <code>--package</code> flag to build to instruct Craft to build an installer. | ||
<syntaxhighlight lang="sh"> | #:<syntaxhighlight lang="sh"> | ||
craft --package kdeconnect-kde | craft --package kdeconnect-kde | ||
</syntaxhighlight> | </syntaxhighlight> | ||
Line 90: | Line 87: | ||
We are only human! There are many questions that we face commonly, during DevSprints and during the onboarding of new contributors. Just skim through all the commonly asked questions so you don't have to ask around like others had to. | We are only human! There are many questions that we face commonly, during DevSprints and during the onboarding of new contributors. Just skim through all the commonly asked questions so you don't have to ask around like others had to. | ||
# '''I don't get the notification buttons, and the application name in the notifications is weird (something like <code>kdeconnect.daemon</code>. How do I fix it?''' | # '''I don't get the notification buttons, and the application name in the notifications is weird (something like <code>kdeconnect.daemon</code>. How do I fix it?''' | ||
#:Just run this command: | |||
Just run this command: | #:<syntaxhighlight lang="dosbatch"> | ||
<syntaxhighlight lang="dosbatch"> | |||
C:\CraftRoot\bin\SnoreToast.exe -install "KDE Connect DEV" "C:/CraftRoot/bin/kdeconnectd.exe" "kdeconnect.daemon" | C:\CraftRoot\bin\SnoreToast.exe -install "KDE Connect DEV" "C:/CraftRoot/bin/kdeconnectd.exe" "kdeconnect.daemon" | ||
</syntaxhighlight> | </syntaxhighlight> | ||
#:A detailed explanation is available [https://taskmaster9001.wordpress.com/2019/06/07/gsoc19-milestone-1/ here] and also in the code of Windows 10 backend for KNotifications [https://github.com/KDE/knotifications/blob/master/src/notifybysnore.cpp#L33 here]. | |||
A detailed explanation is available [https://taskmaster9001.wordpress.com/2019/06/07/gsoc19-milestone-1/ here] and also in the code of Windows 10 backend for KNotifications [https://github.com/KDE/knotifications/blob/master/src/notifybysnore.cpp#L33 here]. | |||
# '''How can I contact the KDE Connect team? I'd like to talk to the team about an issue/ suggestion.''' | # '''How can I contact the KDE Connect team? I'd like to talk to the team about an issue/ suggestion.''' | ||
#: | |||
#:* Matrix: You can find a link to our Matrix room [https://community.kde.org/Matrix here]. | |||
#:* IRC on Libera Chat: #kdeconnect | |||
#:* Mailing List: [https://mail.kde.org/mailman/listinfo/kdeconnect https://mail.kde.org/mailman/listinfo/kdeconnect] | |||
#:* email ID: [email protected] | |||
''Be sure to let us know if you got stuck somewhere in the process of setting up the developer environment. You can [mailto:[email protected] mail us]. Yes, we read the mails!'' | |||
''Be sure to |
Latest revision as of 16:58, 22 August 2023
KDE Connect works quite well on Windows, with all plugins ported over from the OG Linux app.
Get a compiler
The environment for KDE Connect on Windows simply consists of two parts- A compiler of choice and a build system. While we do have a couple of options for the compiler, our recommended build system is Craft. This is a comprehensive build guide. However, you should definitely refer to Craft's documentation for further information on using the build system in your development environment!
Choose your compiler
MSVC (full-support) | minGW (partial support)
Right now, MSVC does the best job as a compiler for KDE Connect for Windows.
MSVC
- Install Visual Studio 2019 (Community) from here and select Desktop development with C++.
- Install these packages.
minGW
- Install MinGW-w64 through the GUI installer located here.
- While installing Craft, select Mingw-w64 as your compiler.
Note that due to the lacking of some definitions in the minGW headers, some plugins could not be compiled with all functions on Windows using MinGW. Patches are certainly welcome!
Install Craft
- Call the following commands in a Powershell window with Administrator Privileges
Set-ExecutionPolicy -Scope CurrentUser RemoteSigned iex ((new-object net.webclient).DownloadString('https://raw.githubusercontent.com/KDE/craft/master/setup/install_craft.ps1'))
- During command 2, select Visual Studio 19 if you chose MSVC earlier, otherwise Mingw-w64 as your compiler.
- When the installation is done, note the Environment variables to match the ones in the top of this image:-
Build KDE Connect
Craft has automated most of the redundant parts of the build process and exposed just the really useful parameters like which version to build, where to install et al.
- Open Craft CraftRoot from search (in taskbar).
- Head over to this link for further instructions.
[OPTIONAL] Build a redistributable installer
- Open
CraftRoot/etc/CraftSettings.ini
- To make an EXE installer, set
PackageType
toNullsoftInstallerPackager
.
- TO make an AppX installer, set
PackageType
toAppxPackager
.
- TO make an AppX installer, set
- Now you can use the
--package
flag to build to instruct Craft to build an installer.craft --package kdeconnect-kde
Note: The output files are saved in: CraftRoot/tmp/
FAQs : FREQUENTLY ASKED QUESTIONS
We are only human! There are many questions that we face commonly, during DevSprints and during the onboarding of new contributors. Just skim through all the commonly asked questions so you don't have to ask around like others had to.
- I don't get the notification buttons, and the application name in the notifications is weird (something like
kdeconnect.daemon
. How do I fix it? - How can I contact the KDE Connect team? I'd like to talk to the team about an issue/ suggestion.
-
- Matrix: You can find a link to our Matrix room here.
- IRC on Libera Chat: #kdeconnect
- Mailing List: https://mail.kde.org/mailman/listinfo/kdeconnect
- email ID: [email protected]
-
Be sure to let us know if you got stuck somewhere in the process of setting up the developer environment. You can mail us. Yes, we read the mails!