Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mono/monodevelop.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlan McGovern <alan@xamarin.com>2015-09-14 12:55:15 +0300
committerAlan McGovern <alan@xamarin.com>2015-09-14 12:56:12 +0300
commit35972686810db003313f9b608c9b40b93d7b54ec (patch)
treecade0b1c0e90033c6f0f45ec0ce083cdc2c1fec4 /dependency_checker.rb
parent9d9ce67be6971964db75d2a050daaba9a01481c3 (diff)
[build] Print out the urls for our dependencies
Diffstat (limited to 'dependency_checker.rb')
-rw-r--r--dependency_checker.rb54
1 files changed, 28 insertions, 26 deletions
diff --git a/dependency_checker.rb b/dependency_checker.rb
index e36113f4fb..e56fa614e2 100644
--- a/dependency_checker.rb
+++ b/dependency_checker.rb
@@ -1,10 +1,12 @@
require 'pp'
-REQUIRED_XAMARIN_MAC_VERSION="2.0"
-XAMARIN_MAC_VERSION_FILE="/Library/Frameworks/Xamarin.Mac.framework/Versions/Current/Version"
+XAMARIN_MAC_MIN_VERSION="2.3"
+XAMARIN_MAC_VERSION=lambda { product_version ("/Library/Frameworks/Xamarin.Mac.framework/Versions/Current/bin/mmp") }
+XAMARIN_MAC_URL="http://storage.bos.internalx.com/macios-mac-cycle6/1e/1e6896dd96bc9387725b4332175baace1bef8186/xamarin.mac-2.3.0.135.pkg"
-REQUIRED_MONO_VERSION="4.0"
-MONO_BINARY="/Library/Frameworks/Mono.Framework/Versions/Current/bin/mono"
+MONO_MIN_VERSION="4.2"
+MONO_VERSION=lambda { mono_version("/Library/Frameworks/Mono.framework/Versions/Current/bin/mono") }
+MONO_URL="http://storage.bos.internalx.com/mono-mac-4.2.0-branch/27/2701b194139f851f54660bd66c97074b041427fd/MonoFramework-MDK-4.2.0.207.macos10.xamarin.x86.pkg"
class String
def red; "\e[31m#{self}\e[0m" end
@@ -17,39 +19,39 @@ def compare_version(first, second)
return val1 <=> val2
end
-def check_product(required_version, version_file, product_name)
- actual_version = File.read(version_file).strip
- retval = compare_version(actual_version, required_version)
- if (retval < 0)
- puts "Your installed #{product_name} (#{actual_version}) is too old, please use #{required_version} or newer".red
- end
- return retval
-end
-
-def check_mono(required_version, mono_binary)
- actual_version = `#{mono_binary} --version`
+def mono_version(binary)
+ actual_version = `#{binary} --version`
# Extract the version number from a string like this:
# `Mono JIT compiler version 4.2.0 (explicit/08b7103 Mon Aug 17 16:58:52 EDT 2015)`
actual_version = actual_version.split('version ')[1]
- actual_version = actual_version.split(' ')[0]
- retval = compare_version(actual_version, required_version)
+ return actual_version.split(' ')[0]
+end
+
+def product_version(binary)
+ version = `#{binary} --version`
+ return version.split(' ')[1]
+end
+
+def check_product(product_min_version, product_version, product_url, product_name)
+ actual_version = product_version.call
+ retval = compare_version(actual_version, product_min_version)
if (retval < 0)
- puts "Your installed mono (#{actual_version}) is too old, please use #{required_version} or newer".red
+ puts ""
+ puts "Your installed #{product_name} (#{actual_version}) is too old, please use #{product_min_version} or newer".red
+ puts "You can download it from #{product_url}".red
end
return retval
end
def check_monodevelop_dependencies()
- mono_ret = check_mono(REQUIRED_MONO_VERSION, MONO_BINARY)
- xammac_ret = check_product(REQUIRED_XAMARIN_MAC_VERSION, XAMARIN_MAC_VERSION_FILE, "Xamarin.Mac")
- if (xammac_ret < 0 || mono_ret < 0)
+ result = [
+ check_product(MONO_MIN_VERSION, MONO_VERSION, MONO_URL, "Mono"),
+ check_product(XAMARIN_MAC_MIN_VERSION, XAMARIN_MAC_VERSION, XAMARIN_MAC_URL, "Xamarin.Mac")
+ ]
+ if (result.min < 0)
raise RuntimeError
end
end
-def run()
- check_monodevelop_dependencies()
-end
-
$stdout.sync = true
-run() if __FILE__==$0
+check_monodevelop_dependencies() if __FILE__==$0 \ No newline at end of file