KDE ISO Image Writer – Release Announcement

My GSoC project comes to an end and I am going to conclude this series of articles by announcing the release of a beta version of KDE ISO Image Writer.
https://download.kde.org/unstable/isoimagewriter/0.8/
https://binary-factory.kde.org/job/KDE%20ISO%20Image%20Writer_Nightly_mingw64/

Highlights of the changes

User Interface Revamp

The user interface of KDE ISO Image Writer has been revamped according to designs made by the KDE community (https://phabricator.kde.org/M113).

Windows Build

In addition to the user interface changes, code changes have been made to allow KDE ISO Image Writer to compile and run on Windows.

N.B. The Windows build currently crashes when ISO images of certain distributions are used because of a segmentation fault caused by QGpgME on Windows.

Advertisements

KDE ISO Image Writer – GSoC Phase 2

As mentioned in my previous blog post, the new user interface was functional on Windows. However, the application had to be run using root on Linux to be able to write an ISO image to a USB flash drive.

KAuth

The original user interface used KAuth to write the ISO image without having to run the entire application with root privileges. KAuth is a framework that allows to perform privilege elevation on restricted portions of code. In order to run an action with administrator privileges without having to run the entire application as an administrator, an additional binary (KAuth helper) which is included alongside the main application binary will perform the actions that require elevated privileges. This approach allows privileges escalation for specific portions of code without granting elevated privileges for code that does not need them. After integrating the existing KAuth helper into the new user interface, it was able to write ISO images by asking for authorisation when required.

Finalising The User Interface

In addition to implementing the KAuth back-end, I polished the user interface and I implemented additional features such as drag and drop support which allows the user to select an ISO image by simply dropping a file on the application window.

KDE ISO Image Writer – Windows Build

One of the main goals of this GSoC project is to have a fully working build of KDE ISO Image Writer on Windows to allow people that want to install KDE Neon to easily write the ISO image onto a USB flash drive.

In order to compile the code on Windows, I used Craft which is a cross-platform build system and package manager. With Craft, I could easily get the dependencies of KDE ISO Image Writer.

I started by writing a Craft blueprint which is a Python file that describes an application (or library) and list its dependencies which allows Craft to fetch the necessary packages before compiling the application.

My journey to get KDE ISO Image Writer running on Windows was not without its hurdles. I first had to figure out how to use Craft to compile an application from a Git repository but that was quickly solved after using Craft’s --help command. Then, I run into an issue with Qgpgme, which is used by KDE ISO Image Writer to verify the digital signature of an ISO image. I tried to compile using MSVC which failed systematically because of CMake complaining about not being able to finding Qgpgme. I learned from the KDE Windows team that Qgpgme can, at the moment, only be compiled using MinGW. I was finally able to compile KDE ISO Image Writer on Windows using Craft and MinGW.

In parallel to working on a Windows build of KDE ISO Image Writer, I continued my work on the user interface by implementing the designs made by the KDE Community. You can see in the following screenshots the new user interface running on Windows:

Writing an ISO image to a USB flash drive

KDE ISO Image Writer – Revamping the UI

As part of GSoC 2019, I am working on KDE ISO Image Writer which is a tool to write ISO images to USB flash drives.

The main goals that I set for this GSoC are:

  • Rework the user interface (following this design).
  • Improve and extend the ISO verification mechanism.
  • Thoroughly test the software to identify bugs.
  • Package the application for Linux, Windows and macOS.

First Attempt at Revamping the UI

When I first looked at the design, I thought I would rewrite the UI in the shape of a wizard using QWizard.

The application would have three main screens that would guide the user through the process of writing an ISO image into a USB flash drive:

  • Select an ISO image
  • Select a USB flash drive
  • Write to USB flash drive

I made the following sketches to illustrate my idea for the user interface:

Select ISO image
Select USB flash drive
Write to USB flash drive

I started implementing this idea using Qt’s QWizard with the idea of having a QWizardPage for each of the above screens:

KDE ISO Image Writer using QWizard

The Way Forward

I had a discussion with my mentor Jonathan Riddell and Nate Graham who is part of the KDE VDG about my plans on the user interface. They provided valuable comments about my approach. It was then clear to me that a wizard is not suitable for this use case and we agreed on the way forward, which is to implement the initial design.