Commit a9ee0da8 authored by Fred Drake's avatar Fred Drake

use API documentation style for the descriptions of the additional

functions made available in the post-installation script run by the
Windows installer
parent c54d9256
...@@ -1462,27 +1462,23 @@ The installation script runs embedded in the windows installer, every ...@@ -1462,27 +1462,23 @@ The installation script runs embedded in the windows installer, every
output (\code{sys.stdout}, \code{sys.stderr}) is redirected into a output (\code{sys.stdout}, \code{sys.stderr}) is redirected into a
buffer and will be displayed in the GUI after the script has finished. buffer and will be displayed in the GUI after the script has finished.
Some functions especially useful in this context are available in the Some functions especially useful in this context are available as
installation script. additional built-in functions in the installation script.
\begin{verbatim} \begin{funcdesc}{directory_created}{path}
directory_created(pathname) \funcline{file_created}{path}
file_created(pathname) These functions should be called when a directory or file is created
\end{verbatim} by the postinstall script at installation time. It will register
\var{path} with the uninstaller, so that it will be removed when the
These functions should be called when a directory or file is created distribution is uninstalled. To be safe, directories are only removed
by the postinstall script at installation time. It will register the if they are empty.
pathname with the uninstaller, so that it will be removed when the \end{funcdesc}
distribution is uninstalled. To be safe, directories are only removed
if they are empty.
\begin{verbatim}
get_special_folder_path(csidl_string)
\end{verbatim}
This function can be used to retrieve special folder locations on \begin{funcdesc}{get_special_folder_path}{csidl_string}
Windows like the Start Menu or the Desktop. It returns the full path This function can be used to retrieve special folder locations on
to the folder. 'csidl_string' must be one of the following strings: Windows like the Start Menu or the Desktop. It returns the full
path to the folder. \var{csidl_string} must be one of the following
strings:
\begin{verbatim} \begin{verbatim}
"CSIDL_APPDATA" "CSIDL_APPDATA"
...@@ -1502,27 +1498,30 @@ to the folder. 'csidl_string' must be one of the following strings: ...@@ -1502,27 +1498,30 @@ to the folder. 'csidl_string' must be one of the following strings:
"CSIDL_FONTS" "CSIDL_FONTS"
\end{verbatim} \end{verbatim}
If the folder cannot be retrieved, \exception{OSError} is raised. If the folder cannot be retrieved, \exception{OSError} is raised.
Which folders are available depends on the exact Windows version, and probably Which folders are available depends on the exact Windows version,
also the configuration. For details refer to Microsoft's documentation of the and probably also the configuration. For details refer to
\cfunction{SHGetSpecialFolderPath()} function. Microsoft's documentation of the
\cfunction{SHGetSpecialFolderPath()} function.
\begin{verbatim} \end{funcdesc}
create_shortcut(target, description, filename[, arguments[,
workdir[, iconpath[, iconindex]]]]) \begin{funcdesc}{create_shortcut}{target, description,
\end{verbatim} filename\optional{,
arguments\optional{,
This function creates a shortcut. workdir\optional{,
\var{target} is the path to the program to be started by the shortcut. iconpath\optional{, iconindex}}}}}
\var{description} is the description of the sortcut. This function creates a shortcut.
\var{filename} is the title of the shortcut that the user will see. \var{target} is the path to the program to be started by the shortcut.
\var{arguments} specifies the command line arguments, if any. \var{description} is the description of the sortcut.
\var{workdir} is the working directory for the program. \var{filename} is the title of the shortcut that the user will see.
\var{iconpath} is the file containing the icon for the shortcut, \var{arguments} specifies the command line arguments, if any.
and \var{iconindex} is the index of the icon in the file \var{workdir} is the working directory for the program.
\var{iconpath}. Again, for details consult the Microsoft \var{iconpath} is the file containing the icon for the shortcut,
documentation for the \class{IShellLink} interface. and \var{iconindex} is the index of the icon in the file
\var{iconpath}. Again, for details consult the Microsoft
documentation for the \class{IShellLink} interface.
\end{funcdesc}
\section{Registering with the Package Index} \section{Registering with the Package Index}
\label{package-index} \label{package-index}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment