From 830522f3a2a57f989f07e4dbd49b899c7fc69e06 Mon Sep 17 00:00:00 2001 From: Pasi Matilainen Date: Wed, 29 Aug 2012 09:51:36 +0300 Subject: Store installer data in a separate file on Mac to support code signing MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Code signing fails on Mac OS X if there's any extra data after the link edit segment in a binary, so store the installer data in a separate file inside the bundle. Task-number: QTIFW-153 Change-Id: Ie1edf21212b4a3bc5b6f32eea3f5d61e8800a0d5 Reviewed-by: Karsten Heimrich Reviewed-by: Lars Knoll Reviewed-by: Simo Fält Reviewed-by: Niels Weber --- src/sdk/installerbase.cpp | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'src') diff --git a/src/sdk/installerbase.cpp b/src/sdk/installerbase.cpp index 03b87bbb2..a06adf500 100644 --- a/src/sdk/installerbase.cpp +++ b/src/sdk/installerbase.cpp @@ -244,8 +244,16 @@ int main(int argc, char *argv[]) // the uninstaller for the recorded list of during the installation performed operations QInstaller::init(); +#ifdef Q_OS_MAC + // load the external binary resource + QDir resourcePath(QFileInfo(QCoreApplication::applicationFilePath()).dir()); + resourcePath.cdUp(); + resourcePath.cd(QLatin1String("Resources")); + BinaryContent content = BinaryContent::readAndRegisterFromBinary(resourcePath.filePath(QLatin1String("installer.dat"))); +#else // load and map the embedded binary resource, registers operations BinaryContent content = BinaryContent::readAndRegisterFromApplicationFile(); +#endif // instantiate the installer we are actually going to use QInstaller::PackageManagerCore core(content.magicMarker(), content.performedOperations()); -- cgit v1.2.3