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