[corlib] Add partial EncodingHelper type to let XI define its own default encoding...
[mono.git] / mcs / tools / macpack / MacPack.cs
index 1c56a81b074fd4e76f7752aa506484cc5c7eeb11..405fac4d7c267de25d01045310eff036a0451fbe 100644 (file)
@@ -132,7 +132,14 @@ namespace Mac {
                        data = Encoding.ASCII.GetBytes (script);
                        writer.Write (data, 0, data.Length);
                        writer.Close ();
-                       chmod (Path.Combine (opts.output, String.Format ("{0}.app/Contents/MacOS/{0}", opts.appname)), Convert.ToUInt32 ("755", 8));
+                       try {
+                               chmod (Path.Combine (opts.output,
+                                                    String.Format ("{0}.app/Contents/MacOS/{0}", opts.appname)),
+                                      Convert.ToUInt32 ("755", 8));
+                       } catch {
+                               Console.WriteLine ("WARNING: It was not possible to set the executable permissions on\n" +
+                                                  "the file {0}.app/Contents/MacOS/{0}, the bundle might not work", opts.appname);
+                       }
 
                        s = Assembly.GetEntryAssembly ().GetManifestResourceStream ("PLIST");
                        reader = new BinaryReader (s);