Files
pilotclient/installer/installbuilder/project.xml
Roland Winklmeier e2f7ea87a3 [MacOS] Write dbus session launchd script during installation
DBus session needs to be started from a central place. On Mac OS, the
recommended solution is launchd service since all dbus clients will query
launchd for the session address first. All other solutions would be hacky.
With this script, launchd will start dbus-daemon on demand and provide
the enviromental variable DBUS_LAUNCHD_SESSION_BUS_SOCKET.
We put this into the user launch agents folder to make it a user session.

ref T170
2017-10-13 17:01:08 +02:00

192 lines
6.9 KiB
XML

<project>
<shortName>swift</shortName>
<fullName>swift</fullName>
<!-- <version>0.7.0</version> -->
<licenseFile>../../dist/bin/LICENSE</licenseFile>
<leftImage>../images/leftimage.png</leftImage>
<logoImage>../images/logo.png</logoImage>
<splashImage>../images/splashscreen.png</splashImage>
<requireInstallationByRootUser>0</requireInstallationByRootUser>
<componentList>
<include>
<file>swift.xml</file>
</include>
<include>
<file>qt5-binaries.xml</file>
</include>
<!--<include>
<file>autoupdater.xml</file>
</include>-->
<include>
<file>vcredist.xml</file>
</include>
</componentList>
<postInstallationActionList>
<createDirectory>
<path>/usr/local/var/lib/dbus</path>
<ruleList>
<platformTest>
<type>osx</type>
</platformTest>
</ruleList>
</createDirectory>
<runProgram>
<program>bin/dbus-uuidgen</program>
<programArguments>--ensure=/usr/local/var/lib/dbus/machine-id</programArguments>
<workingDirectory>${installdir}</workingDirectory>
<ruleList>
<platformTest>
<type>osx</type>
</platformTest>
</ruleList>
</runProgram>
<writeFile>
<path>${user_home_directory}/Library/LaunchAgents/org.freedesktop.dbus-session.plist</path>
<encoding>utf-8</encoding>
<text><![CDATA[
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>Label</key>
<string>org.freedesktop.dbus-session.plist</string>
<key>ProgramArguments</key>
<array>
<string>${installdir}/bin/dbus-daemon</string>
<string>--nofork</string>
<string>--config-file=${installdir}/share/dbus-1/session.conf</string>
</array>
<key>Sockets</key>
<dict>
<key>unix_domain_listener</key>
<dict>
<key>SecureSocketWithKey</key>
<string>DBUS_LAUNCHD_SESSION_BUS_SOCKET</string>
</dict>
</dict>
</dict>
</plist>]]></text>
<ruleList>
<platformTest>
<type>osx</type>
</platformTest>
</ruleList>
</writeFile>
<runProgram>
<program>launchctl</program>
<programArguments>load -w ${user_home_directory}/Library/LaunchAgents/org.freedesktop.dbus-session.plist</programArguments>
<workingDirectory>${installdir}</workingDirectory>
<ruleList>
<platformTest>
<type>osx</type>
</platformTest>
</ruleList>
</runProgram>
</postInstallationActionList>
<preUninstallationActionList>
<deleteFile>
<path>${installdir}/update.ini</path>
</deleteFile>
</preUninstallationActionList>
<allowComponentSelection>1</allowComponentSelection>
<compressionAlgorithm>lzma</compressionAlgorithm>
<!-- Generate a DMG for OSX Installer -->
<createOsxBundleDmg>1</createOsxBundleDmg>
<!-- <allowedLanguages>en fr es it de ja nl ru zh_CN no pt_BR</allowedLanguages> -->
<enableRollback>0</enableRollback>
<enableTimestamp>1</enableTimestamp>
<!-- <osxApplicationBundleIcon>TODO</osxApplicationBundleIcon>
<wmImage>TODO</wmImage> -->
<osxApplicationBundleIdentifier>org.swift-project.macinstaller</osxApplicationBundleIdentifier>
<outputDirectory>.</outputDirectory>
<productDisplayIcon>../images/icon.ico</productDisplayIcon>
<saveRelativePaths>1</saveRelativePaths>
<vendor>swift Project</vendor>
<windowsExecutableIcon>../images/icon.ico</windowsExecutableIcon>
<!-- <windowsResourceOriginalFilename>TODO</windowsResourceOriginalFilename>
<windowsResourceFileDescription>TODO</windowsResourceFileDescription>
Code signing parameters -->
<windowsSigningTimestampServer>http://timestamp.digicert.com</windowsSigningTimestampServer>
<customLanguageFileList>
<!-- <language>
<code>en</code>
<encoding>utf-8</encoding>
<file>${build_project_directory}/lang/alf-en.po</file>
</language> -->
</customLanguageFileList>
<finalPageActionList>
<runProgram>
<program>${installdir}/bin/swiftlauncher</program>
<programArguments>-i --bootstrapurl https://datastore.swift-project.org/shared/ &amp;</programArguments>
<progressText>Run swift launcher wizard</progressText>
<ruleList>
<platformTest>
<negate>1</negate>
<type>osx</type>
</platformTest>
</ruleList>
</runProgram>
<runProgram>
<program>${Installdir}/bin/swiftlauncher.app/Contents/MacOS/swiftlauncher</program>
<programArguments>-i --bootstrapurl https://datastore.swift-project.org/shared/ &amp;</programArguments>
<progressText>Run swift launcher wizard</progressText>
<ruleList>
<platformTest>
<type>osx</type>
</platformTest>
</ruleList>
</runProgram>
<launchBrowser>
<url>http://www.swift-project.org</url>
<progressText>Visit the swift project page</progressText>
</launchBrowser>
</finalPageActionList>
<licenseFileList>
<licenseFile>
<code>en</code>
<encoding>utf-8</encoding>
<file>../../dist/bin/LICENSE</file>
</licenseFile>
</licenseFileList>
<parameterList>
<directoryParameter>
<name>installdir</name>
<description>Installer.Parameter.installdir.description</description>
<explanation>Installer.Parameter.installdir.explanation</explanation>
<value></value>
<default>${platform_install_prefix}/${product_shortname}-${product_version}</default>
<allowEmptyValue>0</allowEmptyValue>
<cliOptionName>prefix</cliOptionName>
<mustBeWritable>1</mustBeWritable>
<mustExist>0</mustExist>
<width>30</width>
</directoryParameter>
</parameterList>
<platformOptionsList>
<platformOptions>
<height>430</height>
<platform>osx</platform>
</platformOptions>
<platformOptions>
<height>430</height>
<platform>linux</platform>
</platformOptions>
<platformOptions>
<height>430</height>
<platform>linux-x64</platform>
</platformOptions>
<platformOptions>
<height>430</height>
<platform>linux-ia64</platform>
</platformOptions>
</platformOptionsList>
</project>