This commit is contained in:
parent
e41632fe95
commit
9c5abc3b0d
48 changed files with 261 additions and 70 deletions
|
|
@ -51,6 +51,7 @@ namespace Server
|
|||
private static bool m_Debug;
|
||||
private static bool m_Cache = true;
|
||||
private static bool m_HaltOnWarning;
|
||||
private static bool m_VBdotNET;
|
||||
private static MultiTextWriter m_MultiConOut;
|
||||
|
||||
private static bool m_Profiling;
|
||||
|
|
@ -98,6 +99,7 @@ namespace Server
|
|||
public static bool Service { get { return m_Service; } }
|
||||
public static bool Debug { get { return m_Debug; } }
|
||||
internal static bool HaltOnWarning { get { return m_HaltOnWarning; } }
|
||||
internal static bool VBdotNet { get { return m_VBdotNET; } }
|
||||
public static List<string> DataDirectories { get { return m_DataDirectories; } }
|
||||
public static Assembly Assembly { get { return m_Assembly; } set { m_Assembly = value; } }
|
||||
public static Process Process { get { return m_Process; } }
|
||||
|
|
@ -363,17 +365,18 @@ namespace Server
|
|||
|
||||
for( int i = 0; i < args.Length; ++i )
|
||||
{
|
||||
if( Insensitive.Equals( args[i], "-debug" ) )
|
||||
if ( Insensitive.Equals( args[i], "-debug" ) )
|
||||
m_Debug = true;
|
||||
else if( Insensitive.Equals( args[i], "-service" ) )
|
||||
else if ( Insensitive.Equals( args[i], "-service" ) )
|
||||
m_Service = true;
|
||||
else if( Insensitive.Equals( args[i], "-profile" ) )
|
||||
else if ( Insensitive.Equals( args[i], "-profile" ) )
|
||||
Profiling = true;
|
||||
else if( Insensitive.Equals( args[i], "-nocache" ) )
|
||||
else if ( Insensitive.Equals( args[i], "-nocache" ) )
|
||||
m_Cache = false;
|
||||
else if( Insensitive.Equals( args[i], "-haltonwarning" ) )
|
||||
else if ( Insensitive.Equals( args[i], "-haltonwarning" ) )
|
||||
m_HaltOnWarning = true;
|
||||
|
||||
else if ( Insensitive.Equals( args[i], "-vb" ) )
|
||||
m_VBdotNET = true;
|
||||
}
|
||||
|
||||
try
|
||||
|
|
@ -518,6 +521,9 @@ namespace Server
|
|||
if( m_HaltOnWarning )
|
||||
Utility.Separate( sb, "-haltonwarning", " " );
|
||||
|
||||
if ( m_VBdotNET )
|
||||
Utility.Separate( sb, "-vb", " " );
|
||||
|
||||
return sb.ToString();
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -91,6 +91,10 @@ namespace Server
|
|||
|
||||
AppendDefine( ref sb, "/d:Framework_2_0" );
|
||||
|
||||
#if Framework_3_5
|
||||
AppendDefine( ref sb, "/d:Framework_3_5" );
|
||||
#endif
|
||||
|
||||
return (sb == null ? null : sb.ToString());
|
||||
}
|
||||
|
||||
|
|
@ -207,7 +211,11 @@ namespace Server
|
|||
|
||||
DeleteFiles( "Scripts.CS*.dll" );
|
||||
|
||||
using( CSharpCodeProvider provider = new CSharpCodeProvider() )
|
||||
#if Framework_3_5
|
||||
using ( CSharpCodeProvider provider = new CSharpCodeProvider( new Dictionary<string, string>() { { "CompilerVersion", "v3.5" } } ) )
|
||||
#else
|
||||
using ( CSharpCodeProvider provider = new CSharpCodeProvider() )
|
||||
#endif
|
||||
{
|
||||
string path = GetUnusedPath( "Scripts.CS" );
|
||||
|
||||
|
|
@ -346,8 +354,11 @@ namespace Server
|
|||
}
|
||||
|
||||
DeleteFiles( "Scripts.VB*.dll" );
|
||||
|
||||
using( VBCodeProvider provider = new VBCodeProvider() )
|
||||
#if Framework_3_5
|
||||
using ( VBCodeProvider provider = new VBCodeProvider( new Dictionary<string, string>() { { "CompilerVersion", "v3.5" } } ) )
|
||||
#else
|
||||
using ( VBCodeProvider provider = new VBCodeProvider() )
|
||||
#endif
|
||||
{
|
||||
string path = GetUnusedPath( "Scripts.VB" );
|
||||
|
||||
|
|
@ -560,16 +571,23 @@ namespace Server
|
|||
return false;
|
||||
}
|
||||
|
||||
if( CompileVBScripts( debug, cache, out assembly ) )
|
||||
if ( Core.VBdotNet )
|
||||
{
|
||||
if( assembly != null )
|
||||
if ( CompileVBScripts( debug, cache, out assembly ) )
|
||||
{
|
||||
assemblies.Add( assembly );
|
||||
if ( assembly != null )
|
||||
{
|
||||
assemblies.Add( assembly );
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
return false;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
return false;
|
||||
Console.WriteLine( "Scripts: Skipping VB.NET Scripts...done (use -vb to enable)");
|
||||
}
|
||||
|
||||
if( assemblies.Count == 0 )
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue