Skip to content

Instantly share code, notes, and snippets.

@tm9k1
Last active December 14, 2018 18:37
Show Gist options
  • Save tm9k1/9cb403d3f4ec3294fe7e86a2995b6463 to your computer and use it in GitHub Desktop.
Save tm9k1/9cb403d3f4ec3294fe7e86a2995b6463 to your computer and use it in GitHub Desktop.
How to setup a dev environment and build a setup out of KDE Connect for Windows

NOTE: This tutorial assumes Craft is being installed in C:/ [default]

SETTING UP ENVIRONMENT

  1. Install Visual Studio 2017 from here

  2. Install these packages :-

Just-in-Time debugger
VC++ 2017 version 15.9
C++ profiling tools
Windows 10 SDK
Visual C++ tools for CMake
Visual C++ ATL for x86 and x64
Test Adapter for Boost.Test
Test Adapter for Google Test

Visual Studio Packages

  1. 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'))
  1. During command 2, be sure to select Visual Studio 17 as your compiler! INSTALLATION 1
Select compiler
[0] Mingw-w64, [1] Microsoft Visual Studio 2015, [2] Microsoft Visual Studio 2017 (default is Microsoft Visual Studio 2015): 2
Select architecture
[0] x86 [1] x64 (Default is x64): 1
  1. When installation is done, note the Environment variables to match the ones in top of this image:- env vars
[Environment]
PATH=

Craft                             : C:\CraftRoot
Version                         : master
ABI                                : windows-msvc2017_64-c1
Download directory   : C:\CraftRoot\download

Getting the source code and building

NOTE : This is a CPU intensive process

  1. Open a normal Powershell window and call these commands to fire up the Craft environment : C:\CraftRoot\craft\craftenv.ps1

  2. To get the latest source and start the building process: craft extragear/kdeconnect-kde

Building an installer

  1. To create an installable setup, you need NSIS- a open source system to create Windows installers. Install it by this command: craft nsis install NSIS

  2. Now you can use the --package argument to build an installable .EXE out of latest source code available here. The command should look like this: craft --package extragear/kdeconnect-kde

Note the output file here:

Output: "C:\CraftRoot\tmp\kdeconnect-kde-master-86e5cd48-windows-msvc2017_64-cl.exe"

Great thanks to <TheOneRing_m> (Hannah) on IRC Freenode! She is the maintainer of KDE Craft, and a magician! 😄

@tm9k1
Copy link
Author

tm9k1 commented Dec 10, 2018

a full build of project also installs that project to CraftRoot
if you want to skip the install step you can call craft --make project
craft project or craft -i project, consists out of craft --fetch --unpack --configure --make --install --qmerge <project>
-- again thanks to <TheOneRing_m> 😸

@sredman
Copy link

sredman commented Dec 10, 2018

This is good! Thank you for writing it

I find the screenshots especially helpful since they give the reader an indication of what they should be seeing. I would suggest putting any text you reference in the actual document, though. This is important so that it is accessible to people using screen readers as well as (potentially) translators

@tm9k1
Copy link
Author

tm9k1 commented Dec 14, 2018

Thank you for reviewing, @sredman ! I'll add the texts you pointed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment