SlideShare a Scribd company logo
1 of 18
Download to read offline
www.ics.com
Qt Installer Framework
Christopher Probst, Chris Rizzitello, ICS
July 28, 2022
1
www.ics.com
About ICS
Delivering Smart Devices for a Connected World
● Founded in 1987
● Largest source of independent Qt expertise in North America
● Trusted Qt Service Partner since 2002
● Exclusive Open Enrollment Training Partner in North America
● Provides integrated custom software development and user experience (UX) design
● Embedded, touchscreen, mobile and desktop applications
● HQ in Waltham, MA with offices in California, Canada, Europe
Boston UX
● Part of the ICS family, focusing on UX design
● Designs intuitive touchscreen interfaces for high-impact embedded
and connected medical, industrial and consumer devices
2
www.ics.com
What is the Qt Installer Framework?
● A set of tools to create installers on Linux, Windows and Mac.
● Installers can be offline and online
● The program binarycreator creates the installer
● If the installer is online, the pgm repogen generates a repository folder to be
uploaded to an http server
● Qt Installer Framework is distributed through Qt’s own installer in the tools
section.
3
www.ics.com
Installing the Installer
4
www.ics.com
● CPack is a packaging system for software distributions integrated with CMake;
● Linux RPM, deb, Windows MSI and more..
● For each packaging format, CPack has a generator
● CPack DEB Generator
● CPack DragNDrop Generator
● CPack External Generator
● CPack FreeBSD Generator
● CPack IFW Generator
● CPack NSIS Generator
● CPack RPM Generator
● The IFW generator is the one that uses the Qt Installer Framework
● Set in the CMakeLists.txt
Starting Point: CPack
set(CPACK_GENERATOR "IFW")
5
www.ics.com
Before Starting
6
● Set the following variables in the CMakeLists.txt file
● Commands to configure, build and package (invoking CPack)
cmake.exe -S. -Bbuild -DCPACK_IFW_ROOT=C:/Qt/Tools/QtInstallerFramework/4.2
cmake.exe --build <PROJECTBUILDDIR> --target all package
set(CPACK_PACKAGE_NAME "Example-Utility")
set(CPACK_GENERATOR "IFW")
if(NOT CPACK_IFW_ROOT)
set(CPACK_IFW_ROOT "C:/Qt/Tools/QtInstallerFramework/4.2")
endif()
www.ics.com
install(TARGETS ${BIN_NAME} DESTINATION ${CMAKE_INSTALL_BINDIR} COMPONENT ${COMPONENT_NAME_MAIN})
● CPack will bundle into the install the components specified with the CMake
install directive
● The component can have a description and can be further configured with the
following commands
Specifying the CMake project to create an installer
7
cpack_add_component(${COMPONENT_NAME_MAIN})
cpack_ifw_configure_component(${COMPONENT_NAME_MAIN}
VERSION ${CMAKE_PROJECT_VERSION}
SCRIPT ${CMAKE_CURRENT_SOURCE_DIR}/installscript.qs)
www.ics.com
Some CPACK_IFW variables that can be set
All these variables map to a config element provided by the Qt Installer
Framework and specified here:
https://doc.qt.io/qtinstallerframework/ifw-globalconfig.html
Customize the installer
#set(CPACK_IFW_PACKAGE_ICON "${CMAKE_CURRENT_SOURCE_DIR}/Example.ico")
set(CPACK_IFW_TARGET_DIRECTORY "@ApplicationsDir@/Example-Utility")
#set(CPACK_PACKAGE_FILE_NAME "GreatInstallerName" )
set (CPACK_IFW_PACKAGE_NAME "Example Utility")
set (CPACK_IFW_PACKAGE_TITLE "Example-Utility Title ${CMAKE_PROJECT_VERSION}")
set (CPACK_IFW_PACKAGE_PUBLISHER "Example Company")
set (CPACK_IFW_PACKAGE_WIZARD_STYLE "Aero")
set (CPACK_IFW_PACKAGE_WIZARD_SHOW_PAGE_LIST OFF)
set (CPACK_IFW_PACKAGE_CONTROL_SCRIPT ${CMAKE_CURRENT_SOURCE_DIR}/controller.qs)
8
www.ics.com
Controller scripting allows:
● Thee modification of the some of the properties of the installer’s page
● The removal of some the installer’s page
● Simulate Button Clicks to control the flow of pages
Further Customization with Controller Scripting
9
function Controller()
{ console.log("-----------This is the entry point---------------")
installer.setDefaultPageVisible(QInstaller.ComponentSelection, false);
installer.installationFinished.connect(this, this.installationFinished);
console.log("------------------------------")
}
Controller.prototype.installationFinished = function()
{ gui.clickButton(buttons.FinishButton);
}
Controller.prototype.IntroductionPageCallback = function()
{ var widget = gui.currentPageWidget(); // get the current wizard page
widget.MessageLabel.setText("Hey how's it going."); // set the welcome text
}
www.ics.com
Further Customization with Controller Scripting
The API is defined here
https://doc.qt.io/qtinstallerframework/scripting-qmlmodule.html
10
www.ics.com
Further Customization with Scripting
Some good documentation and tutorial:
https://doc.qt.io/qtinstallerframework/noninteractive.html
Use the examples provided by the Qt Installer Framework
https://doc.qt.io/qtinstallerframework/qtifwexamples.html
Qt Installer Framework Examples are located:
<QTDIR>ToolsQtInstallerFramework4.4examples
11
www.ics.com
Further Customization with Component
● In the CMakeLists.txt the command cpack_ifw_configure_component allows for
can specify how the component is installed as well as changes to the UI
● Every option of this command is mapped to an element of the package.xml
specified here
https://doc.qt.io/qtinstallerframework/ifw-component-description.html#summary-of-package-information-file-elements
● As an example
In the CMakeLists.txt,
cpack_ifw_configure_component([LICENSES <display_name> <file_path> ...] ..)
maps to
<Licenses>
<License name="License Agreement" file="license.txt" />
</Licenses>
12
www.ics.com
Further Customization with Component Scripting
13
cpack_ifw_configure_component(${COMPONENT_NAME_MAIN}
VERSION ${CMAKE_PROJECT_VERSION}
SCRIPT ${CMAKE_CURRENT_SOURCE_DIR}/installscript.qs)
● One of those options is SCRIPT that specifies a component script
● This allows further customization on modifying how the component is
installed as well as adding pages to the installer
● Uses the same API as controller scripting
www.ics.com
Further Customization with Component Scripting
● Reimplementation of the createOperations function allows to modify
how the component is installed
● Possible operations are listed here
https://doc.qt.io/qtinstallerframework/operations.html#summary-of-operations
14
Component.prototype.createOperations = function () {
// call default implementation
component.createOperations();
var targetDirectory = installer.value("TargetDir");
var windowsTargetDir = targetDirectory.replace(///g,'')
component.addOperation("GlobalConfig",
"HKEY_CLASSES_ROOTDirectoryBackgroundshell",
"Example",
""); …
www.ics.com
Adding Pages to the Installer
● Using Qt Designer create a ui file specify the ui of the page
● The cpack_ifw_configure_component command has the option
cpack_ifw_configure_component(...[USER_INTERFACES <file_path> <file_path> ...] )
● In the component script
15
cpack_ifw_configure_component(...USER_INTERFACES target.ui… )
Component.prototype.installerLoaded = function () {
if (installer.addWizardPage(component, "TargetWidget", QInstaller.TargetDirectory)) {
var widget = gui.pageWidgetByObjectName("DynamicTargetWidget");
if (widget != null) {
widget.targetChooser.clicked.connect(this, Component.prototype.chooseTarget);
widget.targetDirectory.textChanged.connect(this, Component.prototype.targetChanged);
widget.targetDirectory.text = Dir.toNativeSparator(installer.value("TargetDir"));
}
}
www.ics.com
Some Debugging tips
● Run the installer with -d or --verbose option
● The console.log() command will display debugging information
16
function Component() {
console.log("-----------This is the entry point for Component Scripting---------------")
console.log( component.value("Version") )
}
www.ics.com
Deployment Issues
17
set(WINDEPLOYQT "@WINDEPLOYQT@")
set(COMPONENT_NAME_MAIN "@COMPONENT_NAME_MAIN@")
set(CMAKE_CURRENT_SOURCE_DIR "@CMAKE_CURRENT_SOURCE_DIR@")
execute_process(COMMAND ${WINDEPLOYQT} --no-translations --no-opengl-sw --no-svg --no-system-d3d-compiler
--no-quick-import ${COMPONENT_NAME_MAIN}/data/bin WORKING_DIRECTORY
${CPACK_TEMPORARY_INSTALL_DIRECTORY}/packages)
● An installed application linking with Qt needs the Qt dependencies to run
● For Qt, windeployqt (distributed with Qt in the bin folder) can help as it creates
a deployable folder with the Qt dependencies.
● With CPack this means to create deploy-qt-windows.cmake.in file with the following
● The CMakeLists.txt
set (CPACK_IFW_PACKAGE_CONTROL_SCRIPT ${CMAKE_CURRENT_SOURCE_DIR}/controller.qs)
find_program(WINDEPLOYQT windeployqt HINTS "${_qt_bin_dir}")
configure_file("${CMAKE_CURRENT_SOURCE_DIR}/deploy-qt-windows.cmake.in"
"${CMAKE_CURRENT_SOURCE_DIR}/deploy-qt-windows.cmake" @ONLY)
set(CPACK_PRE_BUILD_SCRIPTS ${CMAKE_CURRENT_SOURCE_DIR}/deploy-qt-windows.cmake)
www.ics.com
Integrated Computer Solutions Inc.
Any Questions?
18
Don’t miss our webinar on September 22
CMake for QMake Users

More Related Content

What's hot

VMware Advance Troubleshooting Workshop - Day 3
VMware Advance Troubleshooting Workshop - Day 3VMware Advance Troubleshooting Workshop - Day 3
VMware Advance Troubleshooting Workshop - Day 3Vepsun Technologies
 
Kubernetes Architecture - beyond a black box - Part 1
Kubernetes Architecture - beyond a black box - Part 1Kubernetes Architecture - beyond a black box - Part 1
Kubernetes Architecture - beyond a black box - Part 1Hao H. Zhang
 
Qt multi threads
Qt multi threadsQt multi threads
Qt multi threadsYnon Perek
 
Docker Registry V2
Docker Registry V2Docker Registry V2
Docker Registry V2Docker, Inc.
 
IBM WebSphere Application Server traditional and Docker
IBM WebSphere Application Server traditional and DockerIBM WebSphere Application Server traditional and Docker
IBM WebSphere Application Server traditional and DockerDavid Currie
 
HA Deployment Architecture with HAProxy and Keepalived
HA Deployment Architecture with HAProxy and KeepalivedHA Deployment Architecture with HAProxy and Keepalived
HA Deployment Architecture with HAProxy and KeepalivedGanapathi Kandaswamy
 
[KubeCon EU 2022] Running containerd and k3s on macOS
[KubeCon EU 2022] Running containerd and k3s on macOS[KubeCon EU 2022] Running containerd and k3s on macOS
[KubeCon EU 2022] Running containerd and k3s on macOSAkihiro Suda
 
Docker Deep Dive Understanding Docker Engine Docker for DevOps
Docker Deep Dive Understanding Docker Engine Docker for DevOpsDocker Deep Dive Understanding Docker Engine Docker for DevOps
Docker Deep Dive Understanding Docker Engine Docker for DevOpsMehwishHayat3
 
BlueHat v17 || Securing Windows Defender Application Guard
BlueHat v17 || Securing Windows Defender Application Guard BlueHat v17 || Securing Windows Defender Application Guard
BlueHat v17 || Securing Windows Defender Application Guard BlueHat Security Conference
 
Best practices for optimizing Red Hat platforms for large scale datacenter de...
Best practices for optimizing Red Hat platforms for large scale datacenter de...Best practices for optimizing Red Hat platforms for large scale datacenter de...
Best practices for optimizing Red Hat platforms for large scale datacenter de...Jeremy Eder
 
rpm package 를 이용한 MySQL 설치자동화
rpm package 를 이용한 MySQL 설치자동화rpm package 를 이용한 MySQL 설치자동화
rpm package 를 이용한 MySQL 설치자동화I Goo Lee
 
Basics of Model/View Qt programming
Basics of Model/View Qt programmingBasics of Model/View Qt programming
Basics of Model/View Qt programmingICS
 
Inventory Tips & Tricks
Inventory Tips & TricksInventory Tips & Tricks
Inventory Tips & TricksDell World
 
Dockers and kubernetes
Dockers and kubernetesDockers and kubernetes
Dockers and kubernetesDr Ganesh Iyer
 
Introduction to Docker Compose
Introduction to Docker ComposeIntroduction to Docker Compose
Introduction to Docker ComposeAjeet Singh Raina
 
Kubernetes overview 101
Kubernetes overview 101Kubernetes overview 101
Kubernetes overview 101Boskey Savla
 

What's hot (20)

VMware Advance Troubleshooting Workshop - Day 3
VMware Advance Troubleshooting Workshop - Day 3VMware Advance Troubleshooting Workshop - Day 3
VMware Advance Troubleshooting Workshop - Day 3
 
Kubernetes Architecture - beyond a black box - Part 1
Kubernetes Architecture - beyond a black box - Part 1Kubernetes Architecture - beyond a black box - Part 1
Kubernetes Architecture - beyond a black box - Part 1
 
VDI Best Practices
VDI Best PracticesVDI Best Practices
VDI Best Practices
 
WebLogic for DBAs
WebLogic for DBAsWebLogic for DBAs
WebLogic for DBAs
 
Qt multi threads
Qt multi threadsQt multi threads
Qt multi threads
 
Docker Registry V2
Docker Registry V2Docker Registry V2
Docker Registry V2
 
IBM WebSphere Application Server traditional and Docker
IBM WebSphere Application Server traditional and DockerIBM WebSphere Application Server traditional and Docker
IBM WebSphere Application Server traditional and Docker
 
HA Deployment Architecture with HAProxy and Keepalived
HA Deployment Architecture with HAProxy and KeepalivedHA Deployment Architecture with HAProxy and Keepalived
HA Deployment Architecture with HAProxy and Keepalived
 
[KubeCon EU 2022] Running containerd and k3s on macOS
[KubeCon EU 2022] Running containerd and k3s on macOS[KubeCon EU 2022] Running containerd and k3s on macOS
[KubeCon EU 2022] Running containerd and k3s on macOS
 
Docker Deep Dive Understanding Docker Engine Docker for DevOps
Docker Deep Dive Understanding Docker Engine Docker for DevOpsDocker Deep Dive Understanding Docker Engine Docker for DevOps
Docker Deep Dive Understanding Docker Engine Docker for DevOps
 
BlueHat v17 || Securing Windows Defender Application Guard
BlueHat v17 || Securing Windows Defender Application Guard BlueHat v17 || Securing Windows Defender Application Guard
BlueHat v17 || Securing Windows Defender Application Guard
 
Best practices for optimizing Red Hat platforms for large scale datacenter de...
Best practices for optimizing Red Hat platforms for large scale datacenter de...Best practices for optimizing Red Hat platforms for large scale datacenter de...
Best practices for optimizing Red Hat platforms for large scale datacenter de...
 
rpm package 를 이용한 MySQL 설치자동화
rpm package 를 이용한 MySQL 설치자동화rpm package 를 이용한 MySQL 설치자동화
rpm package 를 이용한 MySQL 설치자동화
 
Introduction to container based virtualization with docker
Introduction to container based virtualization with dockerIntroduction to container based virtualization with docker
Introduction to container based virtualization with docker
 
Basics of Model/View Qt programming
Basics of Model/View Qt programmingBasics of Model/View Qt programming
Basics of Model/View Qt programming
 
Inventory Tips & Tricks
Inventory Tips & TricksInventory Tips & Tricks
Inventory Tips & Tricks
 
Dockers and kubernetes
Dockers and kubernetesDockers and kubernetes
Dockers and kubernetes
 
Introduction to Docker Compose
Introduction to Docker ComposeIntroduction to Docker Compose
Introduction to Docker Compose
 
Kubernetes overview 101
Kubernetes overview 101Kubernetes overview 101
Kubernetes overview 101
 
Hcx intro preso v2
Hcx intro preso v2Hcx intro preso v2
Hcx intro preso v2
 

Similar to Qt Installer Framework

Basic Cmake for Qt Users
Basic Cmake for Qt UsersBasic Cmake for Qt Users
Basic Cmake for Qt UsersICS
 
Build and run embedded apps faster from qt creator with docker
Build and run embedded apps faster from qt creator with dockerBuild and run embedded apps faster from qt creator with docker
Build and run embedded apps faster from qt creator with dockerQt
 
Webinar: Building Embedded Applications from QtCreator with Docker
Webinar: Building Embedded Applications from QtCreator with DockerWebinar: Building Embedded Applications from QtCreator with Docker
Webinar: Building Embedded Applications from QtCreator with DockerBurkhard Stubert
 
Building CI pipeline based on TeamCity & Docker in Android Team
Building CI pipeline based on TeamCity & Docker in Android TeamBuilding CI pipeline based on TeamCity & Docker in Android Team
Building CI pipeline based on TeamCity & Docker in Android TeamPaweł Gajda
 
Use Eclipse technologies to build a modern embedded IDE
Use Eclipse technologies to build a modern embedded IDEUse Eclipse technologies to build a modern embedded IDE
Use Eclipse technologies to build a modern embedded IDEBenjamin Cabé
 
CI/CD with Jenkins and Docker - DevOps Meetup Day Thailand
CI/CD with Jenkins and Docker - DevOps Meetup Day ThailandCI/CD with Jenkins and Docker - DevOps Meetup Day Thailand
CI/CD with Jenkins and Docker - DevOps Meetup Day ThailandTroublemaker Khunpech
 
Deploying windows containers with kubernetes
Deploying windows containers with kubernetesDeploying windows containers with kubernetes
Deploying windows containers with kubernetesBen Hall
 
[Codelab 2017] Docker 기초 및 활용 방안
[Codelab 2017] Docker 기초 및 활용 방안[Codelab 2017] Docker 기초 및 활용 방안
[Codelab 2017] Docker 기초 및 활용 방안양재동 코드랩
 
Phonegap android angualr material design
Phonegap android angualr material designPhonegap android angualr material design
Phonegap android angualr material designSrinadh Kanugala
 
Dockerization of Azure Platform
Dockerization of Azure PlatformDockerization of Azure Platform
Dockerization of Azure Platformnirajrules
 
How to Webpack your Django!
How to Webpack your Django!How to Webpack your Django!
How to Webpack your Django!David Gibbons
 
Scaling Docker Containers using Kubernetes and Azure Container Service
Scaling Docker Containers using Kubernetes and Azure Container ServiceScaling Docker Containers using Kubernetes and Azure Container Service
Scaling Docker Containers using Kubernetes and Azure Container ServiceBen Hall
 
Native Application Development With Qt
Native Application Development With QtNative Application Development With Qt
Native Application Development With Qtrahulnimbalkar
 
Extend Eclipse p2 framework capabilities: Add your custom installation steps
Extend Eclipse p2 framework capabilities: Add your custom installation stepsExtend Eclipse p2 framework capabilities: Add your custom installation steps
Extend Eclipse p2 framework capabilities: Add your custom installation stepsDragos_Mihailescu
 
Continuos integration for iOS projects
Continuos integration for iOS projectsContinuos integration for iOS projects
Continuos integration for iOS projectsAleksandra Gavrilovska
 
GDG-ANDROID-ATHENS Meetup: Build in Docker with Jenkins
GDG-ANDROID-ATHENS Meetup: Build in Docker with Jenkins GDG-ANDROID-ATHENS Meetup: Build in Docker with Jenkins
GDG-ANDROID-ATHENS Meetup: Build in Docker with Jenkins Mando Stam
 
Exploring Next Generation Buildpacks - Anand Rao & Scott Deeg
Exploring Next Generation Buildpacks - Anand Rao & Scott DeegExploring Next Generation Buildpacks - Anand Rao & Scott Deeg
Exploring Next Generation Buildpacks - Anand Rao & Scott DeegVMware Tanzu
 
Ese 2008 RTSC Draft1
Ese 2008 RTSC Draft1Ese 2008 RTSC Draft1
Ese 2008 RTSC Draft1drusso
 

Similar to Qt Installer Framework (20)

Basic Cmake for Qt Users
Basic Cmake for Qt UsersBasic Cmake for Qt Users
Basic Cmake for Qt Users
 
Build and run embedded apps faster from qt creator with docker
Build and run embedded apps faster from qt creator with dockerBuild and run embedded apps faster from qt creator with docker
Build and run embedded apps faster from qt creator with docker
 
Webinar: Building Embedded Applications from QtCreator with Docker
Webinar: Building Embedded Applications from QtCreator with DockerWebinar: Building Embedded Applications from QtCreator with Docker
Webinar: Building Embedded Applications from QtCreator with Docker
 
Building CI pipeline based on TeamCity & Docker in Android Team
Building CI pipeline based on TeamCity & Docker in Android TeamBuilding CI pipeline based on TeamCity & Docker in Android Team
Building CI pipeline based on TeamCity & Docker in Android Team
 
Deep Learning Edge
Deep Learning Edge Deep Learning Edge
Deep Learning Edge
 
Use Eclipse technologies to build a modern embedded IDE
Use Eclipse technologies to build a modern embedded IDEUse Eclipse technologies to build a modern embedded IDE
Use Eclipse technologies to build a modern embedded IDE
 
CI/CD with Jenkins and Docker - DevOps Meetup Day Thailand
CI/CD with Jenkins and Docker - DevOps Meetup Day ThailandCI/CD with Jenkins and Docker - DevOps Meetup Day Thailand
CI/CD with Jenkins and Docker - DevOps Meetup Day Thailand
 
Deploying windows containers with kubernetes
Deploying windows containers with kubernetesDeploying windows containers with kubernetes
Deploying windows containers with kubernetes
 
[Codelab 2017] Docker 기초 및 활용 방안
[Codelab 2017] Docker 기초 및 활용 방안[Codelab 2017] Docker 기초 및 활용 방안
[Codelab 2017] Docker 기초 및 활용 방안
 
Phonegap android angualr material design
Phonegap android angualr material designPhonegap android angualr material design
Phonegap android angualr material design
 
Dockerization of Azure Platform
Dockerization of Azure PlatformDockerization of Azure Platform
Dockerization of Azure Platform
 
How to Webpack your Django!
How to Webpack your Django!How to Webpack your Django!
How to Webpack your Django!
 
citus™ iot ecosystem
citus™ iot ecosystemcitus™ iot ecosystem
citus™ iot ecosystem
 
Scaling Docker Containers using Kubernetes and Azure Container Service
Scaling Docker Containers using Kubernetes and Azure Container ServiceScaling Docker Containers using Kubernetes and Azure Container Service
Scaling Docker Containers using Kubernetes and Azure Container Service
 
Native Application Development With Qt
Native Application Development With QtNative Application Development With Qt
Native Application Development With Qt
 
Extend Eclipse p2 framework capabilities: Add your custom installation steps
Extend Eclipse p2 framework capabilities: Add your custom installation stepsExtend Eclipse p2 framework capabilities: Add your custom installation steps
Extend Eclipse p2 framework capabilities: Add your custom installation steps
 
Continuos integration for iOS projects
Continuos integration for iOS projectsContinuos integration for iOS projects
Continuos integration for iOS projects
 
GDG-ANDROID-ATHENS Meetup: Build in Docker with Jenkins
GDG-ANDROID-ATHENS Meetup: Build in Docker with Jenkins GDG-ANDROID-ATHENS Meetup: Build in Docker with Jenkins
GDG-ANDROID-ATHENS Meetup: Build in Docker with Jenkins
 
Exploring Next Generation Buildpacks - Anand Rao & Scott Deeg
Exploring Next Generation Buildpacks - Anand Rao & Scott DeegExploring Next Generation Buildpacks - Anand Rao & Scott Deeg
Exploring Next Generation Buildpacks - Anand Rao & Scott Deeg
 
Ese 2008 RTSC Draft1
Ese 2008 RTSC Draft1Ese 2008 RTSC Draft1
Ese 2008 RTSC Draft1
 

More from ICS

The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...ICS
 
Practical Advice for FDA’s 510(k) Requirements.pdf
Practical Advice for FDA’s 510(k) Requirements.pdfPractical Advice for FDA’s 510(k) Requirements.pdf
Practical Advice for FDA’s 510(k) Requirements.pdfICS
 
Accelerating Development of a Safety-Critical Cobot Welding System with Qt/QM...
Accelerating Development of a Safety-Critical Cobot Welding System with Qt/QM...Accelerating Development of a Safety-Critical Cobot Welding System with Qt/QM...
Accelerating Development of a Safety-Critical Cobot Welding System with Qt/QM...ICS
 
Overcoming CMake Configuration Issues Webinar
Overcoming CMake Configuration Issues WebinarOvercoming CMake Configuration Issues Webinar
Overcoming CMake Configuration Issues WebinarICS
 
Enhancing Quality and Test in Medical Device Design - Part 2.pdf
Enhancing Quality and Test in Medical Device Design - Part 2.pdfEnhancing Quality and Test in Medical Device Design - Part 2.pdf
Enhancing Quality and Test in Medical Device Design - Part 2.pdfICS
 
Designing and Managing IoT Devices for Rapid Deployment - Webinar.pdf
Designing and Managing IoT Devices for Rapid Deployment - Webinar.pdfDesigning and Managing IoT Devices for Rapid Deployment - Webinar.pdf
Designing and Managing IoT Devices for Rapid Deployment - Webinar.pdfICS
 
Quality and Test in Medical Device Design - Part 1.pdf
Quality and Test in Medical Device Design - Part 1.pdfQuality and Test in Medical Device Design - Part 1.pdf
Quality and Test in Medical Device Design - Part 1.pdfICS
 
Creating Digital Twins Using Rapid Development Techniques.pdf
Creating Digital Twins Using Rapid Development Techniques.pdfCreating Digital Twins Using Rapid Development Techniques.pdf
Creating Digital Twins Using Rapid Development Techniques.pdfICS
 
Secure Your Medical Devices From the Ground Up
Secure Your Medical Devices From the Ground Up Secure Your Medical Devices From the Ground Up
Secure Your Medical Devices From the Ground Up ICS
 
Cybersecurity and Software Updates in Medical Devices.pdf
Cybersecurity and Software Updates in Medical Devices.pdfCybersecurity and Software Updates in Medical Devices.pdf
Cybersecurity and Software Updates in Medical Devices.pdfICS
 
MDG Panel - Creating Expert Level GUIs for Complex Medical Devices
MDG Panel - Creating Expert Level GUIs for Complex Medical DevicesMDG Panel - Creating Expert Level GUIs for Complex Medical Devices
MDG Panel - Creating Expert Level GUIs for Complex Medical DevicesICS
 
How to Craft a Winning IOT Device Management Solution
How to Craft a Winning IOT Device Management SolutionHow to Craft a Winning IOT Device Management Solution
How to Craft a Winning IOT Device Management SolutionICS
 
Bridging the Gap Between Development and Regulatory Teams
Bridging the Gap Between Development and Regulatory TeamsBridging the Gap Between Development and Regulatory Teams
Bridging the Gap Between Development and Regulatory TeamsICS
 
IoT Device Fleet Management: Create a Robust Solution with Azure
IoT Device Fleet Management: Create a Robust Solution with AzureIoT Device Fleet Management: Create a Robust Solution with Azure
IoT Device Fleet Management: Create a Robust Solution with AzureICS
 
Software Update Mechanisms: Selecting the Best Solutin for Your Embedded Linu...
Software Update Mechanisms: Selecting the Best Solutin for Your Embedded Linu...Software Update Mechanisms: Selecting the Best Solutin for Your Embedded Linu...
Software Update Mechanisms: Selecting the Best Solutin for Your Embedded Linu...ICS
 
Bridging the Gap Between Development and Regulatory Teams
Bridging the Gap Between Development and Regulatory TeamsBridging the Gap Between Development and Regulatory Teams
Bridging the Gap Between Development and Regulatory TeamsICS
 
Overcome Hardware And Software Challenges - Medical Device Case Study
Overcome Hardware And Software Challenges - Medical Device Case StudyOvercome Hardware And Software Challenges - Medical Device Case Study
Overcome Hardware And Software Challenges - Medical Device Case StudyICS
 
User Experience Design for IoT
User Experience Design for IoTUser Experience Design for IoT
User Experience Design for IoTICS
 
Software Bill of Materials - Accelerating Your Secure Embedded Development.pdf
Software Bill of Materials - Accelerating Your Secure Embedded Development.pdfSoftware Bill of Materials - Accelerating Your Secure Embedded Development.pdf
Software Bill of Materials - Accelerating Your Secure Embedded Development.pdfICS
 
5 Key Considerations at the Start of SaMD Development
5 Key Considerations at the Start of SaMD Development5 Key Considerations at the Start of SaMD Development
5 Key Considerations at the Start of SaMD DevelopmentICS
 

More from ICS (20)

The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
 
Practical Advice for FDA’s 510(k) Requirements.pdf
Practical Advice for FDA’s 510(k) Requirements.pdfPractical Advice for FDA’s 510(k) Requirements.pdf
Practical Advice for FDA’s 510(k) Requirements.pdf
 
Accelerating Development of a Safety-Critical Cobot Welding System with Qt/QM...
Accelerating Development of a Safety-Critical Cobot Welding System with Qt/QM...Accelerating Development of a Safety-Critical Cobot Welding System with Qt/QM...
Accelerating Development of a Safety-Critical Cobot Welding System with Qt/QM...
 
Overcoming CMake Configuration Issues Webinar
Overcoming CMake Configuration Issues WebinarOvercoming CMake Configuration Issues Webinar
Overcoming CMake Configuration Issues Webinar
 
Enhancing Quality and Test in Medical Device Design - Part 2.pdf
Enhancing Quality and Test in Medical Device Design - Part 2.pdfEnhancing Quality and Test in Medical Device Design - Part 2.pdf
Enhancing Quality and Test in Medical Device Design - Part 2.pdf
 
Designing and Managing IoT Devices for Rapid Deployment - Webinar.pdf
Designing and Managing IoT Devices for Rapid Deployment - Webinar.pdfDesigning and Managing IoT Devices for Rapid Deployment - Webinar.pdf
Designing and Managing IoT Devices for Rapid Deployment - Webinar.pdf
 
Quality and Test in Medical Device Design - Part 1.pdf
Quality and Test in Medical Device Design - Part 1.pdfQuality and Test in Medical Device Design - Part 1.pdf
Quality and Test in Medical Device Design - Part 1.pdf
 
Creating Digital Twins Using Rapid Development Techniques.pdf
Creating Digital Twins Using Rapid Development Techniques.pdfCreating Digital Twins Using Rapid Development Techniques.pdf
Creating Digital Twins Using Rapid Development Techniques.pdf
 
Secure Your Medical Devices From the Ground Up
Secure Your Medical Devices From the Ground Up Secure Your Medical Devices From the Ground Up
Secure Your Medical Devices From the Ground Up
 
Cybersecurity and Software Updates in Medical Devices.pdf
Cybersecurity and Software Updates in Medical Devices.pdfCybersecurity and Software Updates in Medical Devices.pdf
Cybersecurity and Software Updates in Medical Devices.pdf
 
MDG Panel - Creating Expert Level GUIs for Complex Medical Devices
MDG Panel - Creating Expert Level GUIs for Complex Medical DevicesMDG Panel - Creating Expert Level GUIs for Complex Medical Devices
MDG Panel - Creating Expert Level GUIs for Complex Medical Devices
 
How to Craft a Winning IOT Device Management Solution
How to Craft a Winning IOT Device Management SolutionHow to Craft a Winning IOT Device Management Solution
How to Craft a Winning IOT Device Management Solution
 
Bridging the Gap Between Development and Regulatory Teams
Bridging the Gap Between Development and Regulatory TeamsBridging the Gap Between Development and Regulatory Teams
Bridging the Gap Between Development and Regulatory Teams
 
IoT Device Fleet Management: Create a Robust Solution with Azure
IoT Device Fleet Management: Create a Robust Solution with AzureIoT Device Fleet Management: Create a Robust Solution with Azure
IoT Device Fleet Management: Create a Robust Solution with Azure
 
Software Update Mechanisms: Selecting the Best Solutin for Your Embedded Linu...
Software Update Mechanisms: Selecting the Best Solutin for Your Embedded Linu...Software Update Mechanisms: Selecting the Best Solutin for Your Embedded Linu...
Software Update Mechanisms: Selecting the Best Solutin for Your Embedded Linu...
 
Bridging the Gap Between Development and Regulatory Teams
Bridging the Gap Between Development and Regulatory TeamsBridging the Gap Between Development and Regulatory Teams
Bridging the Gap Between Development and Regulatory Teams
 
Overcome Hardware And Software Challenges - Medical Device Case Study
Overcome Hardware And Software Challenges - Medical Device Case StudyOvercome Hardware And Software Challenges - Medical Device Case Study
Overcome Hardware And Software Challenges - Medical Device Case Study
 
User Experience Design for IoT
User Experience Design for IoTUser Experience Design for IoT
User Experience Design for IoT
 
Software Bill of Materials - Accelerating Your Secure Embedded Development.pdf
Software Bill of Materials - Accelerating Your Secure Embedded Development.pdfSoftware Bill of Materials - Accelerating Your Secure Embedded Development.pdf
Software Bill of Materials - Accelerating Your Secure Embedded Development.pdf
 
5 Key Considerations at the Start of SaMD Development
5 Key Considerations at the Start of SaMD Development5 Key Considerations at the Start of SaMD Development
5 Key Considerations at the Start of SaMD Development
 

Recently uploaded

(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...
(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...
(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...gurkirankumar98700
 
The Evolution of Karaoke From Analog to App.pdf
The Evolution of Karaoke From Analog to App.pdfThe Evolution of Karaoke From Analog to App.pdf
The Evolution of Karaoke From Analog to App.pdfPower Karaoke
 
Building Real-Time Data Pipelines: Stream & Batch Processing workshop Slide
Building Real-Time Data Pipelines: Stream & Batch Processing workshop SlideBuilding Real-Time Data Pipelines: Stream & Batch Processing workshop Slide
Building Real-Time Data Pipelines: Stream & Batch Processing workshop SlideChristina Lin
 
Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...
Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...
Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...stazi3110
 
Unveiling Design Patterns: A Visual Guide with UML Diagrams
Unveiling Design Patterns: A Visual Guide with UML DiagramsUnveiling Design Patterns: A Visual Guide with UML Diagrams
Unveiling Design Patterns: A Visual Guide with UML DiagramsAhmed Mohamed
 
ODSC - Batch to Stream workshop - integration of Apache Spark, Cassandra, Pos...
ODSC - Batch to Stream workshop - integration of Apache Spark, Cassandra, Pos...ODSC - Batch to Stream workshop - integration of Apache Spark, Cassandra, Pos...
ODSC - Batch to Stream workshop - integration of Apache Spark, Cassandra, Pos...Christina Lin
 
Cloud Management Software Platforms: OpenStack
Cloud Management Software Platforms: OpenStackCloud Management Software Platforms: OpenStack
Cloud Management Software Platforms: OpenStackVICTOR MAESTRE RAMIREZ
 
KnowAPIs-UnknownPerf-jaxMainz-2024 (1).pptx
KnowAPIs-UnknownPerf-jaxMainz-2024 (1).pptxKnowAPIs-UnknownPerf-jaxMainz-2024 (1).pptx
KnowAPIs-UnknownPerf-jaxMainz-2024 (1).pptxTier1 app
 
Der Spagat zwischen BIAS und FAIRNESS (2024)
Der Spagat zwischen BIAS und FAIRNESS (2024)Der Spagat zwischen BIAS und FAIRNESS (2024)
Der Spagat zwischen BIAS und FAIRNESS (2024)OPEN KNOWLEDGE GmbH
 
Advancing Engineering with AI through the Next Generation of Strategic Projec...
Advancing Engineering with AI through the Next Generation of Strategic Projec...Advancing Engineering with AI through the Next Generation of Strategic Projec...
Advancing Engineering with AI through the Next Generation of Strategic Projec...OnePlan Solutions
 
Automate your Kamailio Test Calls - Kamailio World 2024
Automate your Kamailio Test Calls - Kamailio World 2024Automate your Kamailio Test Calls - Kamailio World 2024
Automate your Kamailio Test Calls - Kamailio World 2024Andreas Granig
 
Professional Resume Template for Software Developers
Professional Resume Template for Software DevelopersProfessional Resume Template for Software Developers
Professional Resume Template for Software DevelopersVinodh Ram
 
Russian Call Girls in Karol Bagh Aasnvi ➡️ 8264348440 💋📞 Independent Escort S...
Russian Call Girls in Karol Bagh Aasnvi ➡️ 8264348440 💋📞 Independent Escort S...Russian Call Girls in Karol Bagh Aasnvi ➡️ 8264348440 💋📞 Independent Escort S...
Russian Call Girls in Karol Bagh Aasnvi ➡️ 8264348440 💋📞 Independent Escort S...soniya singh
 
EY_Graph Database Powered Sustainability
EY_Graph Database Powered SustainabilityEY_Graph Database Powered Sustainability
EY_Graph Database Powered SustainabilityNeo4j
 
React Server Component in Next.js by Hanief Utama
React Server Component in Next.js by Hanief UtamaReact Server Component in Next.js by Hanief Utama
React Server Component in Next.js by Hanief UtamaHanief Utama
 
Implementing Zero Trust strategy with Azure
Implementing Zero Trust strategy with AzureImplementing Zero Trust strategy with Azure
Implementing Zero Trust strategy with AzureDinusha Kumarasiri
 
办理学位证(UQ文凭证书)昆士兰大学毕业证成绩单原版一模一样
办理学位证(UQ文凭证书)昆士兰大学毕业证成绩单原版一模一样办理学位证(UQ文凭证书)昆士兰大学毕业证成绩单原版一模一样
办理学位证(UQ文凭证书)昆士兰大学毕业证成绩单原版一模一样umasea
 
software engineering Chapter 5 System modeling.pptx
software engineering Chapter 5 System modeling.pptxsoftware engineering Chapter 5 System modeling.pptx
software engineering Chapter 5 System modeling.pptxnada99848
 
BATTLEFIELD ORM: TIPS, TACTICS AND STRATEGIES FOR CONQUERING YOUR DATABASE
BATTLEFIELD ORM: TIPS, TACTICS AND STRATEGIES FOR CONQUERING YOUR DATABASEBATTLEFIELD ORM: TIPS, TACTICS AND STRATEGIES FOR CONQUERING YOUR DATABASE
BATTLEFIELD ORM: TIPS, TACTICS AND STRATEGIES FOR CONQUERING YOUR DATABASEOrtus Solutions, Corp
 
Intelligent Home Wi-Fi Solutions | ThinkPalm
Intelligent Home Wi-Fi Solutions | ThinkPalmIntelligent Home Wi-Fi Solutions | ThinkPalm
Intelligent Home Wi-Fi Solutions | ThinkPalmSujith Sukumaran
 

Recently uploaded (20)

(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...
(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...
(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...
 
The Evolution of Karaoke From Analog to App.pdf
The Evolution of Karaoke From Analog to App.pdfThe Evolution of Karaoke From Analog to App.pdf
The Evolution of Karaoke From Analog to App.pdf
 
Building Real-Time Data Pipelines: Stream & Batch Processing workshop Slide
Building Real-Time Data Pipelines: Stream & Batch Processing workshop SlideBuilding Real-Time Data Pipelines: Stream & Batch Processing workshop Slide
Building Real-Time Data Pipelines: Stream & Batch Processing workshop Slide
 
Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...
Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...
Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...
 
Unveiling Design Patterns: A Visual Guide with UML Diagrams
Unveiling Design Patterns: A Visual Guide with UML DiagramsUnveiling Design Patterns: A Visual Guide with UML Diagrams
Unveiling Design Patterns: A Visual Guide with UML Diagrams
 
ODSC - Batch to Stream workshop - integration of Apache Spark, Cassandra, Pos...
ODSC - Batch to Stream workshop - integration of Apache Spark, Cassandra, Pos...ODSC - Batch to Stream workshop - integration of Apache Spark, Cassandra, Pos...
ODSC - Batch to Stream workshop - integration of Apache Spark, Cassandra, Pos...
 
Cloud Management Software Platforms: OpenStack
Cloud Management Software Platforms: OpenStackCloud Management Software Platforms: OpenStack
Cloud Management Software Platforms: OpenStack
 
KnowAPIs-UnknownPerf-jaxMainz-2024 (1).pptx
KnowAPIs-UnknownPerf-jaxMainz-2024 (1).pptxKnowAPIs-UnknownPerf-jaxMainz-2024 (1).pptx
KnowAPIs-UnknownPerf-jaxMainz-2024 (1).pptx
 
Der Spagat zwischen BIAS und FAIRNESS (2024)
Der Spagat zwischen BIAS und FAIRNESS (2024)Der Spagat zwischen BIAS und FAIRNESS (2024)
Der Spagat zwischen BIAS und FAIRNESS (2024)
 
Advancing Engineering with AI through the Next Generation of Strategic Projec...
Advancing Engineering with AI through the Next Generation of Strategic Projec...Advancing Engineering with AI through the Next Generation of Strategic Projec...
Advancing Engineering with AI through the Next Generation of Strategic Projec...
 
Automate your Kamailio Test Calls - Kamailio World 2024
Automate your Kamailio Test Calls - Kamailio World 2024Automate your Kamailio Test Calls - Kamailio World 2024
Automate your Kamailio Test Calls - Kamailio World 2024
 
Professional Resume Template for Software Developers
Professional Resume Template for Software DevelopersProfessional Resume Template for Software Developers
Professional Resume Template for Software Developers
 
Russian Call Girls in Karol Bagh Aasnvi ➡️ 8264348440 💋📞 Independent Escort S...
Russian Call Girls in Karol Bagh Aasnvi ➡️ 8264348440 💋📞 Independent Escort S...Russian Call Girls in Karol Bagh Aasnvi ➡️ 8264348440 💋📞 Independent Escort S...
Russian Call Girls in Karol Bagh Aasnvi ➡️ 8264348440 💋📞 Independent Escort S...
 
EY_Graph Database Powered Sustainability
EY_Graph Database Powered SustainabilityEY_Graph Database Powered Sustainability
EY_Graph Database Powered Sustainability
 
React Server Component in Next.js by Hanief Utama
React Server Component in Next.js by Hanief UtamaReact Server Component in Next.js by Hanief Utama
React Server Component in Next.js by Hanief Utama
 
Implementing Zero Trust strategy with Azure
Implementing Zero Trust strategy with AzureImplementing Zero Trust strategy with Azure
Implementing Zero Trust strategy with Azure
 
办理学位证(UQ文凭证书)昆士兰大学毕业证成绩单原版一模一样
办理学位证(UQ文凭证书)昆士兰大学毕业证成绩单原版一模一样办理学位证(UQ文凭证书)昆士兰大学毕业证成绩单原版一模一样
办理学位证(UQ文凭证书)昆士兰大学毕业证成绩单原版一模一样
 
software engineering Chapter 5 System modeling.pptx
software engineering Chapter 5 System modeling.pptxsoftware engineering Chapter 5 System modeling.pptx
software engineering Chapter 5 System modeling.pptx
 
BATTLEFIELD ORM: TIPS, TACTICS AND STRATEGIES FOR CONQUERING YOUR DATABASE
BATTLEFIELD ORM: TIPS, TACTICS AND STRATEGIES FOR CONQUERING YOUR DATABASEBATTLEFIELD ORM: TIPS, TACTICS AND STRATEGIES FOR CONQUERING YOUR DATABASE
BATTLEFIELD ORM: TIPS, TACTICS AND STRATEGIES FOR CONQUERING YOUR DATABASE
 
Intelligent Home Wi-Fi Solutions | ThinkPalm
Intelligent Home Wi-Fi Solutions | ThinkPalmIntelligent Home Wi-Fi Solutions | ThinkPalm
Intelligent Home Wi-Fi Solutions | ThinkPalm
 

Qt Installer Framework

  • 1. www.ics.com Qt Installer Framework Christopher Probst, Chris Rizzitello, ICS July 28, 2022 1
  • 2. www.ics.com About ICS Delivering Smart Devices for a Connected World ● Founded in 1987 ● Largest source of independent Qt expertise in North America ● Trusted Qt Service Partner since 2002 ● Exclusive Open Enrollment Training Partner in North America ● Provides integrated custom software development and user experience (UX) design ● Embedded, touchscreen, mobile and desktop applications ● HQ in Waltham, MA with offices in California, Canada, Europe Boston UX ● Part of the ICS family, focusing on UX design ● Designs intuitive touchscreen interfaces for high-impact embedded and connected medical, industrial and consumer devices 2
  • 3. www.ics.com What is the Qt Installer Framework? ● A set of tools to create installers on Linux, Windows and Mac. ● Installers can be offline and online ● The program binarycreator creates the installer ● If the installer is online, the pgm repogen generates a repository folder to be uploaded to an http server ● Qt Installer Framework is distributed through Qt’s own installer in the tools section. 3
  • 5. www.ics.com ● CPack is a packaging system for software distributions integrated with CMake; ● Linux RPM, deb, Windows MSI and more.. ● For each packaging format, CPack has a generator ● CPack DEB Generator ● CPack DragNDrop Generator ● CPack External Generator ● CPack FreeBSD Generator ● CPack IFW Generator ● CPack NSIS Generator ● CPack RPM Generator ● The IFW generator is the one that uses the Qt Installer Framework ● Set in the CMakeLists.txt Starting Point: CPack set(CPACK_GENERATOR "IFW") 5
  • 6. www.ics.com Before Starting 6 ● Set the following variables in the CMakeLists.txt file ● Commands to configure, build and package (invoking CPack) cmake.exe -S. -Bbuild -DCPACK_IFW_ROOT=C:/Qt/Tools/QtInstallerFramework/4.2 cmake.exe --build <PROJECTBUILDDIR> --target all package set(CPACK_PACKAGE_NAME "Example-Utility") set(CPACK_GENERATOR "IFW") if(NOT CPACK_IFW_ROOT) set(CPACK_IFW_ROOT "C:/Qt/Tools/QtInstallerFramework/4.2") endif()
  • 7. www.ics.com install(TARGETS ${BIN_NAME} DESTINATION ${CMAKE_INSTALL_BINDIR} COMPONENT ${COMPONENT_NAME_MAIN}) ● CPack will bundle into the install the components specified with the CMake install directive ● The component can have a description and can be further configured with the following commands Specifying the CMake project to create an installer 7 cpack_add_component(${COMPONENT_NAME_MAIN}) cpack_ifw_configure_component(${COMPONENT_NAME_MAIN} VERSION ${CMAKE_PROJECT_VERSION} SCRIPT ${CMAKE_CURRENT_SOURCE_DIR}/installscript.qs)
  • 8. www.ics.com Some CPACK_IFW variables that can be set All these variables map to a config element provided by the Qt Installer Framework and specified here: https://doc.qt.io/qtinstallerframework/ifw-globalconfig.html Customize the installer #set(CPACK_IFW_PACKAGE_ICON "${CMAKE_CURRENT_SOURCE_DIR}/Example.ico") set(CPACK_IFW_TARGET_DIRECTORY "@ApplicationsDir@/Example-Utility") #set(CPACK_PACKAGE_FILE_NAME "GreatInstallerName" ) set (CPACK_IFW_PACKAGE_NAME "Example Utility") set (CPACK_IFW_PACKAGE_TITLE "Example-Utility Title ${CMAKE_PROJECT_VERSION}") set (CPACK_IFW_PACKAGE_PUBLISHER "Example Company") set (CPACK_IFW_PACKAGE_WIZARD_STYLE "Aero") set (CPACK_IFW_PACKAGE_WIZARD_SHOW_PAGE_LIST OFF) set (CPACK_IFW_PACKAGE_CONTROL_SCRIPT ${CMAKE_CURRENT_SOURCE_DIR}/controller.qs) 8
  • 9. www.ics.com Controller scripting allows: ● Thee modification of the some of the properties of the installer’s page ● The removal of some the installer’s page ● Simulate Button Clicks to control the flow of pages Further Customization with Controller Scripting 9 function Controller() { console.log("-----------This is the entry point---------------") installer.setDefaultPageVisible(QInstaller.ComponentSelection, false); installer.installationFinished.connect(this, this.installationFinished); console.log("------------------------------") } Controller.prototype.installationFinished = function() { gui.clickButton(buttons.FinishButton); } Controller.prototype.IntroductionPageCallback = function() { var widget = gui.currentPageWidget(); // get the current wizard page widget.MessageLabel.setText("Hey how's it going."); // set the welcome text }
  • 10. www.ics.com Further Customization with Controller Scripting The API is defined here https://doc.qt.io/qtinstallerframework/scripting-qmlmodule.html 10
  • 11. www.ics.com Further Customization with Scripting Some good documentation and tutorial: https://doc.qt.io/qtinstallerframework/noninteractive.html Use the examples provided by the Qt Installer Framework https://doc.qt.io/qtinstallerframework/qtifwexamples.html Qt Installer Framework Examples are located: <QTDIR>ToolsQtInstallerFramework4.4examples 11
  • 12. www.ics.com Further Customization with Component ● In the CMakeLists.txt the command cpack_ifw_configure_component allows for can specify how the component is installed as well as changes to the UI ● Every option of this command is mapped to an element of the package.xml specified here https://doc.qt.io/qtinstallerframework/ifw-component-description.html#summary-of-package-information-file-elements ● As an example In the CMakeLists.txt, cpack_ifw_configure_component([LICENSES <display_name> <file_path> ...] ..) maps to <Licenses> <License name="License Agreement" file="license.txt" /> </Licenses> 12
  • 13. www.ics.com Further Customization with Component Scripting 13 cpack_ifw_configure_component(${COMPONENT_NAME_MAIN} VERSION ${CMAKE_PROJECT_VERSION} SCRIPT ${CMAKE_CURRENT_SOURCE_DIR}/installscript.qs) ● One of those options is SCRIPT that specifies a component script ● This allows further customization on modifying how the component is installed as well as adding pages to the installer ● Uses the same API as controller scripting
  • 14. www.ics.com Further Customization with Component Scripting ● Reimplementation of the createOperations function allows to modify how the component is installed ● Possible operations are listed here https://doc.qt.io/qtinstallerframework/operations.html#summary-of-operations 14 Component.prototype.createOperations = function () { // call default implementation component.createOperations(); var targetDirectory = installer.value("TargetDir"); var windowsTargetDir = targetDirectory.replace(///g,'') component.addOperation("GlobalConfig", "HKEY_CLASSES_ROOTDirectoryBackgroundshell", "Example", ""); …
  • 15. www.ics.com Adding Pages to the Installer ● Using Qt Designer create a ui file specify the ui of the page ● The cpack_ifw_configure_component command has the option cpack_ifw_configure_component(...[USER_INTERFACES <file_path> <file_path> ...] ) ● In the component script 15 cpack_ifw_configure_component(...USER_INTERFACES target.ui… ) Component.prototype.installerLoaded = function () { if (installer.addWizardPage(component, "TargetWidget", QInstaller.TargetDirectory)) { var widget = gui.pageWidgetByObjectName("DynamicTargetWidget"); if (widget != null) { widget.targetChooser.clicked.connect(this, Component.prototype.chooseTarget); widget.targetDirectory.textChanged.connect(this, Component.prototype.targetChanged); widget.targetDirectory.text = Dir.toNativeSparator(installer.value("TargetDir")); } }
  • 16. www.ics.com Some Debugging tips ● Run the installer with -d or --verbose option ● The console.log() command will display debugging information 16 function Component() { console.log("-----------This is the entry point for Component Scripting---------------") console.log( component.value("Version") ) }
  • 17. www.ics.com Deployment Issues 17 set(WINDEPLOYQT "@WINDEPLOYQT@") set(COMPONENT_NAME_MAIN "@COMPONENT_NAME_MAIN@") set(CMAKE_CURRENT_SOURCE_DIR "@CMAKE_CURRENT_SOURCE_DIR@") execute_process(COMMAND ${WINDEPLOYQT} --no-translations --no-opengl-sw --no-svg --no-system-d3d-compiler --no-quick-import ${COMPONENT_NAME_MAIN}/data/bin WORKING_DIRECTORY ${CPACK_TEMPORARY_INSTALL_DIRECTORY}/packages) ● An installed application linking with Qt needs the Qt dependencies to run ● For Qt, windeployqt (distributed with Qt in the bin folder) can help as it creates a deployable folder with the Qt dependencies. ● With CPack this means to create deploy-qt-windows.cmake.in file with the following ● The CMakeLists.txt set (CPACK_IFW_PACKAGE_CONTROL_SCRIPT ${CMAKE_CURRENT_SOURCE_DIR}/controller.qs) find_program(WINDEPLOYQT windeployqt HINTS "${_qt_bin_dir}") configure_file("${CMAKE_CURRENT_SOURCE_DIR}/deploy-qt-windows.cmake.in" "${CMAKE_CURRENT_SOURCE_DIR}/deploy-qt-windows.cmake" @ONLY) set(CPACK_PRE_BUILD_SCRIPTS ${CMAKE_CURRENT_SOURCE_DIR}/deploy-qt-windows.cmake)
  • 18. www.ics.com Integrated Computer Solutions Inc. Any Questions? 18 Don’t miss our webinar on September 22 CMake for QMake Users