summaryrefslogtreecommitdiffstats
path: root/doc/operations.qdoc
diff options
context:
space:
mode:
Diffstat (limited to 'doc/operations.qdoc')
-rw-r--r--doc/operations.qdoc33
1 files changed, 31 insertions, 2 deletions
diff --git a/doc/operations.qdoc b/doc/operations.qdoc
index c61e2af0c..e148d6fc1 100644
--- a/doc/operations.qdoc
+++ b/doc/operations.qdoc
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2022 The Qt Company Ltd.
+** Copyright (C) 2023 The Qt Company Ltd.
** Contact: https://www.qt.io/licensing/
**
** This file is part of the Qt Installer Framework.
@@ -40,6 +40,10 @@
the installer and an \e UNDO step that contains instructions for the
uninstaller.
+ Some operations especially in Windows might need native separators. Use
+ \c installer.toNativeSeparators() to convert separators to ones that are
+ appropriate for the underlying operating system.
+
\section1 Summary of Operations
The following table summarizes the available operations and their syntax in component
@@ -65,10 +69,16 @@
\li Copy
\li "Copy" \c source \c target
\li Copies a file from \c source to \c target.
+ \note The file will be restored during unistallation. If you want
+ to skip the copying, you can overwrite the \e UNDO by passing
+ \e UNDOOPERATION and \e "", to the end of the argument list.
\row
\li Move
\li "Move" \c source \c target
\li Moves a file from \c source to \c target.
+ \note Files restored during uninstallation. If you want to move the
+ files persistently, you can overwrite the \e UNDO by passing \e
+ UNDOOPERATION and \e "", to the end of the argument list.
\row
\li SimpleMoveFile
\li "SimpleMoveFile" \c source \c target
@@ -81,14 +91,25 @@
\li Delete
\li "Delete" \c filename
\li Deletes the file specified by \c filename.
+ \note File will be restored during uninstallation. If you want to
+ delete the files persistently, you can overwrite the \e UNDO by
+ passing \e UNDOOPERATION and \e "", to the end of the argument list.
\row
\li Mkdir
\li "Mkdir" \c path
\li Creates the directory path \c path.
+ \note Directory will be deleted during uninstallation.
+ If you want to create the directory persistently, you can overwrite the \e UNDO
+ by passing \e UNDOOPERATION and \e "", to the end of the argument list. Note that
+ during full uninstall, directory will be deleted if it was created to target directory
+ and \c RemoveTargetDir is false.
\row
\li Rmdir
\li "Rmdir" \c path
\li Removes the directory path \c path.
+ \note Directory will be recreated during uninstallation.
+ If you want to remove the directory persistently, you can overwrite the \e UNDO
+ by passing \e UNDOOPERATION and \e "", to the end of the argument list.
\row
\li CopyDirectory
\li "CopyDirectory" \c sourcePath \c targetPath
@@ -101,11 +122,17 @@
\li "AppendFile" \c filename \c text
\li Appends \c text to the file specified by \c filename. \c text is
treated as ASCII text.
+ \note Text will be removed from file during unistallation. If you want to append the
+ text persistently, you can overwrite the \e UNDO by passing \e UNDOOPERATION
+ and \e "", to the end of the argument list.
\row
\li PrependFile
\li "PrependFile" \c filename \c text
\li Prepends \c text to the file specified by \c filename. \c text
is treated as ASCII text.
+ \note Text will be removed from file during unistallation. If you want to append the
+ text persistently, you can overwrite the \e UNDO by passing \e UNDOOPERATION
+ and \e "", to the end of the argument list.
\row
\li Replace
\li "Replace" \c file \c search \c replace \c mode
@@ -149,12 +176,13 @@
\c linkname.
On Windows, this creates a .lnk file which can have
\c arguments. Furthermore, \c filename can be
- an HTTP or FTP URL in which case a URL shortcut is created.
+ an HTTP, HTTPS or FTP URL in which case a URL shortcut is created.
\note If the \c @AllUsersStartMenuProgramsPath@ is used for
placing the shortcut, then due to a problem on Windows, it will
drop any arguments to the target and any description set. In
this case, you should place the shortcut elsewhere and copy it
to the location desired.
+ \note Creating a shortcut to a network share is not supported.
The operation is currently not implemented on other platforms.
\row
\li CreateDesktopEntry
@@ -286,6 +314,7 @@
\li Sets or removes the \c value of \c key in the settings file located at
\c path, depending on the value of \c method: \c set, \c remove,
\c add_array_value, and \c remove_array_value.
+ Example: \c{component.addOperation("Settings", "path=settings.ini", "method=add", "key=myKey", "value=myValue")}
\endtable
The Extract, License, and MinimumProgress operations are automatically added for matching