You've already forked linux-packaging-mono
Imported Upstream version 5.14.0.78
Former-commit-id: 3494343bcc9ddb42b36b82dd9ae7b69e85e0229f
This commit is contained in:
parent
74b74abd9f
commit
19234507ba
@ -48,8 +48,19 @@ class MakeBundle {
|
||||
static bool keeptemp = false;
|
||||
static bool compile_only = false;
|
||||
static bool static_link = false;
|
||||
static string config_file = null;
|
||||
|
||||
// Points to the $sysconfig/mono/4.5/machine.config, which contains System.Configuration settings
|
||||
static string machine_config_file = null;
|
||||
|
||||
// By default, we automatically bundle a machine-config, use this to turn off the behavior.
|
||||
static bool no_machine_config = false;
|
||||
|
||||
// Points to the $sysconfig/mono/config file, contains <dllmap> and others
|
||||
static string config_file = null;
|
||||
|
||||
// By default, we automatically bundle the above config file, use this to turn off the behavior.
|
||||
static bool no_config = false;
|
||||
|
||||
static string config_dir = null;
|
||||
static string style = "linux";
|
||||
static bool bundled_header = false;
|
||||
@ -65,7 +76,7 @@ class MakeBundle {
|
||||
static string fetch_target = null;
|
||||
static bool custom_mode = true;
|
||||
static string embedded_options = null;
|
||||
|
||||
|
||||
static string runtime = null;
|
||||
|
||||
static bool aot_compile = false;
|
||||
@ -148,7 +159,7 @@ class MakeBundle {
|
||||
return 1;
|
||||
}
|
||||
if (sdk_path != null || runtime != null)
|
||||
Error ("You can only specify one of --runtime, --sdk or --cross");
|
||||
Error ("You can only specify one of --runtime, --sdk or --cross {sdk_path}/{runtime}");
|
||||
custom_mode = false;
|
||||
autodeps = true;
|
||||
cross_target = args [++i];
|
||||
@ -289,6 +300,12 @@ class MakeBundle {
|
||||
if (!quiet)
|
||||
Console.WriteLine ("WARNING:\n Check that the machine.config file you are bundling\n doesn't contain sensitive information specific to this machine.");
|
||||
break;
|
||||
case "--no-machine-config":
|
||||
no_machine_config = true;
|
||||
break;
|
||||
case "--no-config":
|
||||
no_config = true;
|
||||
break;
|
||||
case "--config-dir":
|
||||
if (i+1 == top) {
|
||||
Help ();
|
||||
@ -523,6 +540,18 @@ class MakeBundle {
|
||||
if (!Directory.Exists (lib_path))
|
||||
Error ($"The SDK location does not contain a {path}/lib/mono/4.5 directory");
|
||||
link_paths.Add (lib_path);
|
||||
if (machine_config_file == null && !no_machine_config) {
|
||||
machine_config_file = Path.Combine (path, "etc", "mono", "4.5", "machine.config");
|
||||
if (!File.Exists (machine_config_file)){
|
||||
Error ($"Could not locate the file machine.config file at ${machine_config_file} use --machine-config FILE or --no-machine-config");
|
||||
}
|
||||
}
|
||||
if (config_file == null && !no_config) {
|
||||
config_file = Path.Combine (path, "etc", "mono", "config");
|
||||
if (!File.Exists (config_file)){
|
||||
Error ($"Could not locate the file config file at ${config_file} use --config FILE or --no-config");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
static string targets_dir = Path.Combine (Environment.GetFolderPath (Environment.SpecialFolder.Personal), ".mono", "targets");
|
||||
@ -2463,7 +2492,15 @@ void mono_register_config_for_assembly (const char* assembly_name, cons
|
||||
static bool Target64BitApplication ()
|
||||
{
|
||||
// Should probably handled the --cross and sdk parameters.
|
||||
return Environment.Is64BitProcess;
|
||||
string targetArchitecture = GetEnv ("VSCMD_ARG_TGT_ARCH", "");
|
||||
if (targetArchitecture.Length != 0) {
|
||||
if (string.Compare (targetArchitecture, "x64", StringComparison.OrdinalIgnoreCase) == 0)
|
||||
return true;
|
||||
else
|
||||
return false;
|
||||
} else {
|
||||
return Environment.Is64BitProcess;
|
||||
}
|
||||
}
|
||||
|
||||
static string GetMonoDir ()
|
||||
@ -2560,6 +2597,13 @@ void mono_register_config_for_assembly (const char* assembly_name, cons
|
||||
linkerArgs.Add ("oldnames.lib");
|
||||
}
|
||||
|
||||
if (MakeBundle.compress) {
|
||||
if (staticLinkMono)
|
||||
linkerArgs.Add("zlibstatic.lib");
|
||||
else
|
||||
linkerArgs.Add("zlib.lib");
|
||||
}
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user