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