65 lines
		
	
	
		
			3.5 KiB
		
	
	
	
		
			XML
		
	
	
	
	
	
			
		
		
	
	
			65 lines
		
	
	
		
			3.5 KiB
		
	
	
	
		
			XML
		
	
	
	
	
	
| <?xml version="1.0" encoding="utf-8"?>
 | |
| <Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
 | |
|   <ItemGroup>
 | |
|     <AllGeneratedFiles Include="$(ApplicationRoot)\generated\fonts\**\*.*;$(ApplicationRoot)\generated\images\**\*.*;$(ApplicationRoot)\generated\texts\**\*.*" />
 | |
|   </ItemGroup>
 | |
| 
 | |
|   <ItemGroup>
 | |
|     <ImageConvertExecutable Include="$(TouchGFXReleasePath)\framework\tools\imageconvert\build\msvs\ImageConvert.exe"/>
 | |
|   </ItemGroup>
 | |
| 
 | |
|   <PropertyGroup>
 | |
|     <UseBPPOption>/DUSE_BPP=$(UseBPP)</UseBPPOption>
 | |
|   </PropertyGroup>
 | |
|   
 | |
|   <PropertyGroup Condition="'$(LCD)'!=''">
 | |
|     <LCDOption>/D$(LCD)</LCDOption>
 | |
|   </PropertyGroup>
 | |
|   <PropertyGroup Condition="'$(LCD)'==''">
 | |
|     <LCDOption/>
 | |
|   </PropertyGroup>
 | |
|   
 | |
|   <PropertyGroup>
 | |
|     <touchgfx_env Condition="'$(TouchGFXEnvPath)'==''">$(TouchGFXReleasePath)\..\env</touchgfx_env>
 | |
|     <touchgfx_env Condition="'$(TouchGFXEnvPath)'!=''">$(TouchGFXEnvPath)</touchgfx_env>
 | |
|   </PropertyGroup>
 | |
| 
 | |
|   <Target Name="GenerateBitmapDatabaseFiles" BeforeTargets="ClCompile">
 | |
|     <Message Text="Converting images"/>
 | |
|     <Exec Command="echo Converting images"/>
 | |
|     <Exec Command=""%(ImageConvertExecutable.FullPath)" -r assets\images -w generated\images" WorkingDirectory="$(ApplicationRoot)"/>
 | |
|   </Target>
 | |
| 
 | |
|   <Target Name="GenerateTextsAndFontsFiles" BeforeTargets="ClCompile">
 | |
|     <Message Text="Converting texts and fonts" />
 | |
|     <Exec Command="echo Converting texts and fonts"/>
 | |
|     <Exec Command=""$(touchgfx_env)\MinGW\msys\1.0\ruby193\bin\ruby.exe" "$(TouchGFXReleasePath)\framework\tools\textconvert\main.rb" "$(ApplicationRoot)\assets\texts\texts.xlsx" "$(TouchGFXReleasePath)\framework\tools\fontconvert\build\win\fontconvert.out" "$(ApplicationRoot)\generated\fonts" "$(ApplicationRoot)\generated\texts" "$(ApplicationRoot)\assets\fonts" "$(ApplicationRoot)""/>
 | |
|   </Target>
 | |
| 
 | |
|   <Target Name="CompileAllGeneratedFiles" BeforeTargets="ClCompile">
 | |
|     <ItemGroup>
 | |
|       <AllGeneratedCompileFiles Include="$(ApplicationRoot)\generated\fonts\**\*.cpp;$(ApplicationRoot)\generated\images\**\*.cpp;$(ApplicationRoot)\generated\texts\**\*.cpp;" />
 | |
|     </ItemGroup>
 | |
|     <Message Text="Creating compile items for all generated source files: @(AllGeneratedCompileFiles)"/>
 | |
|     <Exec Command="echo Creating compile items for all generated source files: @(AllGeneratedCompileFiles)"/>
 | |
|     <CreateItem Include="@(AllGeneratedCompileFiles)">
 | |
|       <Output TaskParameter="Include" ItemName="ClCompile"/>
 | |
|     </CreateItem>
 | |
|   </Target>
 | |
| 
 | |
|   <Target Name="CleanupGeneratedFiles" AfterTargets="Clean">
 | |
|     <Message Text="Clean-up generated files: @(AllGeneratedFiles)"/>
 | |
|     <Exec Command="echo Clean-up generated files: @(AllGeneratedFiles)"/>
 | |
|     <Delete Files="@(AllGeneratedFiles)"/>
 | |
|   </Target>
 | |
| 
 | |
|   <Target Name="PostBuild" AfterTargets="ClCompile">
 | |
|     <Exec Command="copy $(TouchGFXReleasePath)\lib\sdl2\win32\SDL2.dll $(OutDir) > nul" />
 | |
|     <Exec Command="copy $(TouchGFXReleasePath)\lib\sdl2\win32\SDL2_image.dll $(OutDir) > nul" />
 | |
|     <Exec Command="copy $(TouchGFXReleasePath)\lib\sdl2\win32\libpng16-16.dll $(OutDir) > nul" />
 | |
|     <Exec Command="copy $(TouchGFXReleasePath)\lib\sdl2\win32\zlib1.dll $(OutDir) > nul"/>
 | |
|     <Exec Command="if exist $(ApplicationRoot)\simulator\landscape.png copy /y $(ApplicationRoot)\simulator\landscape.png $(OutDir) > nul" />
 | |
|     <Exec Command="if exist $(ApplicationRoot)\simulator\portrait.png copy /y $(ApplicationRoot)\simulator\portrait.png $(OutDir) > nul" />
 | |
|   </Target>
 | |
| </Project>
 |