|
| 1 | +<?xml version="1.0" encoding="utf-8"?> |
| 2 | +<installer-gui-script minSpecVersion="1"> |
| 3 | + <title>MariaDB Server</title> |
| 4 | + <background file="MariaDB_background.png" mime-type="image/png" /> |
| 5 | + <allowed-os-versions> |
| 6 | + <os-version min="10.11.0"/> |
| 7 | + </allowed-os-versions> |
| 8 | + <domains enable_anywhere="false" enable_currentUserHome="false" enable_localSystem="true"/> |
| 9 | + <installation-check script="InstallationCheck()"/> |
| 10 | + <script> |
| 11 | +function InstallationCheck(prefix) { |
| 12 | + if (system.compareVersions(system.version.ProductVersion, '10.11.0') < 0) { |
| 13 | + my.result.message = 'Sorry, macOS Sierra (10.11) or higher is required to install this MariaDB Server package. Consider installing from Homebrew instead on earlier versions of OS X.'; |
| 14 | + my.result.type = 'Fatal'; |
| 15 | + return false; |
| 16 | + } |
| 17 | + var existing = system.run('check_for_existing_installation'); |
| 18 | + if (existing > 0) { |
| 19 | + // _err_existing_process=2 |
| 20 | + // _err_existing_tcp=4 |
| 21 | + // _err_existing_socket=8 |
| 22 | + // _err_existing_install=16 |
| 23 | + my.result.message = "Installation of MariaDB Server may interfere with, or be affected by, your existing installation. Proceed with caution."; |
| 24 | + my.result.type = 'Warning'; |
| 25 | + if (existing & 16) { my.result.message += "\n\n• There is an existing install of MariaDB Server running from /usr/local/mariadb/server. This instance will be stopped before installation proceeds." } |
| 26 | + if (existing & 2) { my.result.message += "\n\n• There is a mariadbd or mysqld process already running on this computer." } |
| 27 | + if (existing & 4) { my.result.message += "\n\n• There is a server already listening on TCP port 3306. This MariaDB Server installation will be started with networking disabled unless an existing MariaDB Server installation, stopped during the install process, is bound to that port." } |
| 28 | + if (existing & 8) { my.result.message += "\n\n• There is an existing socket file at /tmp/mysql.sock." } |
| 29 | + return false |
| 30 | + } |
| 31 | + return true; |
| 32 | +} |
| 33 | + </script> |
| 34 | + <welcome file="welcome.html" mime-type="text/html" /> |
| 35 | + <license file="license.html" mime-type="text/html" /> |
| 36 | + <conclusion file="conclusion.html" mime-type="text/html"/> |
| 37 | + <options customize="allow" require-scripts="false" allow-external-scripts="yes"/> |
| 38 | + <choices-outline> |
| 39 | + <line choice="com.mariadb.mariadb-server-files"/> |
| 40 | + <line choice="com.mariadb.mariadb-server-launchd"/> |
| 41 | + </choices-outline> |
| 42 | + <choice id="default"/> |
| 43 | + <choice id="com.mariadb.mariadb-server-files" visible="true" enabled="true" title="MariaDB Server" description="MariaDB Server and standard tools."> |
| 44 | + <pkg-ref id="com.mariadb.mariadb-server-files"/> |
| 45 | + </choice> |
| 46 | + <choice id="com.mariadb.mariadb-server-launchd" visible="true" enabled="true" title="launchd support" description="Automatically start MariaDB Server using launchd."> |
| 47 | + <pkg-ref id="com.mariadb.mariadb-server-launchd"/> |
| 48 | + </choice> |
| 49 | + <pkg-ref id="com.mariadb.mariadb-server-files" onConclusion="none">#mariadb-server-files.pkg</pkg-ref> |
| 50 | + <pkg-ref id="com.mariadb.mariadb-server-launchd" onConclusion="none">#mariadb-server-launchd.pkg</pkg-ref> |
| 51 | +</installer-gui-script> |
0 commit comments