Patch level : 12.0 no-patch

Files correlati     :
Commento            : Aggiunti compilatori SrcCompilerNEW e SqlCompiler
This commit is contained in:
Mattia Tollari 2018-08-01 12:32:56 +02:00
parent 2795dbab8d
commit f4eda260e8
5 changed files with 457 additions and 4 deletions

View File

@ -274,4 +274,37 @@
<ExecutionDescription>Compiling %(Filename) to $(TargetDir)</ExecutionDescription>
</SrcCompiler>
</ItemDefinitionGroup>
<!-- DA MODIFICARE ALESSANDRO, QUA C'É IL COMANDO CHE TI INTERESSA!!!!!!! -->
<PropertyGroup
Condition="'$(SrcNEWCompilerBeforeTargets)' == '' and '$(SrcNEWCompilerAfterTargets)' == '' and '$(ConfigurationType)' != 'Makefile'">
<SrcNEWCompilerBeforeTargets>Midl</SrcNEWCompilerBeforeTargets>
<SrcNEWCompilerAfterTargets>CustomBuild</SrcNEWCompilerAfterTargets>
</PropertyGroup>
<PropertyGroup>
<SrcNEWCompilerDependsOn
Condition="'$(ConfigurationType)' != 'Makefile'">_SelectedFiles;$(SrcNEWCompilerDependsOn)</SrcNEWCompilerDependsOn>
</PropertyGroup>
<ItemDefinitionGroup>
<SrcNEWCompiler>
<CommandLineTemplate>ini32r %(FullPath) $(TargetDir)%(Filename).ini</CommandLineTemplate>
<Outputs>$(TargetDir)%(Filename).ini</Outputs>
<ExecutionDescription>Compiling %(Filename) to $(TargetDir)</ExecutionDescription>
</SrcNEWCompiler>
</ItemDefinitionGroup>
<PropertyGroup
Condition="'$(SqlCompilerBeforeTargets)' == '' and '$(SqlCompilerAfterTargets)' == '' and '$(ConfigurationType)' != 'Makefile'">
<SqlCompilerBeforeTargets>Midl</SqlCompilerBeforeTargets>
<SqlCompilerAfterTargets>CustomBuild</SqlCompilerAfterTargets>
</PropertyGroup>
<PropertyGroup>
<SqlCompilerDependsOn
Condition="'$(ConfigurationType)' != 'Makefile'">_SelectedFiles;$(SqlCompilerDependsOn)</SqlCompilerDependsOn>
</PropertyGroup>
<ItemDefinitionGroup>
<SqlCompiler>
<CommandLineTemplate>copy %(FullPath) $(TargetDir)sql\$(ProjectName)\</CommandLineTemplate>
<Outputs>$(TargetDir)sql\$(ProjectName)\%(Filename).sql</Outputs>
<ExecutionDescription>Copia di %(Filename) in $(TargetDir)sql\$(ProjectName)\</ExecutionDescription>
</SqlCompiler>
</ItemDefinitionGroup>
</Project>

View File

@ -193,5 +193,28 @@
<Properties>
</Properties>
</CustomBuildRule>
<!-- DA MODIFICARE ALESSANDRO, QUA C'É IL COMANDO CHE TI INTERESSA!!!!!!! -->
<CustomBuildRule
Name="SrcNEWCompiler"
DisplayName="Profile Compiler INI32R"
CommandLine="ini32r $(InputPath) $(TargetDir)$(InputName).ini"
Outputs="$(TargetDir)$(InputName).ini"
FileExtensions="*.src"
ExecutionDescription="Compiling $(InputName) to $(TargetDir)"
>
<Properties>
</Properties>
</CustomBuildRule>
<CustomBuildRule
Name="SqlCompiler"
DisplayName="Sql Compiler"
CommandLine="copy %(FullPath) $(TargetDir)sql\$(ProjectName)\"
Outputs="$(TargetDir)sql\$(ProjectName)\$(InputName).sql"
FileExtensions="*.sql"
ExecutionDescription="Copia di %(Filename) in $(TargetDir)sql\$(ProjectName)\"
>
<Properties>
</Properties>
</CustomBuildRule>
</Rules>
</VisualStudioToolFile>

View File

@ -70,6 +70,15 @@
<AvailableItemName
Include="SrcCompiler">
<Targets>_SrcCompiler</Targets>
</AvailableItemName>
<!-- DA MODIFICARE ALESSANDRO -->
<AvailableItemName
Include="SrcNEWCompiler">
<Targets>_SrcNEWCompiler</Targets>
</AvailableItemName>
<AvailableItemName
Include="SqlCompiler">
<Targets>_SqlCompiler</Targets>
</AvailableItemName>
</ItemGroup>
<UsingTask
@ -174,6 +183,19 @@
AssemblyName="Microsoft.Build.Tasks.v4.0">
<Task>$(MSBuildThisFileDirectory)$(MSBuildThisFileName).xml</Task>
</UsingTask>
<!-- DA MODIFICARE ALESSANDRO -->
<UsingTask
TaskName="SrcNEWCompiler"
TaskFactory="XamlTaskFactory"
AssemblyName="Microsoft.Build.Tasks.v4.0">
<Task>$(MSBuildThisFileDirectory)$(MSBuildThisFileName).xml</Task>
</UsingTask>
<UsingTask
TaskName="SqlCompiler"
TaskFactory="XamlTaskFactory"
AssemblyName="Microsoft.Build.Tasks.v4.0">
<Task>$(MSBuildThisFileDirectory)$(MSBuildThisFileName).xml</Task>
</UsingTask>
<Target
Name="_MskCompiler"
BeforeTargets="$(MskCompilerBeforeTargets)"
@ -1262,4 +1284,133 @@
<MakeDir
Directories="@(SrcCompilerDirsToMake-&gt;'%(RootDir)%(Directory)')" />
</Target>
<!-- DA MODIFICARE ALESSANDRO -->
<Target
Name="_SrcNEWCompiler"
BeforeTargets="$(SrcNEWCompilerBeforeTargets)"
AfterTargets="$(SrcNEWCompilerAfterTargets)"
Condition="'@(SrcNEWCompiler)' != ''"
DependsOnTargets="$(SrcNEWCompilerDependsOn);ComputeSrcNEWCompilerOutput"
Outputs="%(SrcNEWCompiler.Outputs)"
Inputs="%(SrcNEWCompiler.Identity);%(SrcDebugCompiler.AdditionalDependencies);$(MSBuildProjectFile)">
<ItemGroup
Condition="'@(SelectedFiles)' != ''">
<SrcNEWCompiler
Remove="@(SrcNEWCompiler)"
Condition="'%(Identity)' != '@(SelectedFiles)'" />
</ItemGroup>
<ItemGroup>
<SrcNEWCompiler_tlog
Include="%(SrcNEWCompiler.Outputs)"
Condition="'%(SrcNEWCompiler.Outputs)' != '' and '%(SrcNEWCompiler.ExcludedFromBuild)' != 'true'">
<Source>@(SrcNEWCompiler, '|')</Source>
</SrcNEWCompiler_tlog>
</ItemGroup>
<Message
Importance="High"
Text="%(SrcNEWCompiler.ExecutionDescription)" />
<WriteLinesToFile
Condition="'@(SrcNEWCompiler_tlog)' != '' and '%(SrcNEWCompiler_tlog.ExcludedFromBuild)' != 'true'"
File="$(IntDir)$(ProjectName).write.1.tlog"
Lines="^%(SrcNEWCompiler_tlog.Source);@(SrcNEWCompiler_tlog-&gt;'%(Fullpath)')" />
<SrcNEWCompiler
Condition="'@(SrcNEWCompiler)' != '' and '%(SrcNEWCompiler.ExcludedFromBuild)' != 'true'"
CommandLineTemplate="%(SrcNEWCompiler.CommandLineTemplate)"
AdditionalOptions="%(SrcNEWCompiler.AdditionalOptions)"
Inputs="%(SrcNEWCompiler.Identity)" />
</Target>
<PropertyGroup>
<ComputeLinkInputsTargets>
$(ComputeLinkInputsTargets);
ComputeSrcNEWCompilerOutput;
</ComputeLinkInputsTargets>
<ComputeLibInputsTargets>
$(ComputeLibInputsTargets);
ComputeSrcNEWCompilerOutput;
</ComputeLibInputsTargets>
</PropertyGroup>
<Target
Name="ComputeSrcNEWCompilerOutput"
Condition="'@(SrcNEWCompiler)' != ''">
<ItemGroup>
<SrcNEWCompilerDirsToMake
Condition="'@(SrcNEWCompiler)' != '' and '%(SrcNEWCompiler.ExcludedFromBuild)' != 'true'"
Include="%(SrcNEWCompiler.Outputs)" />
<Link
Include="%(SrcNEWCompilerDirsToMake.Identity)"
Condition="'%(Extension)'=='.obj' or '%(Extension)'=='.res' or '%(Extension)'=='.rsc' or '%(Extension)'=='.lib'" />
<Lib
Include="%(SrcNEWCompilerDirsToMake.Identity)"
Condition="'%(Extension)'=='.obj' or '%(Extension)'=='.res' or '%(Extension)'=='.rsc' or '%(Extension)'=='.lib'" />
<ImpLib
Include="%(SrcNEWCompilerDirsToMake.Identity)"
Condition="'%(Extension)'=='.obj' or '%(Extension)'=='.res' or '%(Extension)'=='.rsc' or '%(Extension)'=='.lib'" />
</ItemGroup>
<MakeDir
Directories="@(SrcNEWCompilerDirsToMake-&gt;'%(RootDir)%(Directory)')" />
</Target>
<Target
Name="_SqlCompiler"
BeforeTargets="$(SqlCompilerBeforeTargets)"
AfterTargets="$(SqlCompilerAfterTargets)"
Condition="'@(SqlCompiler)' != ''"
DependsOnTargets="$(SqlCompilerDependsOn);ComputeSqlCompilerOutput"
Outputs="%(SqlCompiler.Outputs)"
Inputs="%(SqlCompiler.Identity);%(SqlCompiler.AdditionalDependencies);$(MSBuildProjectFile)">
<ItemGroup
Condition="'@(SelectedFiles)' != ''">
<SqlCompiler
Remove="@(SqlCompiler)"
Condition="'%(Identity)' != '@(SelectedFiles)'" />
</ItemGroup>
<ItemGroup>
<SqlCompiler_tlog
Include="%(SqlCompiler.Outputs)"
Condition="'%(SqlCompiler.Outputs)' != '' and '%(SqlCompiler.ExcludedFromBuild)' != 'true'">
<Source>@(SqlCompiler, '|')</Source>
</SqlCompiler_tlog>
</ItemGroup>
<Message
Importance="High"
Text="%(SqlCompiler.ExecutionDescription)" />
<WriteLinesToFile
Condition="'@(SqlCompiler_tlog)' != '' and '%(SqlCompiler_tlog.ExcludedFromBuild)' != 'true'"
File="$(IntDir)$(ProjectName).write.1.tlog"
Lines="^%(SqlCompiler_tlog.Source);@(SqlCompiler_tlog-&gt;'%(Fullpath)')" />
<SqlCompiler
Condition="'@(SqlCompiler)' != '' and '%(SqlCompiler.ExcludedFromBuild)' != 'true'"
CommandLineTemplate="%(SqlCompiler.CommandLineTemplate)"
AdditionalOptions="%(SqlCompiler.AdditionalOptions)"
Inputs="%(SqlCompiler.Identity)" />
</Target>
<PropertyGroup>
<ComputeLinkInputsTargets>
$(ComputeLinkInputsTargets);
ComputeSqlCompilerOutput;
</ComputeLinkInputsTargets>
<ComputeLibInputsTargets>
$(ComputeLibInputsTargets);
ComputeSqlCompilerOutput;
</ComputeLibInputsTargets>
</PropertyGroup>
<Target
Name="ComputeSqlCompilerOutput"
Condition="'@(SqlCompiler)' != ''">
<ItemGroup>
<SqlCompilerDirsToMake
Condition="'@(SqlCompiler)' != '' and '%(SqlCompiler.ExcludedFromBuild)' != 'true'"
Include="%(SqlCompiler.Outputs)" />
<Link
Include="%(SqlCompilerDirsToMake.Identity)"
Condition="'%(Extension)'=='.sql'" />
<Lib
Include="%(SqlCompilerDirsToMake.Identity)"
Condition="'%(Extension)'=='.sql'" />
<ImpLib
Include="%(SqlCompilerDirsToMake.Identity)"
Condition="'%(Extension)'=='.sql'" />
</ItemGroup>
<MakeDir
Directories="@(SqlCompilerDirsToMake-&gt;'%(RootDir)%(Directory)')" />
</Target>
</Project>

View File

@ -2108,4 +2108,253 @@
Name="SrcCompiler"
DisplayName="Profile Debug Compiler"
ItemType="SrcCompiler" />
<!-- DA MODIFICARE ALESSANDRO -->
<Rule
Name="SrcNEWCompiler"
PageTemplate="tool"
DisplayName="Profile Compiler INI32R"
Order="200">
<Rule.DataSource>
<DataSource
Persistence="ProjectFile"
ItemType="SrcNEWCompiler" />
</Rule.DataSource>
<Rule.Categories>
<Category
Name="General">
<Category.DisplayName>
<sys:String>General</sys:String>
</Category.DisplayName>
</Category>
<Category
Name="Command Line"
Subtype="CommandLine">
<Category.DisplayName>
<sys:String>Command Line</sys:String>
</Category.DisplayName>
</Category>
</Rule.Categories>
<StringListProperty
Name="Inputs"
Category="Command Line"
IsRequired="true"
Switch=" ">
<StringListProperty.DataSource>
<DataSource
Persistence="ProjectFile"
ItemType="SrcNEWCompiler"
SourceType="Item" />
</StringListProperty.DataSource>
</StringListProperty>
<StringProperty
Name="CommandLineTemplate"
DisplayName="Command Line"
Visible="False"
IncludeInCommandLine="False" />
<DynamicEnumProperty
Name="SrcNEWCompilerBeforeTargets"
Category="General"
EnumProvider="Targets"
IncludeInCommandLine="False">
<DynamicEnumProperty.DisplayName>
<sys:String>Execute Before</sys:String>
</DynamicEnumProperty.DisplayName>
<DynamicEnumProperty.Description>
<sys:String>Specifies the targets for the build customization to run before.</sys:String>
</DynamicEnumProperty.Description>
<DynamicEnumProperty.ProviderSettings>
<NameValuePair
Name="Exclude"
Value="^SrcNEWCompilerBeforeTargets|^Compute" />
</DynamicEnumProperty.ProviderSettings>
<DynamicEnumProperty.DataSource>
<DataSource
Persistence="ProjectFile"
HasConfigurationCondition="true" />
</DynamicEnumProperty.DataSource>
</DynamicEnumProperty>
<DynamicEnumProperty
Name="SrcNEWCompilerAfterTargets"
Category="General"
EnumProvider="Targets"
IncludeInCommandLine="False">
<DynamicEnumProperty.DisplayName>
<sys:String>Execute After</sys:String>
</DynamicEnumProperty.DisplayName>
<DynamicEnumProperty.Description>
<sys:String>Specifies the targets for the build customization to run after.</sys:String>
</DynamicEnumProperty.Description>
<DynamicEnumProperty.ProviderSettings>
<NameValuePair
Name="Exclude"
Value="^SrcNEWCompilerAfterTargets|^Compute" />
</DynamicEnumProperty.ProviderSettings>
<DynamicEnumProperty.DataSource>
<DataSource
Persistence="ProjectFile"
ItemType=""
HasConfigurationCondition="true" />
</DynamicEnumProperty.DataSource>
</DynamicEnumProperty>
<StringListProperty
Name="Outputs"
DisplayName="Outputs"
Visible="False"
IncludeInCommandLine="False" />
<StringProperty
Name="ExecutionDescription"
DisplayName="Execution Description"
Visible="False"
IncludeInCommandLine="False" />
<StringListProperty
Name="AdditionalDependencies"
DisplayName="Additional Dependencies"
IncludeInCommandLine="False"
Visible="false" />
<StringProperty
Subtype="AdditionalOptions"
Name="AdditionalOptions"
Category="Command Line">
<StringProperty.DisplayName>
<sys:String>Additional Options</sys:String>
</StringProperty.DisplayName>
<StringProperty.Description>
<sys:String>Additional Options</sys:String>
</StringProperty.Description>
</StringProperty>
</Rule>
<ItemType
Name="SrcNEWCompiler"
DisplayName="Profile Compiler INI32R" />
<FileExtension
Name="*.src"
ContentType="SrcNEWCompiler" />
<ContentType
Name="SrcNEWCompiler"
DisplayName="Profile Compiler INI32R"
ItemType="SrcNEWCompiler" />
<Rule
Name="SqlCompiler"
PageTemplate="tool"
DisplayName="Sql Compiler"
Order="200">
<Rule.DataSource>
<DataSource
Persistence="ProjectFile"
ItemType="SqlCompiler" />
</Rule.DataSource>
<Rule.Categories>
<Category
Name="General">
<Category.DisplayName>
<sys:String>General</sys:String>
</Category.DisplayName>
</Category>
<Category
Name="Command Line"
Subtype="CommandLine">
<Category.DisplayName>
<sys:String>Command Line</sys:String>
</Category.DisplayName>
</Category>
</Rule.Categories>
<StringListProperty
Name="Inputs"
Category="Command Line"
IsRequired="true"
Switch=" ">
<StringListProperty.DataSource>
<DataSource
Persistence="ProjectFile"
ItemType="SqlCompiler"
SourceType="Item" />
</StringListProperty.DataSource>
</StringListProperty>
<StringProperty
Name="CommandLineTemplate"
DisplayName="Command Line"
Visible="False"
IncludeInCommandLine="False" />
<DynamicEnumProperty
Name="SqlCompilerBeforeTargets"
Category="General"
EnumProvider="Targets"
IncludeInCommandLine="False">
<DynamicEnumProperty.DisplayName>
<sys:String>Execute Before</sys:String>
</DynamicEnumProperty.DisplayName>
<DynamicEnumProperty.Description>
<sys:String>Specifies the targets for the build customization to run before.</sys:String>
</DynamicEnumProperty.Description>
<DynamicEnumProperty.ProviderSettings>
<NameValuePair
Name="Exclude"
Value="^SqlCompilerBeforeTargets|^Compute" />
</DynamicEnumProperty.ProviderSettings>
<DynamicEnumProperty.DataSource>
<DataSource
Persistence="ProjectFile"
HasConfigurationCondition="true" />
</DynamicEnumProperty.DataSource>
</DynamicEnumProperty>
<DynamicEnumProperty
Name="SqlCompilerAfterTargets"
Category="General"
EnumProvider="Targets"
IncludeInCommandLine="False">
<DynamicEnumProperty.DisplayName>
<sys:String>Execute After</sys:String>
</DynamicEnumProperty.DisplayName>
<DynamicEnumProperty.Description>
<sys:String>Specifies the targets for the build customization to run after.</sys:String>
</DynamicEnumProperty.Description>
<DynamicEnumProperty.ProviderSettings>
<NameValuePair
Name="Exclude"
Value="^SqlCompilerAfterTargets|^Compute" />
</DynamicEnumProperty.ProviderSettings>
<DynamicEnumProperty.DataSource>
<DataSource
Persistence="ProjectFile"
ItemType=""
HasConfigurationCondition="true" />
</DynamicEnumProperty.DataSource>
</DynamicEnumProperty>
<StringListProperty
Name="Outputs"
DisplayName="Outputs"
Visible="False"
IncludeInCommandLine="False" />
<StringProperty
Name="ExecutionDescription"
DisplayName="Execution Description"
Visible="False"
IncludeInCommandLine="False" />
<StringListProperty
Name="AdditionalDependencies"
DisplayName="Additional Dependencies"
IncludeInCommandLine="False"
Visible="false" />
<StringProperty
Subtype="AdditionalOptions"
Name="AdditionalOptions"
Category="Command Line">
<StringProperty.DisplayName>
<sys:String>Additional Options</sys:String>
</StringProperty.DisplayName>
<StringProperty.Description>
<sys:String>Additional Options</sys:String>
</StringProperty.Description>
</StringProperty>
</Rule>
<ItemType
Name="SqlCompiler"
DisplayName="Sql Compiler" />
<FileExtension
Name="*.sql"
ContentType="SqlCompiler" />
<ContentType
Name="SqlCompiler"
DisplayName="SqlCompiler Compiler"
ItemType="SqlCompiler" />
</ProjectSchemaDefinitions>

View File

@ -4,7 +4,4 @@ echo Generating %1 ini file
set oldinc=%include
set include=..\src\include;..\src\xvaga;..\src\ve;%~p1
srcini %1 %2
cd %~p2
echo Generating %2 msk file
ve0 -3 %2 -f /uADMIN
srcini %1 %2