Files
pilotclient/installer/installbuilder/project.xml
Roland Rossgotterer 7a8ae85b5a Do not require root privileges when installing on MacOS
Requiring general root privileges raised some trust concerns by MacOS users. This reverts the latest changes to require root to install DBus machine-id into /etc. Now the user has to do that manually via sudo. A check will be added before running into an assert.
2018-12-11 17:42:54 +01:00

376 lines
14 KiB
XML

<project>
<shortName>swift</shortName>
<fullName>swift</fullName>
<version></version>
<!-- <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>
<wmImage>../images/logo.png</wmImage>
<componentList>
<include>
<file>swift.xml</file>
</include>
<include>
<file>qt5-binaries.xml</file>
</include>
<include>
<file>vcredist-x86.xml</file>
</include>
<include>
<file>vcredist-x64.xml</file>
</include>
</componentList>
<preInstallationActionList>
<actionGroup>
<explanation>Check that no swift applications running</explanation>
<actionList>
<showWarning>
<ruleEvaluationLogic>or</ruleEvaluationLogic>
<text>It seems that some swift application is still in use, please close
it and relaunch the installer.</text>
</showWarning>
<exit>
<exitCode>1</exitCode>
</exit>
</actionList>
<ruleList>
<ruleGroup>
<ruleList>
<ruleGroup>
<ruleEvaluationLogic>or</ruleEvaluationLogic>
<ruleList>
<processTest>
<logic>is_running</logic>
<name>swiftcore.exe</name>
</processTest>
<processTest>
<logic>is_running</logic>
<name>swiftguistd.exe</name>
</processTest>
<processTest>
<logic>is_running</logic>
<name>swiftlauncher.exe</name>
</processTest>
<processTest>
<logic>is_running</logic>
<name>swiftdata.exe</name>
</processTest>
</ruleList>
</ruleGroup>
<platformTest>
<type>windows</type>
</platformTest>
</ruleList>
</ruleGroup>
</ruleList>
</actionGroup>
<!-- TODO Linux/MacOS: Save and load last install dir -->
<setInstallerVariable>
<name>installBaseDir</name>
<value>${platform_install_prefix}</value>
</setInstallerVariable>
<actionGroup>
<actionList>
<readFile>
<name>installBaseDir</name>
<path>${windows_folder_local_appdata}/org.swift-project/lastinstallpath.txt</path>
</readFile>
<setInstallerVariableFromRegEx>
<name>installBaseDir</name>
<pattern>^(.*)[\\\/](.*?)$</pattern>
<substitution>\1</substitution>
<text>${installBaseDir}</text>
</setInstallerVariableFromRegEx>
</actionList>
<ruleList>
<platformTest>
<type>windows</type>
</platformTest>
<fileTest>
<condition>readable</condition>
<path>${windows_folder_local_appdata}/org.swift-project/lastinstallpath.txt</path>
</fileTest>
</ruleList>
</actionGroup>
<setInstallerVariable>
<name>installdir</name>
<value>${installBaseDir}/${project.shortName}-${project.version}-${architecture}bit</value>
<ruleList>
<platformTest>
<type>windows</type>
</platformTest>
</ruleList>
</setInstallerVariable>
</preInstallationActionList>
<postInstallationActionList>
<runProgram>
<program>${installdir}/bin/dbus-uuidgen</program>
<programArguments>--ensure=${installdir}/share/dbus-1/machine-id</programArguments>
<ruleList>
<platformTest>
<type>osx</type>
</platformTest>
</ruleList>
</runProgram>
<createDirectory>
<path>{user_home_directory}/Library/LaunchAgents</path>
<ruleList>
<platformTest>
<type>osx</type>
</platformTest>
</ruleList>
</createDirectory>
<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>
<ruleList>
<platformTest>
<type>osx</type>
</platformTest>
</ruleList>
</runProgram>
<createDirectory>
<path>${windows_folder_local_appdata}/org.swift-project</path>
<ruleList>
<platformTest>
<type>windows</type>
</platformTest>
</ruleList>
</createDirectory>
<writeFile>
<path>${windows_folder_local_appdata}/org.swift-project/lastinstallpath.txt</path>
<text>${installdir}</text>
<ruleList>
<platformTest>
<type>windows</type>
</platformTest>
</ruleList>
</writeFile>
</postInstallationActionList>
<preUninstallationActionList>
<actionGroup>
<explanation>Check that no swift applications running</explanation>
<actionList>
<showWarning>
<ruleEvaluationLogic>or</ruleEvaluationLogic>
<text>It seems that some swift application is still in use, please close
it and relaunch the uninstaller.</text>
</showWarning>
<exit>
<exitCode>1</exitCode>
</exit>
</actionList>
<ruleList>
<ruleGroup>
<ruleList>
<ruleGroup>
<ruleEvaluationLogic>or</ruleEvaluationLogic>
<ruleList>
<processTest>
<logic>is_running</logic>
<name>swiftcore.exe</name>
</processTest>
<processTest>
<logic>is_running</logic>
<name>swiftguistd.exe</name>
</processTest>
<processTest>
<logic>is_running</logic>
<name>swiftlauncher.exe</name>
</processTest>
<processTest>
<logic>is_running</logic>
<name>swiftdata.exe</name>
</processTest>
</ruleList>
</ruleGroup>
<platformTest>
<type>windows</type>
</platformTest>
</ruleList>
</ruleGroup>
</ruleList>
</actionGroup>
<runProgram>
<program>launchctl</program>
<programArguments>remove org.freedesktop.dbus-session.plist</programArguments>
<runAs>${env(USER)}</runAs>
<ruleList>
<platformTest>
<type>osx</type>
</platformTest>
</ruleList>
</runProgram>
<deleteFile>
<path>${user_home_directory}/Library/LaunchAgents/org.freedesktop.dbus-session.plist</path>
<ruleList>
<platformTest>
<type>osx</type>
</platformTest>
</ruleList>
</deleteFile>
<deleteFile>
<path>${installdir}/share/dbus-1/machine-id</path>
<ruleList>
<platformTest>
<type>osx</type>
</platformTest>
</ruleList>
</deleteFile>
<kill>
<name>dbus-daemon.exe</name>
<ruleList>
<platformTest>
<type>windows</type>
</platformTest>
</ruleList>
</kill>
</preUninstallationActionList>
<allowComponentSelection>1</allowComponentSelection>
<compressionAlgorithm>lzma</compressionAlgorithm>
<!-- Generate a DMG for MacOS 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>../images/swiftinstaller.icns</osxApplicationBundleIcon>
<osxApplicationBundleIdentifier>org.swift-project.macinstaller</osxApplicationBundleIdentifier>
<!-- Create 64bit installers -->
<osxPlatforms>osx-x86_64</osxPlatforms>
<osxUninstallerApplicationBundleIcon>../images/swiftinstaller.icns</osxUninstallerApplicationBundleIcon>
<outputDirectory>.</outputDirectory>
<productDisplayIcon>${installdir}/share/icons/swiftinstaller.ico</productDisplayIcon>
<productDisplayName>${product_fullname} ${project.version} ${architecture}bit</productDisplayName>
<requestedExecutionLevel>highestAvailable</requestedExecutionLevel>
<saveRelativePaths>1</saveRelativePaths>
<startMenuGroupName>swift ${project.version} ${architecture}bit</startMenuGroupName>
<vendor>swift Project</vendor>
<windowsExecutableIcon>../images/swiftinstaller.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>open</program>
<programArguments>${Installdir}/bin/swiftlauncher.app --args -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}/${project.shortName}-${project.version}-${architecture}bit</default>
<allowEmptyValue>0</allowEmptyValue>
<cliOptionName>prefix</cliOptionName>
<mustBeWritable>yes</mustBeWritable>
<mustExist>0</mustExist>
<width>40</width>
</directoryParameter>
<stringParameter name="architecture" value="64" ask="0">
<description></description>
<explanation></explanation>
<default></default>
<allowEmptyValue>1</allowEmptyValue>
<width>40</width>
</stringParameter>
</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>