public static String GetPath(MacOSVersion version) { // Set the base path String basedir = "/Library/Frameworks/Mono.framework/Libraries/mono"; IDictionary<MacOSVersion, String> map = new Dictionary<MacOSVersion, String> () { { MacOSVersion.MacOS105, "monobjc-10.5" }, { MacOSVersion.MacOS106, "monobjc-10.6" }, { MacOSVersion.MacOS107, "monobjc-10.7" }, { MacOSVersion.MacOS108, "monobjc-10.8" }, { MacOSVersion.MacOS109, "monobjc-10.9" }, { MacOSVersion.MacOS1010, "monobjc-10.10" }, }; String result = null; foreach(var slot in map) { String dir = Path.Combine (basedir, slot.Value); if (!Directory.Exists (dir)) { continue; } result = dir; if (version <= slot.Key) { break; } } if (!String.IsNullOrEmpty(result)) { return result; } // TODO: I18N throw new NotSupportedException ("Unsupported version of Mac OS X"); }
public static void CopyFile(MacOSVersion version, String name, String destination, String permissions) { // Copy the file String file = GetPath (version, name); File.Copy (file, destination, true); if (!String.IsNullOrEmpty (permissions)) { // Apply permissions Chmod.ApplyTo ("a+x", destination); } }
public static void CopyFile(MacOSVersion version, String name, String destination, String permissions) { // Copy the file String file = GetPath(version, name); File.Copy(file, destination, true); if (!String.IsNullOrEmpty(permissions)) { // Apply permissions Chmod.ApplyTo("a+x", destination); } }
public static String GetPath(MacOSVersion version) { // Set the base path String basedir = "/Library/Frameworks/Mono.framework/Libraries/mono"; IDictionary <MacOSVersion, String> map = new Dictionary <MacOSVersion, String> () { { MacOSVersion.MacOS105, "monobjc-10.5" }, { MacOSVersion.MacOS106, "monobjc-10.6" }, { MacOSVersion.MacOS107, "monobjc-10.7" }, { MacOSVersion.MacOS108, "monobjc-10.8" }, { MacOSVersion.MacOS109, "monobjc-10.9" }, { MacOSVersion.MacOS1010, "monobjc-10.10" }, }; String result = null; foreach (var slot in map) { String dir = Path.Combine(basedir, slot.Value); if (!Directory.Exists(dir)) { continue; } result = dir; if (version <= slot.Key) { break; } } if (!String.IsNullOrEmpty(result)) { return(result); } // TODO: I18N throw new NotSupportedException("Unsupported version of Mac OS X"); }
public static void CopyFile(MacOSVersion version, String name, String destination) { CopyFile(version, name, destination, null); }
public static String GetPath(MacOSVersion version, String name) { return(Path.Combine(GetPath(version), name)); }
/// <summary> /// Initializes a new instance of the <see cref="Monobjc.MSBuild.Tasks.EmbedApplication"/> class. /// </summary> public EmbedApplication() { this.targetOSVersion = MacOSVersion.MacOS105; this.targetArchitecture = MacOSArchitecture.X86; }
/// <summary> /// Initializes a new instance of the <see cref="Monobjc.MSBuild.Tasks.CopyRuntime"/> class. /// </summary> public CopyRuntime() { this.targetOSVersion = MacOSVersion.MacOS106; }
public NativeContext(MacOSVersion version, MacOSArchitecture architecture) { this.version = version; this.architecture = architecture; }
public static String GetPath(MacOSVersion version, String name) { return Path.Combine (GetPath (version), name); }
public static void CopyFile(MacOSVersion version, String name, String destination) { CopyFile (version, name, destination, null); }
/// <summary> /// Initializes a new instance of the <see cref="GenerateInfoPListTask"/> class. /// </summary> public GenerateInfoPList() { this.generator = new InfoPListGenerator(); this.minRequiredOSVersion = MacOSVersion.MacOS106; this.DevelopmentRegion = "en"; }
public void WriteRuntime(MacOSVersion version) { FileProvider.CopyFile(version, "runtime", this.Runtime, "a+x"); }