Kdenlive/Development/WindowsBuild: Difference between revisions

From KDE Community Wiki
No edit summary
(11 intermediate revisions by 3 users not shown)
Line 1: Line 1:
Different efforts are currently being led to make building Kdenlive on Microsoft Windows possible.
Different efforts are currently being led to make building Kdenlive on Microsoft Windows possible.
The most successful one is with Craft, as described in the [https://kdenlive.org/en/2019/01/building-and-distributing-kdenlive-on-windows-and-mac/ Building and Distributing Kdenlive on Windows and Mac article]
== Compiling on Windows using Craft (Recommended method) ==
* If you are using Windows 10, turn on Developper mode, as explained here ([https://docs.microsoft.com/en-us/windows/uwp/get-started/enable-your-device-for-development here]
* Install powerShell. You will find the latest version [https://github.com/PowerShell/PowerShell/releases/ here]. If you have a 64bits system (probable if you have a recent system), choose the "win-x64" version. Otherwise, use the "win-x86" version.
* Create a Craft directory, and download the script:
<pre>
cd C:/
mkdir Craft
cd Craft
curl -o CraftBootstrap.py https://cgit.kde.org/craft.git/plain/setup/CraftBootstrap.py
</pre>
* Now, you can run the installer using <code>python CraftBootstrap.py </code>. It will ask for a compiler, choose Mingw-w64, then an architecture, choose 64bits if you are on a 64 bits system. The craft setup up will take a while.
* As requested, source the environment by running <code>C:\Craft\craft\craftenv.ps1</code>
* Make sure that craft is properly installed by running <code>craft -i craft</code>
* Start building kdenlive. You can simply run <code>craft kdenlive</code>. If it fails because of zlib, simply run <code>craft zlib</code> and retry. Note that if you want to compile kdenlive in debug mode, you can do so by running <code>craft --buildtype Debug kdenlive</code>
== Compiling on Windows in MSYS2 bash shell ==
* [http://www.msys2.org/ Download MSYS2] (x86_64 preferred) and install this unix-like environment for Windows.
* Then download our [https://cgit.kde.org/kdenlive.git/plain/packaging/kdenlive-msys2.sh build script] to the directory where you want it to work.
* From a mingw64 shell, "cd" to that directory and run the script ("./kdenlive-msys2.sh")
* Answer "yes" to package manager questions (pacman) to update build system and download dependencies
* Wait for MLT & Kdenlive to build
* Run Kdenlive from "/mingw64/bin/kdenlive"


== Cross compiling on GNU/Linux using [http://mxe.cc/ MXE] ==
== Cross compiling on GNU/Linux using [http://mxe.cc/ MXE] ==


You should first follow the steps necessary to build [[Kdenlive/Development#Pre-requisites_and_Supported_Platformsbuild|Kdenlive on GNU/ Linux]]. Then, on the level where you cloned the kdenlive repository, you should clone a special version of MXE (M cross environment):
You should first follow the steps necessary to build [[Kdenlive/Development#Pre-requisites_and_Supported_Platformsbuild|Kdenlive on GNU/ Linux]].  
 
=== Getting and configuring MXE ===
Then, on the level where you cloned the kdenlive repository, you should clone a special version of MXE (M cross environment):
<pre>
<pre>
git clone https://github.com/vpinon/mxe.git
git clone https://github.com/vpinon/mxe.git
Line 14: Line 45:
kdenlive_SOURCE_TREE := $PWD/kdenlive
kdenlive_SOURCE_TREE := $PWD/kdenlive
EOF</pre>
EOF</pre>
=== Installing specific dependencies ===
=== Installing MXE dependencies ===
 
MXE requires the following dependecies (many of which should already be on your system, since you built the GNU/Linux version):
 
<pre>
<pre>
sudo apt install \
sudo apt install \
Line 48: Line 82:
     unzip \
     unzip \
     wget \
     wget \
    yasm \
     xz-utils
     xz-utils
</pre>
</pre>


=== Building kdenlive with MXE ===
<pre>
cd mxe
make kdenlive
make gdb  #for debugging
plugins/apps/deploy_kdenlive.sh
</pre>


=== Debugging ===
In case of crash, look for kdenlive PID in the task manager, start gdb:
<pre>
<pre>
cd mxe
gdb
make kdenlive
make gdb # useful in case of crash: look for kdenlive PID in task manager, start gdb, run "attach ''PID''"
plugins/apps/deploy_kdenlive.sh
</pre>
</pre>
And in gdb:
  (gdb)attach ''<i>PID</i>''


== Porting the [https://www.mltframework.org/ MLT framework] to CMake ==
== Porting the [https://www.mltframework.org/ MLT framework] to CMake ==


To be able to compile Kdenlive with MSVC  (Microsoft Visual C++ compiler and libraries toolset). (Elie).
To be able to compile Kdenlive with MSVC  (Microsoft Visual C++ compiler and libraries toolset). (Elie).

Revision as of 21:18, 3 April 2019

Different efforts are currently being led to make building Kdenlive on Microsoft Windows possible. The most successful one is with Craft, as described in the Building and Distributing Kdenlive on Windows and Mac article

Compiling on Windows using Craft (Recommended method)

  • If you are using Windows 10, turn on Developper mode, as explained here (here
  • Install powerShell. You will find the latest version here. If you have a 64bits system (probable if you have a recent system), choose the "win-x64" version. Otherwise, use the "win-x86" version.
  • Create a Craft directory, and download the script:
cd C:/
mkdir Craft
cd Craft
curl -o CraftBootstrap.py https://cgit.kde.org/craft.git/plain/setup/CraftBootstrap.py
  • Now, you can run the installer using python CraftBootstrap.py . It will ask for a compiler, choose Mingw-w64, then an architecture, choose 64bits if you are on a 64 bits system. The craft setup up will take a while.
  • As requested, source the environment by running C:\Craft\craft\craftenv.ps1
  • Make sure that craft is properly installed by running craft -i craft
  • Start building kdenlive. You can simply run craft kdenlive. If it fails because of zlib, simply run craft zlib and retry. Note that if you want to compile kdenlive in debug mode, you can do so by running craft --buildtype Debug kdenlive


Compiling on Windows in MSYS2 bash shell

  • Download MSYS2 (x86_64 preferred) and install this unix-like environment for Windows.
  • Then download our build script to the directory where you want it to work.
  • From a mingw64 shell, "cd" to that directory and run the script ("./kdenlive-msys2.sh")
  • Answer "yes" to package manager questions (pacman) to update build system and download dependencies
  • Wait for MLT & Kdenlive to build
  • Run Kdenlive from "/mingw64/bin/kdenlive"

Cross compiling on GNU/Linux using MXE

You should first follow the steps necessary to build Kdenlive on GNU/ Linux.

Getting and configuring MXE

Then, on the level where you cloned the kdenlive repository, you should clone a special version of MXE (M cross environment):

git clone https://github.com/vpinon/mxe.git

Then create a settings.mk file with the following command (copy/paste the whole block)

cat >mxe/settings.mk <<EOF
MXE_TARGETS := x86_64-w64-mingw32.shared.posix
override MXE_PLUGIN_DIRS += plugins/multimedia plugins/kdeframeworks plugins/apps
kdenlive_SOURCE_TREE := $PWD/kdenlive
EOF

Installing MXE dependencies

MXE requires the following dependecies (many of which should already be on your system, since you built the GNU/Linux version):

sudo apt install \
    autoconf \
    automake \
    autopoint \
    bash \
    bison \
    bzip2 \
    flex \
    g++ \
    g++-multilib \
    gettext \
    git \
    gperf \
    intltool \
    libc6-dev-i386 \
    libgdk-pixbuf2.0-dev \
    libltdl-dev \
    libssl-dev \
    libtool-bin \
    libxml-parser-perl \
    make \
    openssl \
    p7zip-full \
    patch \
    perl \
    pkg-config \
    python \
    ruby \
    scons \
    sed \
    unzip \
    wget \
    yasm \
    xz-utils

Building kdenlive with MXE

cd mxe
make kdenlive
make gdb  #for debugging
plugins/apps/deploy_kdenlive.sh

Debugging

In case of crash, look for kdenlive PID in the task manager, start gdb:

gdb

And in gdb:

 (gdb)attach PID

Porting the MLT framework to CMake

To be able to compile Kdenlive with MSVC (Microsoft Visual C++ compiler and libraries toolset). (Elie).