return 1;
}
if (sdk_path != null || runtime != null)
- Error ("You can not specify one of --runtime, --sdk or --cross");
+ Error ("You can only specify one of --runtime, --sdk or --cross");
custom_mode = false;
autodeps = true;
cross_target = args [++i];
autodeps = true;
sdk_path = args [++i];
if (cross_target != null || runtime != null)
- Error ("You can not specify one of --runtime, --sdk or --cross");
+ Error ("You can only specify one of --runtime, --sdk or --cross");
break;
case "--runtime":
if (i+1 == top){
return false;
}
maker.Add (code, file);
+ // add a space after code (="systemconfig:" or "machineconfig:")
+ Console.WriteLine (code + " " + file);
return true;
}
Console.WriteLine (" Assembly: " + fname);
if (File.Exists (fname + ".config")){
maker.Add ("config:" + aname, fname + ".config");
- Console.WriteLine (" Config: " + runtime);
+ Console.WriteLine (" Config: " + fname + ".config");
}
}
if (!MaybeAddFile (maker, "systemconfig:", config_file) || !MaybeAddFile (maker, "machineconfig:", machine_config_file))
return false;
- if (config_dir != null)
+ if (config_dir != null){
maker.Add ("config_dir:", config_dir);
+ Console.WriteLine (" Config_dir: " + config_dir );
+ }
if (embedded_options != null)
maker.AddString ("options:", embedded_options);
if (environment.Count > 0){
else
{
string zlib = (compress ? "-lz" : "");
+ string objc = (style == "osx" ? "-framework CoreFoundation -lobjc" : "");
string debugging = "-g";
string cc = GetEnv("CC", "cc");
string cmd = null;
smonolib = "`pkg-config --variable=libdir mono-2`/libmono-2.0.a ";
else
smonolib = "-Wl,-Bstatic -lmono-2.0 -Wl,-Bdynamic ";
- cmd = String.Format("{4} -o '{2}' -Wall `pkg-config --cflags mono-2` {0} {3} " +
+ cmd = String.Format("{4} -o '{2}' -Wall {5} `pkg-config --cflags mono-2` {0} {3} " +
"`pkg-config --libs-only-L mono-2` " + smonolib +
"`pkg-config --libs-only-l mono-2 | sed -e \"s/\\-lmono-2.0 //\"` {1}",
- temp_c, temp_o, output, zlib, cc);
+ temp_c, temp_o, output, zlib, cc, objc);
}
else
{
- cmd = String.Format("{4} " + debugging + " -o '{2}' -Wall {0} `pkg-config --cflags --libs mono-2` {3} {1}",
- temp_c, temp_o, output, zlib, cc);
+ cmd = String.Format("{4} " + debugging + " -o '{2}' -Wall {5} {0} `pkg-config --cflags --libs mono-2` {3} {1}",
+ temp_c, temp_o, output, zlib, cc, objc);
}
Execute (cmd);
}
static readonly Universe universe = new Universe ();
static readonly Dictionary<string, string> loaded_assemblies = new Dictionary<string, string> ();
- static readonly string resourcePathSeparator = (Path.DirectorySeparatorChar == '\\') ? $"\\{Path.DirectorySeparatorChar}" : $"{Path.DirectorySeparatorChar}";
public static string GetAssemblyName (string path)
{
+ string resourcePathSeparator = style == "windows" ? "\\\\" : "/";
string name = Path.GetFileName (path);
// A bit of a hack to support satellite assemblies. They all share the same name but
return true;
try {
Assembly a = universe.LoadFile (path);
+ if (a == null) {
+ Error ("Unable to to load assembly `{0}'", path);
+ return false;
+ }
foreach (AssemblyName an in a.GetReferencedAssemblies ()) {
a = LoadAssembly (an.Name);
+ if (a == null) {
+ Error ("Unable to load assembly `{0}' referenced by `{1}'", an.Name, path);
+ return false;
+ }
+
if (!QueueAssembly (files, a.CodeBase))
return false;
}