Skip to content

Commit

Permalink
Support multiple ways of mixed generation
Browse files Browse the repository at this point in the history
  • Loading branch information
egokb committed Dec 20, 2024
1 parent 9406085 commit 1850a76
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/Compiler/BuildParam.cs
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ public enum BindingContextGenerateType
/// <summary>
/// 混合生成
/// </summary>
Mix = Attribute | Config | Descriptor,
All = Attribute | Config | Descriptor,
}

/// <summary>
Expand Down
4 changes: 2 additions & 2 deletions src/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
try
{
//string workspace = "..\\..\\..\\..\\..\\..\\FUI\\";
//args = $"--sln={workspace}.\\FUI.sln --project=FUI.Test --output={workspace}.\\Library\\ScriptAssemblies --binding={workspace}.\\Binding\\ --generated={workspace}.\\FUI\\Generated\\ --ctx_type=Mix --binding_output={workspace}.\\FUI\\BindingInfo\\".Split(' ');
//args = $"--sln={workspace}.\\FUI.sln --project=FUI.Test --output={workspace}.\\Library\\ScriptAssemblies --binding={workspace}.\\Binding\\ --generated={workspace}.\\FUI\\Generated\\ --binding_output={workspace}.\\FUI\\BindingInfo\\".Split(' ');
var param = ParseArgs(args);
var compiler = new Compiler(param);
await compiler.Build();
Expand Down Expand Up @@ -49,7 +49,7 @@ BuildParam ParseArgs(string[] args)
output: args[outputIndex].Substring(outputMark.Length + 1),
bindingPath: bindingPathIndex == -1 ? string.Empty : args[bindingPathIndex].Substring(bindingConfigMark.Length + 1),
generatedPath: generatedPathIndex == -1 ? string.Empty : args[generatedPathIndex].Substring(generatedPathMark.Length + 1),
contextGenerateType: contextGenerateTypeIndex == -1 ? BindingContextGenerateType.Mix : Enum.Parse<BindingContextGenerateType>(args[contextGenerateTypeIndex].Substring(contextGenerateTypeMark.Length + 1)),
contextGenerateType: contextGenerateTypeIndex == -1 ? BindingContextGenerateType.All : (BindingContextGenerateType)int.Parse(args[contextGenerateTypeIndex].Substring(contextGenerateTypeMark.Length + 1)),
bindingOutput: bindingOutputIndex == -1 ? string.Empty : args[bindingOutputIndex].Substring(bindingOutputMark.Length + 1)
);
}

0 comments on commit 1850a76

Please sign in to comment.