示例#1
0
        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");
        }
示例#2
0
        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);
            }
        }
示例#3
0
        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);
            }
        }
示例#4
0
        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");
        }
示例#5
0
 public static void CopyFile(MacOSVersion version, String name, String destination)
 {
     CopyFile(version, name, destination, null);
 }
示例#6
0
 public static String GetPath(MacOSVersion version, String name)
 {
     return(Path.Combine(GetPath(version), name));
 }
示例#7
0
 /// <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;
 }
示例#8
0
 /// <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;
 }
示例#9
0
 /// <summary>
 /// Initializes a new instance of the <see cref="Monobjc.MSBuild.Tasks.CopyRuntime"/> class.
 /// </summary>
 public CopyRuntime()
 {
     this.targetOSVersion = MacOSVersion.MacOS106;
 }
示例#10
0
 public NativeContext(MacOSVersion version, MacOSArchitecture architecture)
 {
     this.version      = version;
     this.architecture = architecture;
 }
示例#11
0
 public static String GetPath(MacOSVersion version, String name)
 {
     return Path.Combine (GetPath (version), name);
 }
示例#12
0
 public static void CopyFile(MacOSVersion version, String name, String destination)
 {
     CopyFile (version, name, destination, null);
 }
示例#13
0
 /// <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";
 }
示例#14
0
 public void WriteRuntime(MacOSVersion version)
 {
     FileProvider.CopyFile(version, "runtime", this.Runtime, "a+x");
 }
示例#15
0
 /// <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";
 }
示例#16
0
 public NativeContext(MacOSVersion version, MacOSArchitecture architecture)
 {
     this.version = version;
     this.architecture = architecture;
 }
示例#17
0
 /// <summary>
 /// Initializes a new instance of the <see cref="Monobjc.MSBuild.Tasks.CopyRuntime"/> class.
 /// </summary>
 public CopyRuntime()
 {
     this.targetOSVersion = MacOSVersion.MacOS106;
 }
示例#18
0
 public void WriteRuntime(MacOSVersion version)
 {
     FileProvider.CopyFile(version, "runtime", this.Runtime, "a+x");
 }