| 7 | #include "VSVersion.h" |
| 8 | |
| 9 | void FSolutionGenerator::Generator() |
| 10 | { |
| 11 | const auto TemplatePath = FUnrealCSharpFunctionLibrary::GetPluginTemplateDirectory(); |
| 12 | |
| 13 | const auto ScriptPath = FUnrealCSharpFunctionLibrary::GetPluginScriptDirectory(); |
| 14 | |
| 15 | CopyTemplate( |
| 16 | FUnrealCSharpFunctionLibrary::GetCodeAnalysisProjectPath(), |
| 17 | ScriptPath / CODE_ANALYSIS_NAME / CODE_ANALYSIS_NAME + PROJECT_SUFFIX, |
| 18 | TArray<TFunction<void(FString& OutResult)>> |
| 19 | { |
| 20 | &FSolutionGenerator::ReplaceTargetFramework, |
| 21 | &FSolutionGenerator::AddProjectGeneratorHeaderComment |
| 22 | }); |
| 23 | |
| 24 | CopyTemplate( |
| 25 | FPaths::Combine(FUnrealCSharpFunctionLibrary::GetCodeAnalysisCSProjPath(), CODE_ANALYSIS_NAME + CSHARP_SUFFIX), |
| 26 | ScriptPath / CODE_ANALYSIS_NAME / CODE_ANALYSIS_NAME + CSHARP_SUFFIX, |
| 27 | TArray<TFunction<void(FString& OutResult)>> |
| 28 | { |
| 29 | &FSolutionGenerator::AddCSharpGeneratorHeaderComment |
| 30 | }); |
| 31 | |
| 32 | CopyTemplate( |
| 33 | FPaths::Combine(FUnrealCSharpFunctionLibrary::GetSourceGeneratorPath(), SOURCE_GENERATOR_NAME + PROJECT_SUFFIX), |
| 34 | ScriptPath / SOURCE_GENERATOR_NAME / SOURCE_GENERATOR_NAME + PROJECT_SUFFIX, |
| 35 | TArray<TFunction<void(FString& OutResult)>> |
| 36 | { |
| 37 | &FSolutionGenerator::AddProjectGeneratorHeaderComment |
| 38 | }); |
| 39 | |
| 40 | CopyTemplate( |
| 41 | FPaths::Combine(FUnrealCSharpFunctionLibrary::GetSourceGeneratorPath(), |
| 42 | UNREAL_TYPE_SOURCE_GENERATOR_NAME + CSHARP_SUFFIX), |
| 43 | ScriptPath / SOURCE_GENERATOR_NAME / UNREAL_TYPE_SOURCE_GENERATOR_NAME + CSHARP_SUFFIX, |
| 44 | TArray<TFunction<void(FString& OutResult)>> |
| 45 | { |
| 46 | &FSolutionGenerator::AddCSharpGeneratorHeaderComment |
| 47 | }); |
| 48 | |
| 49 | CopyTemplate( |
| 50 | FPaths::Combine(FUnrealCSharpFunctionLibrary::GetSourceGeneratorPath(), |
| 51 | ANALYZER_RELEASES_UN_SHIPPED_NAME + MARKDOWN_SUFFIX), |
| 52 | ScriptPath / SOURCE_GENERATOR_NAME / ANALYZER_RELEASES_UN_SHIPPED_NAME + MARKDOWN_SUFFIX); |
| 53 | |
| 54 | CopyTemplate( |
| 55 | FPaths::Combine(FUnrealCSharpFunctionLibrary::GetWeaversPath(), WEAVERS_NAME + PROJECT_SUFFIX), |
| 56 | ScriptPath / WEAVERS_NAME / WEAVERS_NAME + PROJECT_SUFFIX, |
| 57 | TArray<TFunction<void(FString& OutResult)>>{ |
| 58 | &FSolutionGenerator::ReplaceScriptOutputPath, |
| 59 | &FSolutionGenerator::AddProjectGeneratorHeaderComment |
| 60 | }); |
| 61 | |
| 62 | CopyTemplate( |
| 63 | FPaths::Combine(FUnrealCSharpFunctionLibrary::GetWeaversPath(), UNREAL_TYPE_WEAVER_NAME + CSHARP_SUFFIX), |
| 64 | ScriptPath / WEAVERS_NAME / UNREAL_TYPE_WEAVER_NAME + CSHARP_SUFFIX, |
| 65 | TArray<TFunction<void(FString& OutResult)>> |
| 66 | { |
nothing calls this directly
no outgoing calls
no test coverage detected