Difference between revisions of "KDEConnect/Build Windows"

Jump to: navigation, search
m (SETTING UP ENVIRONMENT)
Line 6: Line 6:
 
# Select "Desktop development with C++"
 
# Select "Desktop development with C++"
 
# Install these packages
 
# Install these packages
 +
  
 
<pre>Just-in-Time debugger
 
<pre>Just-in-Time debugger
Line 16: Line 17:
 
Test Adapter for Google Test
 
Test Adapter for Google Test
 
</pre>
 
</pre>
 +
 
[[File:kdeconnect_win01.jpeg | Select these components]]
 
[[File:kdeconnect_win01.jpeg | Select these components]]
  
 
<ol start="3">
 
<ol start="3">
 
<li>Call the following commands in a Powershell window with ''Administrator Privileges'' :-</li></ol>
 
<li>Call the following commands in a Powershell window with ''Administrator Privileges'' :-</li></ol>
 +
  
 
<pre>Set-ExecutionPolicy -Scope CurrentUser RemoteSigned
 
<pre>Set-ExecutionPolicy -Scope CurrentUser RemoteSigned
Line 26: Line 29:
 
<ol start="4">
 
<ol start="4">
 
<li>During command 2, be sure to select '''Visual Studio 17''' as your compiler!  
 
<li>During command 2, be sure to select '''Visual Studio 17''' as your compiler!  
 +
 
[[File:kdeconnect_win02.jpeg|INSTALLATION 1]]</li></ol>
 
[[File:kdeconnect_win02.jpeg|INSTALLATION 1]]</li></ol>
 +
  
 
<pre>Select compiler
 
<pre>Select compiler
Line 33: Line 38:
 
[0] x86 [1] x64 (Default is x64): 1
 
[0] x86 [1] x64 (Default is x64): 1
 
</pre>
 
</pre>
 +
 
<ol start="5">
 
<ol start="5">
<li>When installation is done, note the Environment variables to match the ones in top of this image:- [[File:kdeconnect_win03.jpeg|env vars]]</li></ol>
+
<li>When installation is done, note the Environment variables to match the ones in top of this image:-  
 +
 
 +
[[File:kdeconnect_win03.jpeg|env vars]]</li></ol>
 +
 
  
 
<pre>[Environment]
 
<pre>[Environment]
Line 55: Line 64:
  
 
# To create an installable setup, you need [https://sourceforge.net/projects/nsis/ '''NSIS- a open source system to create Windows installers''']. Install it by this command: <code>craft nsis</code>  
 
# To create an installable setup, you need [https://sourceforge.net/projects/nsis/ '''NSIS- a open source system to create Windows installers''']. Install it by this command: <code>craft nsis</code>  
 +
 +
 
[[File:kdeconnect_win04.jpeg|install NSIS]]
 
[[File:kdeconnect_win04.jpeg|install NSIS]]
 +
 +
 
# Now you can use the <code>--package</code> flag to build an installable '''.EXE''' out of latest source code available [https://invent.kde.org/kde/kdeconnect-kde here]. The command should look like this: <code>craft --package extragear/kdeconnect-kde</code>
 
# Now you can use the <code>--package</code> flag to build an installable '''.EXE''' out of latest source code available [https://invent.kde.org/kde/kdeconnect-kde here]. The command should look like this: <code>craft --package extragear/kdeconnect-kde</code>
  
Line 64: Line 77:
 
Great thanks to &lt;TheOneRing_m&gt; (Hannah) on IRC Freenode! She is the maintainer of KDE Craft, and a magician! <span class="emoji" data-emoji="smile">😄</span>
 
Great thanks to &lt;TheOneRing_m&gt; (Hannah) on IRC Freenode! She is the maintainer of KDE Craft, and a magician! <span class="emoji" data-emoji="smile">😄</span>
  
== SETTING UP ENVIRONMENT of MinGW environment (Experiemental, Option) ==
+
== SETTING UP ENVIRONMENT of MinGW environment (Experimental, Option) ==
  
 
<ol start="1">
 
<ol start="1">
 
<li>Call the following commands in a Powershell window with ''Administrator Privileges'' :-</li></ol>
 
<li>Call the following commands in a Powershell window with ''Administrator Privileges'' :-</li></ol>
 +
  
 
<pre>Set-ExecutionPolicy -Scope CurrentUser RemoteSigned
 
<pre>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'))
 
</pre>
 
</pre>
 +
 +
 
<ol start="2">
 
<ol start="2">
 
<li>During command 2, feel free to select '''Mingw-w64''' as your compiler! </li>
 
<li>During command 2, feel free to select '''Mingw-w64''' as your compiler! </li>
 +
  
 
<pre>Select compiler
 
<pre>Select compiler
Line 80: Line 97:
 
[0] x86 [1] x64 (Default is x64): 1
 
[0] x86 [1] x64 (Default is x64): 1
 
</pre>
 
</pre>
 +
  
 
Then there is no difference between this way and the one above.
 
Then there is no difference between this way and the one above.
 
Note that due to the lacking of some definitions in MinGW provided header file, system volume plugin could not be compiled with all functions on Windows using MinGW.
 
Note that due to the lacking of some definitions in MinGW provided header file, system volume plugin could not be compiled with all functions on Windows using MinGW.
 
This feature is still an experimental feature.
 
This feature is still an experimental feature.

Revision as of 14:20, 30 August 2019

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

SETTING UP ENVIRONMENT

  1. Install Visual Studio 2017 from here
  2. Select "Desktop development with C++"
  3. 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

Select these components

  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


  1. Now you can use the --package flag 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! 😄

SETTING UP ENVIRONMENT of MinGW environment (Experimental, Option)

  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, feel free to select Mingw-w64 as your compiler!

  2. Select compiler
    [0] Mingw-w64, [1] Microsoft Visual Studio 2015, [2] Microsoft Visual Studio 2017 (default is Microsoft Visual Studio 2015): 0
    Select architecture
    [0] x86 [1] x64 (Default is x64): 1
    


    Then there is no difference between this way and the one above. Note that due to the lacking of some definitions in MinGW provided header file, system volume plugin could not be compiled with all functions on Windows using MinGW. This feature is still an experimental feature.


Content is available under Creative Commons License SA 4.0 unless otherwise noted.