mirror of
https://onedev.site.tesses.net/crosslang/crosslangextras
synced 2026-02-09 01:25:46 +00:00
Add more to plugin
This commit is contained in:
@@ -3,27 +3,33 @@ func Tesses.CrossLang.Shell.Build(dd)
|
||||
var offline=false;
|
||||
var allowFullCompTime=false;
|
||||
var buildPath = ".";
|
||||
var debug=false;
|
||||
if(dd.Arguments.Count > 1)
|
||||
{
|
||||
buildPath = dd.Arguments[1];
|
||||
}
|
||||
each(var flag : dd.Flags)
|
||||
{
|
||||
if(flag == "offline")
|
||||
if(flag == "debug")
|
||||
{
|
||||
debug = true;
|
||||
}
|
||||
else if(flag == "offline")
|
||||
{
|
||||
offline = true;
|
||||
}
|
||||
if(flag == "allow-insecure-comptime")
|
||||
else if(flag == "allow-insecure-comptime")
|
||||
{
|
||||
allowFullCompTime=true;
|
||||
}
|
||||
if(flag == "help")
|
||||
else if(flag == "help")
|
||||
{
|
||||
Console.WriteLine("USAGE: crosslang build [build-flags-and-options]");
|
||||
Console.WriteLine("FLAGS:");
|
||||
Console.WriteLine("offline: build with no internet (don't fetch files)");
|
||||
Console.WriteLine("help: this help");
|
||||
Console.WriteLine("allow-insecure-comptime: Allow full comptime");
|
||||
Console.WriteLine("debug: emit line info into executable");
|
||||
Console.WriteLine();
|
||||
Console.WriteLine("OPTIONS:");
|
||||
Console.WriteLine("conf=CONFIGSTRING: specify a conf string for compile_tool(s), is the property Config");
|
||||
@@ -42,6 +48,7 @@ func Tesses.CrossLang.Shell.Build(dd)
|
||||
pm.Offline = offline;
|
||||
var bt = new Tesses.CrossLang.BuildTool(pm);
|
||||
bt.Config = conf;
|
||||
bt.Debug = debug;
|
||||
bt.AllowFullCompTime = allowFullCompTime;
|
||||
bt.BuildProject(buildPath);
|
||||
|
||||
|
||||
@@ -61,6 +61,7 @@ func Tesses.CrossLang.Shell.Debug(dd)
|
||||
var pm = new Tesses.CrossLang.PackageManager();
|
||||
pm.Offline = offline;
|
||||
var bt = new Tesses.CrossLang.BuildTool(pm);
|
||||
bt.Debug = true;
|
||||
bt.Config = conf;
|
||||
output = bt.BuildProject(buildPath).Output;
|
||||
}
|
||||
|
||||
@@ -5,9 +5,14 @@ func Tesses.CrossLang.Shell.Run(dd)
|
||||
var nobuild=false;
|
||||
var allowFullCompTime=false;
|
||||
var output="";
|
||||
var debug = false;
|
||||
each(var flag : dd.Flags)
|
||||
{
|
||||
if(flag == "offline")
|
||||
if(flag == "debug")
|
||||
{
|
||||
debug = true;
|
||||
}
|
||||
else if(flag == "offline")
|
||||
{
|
||||
offline = true;
|
||||
}
|
||||
@@ -23,6 +28,7 @@ func Tesses.CrossLang.Shell.Run(dd)
|
||||
Console.WriteLine("offline: build with no internet (don't fetch files)");
|
||||
Console.WriteLine("allow-insecure-comptime: Allow full comptime");
|
||||
Console.WriteLine("nobuild: don't build, just run");
|
||||
Console.WriteLine("debug: emit line info into executable");
|
||||
Console.WriteLine("help: this help");
|
||||
Console.WriteLine();
|
||||
Console.WriteLine("OPTIONS:");
|
||||
@@ -68,6 +74,7 @@ func Tesses.CrossLang.Shell.Run(dd)
|
||||
pm.Offline = offline;
|
||||
var bt = new Tesses.CrossLang.BuildTool(pm);
|
||||
bt.Config = conf;
|
||||
bt.Debug = debug;
|
||||
bt.AllowFullCompTime = allowFullCompTime;
|
||||
output = bt.BuildProject(buildPath).Output;
|
||||
}
|
||||
|
||||
@@ -20,11 +20,14 @@ func Tesses.CrossLang.Shell.WebAppTest(dd)
|
||||
var proj=bt.BuildProject(".");
|
||||
|
||||
var output = proj.Output;
|
||||
|
||||
var env = VM.CreateEnvironment({});
|
||||
const _dict = {};
|
||||
var env = VM.CreateEnvironment(_dict);
|
||||
env.RegisterEverything();
|
||||
env.LockRegister();
|
||||
|
||||
_dict.Net ?? = {};
|
||||
_dict.Net.WebServerPort = port;
|
||||
|
||||
env.LoadFileWithDependencies(FS.Local,output);
|
||||
var myArgs = [output.ToString()];
|
||||
for(var i = 1; i < dd.Arguments.Count; i++)
|
||||
|
||||
@@ -27,13 +27,18 @@ func Tesses.CrossLang.Shell.WebApp(dd)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
if(FS.Local.FileExists(webapppath))
|
||||
{
|
||||
|
||||
var env = VM.CreateEnvironment({});
|
||||
const _dict = {};
|
||||
const env = VM.CreateEnvironment(_dict);
|
||||
env.RegisterEverything();
|
||||
env.LockRegister();
|
||||
|
||||
_dict.Net ?? = {};
|
||||
_dict.Net.WebServerPort = port;
|
||||
|
||||
|
||||
env.LoadFileWithDependencies(FS.Local,webapppath);
|
||||
var myArgs = [webapppath.ToString()];
|
||||
for(var i = 2; i < dd.Arguments.Count; i++)
|
||||
|
||||
Reference in New Issue
Block a user