mirror of
https://github.com/QuasarApp/installer-framework.git
synced 2025-04-26 13:44:31 +00:00
Update usage of Apple-related terminology
Replace deprecated Q_OS_OSX macro used in several places with the newer Q_OS_MACOS. Old style reference of Apple's desktop operating system name as "OS X" in documentation and files are also replaced with "macOS" where applicable. Task-number: QTIFW-1406 Change-Id: I0561d5e0d964917ac4fca0702d58a06b85d30e57 Reviewed-by: Katja Marttila <katja.marttila@qt.io>
This commit is contained in:
parent
54f1de217b
commit
c7066c9dc2
4
INSTALL
4
INSTALL
@ -40,9 +40,9 @@ Recommended configuration options for Linux:
|
||||
configure -prefix $PWD/qtbase -release -static -accessibility -qt-zlib -qt-libpng -qt-libjpeg -qt-xcb -qt-pcre -no-glib -no-cups -no-sql-sqlite -no-qml-debug -no-opengl -no-egl -no-xinput2 -no-sm -no-icu -nomake examples -nomake tests -no-libudev
|
||||
Build Qt:
|
||||
make module-qtbase module-qtdeclarative module-qttools module-qttranslations
|
||||
### OS X
|
||||
### macOS
|
||||
|
||||
Recommended configuration options for OS X:
|
||||
Recommended configuration options for macOS:
|
||||
|
||||
configure -prefix $PWD/qtbase -release -static -no-securetransport -accessibility -qt-zlib -qt-libpng -qt-libjpeg -no-cups -no-sql-sqlite -no-qml-debug -nomake examples -nomake tests -no-freetype
|
||||
Build Qt:
|
||||
|
2
README
2
README
@ -1,6 +1,6 @@
|
||||
The Qt Installer Framework provides a set of tools and utilities to create
|
||||
installers for the supported desktop Qt platforms: Linux, Microsoft Windows, and
|
||||
OS X.
|
||||
macOS.
|
||||
|
||||
|
||||
Documentation
|
||||
|
@ -8,7 +8,7 @@
|
||||
\code
|
||||
..\..\bin\binarycreator.exe -c config\config.xml -p packages installer.exe
|
||||
\endcode
|
||||
\li On Linux or OS X:
|
||||
\li On Linux or macOS:
|
||||
\code
|
||||
../../bin/binarycreator -c config/config.xml -p packages installer
|
||||
\endcode
|
||||
|
@ -99,9 +99,9 @@
|
||||
make module-qtbase module-qtdeclarative module-qttools module-qttranslations
|
||||
\endcode
|
||||
|
||||
\section3 Configuring Qt for OS X
|
||||
\section3 Configuring Qt for macOS
|
||||
|
||||
We recommend that you use the following configuration options for OS X:
|
||||
We recommend that you use the following configuration options for macOS:
|
||||
|
||||
\code
|
||||
configure -prefix $PWD/qtbase -release -static -no-securetransport -accessibility -qt-zlib -qt-libpng -qt-libjpeg -no-cups -no-sql-sqlite -no-qml-debug -nomake examples -nomake tests -no-freetype
|
||||
|
@ -37,7 +37,7 @@
|
||||
create installers once, and deploy them across all the supported desktop
|
||||
Qt platforms without rewriting the source code. The installers will have the
|
||||
native look and feel on the platform where they are run: Linux, Microsoft
|
||||
Windows, and OS X.
|
||||
Windows, and macOS.
|
||||
|
||||
The Qt Installer Framework tools generate installers with a set of pages
|
||||
that guide the users during the installation, update, or uninstallation
|
||||
|
@ -71,7 +71,7 @@
|
||||
|
||||
\image ifw-user-flow-installing.png "Installation workflow"
|
||||
|
||||
This section uses the \e {Your Application Installer} example run on OS X
|
||||
This section uses the \e {Your Application Installer} example run on macOS
|
||||
to illustrate the default workflow for end users. The installers have the
|
||||
native look and feel on each supported desktop platform, and therefore they
|
||||
look and feel different when run on Linux and Windows.
|
||||
@ -188,7 +188,7 @@
|
||||
\image ifw-user-flow-adding.png "Add components workflow"
|
||||
|
||||
This section uses the \e {Maintenance Tool} installed by the Qt 5 installer
|
||||
run on OS X as an example implementation of how end users can add components
|
||||
run on macOS as an example implementation of how end users can add components
|
||||
after the initial installation. The Maintenance Tool contains the package
|
||||
manager, updater, and uninstaller.
|
||||
|
||||
@ -244,7 +244,7 @@
|
||||
|
||||
\image ifw-user-flow-removing.png "Remove components workflow"
|
||||
|
||||
This section uses the Qt 5 Maintenance Tool run on OS X as an example
|
||||
This section uses the Qt 5 Maintenance Tool run on macOS as an example
|
||||
implementation of how end users can remove all or selected components.
|
||||
|
||||
\section1 Removing All Components
|
||||
@ -297,7 +297,7 @@
|
||||
|
||||
\image ifw-user-flow-updating.png "Updating workflow"
|
||||
|
||||
This section uses the Qt 5 Maintenance Tool run on OS X as an example
|
||||
This section uses the Qt 5 Maintenance Tool run on macOS as an example
|
||||
implementation of how end users can update installed components.
|
||||
|
||||
\section1 Starting Updater
|
||||
|
@ -42,7 +42,7 @@
|
||||
|
||||
The Qt Installer Framework provides a set of tools and utilities to
|
||||
create installers for the supported desktop Qt platforms: Linux, Microsoft
|
||||
Windows, and OS X.
|
||||
Windows, and macOS.
|
||||
|
||||
\note Report bugs and suggestions for the Qt Installer Framework project
|
||||
in the \l{https://bugreports.qt.io/browse/QTIFW}{Qt Bugtracker}.
|
||||
@ -191,13 +191,13 @@
|
||||
\row
|
||||
\li Icon
|
||||
\li Filename for a custom installer icon. The actual file is looked up by attaching
|
||||
a '.icns' (OS X), '.ico' (Windows) or '.png' (Unix) suffix. Deprecated,
|
||||
a '.icns' (macOS), '.ico' (Windows) or '.png' (Unix) suffix. Deprecated,
|
||||
use \c <InstallerApplicationIcon> or \c <InstallerWindowIcon>
|
||||
instead.
|
||||
\row
|
||||
\li InstallerApplicationIcon
|
||||
\li Filename for a custom installer icon. The actual file is looked up by attaching
|
||||
a '.icns' (OS X), '.ico' (Windows). No functionality on Unix.
|
||||
a '.icns' (macOS), '.ico' (Windows). No functionality on Unix.
|
||||
\row
|
||||
\li InstallerWindowIcon
|
||||
\li Filename for a custom window icon in PNG format for the Installer application.
|
||||
@ -794,7 +794,7 @@
|
||||
<location-of-ifw>\binarycreator.exe -t <location-of-ifw>\installerbase.exe -p <package_directory> -c <config_directory>\<config_file> <installer_name>
|
||||
\endcode
|
||||
|
||||
\li On Linux and OS X
|
||||
\li On Linux and macOS
|
||||
|
||||
\code
|
||||
<location-of-ifw>/binarycreator -t <location-of-ifw>/installerbase -p <package_directory> -c <config_directory>/<config_file> <installer_name>
|
||||
@ -812,7 +812,7 @@
|
||||
<location-of-ifw>\binarycreator.exe -t <location-of-ifw>\installerbase.exe -p <package_directory> -c <config_directory>\<config_file> -e <packages> <installer_name>
|
||||
\endcode
|
||||
|
||||
\li On Linux and OS X
|
||||
\li On Linux and macOS
|
||||
|
||||
\code
|
||||
<location-of-ifw>/binarycreator -t <location-of-ifw>/installerbase -p <package_directory> -c <config_directory>/<config_file> -e <packages> <installer_name>
|
||||
@ -883,7 +883,7 @@
|
||||
|
||||
\row
|
||||
\li -s or --sign identity
|
||||
\li Only available on OS X. Allows specifying a code signing identity to be
|
||||
\li Only available on macOS. Allows specifying a code signing identity to be
|
||||
used for signing the generated app bundle.
|
||||
\endtable
|
||||
|
||||
@ -907,7 +907,7 @@
|
||||
|
||||
\section2 Using Icons
|
||||
|
||||
On OS X, if the target binary is suffixed with .app, a OS X
|
||||
On macOS, if the target binary is suffixed with .app, a macOS
|
||||
application bundle is created. The icon that you specify in config.xml is
|
||||
extended with .icns and used as the icon for the created bundle.
|
||||
|
||||
|
@ -42,13 +42,13 @@
|
||||
Specifies the buttons on an installer page.
|
||||
|
||||
\value buttons.BackButton
|
||||
The \uicontrol Back button (\uicontrol {Go Back} on OS X.)
|
||||
The \uicontrol Back button (\uicontrol {Go Back} on macOS.)
|
||||
\value buttons.NextButton
|
||||
The \uicontrol Next button (\uicontrol Continue on OS X.)
|
||||
The \uicontrol Next button (\uicontrol Continue on macOS.)
|
||||
\value buttons.CommitButton
|
||||
The \uicontrol Commit button.
|
||||
\value buttons.FinishButton
|
||||
The \uicontrol Finish button (\uicontrol Done on OS X.)
|
||||
The \uicontrol Finish button (\uicontrol Done on macOS.)
|
||||
\value buttons.CancelButton
|
||||
The \uicontrol Cancel button.
|
||||
\value buttons.HelpButton
|
||||
|
@ -66,6 +66,6 @@
|
||||
"Images (*.png *.xpm *.jpg);;Text files (*.txt);;XML files (*.xml)"
|
||||
\endcode
|
||||
|
||||
On Windows, and OS X, this static function will use the native file dialog
|
||||
On Windows, and macOS, this static function will use the native file dialog
|
||||
and not a QFileDialog.
|
||||
*/
|
||||
|
@ -265,7 +265,7 @@
|
||||
\li Applications directory.
|
||||
|
||||
For example, \c {C:\Program Files} on Windows,
|
||||
\c {/opt} on Linux and \c {/Applications} on OS X.
|
||||
\c {/opt} on Linux and \c {/Applications} on macOS.
|
||||
|
||||
See also the table that lists examples of \l {Applications-directory-on-Windows}
|
||||
{applications directories on Windows}.
|
||||
|
@ -58,7 +58,7 @@
|
||||
kernel the installer is running on, unless the host operating system is running a form of
|
||||
compatibility or virtualization layer.
|
||||
|
||||
For Windows, Linux, and OS X this will return
|
||||
For Windows, Linux, and macOS this will return
|
||||
\list
|
||||
\li "winnt"
|
||||
\li "linux"
|
||||
@ -82,7 +82,7 @@
|
||||
\endlist
|
||||
|
||||
The release version of the operating system kernel. On Windows, it returns the version of the
|
||||
NT or CE kernel. On Unix systems, including OS X, it returns the same as the \c {uname -r}
|
||||
NT or CE kernel. On Unix systems, including macOS, it returns the same as the \c {uname -r}
|
||||
command would return.
|
||||
|
||||
\sa QSysInfo::kernelVersion()
|
||||
|
@ -195,7 +195,7 @@
|
||||
..\..\bin\binarycreator.exe -c config\config.xml -p packages YourInstaller.exe
|
||||
\endcode
|
||||
|
||||
\li On Linux or OS X:
|
||||
\li On Linux or macOS:
|
||||
\code
|
||||
../../bin/binarycreator -c config/config.xml -p packages YourInstaller
|
||||
\endcode
|
||||
|
@ -105,7 +105,7 @@
|
||||
\code
|
||||
..\..\bin\binarycreator.exe -c config\config.xml -r resources/additional.qrc -p packages installer.exe
|
||||
\endcode
|
||||
\li On Linux or OS X:
|
||||
\li On Linux or macOS:
|
||||
\code
|
||||
../../bin/binarycreator -c config/config.xml -r resources/additional.qrc -p packages installer
|
||||
\endcode
|
||||
|
@ -74,7 +74,7 @@
|
||||
\code
|
||||
..\..\bin\repogen.exe -p packages repository
|
||||
\endcode
|
||||
\li On Linux or OS X:
|
||||
\li On Linux or macOS:
|
||||
\code
|
||||
../../bin/repogen -p packages repository
|
||||
\endcode
|
||||
@ -114,7 +114,7 @@
|
||||
\code
|
||||
..\..\bin\binarycreator.exe --online-only -c config\config.xml -p packages installer.exe
|
||||
\endcode
|
||||
\li On Linux or OS X:
|
||||
\li On Linux or macOS:
|
||||
\code
|
||||
../../bin/binarycreator --online-only -c config/config.xml -p packages installer
|
||||
\endcode
|
||||
@ -139,7 +139,7 @@
|
||||
\code
|
||||
..\..\bin\repogen.exe --update-new-components -p packages_update repository
|
||||
\endcode
|
||||
\li On Linux or OS X:
|
||||
\li On Linux or macOS:
|
||||
\code
|
||||
../../bin/repogen --update-new-components -p packages_update repository
|
||||
\endcode
|
||||
|
@ -61,7 +61,7 @@
|
||||
In installscript.qs, we use the \c Component() function to connect to the
|
||||
\c installationFinishedPageIsShown signal when the installation is complete
|
||||
and to the \c installationFinished signal when the end users click
|
||||
\uicontrol Finish (\uicontrol Done on OS X):
|
||||
\uicontrol Finish (\uicontrol Done on macOS):
|
||||
|
||||
\quotefromfile openreadme/packages/or.qtproject.ifw.example.openreadme/meta/installscript.qs
|
||||
\skipto Component()
|
||||
|
@ -84,9 +84,9 @@
|
||||
\printto /\!validOs/
|
||||
|
||||
The script uses \l{systemInfo::productType}{systemInfo.productType} to differentiate
|
||||
between Windows, OS X, and individual Linux distributions.
|
||||
between Windows, macOS, and individual Linux distributions.
|
||||
|
||||
For OS X and Windows, the script checks the operating system kernel version.
|
||||
For macOS and Windows, the script checks the operating system kernel version.
|
||||
For a mapping of kernel to operating system versions, see
|
||||
\l{http://en.wikipedia.org/wiki/Darwin_%28operating_system%29}{Darwin} and
|
||||
\l{http://en.wikipedia.org/wiki/Windows_NT}{Windows NT}.
|
||||
@ -95,7 +95,7 @@
|
||||
the specific distribution and version the binaries are presumably built for,
|
||||
the installer shows a warning in a modal dialog, but allows installation.
|
||||
|
||||
If the Windows or OS X version is too old, though, the script calls the \c cancelInstaller()
|
||||
If the Windows or macOS version is too old, though, the script calls the \c cancelInstaller()
|
||||
helper function to prevent an actual installation:
|
||||
|
||||
\printuntil /\}/
|
||||
|
@ -55,7 +55,7 @@ function Component()
|
||||
//
|
||||
// Check whether OS is supported.
|
||||
//
|
||||
// For Windows and OS X we check the kernel version:
|
||||
// For Windows and macOS we check the kernel version:
|
||||
// - Require at least Windows Vista (winnt kernel version 6.0.x)
|
||||
// - Require at least OS X 10.7 (Lion) (darwin kernel version 11.x)
|
||||
//
|
||||
|
@ -12,4 +12,4 @@ Linux:
|
||||
|
||||
LANGUAGE=de ./installer
|
||||
|
||||
On OS X and Windows you need to adapt the system settings to set German as preferred language, and then start the installer.
|
||||
On macOS and Windows you need to adapt the system settings to set German as preferred language, and then start the installer.
|
||||
|
@ -286,7 +286,7 @@ void QInstaller::removeSystemGeneratedFiles(const QString &path)
|
||||
{
|
||||
if (path.isEmpty())
|
||||
return;
|
||||
#if defined Q_OS_OSX
|
||||
#if defined Q_OS_MACOS
|
||||
QFile::remove(path + QLatin1String("/.DS_Store"));
|
||||
#elif defined Q_OS_WIN
|
||||
QFile::remove(path + QLatin1String("/Thumbs.db"));
|
||||
@ -572,7 +572,7 @@ quint64 QInstaller::fileSize(const QFileInfo &info)
|
||||
|
||||
bool QInstaller::isInBundle(const QString &path, QString *bundlePath)
|
||||
{
|
||||
#ifdef Q_OS_OSX
|
||||
#ifdef Q_OS_MACOS
|
||||
QFileInfo fi = QFileInfo(path).absoluteFilePath();
|
||||
while (!fi.isRoot()) {
|
||||
if (fi.isBundle()) {
|
||||
|
@ -381,7 +381,7 @@ static QMessageBox::StandardButton showNewMessageBox(QWidget *parent, QMessageBo
|
||||
msgBox.setDefaultButton(button);
|
||||
}
|
||||
}
|
||||
#if defined(Q_OS_OSX)
|
||||
#if defined(Q_OS_MACOS)
|
||||
msgBox.setWindowModality(Qt::WindowModal);
|
||||
#endif
|
||||
if (msgBox.exec() == -1)
|
||||
|
@ -2201,7 +2201,7 @@ QString PackageManagerCore::findLibrary(const QString &name, const QStringList &
|
||||
#if defined(Q_OS_WIN)
|
||||
return findPath(QString::fromLatin1("%1.lib").arg(name), findPaths);
|
||||
#else
|
||||
#if defined(Q_OS_OSX)
|
||||
#if defined(Q_OS_MACOS)
|
||||
if (findPaths.isEmpty()) {
|
||||
findPaths.push_back(QLatin1String("/lib"));
|
||||
findPaths.push_back(QLatin1String("/usr/lib"));
|
||||
|
@ -590,7 +590,7 @@ void PackageManagerCorePrivate::initialize(const QHash<QString, QString> ¶ms
|
||||
#endif
|
||||
|
||||
if (!m_core->isInstaller()) {
|
||||
#ifdef Q_OS_OSX
|
||||
#ifdef Q_OS_MACOS
|
||||
readMaintenanceConfigFiles(QCoreApplication::applicationDirPath() + QLatin1String("/../../.."));
|
||||
#else
|
||||
readMaintenanceConfigFiles(QCoreApplication::applicationDirPath());
|
||||
@ -718,7 +718,7 @@ Operation *PackageManagerCorePrivate::takeOwnedOperation(Operation *operation)
|
||||
QString PackageManagerCorePrivate::maintenanceToolName() const
|
||||
{
|
||||
QString filename = m_data.settings().maintenanceToolName();
|
||||
#if defined(Q_OS_OSX)
|
||||
#if defined(Q_OS_MACOS)
|
||||
if (QInstaller::isInBundle(QCoreApplication::applicationDirPath()))
|
||||
filename += QLatin1String(".app/Contents/MacOS/") + filename;
|
||||
#elif defined(Q_OS_WIN)
|
||||
@ -1044,7 +1044,7 @@ void PackageManagerCorePrivate::writeMaintenanceToolBinary(QFile *const input, q
|
||||
if (writeBinaryLayout) {
|
||||
|
||||
QDir resourcePath(QFileInfo(maintenanceToolRenamedName).dir());
|
||||
#ifdef Q_OS_OSX
|
||||
#ifdef Q_OS_MACOS
|
||||
if (!resourcePath.path().endsWith(QLatin1String("Contents/MacOS")))
|
||||
throw Error(tr("Maintenance tool is not a bundle"));
|
||||
resourcePath.cdUp();
|
||||
@ -1172,7 +1172,7 @@ void PackageManagerCorePrivate::writeMaintenanceTool(OperationList performedOper
|
||||
|
||||
const QString targetAppDirPath = QFileInfo(maintenanceToolName()).path();
|
||||
if (!QDir().exists(targetAppDirPath)) {
|
||||
// create the directory containing the maintenance tool (like a bundle structure on OS X...)
|
||||
// create the directory containing the maintenance tool (like a bundle structure on macOS...)
|
||||
Operation *op = createOwnedOperation(QLatin1String("Mkdir"));
|
||||
op->setArguments(QStringList() << targetAppDirPath);
|
||||
performOperationThreaded(op, Backup);
|
||||
@ -1180,7 +1180,7 @@ void PackageManagerCorePrivate::writeMaintenanceTool(OperationList performedOper
|
||||
performedOperations.append(takeOwnedOperation(op));
|
||||
}
|
||||
|
||||
#ifdef Q_OS_OSX
|
||||
#ifdef Q_OS_MACOS
|
||||
// if it is a bundle, we need some stuff in it...
|
||||
const QString sourceAppDirPath = QCoreApplication::applicationDirPath();
|
||||
if (isInstaller() && QInstaller::isInBundle(sourceAppDirPath)) {
|
||||
@ -1340,7 +1340,7 @@ void PackageManagerCorePrivate::writeMaintenanceTool(OperationList performedOper
|
||||
// On Mac data is always in a separate file so that the binary can be signed.
|
||||
// On other platforms data is in separate file only after install so that the
|
||||
// maintenancetool sign does not break.
|
||||
#ifdef Q_OS_OSX
|
||||
#ifdef Q_OS_MACOS
|
||||
QDir dataPath(QFileInfo(binaryName).dir());
|
||||
dataPath.cdUp();
|
||||
dataPath.cd(QLatin1String("Resources"));
|
||||
@ -1355,7 +1355,7 @@ void PackageManagerCorePrivate::writeMaintenanceTool(OperationList performedOper
|
||||
newBinaryWritten = true;
|
||||
QFile tmp(binaryName);
|
||||
QInstaller::openForRead(&tmp);
|
||||
#ifdef Q_OS_OSX
|
||||
#ifdef Q_OS_MACOS
|
||||
writeMaintenanceToolBinary(&tmp, tmp.size(), true);
|
||||
#else
|
||||
writeMaintenanceToolBinary(&tmp, layout.endOfBinaryContent - layout.binaryContentSize, true);
|
||||
@ -1554,8 +1554,8 @@ bool PackageManagerCorePrivate::runInstaller()
|
||||
Operation *createRepo = createOwnedOperation(QLatin1String("CreateLocalRepository"));
|
||||
if (createRepo) {
|
||||
QString binaryFile = QCoreApplication::applicationFilePath();
|
||||
#ifdef Q_OS_OSX
|
||||
// The installer binary on OSX does not contain the binary content, it's put into
|
||||
#ifdef Q_OS_MACOS
|
||||
// The installer binary on macOS does not contain the binary content, it's put into
|
||||
// the resources folder as separate file. Adjust the actual binary path. No error
|
||||
// checking here since we will fail later while reading the binary content.
|
||||
QDir resourcePath(QFileInfo(binaryFile).dir());
|
||||
@ -2028,7 +2028,7 @@ void PackageManagerCorePrivate::deleteMaintenanceTool()
|
||||
// every other platform has no problem if we just delete ourselves now
|
||||
QFile maintenanceTool(QFileInfo(installerBinaryPath()).absoluteFilePath());
|
||||
maintenanceTool.remove();
|
||||
# ifdef Q_OS_OSX
|
||||
# ifdef Q_OS_MACOS
|
||||
if (QInstaller::isInBundle(installerBinaryPath())) {
|
||||
const QLatin1String cdUp("/../../..");
|
||||
removeDirectoryThreaded(QFileInfo(installerBinaryPath() + cdUp).absoluteFilePath());
|
||||
|
@ -57,7 +57,7 @@ PackageManagerCoreData::PackageManagerCoreData(const QHash<QString, QString> &va
|
||||
|
||||
#ifdef Q_OS_WIN
|
||||
m_variables.insert(QLatin1String("os"), QLatin1String("win"));
|
||||
#elif defined(Q_OS_OSX)
|
||||
#elif defined(Q_OS_MACOS)
|
||||
m_variables.insert(QLatin1String("os"), QLatin1String("mac"));
|
||||
#elif defined(Q_OS_LINUX)
|
||||
m_variables.insert(QLatin1String("os"), QLatin1String("x11"));
|
||||
@ -110,7 +110,7 @@ void PackageManagerCoreData::setDynamicPredefinedVariables()
|
||||
TCHAR buffer[MAX_PATH + 1] = { 0 };
|
||||
SHGetFolderPath(nullptr, CSIDL_PROGRAM_FILES, nullptr, 0, buffer);
|
||||
dir = QString::fromWCharArray(buffer);
|
||||
#elif defined (Q_OS_OSX)
|
||||
#elif defined (Q_OS_MACOS)
|
||||
dir = QStandardPaths::standardLocations(QStandardPaths::ApplicationsLocation).value(0);
|
||||
#endif
|
||||
m_variables.insert(QLatin1String("ApplicationsDir"), dir);
|
||||
|
@ -305,7 +305,7 @@ PackageManagerGui::PackageManagerGui(PackageManagerCore *core, QWidget *parent)
|
||||
setWindowTitle(tr("Maintain %1").arg(m_core->value(scTitle)));
|
||||
setWindowFlags(windowFlags() &~ Qt::WindowContextHelpButtonHint);
|
||||
|
||||
#ifndef Q_OS_OSX
|
||||
#ifndef Q_OS_MACOS
|
||||
setWindowIcon(QIcon(m_core->settings().installerWindowIcon()));
|
||||
#else
|
||||
setPixmap(QWizard::BackgroundPixmap, m_core->settings().background());
|
||||
@ -408,7 +408,7 @@ PackageManagerGui::~PackageManagerGui()
|
||||
\list
|
||||
\li \c Classic - Classic UI style for Windows 7 and earlier.
|
||||
\li \c Modern - Modern UI style for Windows 8.
|
||||
\li \c Mac - UI style for OS X.
|
||||
\li \c Mac - UI style for macOS.
|
||||
\li \c Aero - Aero Peek for Windows 7.
|
||||
\endlist
|
||||
*/
|
||||
@ -2178,7 +2178,7 @@ bool TargetDirectoryPage::validatePage()
|
||||
const QFileInfo fi(targetDir);
|
||||
if (fi.isDir()) {
|
||||
QString fileName = packageManagerCore()->settings().maintenanceToolName();
|
||||
#if defined(Q_OS_OSX)
|
||||
#if defined(Q_OS_MACOS)
|
||||
if (QInstaller::isInBundle(QCoreApplication::applicationDirPath()))
|
||||
fileName += QLatin1String(".app/Contents/MacOS/") + fileName;
|
||||
#elif defined(Q_OS_WIN)
|
||||
@ -2849,7 +2849,7 @@ void FinishedPage::entering()
|
||||
}
|
||||
|
||||
if (packageManagerCore()->isMaintainer()) {
|
||||
#ifdef Q_OS_OSX
|
||||
#ifdef Q_OS_MACOS
|
||||
gui()->setOption(QWizard::NoCancelButton, false);
|
||||
#endif
|
||||
if (QAbstractButton *cancel = gui()->button(QWizard::CancelButton)) {
|
||||
@ -2913,7 +2913,7 @@ void FinishedPage::entering()
|
||||
*/
|
||||
void FinishedPage::leaving()
|
||||
{
|
||||
#ifdef Q_OS_OSX
|
||||
#ifdef Q_OS_MACOS
|
||||
gui()->setOption(QWizard::NoCancelButton, true);
|
||||
#endif
|
||||
|
||||
|
@ -65,7 +65,7 @@ void RemoteServer::start()
|
||||
if (d->m_localServer)
|
||||
return;
|
||||
|
||||
#if defined(Q_OS_UNIX) && !defined(Q_OS_OSX)
|
||||
#if defined(Q_OS_UNIX) && !defined(Q_OS_MACOS)
|
||||
// avoid writing to stderr:
|
||||
// the parent process has redirected stderr to a pipe to work with sudo,
|
||||
// but is not reading anymore -> writing to stderr will block after a while.
|
||||
|
@ -472,7 +472,7 @@ QString Settings::installerWindowIcon() const
|
||||
|
||||
QString Settings::systemIconSuffix() const
|
||||
{
|
||||
#if defined(Q_OS_OSX)
|
||||
#if defined(Q_OS_MACOS)
|
||||
return QLatin1String(".icns");
|
||||
#elif defined(Q_OS_WIN)
|
||||
return QLatin1String(".ico");
|
||||
|
@ -76,7 +76,7 @@ QString SystemInfo::currentCpuArchitecture() const
|
||||
kernel the installer is running on, unless the host operating system is running a form of
|
||||
compatibility or virtualization layer.
|
||||
|
||||
For Windows, Linux, and OS X this will return:
|
||||
For Windows, Linux, and macOS this will return:
|
||||
\list
|
||||
\li "winnt"
|
||||
\li "linux"
|
||||
@ -96,7 +96,7 @@ QString SystemInfo::kernelType() const
|
||||
\property SystemInfo::kernelVersion
|
||||
|
||||
The release version of the operating system kernel. On Windows, it returns the version of the
|
||||
NT or CE kernel. On Unix systems, including OS X, it returns the same as the \c {uname -r}
|
||||
NT or CE kernel. On Unix systems, including macOS, it returns the same as the \c {uname -r}
|
||||
command would return.
|
||||
|
||||
Example values are:
|
||||
|
@ -455,7 +455,7 @@ QDomDocument UpdateOperation::toXml() const
|
||||
bool UpdateOperation::fromXml(const QDomDocument &doc)
|
||||
{
|
||||
QString target = QCoreApplication::applicationDirPath();
|
||||
// Does not change target on non OSX platforms.
|
||||
// Does not change target on non macOS platforms.
|
||||
if (QInstaller::isInBundle(target, &target))
|
||||
target = QDir::cleanPath(target + QLatin1String("/.."));
|
||||
|
||||
|
@ -51,7 +51,7 @@ CommandLineParser::CommandLineParser()
|
||||
QLatin1String("Verbose mode. Prints out more information.")));
|
||||
|
||||
m_parser.addOption(QCommandLineOption(QLatin1String(CommandLineOptions::Proxy),
|
||||
QLatin1String("Use system proxy on Windows and Linux. This option has no effect on OS X.")));
|
||||
QLatin1String("Use system proxy on Windows and Linux. This option has no effect on macOS.")));
|
||||
|
||||
m_parser.addOption(QCommandLineOption(QLatin1String(CommandLineOptions::NoProxy),
|
||||
QLatin1String("Do not use system proxy.")));
|
||||
|
@ -44,7 +44,7 @@
|
||||
|
||||
#include <iostream>
|
||||
|
||||
#if defined(Q_OS_OSX) or defined(Q_OS_UNIX)
|
||||
#if defined(Q_OS_MACOS) or defined(Q_OS_UNIX)
|
||||
# include <unistd.h>
|
||||
# include <sys/types.h>
|
||||
#endif
|
||||
@ -66,7 +66,7 @@ int main(int argc, char *argv[])
|
||||
}
|
||||
#endif
|
||||
// increase maximum numbers of file descriptors
|
||||
#if defined (Q_OS_OSX)
|
||||
#if defined (Q_OS_MACOS)
|
||||
QCoreApplication::setSetuidAllowed(true);
|
||||
struct rlimit rl;
|
||||
getrlimit(RLIMIT_NOFILE, &rl);
|
||||
@ -141,7 +141,7 @@ int main(int argc, char *argv[])
|
||||
Qt::CaseInsensitive) == 0);
|
||||
if (production) {
|
||||
argumentsValid = (!key.isEmpty()) && (!socketName.isEmpty());
|
||||
#if defined(Q_OS_UNIX) && !defined(Q_OS_OSX)
|
||||
#if defined(Q_OS_UNIX) && !defined(Q_OS_MACOS)
|
||||
/* In production mode detach child so that sudo waiting on us will terminate. */
|
||||
pid_t child = fork();
|
||||
if (child <= -1) {
|
||||
@ -166,7 +166,7 @@ int main(int argc, char *argv[])
|
||||
return EXIT_FAILURE;
|
||||
}
|
||||
|
||||
#if defined(Q_OS_OSX)
|
||||
#if defined(Q_OS_MACOS)
|
||||
// make sure effective == real user id.
|
||||
uid_t realUserId = getuid();
|
||||
uid_t effectiveUserId = geteuid();
|
||||
|
@ -73,21 +73,21 @@ public:
|
||||
as the binary layout cannot be appended to the actual maintenance tool binary
|
||||
itself because of signing.
|
||||
|
||||
On OS X: This function will return always the .dat file
|
||||
On macOS: This function will return always the .dat file
|
||||
.dat file is located inside the resource folder in the application
|
||||
bundle in OS X.
|
||||
bundle in macOS.
|
||||
*/
|
||||
QString binaryFile() const
|
||||
{
|
||||
QString binaryFile = QCoreApplication::applicationFilePath();
|
||||
|
||||
// The installer binary on OSX and Windows does not contain the binary
|
||||
// The installer binary on macOS and Windows does not contain the binary
|
||||
// content, it's put into the resources folder as separate file.
|
||||
// Adjust the actual binary path. No error checking here since we
|
||||
// will fail later while reading the binary content.
|
||||
QDir resourcePath(QFileInfo(binaryFile).dir());
|
||||
|
||||
#ifdef Q_OS_OSX
|
||||
#ifdef Q_OS_MACOS
|
||||
resourcePath.cdUp();
|
||||
resourcePath.cd(QLatin1String("Resources"));
|
||||
#endif
|
||||
@ -116,7 +116,7 @@ public:
|
||||
QString bundlePath;
|
||||
if (QInstaller::isInBundle(fi.absoluteFilePath(), &bundlePath))
|
||||
fi.setFile(bundlePath);
|
||||
#ifdef Q_OS_OSX
|
||||
#ifdef Q_OS_MACOS
|
||||
return fi.absoluteDir().filePath(fi.baseName() + QLatin1String(".dat"));
|
||||
#else
|
||||
return fi.absoluteDir().filePath(qApp->applicationName() + QLatin1String(".dat"));
|
||||
|
@ -49,7 +49,7 @@ void tst_Settings::loadTutorialConfig()
|
||||
QCOMPARE(settings.installerApplicationIcon(), QLatin1String(":/installer.ico"));
|
||||
QCOMPARE(settings.installerWindowIcon(), QLatin1String(":/installer.ico"));
|
||||
QCOMPARE(settings.systemIconSuffix(), QLatin1String(".ico"));
|
||||
#elif defined(Q_OS_OSX)
|
||||
#elif defined(Q_OS_MACOS)
|
||||
QCOMPARE(settings.installerApplicationIcon(), QLatin1String(":/installer.icns"));
|
||||
QCOMPARE(settings.installerWindowIcon(), QLatin1String(":/installer.icns"));
|
||||
QCOMPARE(settings.systemIconSuffix(), QLatin1String(".icns"));
|
||||
|
@ -263,7 +263,7 @@ static QVersionNumber readMachOMinimumSystemVersion(QIODevice *device)
|
||||
|
||||
static int assemble(Input input, const QInstaller::Settings &settings, const QString &signingIdentity)
|
||||
{
|
||||
#ifdef Q_OS_OSX
|
||||
#ifdef Q_OS_MACOS
|
||||
if (QInstaller::isInBundle(input.installerExePath)) {
|
||||
const QString bundle = input.installerExePath;
|
||||
// if the input file was a bundle
|
||||
@ -394,7 +394,7 @@ static int assemble(Input input, const QInstaller::Settings &settings, const QSt
|
||||
// no error handling as this is not fatal
|
||||
setApplicationIcon(tempFile, settings.installerApplicationIcon());
|
||||
}
|
||||
#elif defined(Q_OS_OSX)
|
||||
#elif defined(Q_OS_MACOS)
|
||||
if (isBundle) {
|
||||
// no error handling as this is not fatal
|
||||
const QString copyscript = QDir::temp().absoluteFilePath(QLatin1String("copylibsintobundle.sh"));
|
||||
@ -411,7 +411,7 @@ static int assemble(Input input, const QInstaller::Settings &settings, const QSt
|
||||
|
||||
QTemporaryFile out;
|
||||
QString targetName = input.outputPath;
|
||||
#ifdef Q_OS_OSX
|
||||
#ifdef Q_OS_MACOS
|
||||
QDir resourcePath(QFileInfo(input.outputPath).dir());
|
||||
resourcePath.cdUp();
|
||||
resourcePath.cd(QLatin1String("Resources"));
|
||||
@ -432,7 +432,7 @@ static int assemble(Input input, const QInstaller::Settings &settings, const QSt
|
||||
QInstaller::openForWrite(&out);
|
||||
QFile exe(input.installerExePath);
|
||||
|
||||
#ifdef Q_OS_OSX
|
||||
#ifdef Q_OS_MACOS
|
||||
if (!exe.copy(input.outputPath)) {
|
||||
throw Error(QString::fromLatin1("Cannot copy %1 to %2: %3").arg(exe.fileName(),
|
||||
input.outputPath, exe.errorString()));
|
||||
@ -477,7 +477,7 @@ static int assemble(Input input, const QInstaller::Settings &settings, const QSt
|
||||
#endif
|
||||
QFile::remove(tempFile);
|
||||
|
||||
#ifdef Q_OS_OSX
|
||||
#ifdef Q_OS_MACOS
|
||||
if (isBundle && !signingIdentity.isEmpty()) {
|
||||
qDebug() << "Signing .app bundle...";
|
||||
|
||||
@ -660,7 +660,7 @@ static void printUsage()
|
||||
std::cout << " -rcc|--compile-resource Compiles the default resource and outputs the result into"
|
||||
<< std::endl;
|
||||
std::cout << " 'update.rcc' in the current path." << std::endl;
|
||||
#ifdef Q_OS_OSX
|
||||
#ifdef Q_OS_MACOS
|
||||
std::cout << " -s|--sign identity Sign generated app bundle using the given code " << std::endl;
|
||||
std::cout << " signing identity" << std::endl;
|
||||
#endif
|
||||
@ -718,7 +718,7 @@ void copyConfigData(const QString &configFile, const QString &targetDir)
|
||||
QString targetFile;
|
||||
QFileInfo elementFileInfo;
|
||||
if (tagName == QLatin1String("Icon") || tagName == QLatin1String("InstallerApplicationIcon")) {
|
||||
#if defined(Q_OS_OSX)
|
||||
#if defined(Q_OS_MACOS)
|
||||
const QString suffix = QLatin1String(".icns");
|
||||
#elif defined(Q_OS_WIN)
|
||||
const QString suffix = QLatin1String(".ico");
|
||||
@ -885,7 +885,7 @@ int main(int argc, char **argv)
|
||||
continue;
|
||||
} else if (*it == QLatin1String("-rcc") || *it == QLatin1String("--compile-resource")) {
|
||||
compileResource = true;
|
||||
#ifdef Q_OS_OSX
|
||||
#ifdef Q_OS_MACOS
|
||||
} else if (*it == QLatin1String("-s") || *it == QLatin1String("--sign")) {
|
||||
++it;
|
||||
if (it == args.end() || it->startsWith(QLatin1String("-")))
|
||||
@ -986,7 +986,7 @@ int main(int argc, char **argv)
|
||||
confInternal.setValue(QLatin1String("offlineOnly"), offlineOnly);
|
||||
}
|
||||
|
||||
#ifdef Q_OS_OSX
|
||||
#ifdef Q_OS_MACOS
|
||||
// on mac, we enforce building a bundle
|
||||
if (!target.endsWith(QLatin1String(".app")) && !target.endsWith(QLatin1String(".dmg")))
|
||||
target += QLatin1String(".app");
|
||||
|
@ -71,7 +71,7 @@ function handleFile()
|
||||
|
||||
if [ `basename $FILE` != $NAME ]; then
|
||||
|
||||
# this part handles libraries which are Mac OS X frameworks
|
||||
# this part handles libraries which are macOS frameworks
|
||||
if echo $lib | grep '\.framework' >/dev/null; then
|
||||
local FRAMEWORKPATH=`echo $lib | sed -ne 's,\(.*\.framework\).*,\1,p'`
|
||||
local FRAMEWORKNAME=`basename $FRAMEWORKPATH`
|
||||
|
@ -99,7 +99,7 @@ int BinaryReplace::replace(const QString &source, const QString &target)
|
||||
result = EXIT_FAILURE;
|
||||
try {
|
||||
QFile installerBaseNew(newInstallerBasePath);
|
||||
#ifndef Q_OS_OSX
|
||||
#ifndef Q_OS_MACOS
|
||||
QFile installerBaseOld(target);
|
||||
QInstaller::openForAppend(&installerBaseNew);
|
||||
|
||||
|
@ -168,7 +168,7 @@ int main(int argc, char *argv[])
|
||||
if (QInstaller::isInBundle(path, &bundlePath)) {
|
||||
path = QDir(bundlePath).filePath(QLatin1String("Contents/Resources/installer.dat"));
|
||||
}
|
||||
#ifndef Q_OS_OSX
|
||||
#ifndef Q_OS_MACOS
|
||||
QFileInfo fi = QFileInfo(path);
|
||||
bundlePath = path;
|
||||
QString tmp = QDir(fi.path()).filePath(QLatin1String("installer.dat"));
|
||||
|
Loading…
x
Reference in New Issue
Block a user