diff options
| author | lbavoil <[email protected]> | 2016-03-25 13:01:54 +0100 |
|---|---|---|
| committer | lbavoil <[email protected]> | 2016-03-25 13:01:54 +0100 |
| commit | 99174e4e5fb4b7079da80b35a6dfd68f3fd56a1c (patch) | |
| tree | fbcd4260d6c953d569a887505336a1c3f202e10f /build/tools/Stringify | |
| download | hbaoplus-99174e4e5fb4b7079da80b35a6dfd68f3fd56a1c.tar.xz hbaoplus-99174e4e5fb4b7079da80b35a6dfd68f3fd56a1c.zip | |
GFSDK_HBAO+_distro_r3.0_cl20573789
Diffstat (limited to 'build/tools/Stringify')
| -rw-r--r-- | build/tools/Stringify/Stringify.cpp | 49 | ||||
| -rw-r--r-- | build/tools/Stringify/Stringify.sln | 20 | ||||
| -rw-r--r-- | build/tools/Stringify/Stringify.vcxproj | 93 | ||||
| -rw-r--r-- | build/tools/Stringify/Stringify.vcxproj.filters | 33 | ||||
| -rw-r--r-- | build/tools/Stringify/stdafx.cpp | 8 | ||||
| -rw-r--r-- | build/tools/Stringify/stdafx.h | 19 | ||||
| -rw-r--r-- | build/tools/Stringify/targetver.h | 8 |
7 files changed, 230 insertions, 0 deletions
diff --git a/build/tools/Stringify/Stringify.cpp b/build/tools/Stringify/Stringify.cpp new file mode 100644 index 0000000..ea3fe68 --- /dev/null +++ b/build/tools/Stringify/Stringify.cpp @@ -0,0 +1,49 @@ +// Stringify.cpp : Defines the entry point for the console application. +// + +#include "stdafx.h" + + +int main(int argc, char* argv[]) +{ + if (argc != 4) + { + fprintf(stderr, "Usage: %s TEXT_FILENAME VARIABLE_NAME OUTPUT_FILE\n", argv[0]); + exit(1); + } + + const char* pFilenameIn = argv[1]; + const char* pVariableName = argv[2]; + const char *pFilenameOut = argv[3]; + + FILE *fpIn = fopen(pFilenameIn, "r"); + if (!fpIn) + { + fprintf(stderr, "Error: Failed to open %s\n", pFilenameIn); + exit(1); + } + + FILE *fpOut = fopen(pFilenameOut, "w"); + if (!fpOut) + { + fprintf(stderr, "Error: Failed to open %s\n", pFilenameOut); + exit(1); + } + + fprintf(fpOut, "static const char* %s =\n", pVariableName); + + char row[1024]; + while (fgets(row, sizeof(row), fpIn)) + { + row[strlen(row) - 1] = 0; // remove \n + + fprintf(fpOut, "\"%s\\n\"\n", row); + } + + fprintf(fpOut, ";\n"); + + fclose(fpIn); + fclose(fpOut); + return 0; +} + diff --git a/build/tools/Stringify/Stringify.sln b/build/tools/Stringify/Stringify.sln new file mode 100644 index 0000000..d11dcad --- /dev/null +++ b/build/tools/Stringify/Stringify.sln @@ -0,0 +1,20 @@ + +Microsoft Visual Studio Solution File, Format Version 11.00 +# Visual Studio 2010 +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Stringify", "Stringify\Stringify.vcxproj", "{199AEFC4-A2BC-4837-9D0D-69BEB794F681}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Win32 = Debug|Win32 + Release|Win32 = Release|Win32 + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {199AEFC4-A2BC-4837-9D0D-69BEB794F681}.Debug|Win32.ActiveCfg = Debug|Win32 + {199AEFC4-A2BC-4837-9D0D-69BEB794F681}.Debug|Win32.Build.0 = Debug|Win32 + {199AEFC4-A2BC-4837-9D0D-69BEB794F681}.Release|Win32.ActiveCfg = Release|Win32 + {199AEFC4-A2BC-4837-9D0D-69BEB794F681}.Release|Win32.Build.0 = Release|Win32 + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection +EndGlobal diff --git a/build/tools/Stringify/Stringify.vcxproj b/build/tools/Stringify/Stringify.vcxproj new file mode 100644 index 0000000..245cf4e --- /dev/null +++ b/build/tools/Stringify/Stringify.vcxproj @@ -0,0 +1,93 @@ +<?xml version="1.0" encoding="utf-8"?> +<Project DefaultTargets="Build" ToolsVersion="14.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> + <ItemGroup Label="ProjectConfigurations"> + <ProjectConfiguration Include="Debug|Win32"> + <Configuration>Debug</Configuration> + <Platform>Win32</Platform> + </ProjectConfiguration> + <ProjectConfiguration Include="Release|Win32"> + <Configuration>Release</Configuration> + <Platform>Win32</Platform> + </ProjectConfiguration> + </ItemGroup> + <PropertyGroup Label="Globals"> + <ProjectGuid>{199AEFC4-A2BC-4837-9D0D-69BEB794F681}</ProjectGuid> + <Keyword>Win32Proj</Keyword> + <RootNamespace>Stringify</RootNamespace> + <WindowsTargetPlatformVersion>8.1</WindowsTargetPlatformVersion> + </PropertyGroup> + <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" /> + <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration"> + <ConfigurationType>Application</ConfigurationType> + <UseDebugLibraries>true</UseDebugLibraries> + <CharacterSet>MultiByte</CharacterSet> + <PlatformToolset>v140</PlatformToolset> + </PropertyGroup> + <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration"> + <ConfigurationType>Application</ConfigurationType> + <UseDebugLibraries>false</UseDebugLibraries> + <WholeProgramOptimization>true</WholeProgramOptimization> + <CharacterSet>MultiByte</CharacterSet> + <PlatformToolset>v140</PlatformToolset> + </PropertyGroup> + <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" /> + <ImportGroup Label="ExtensionSettings"> + </ImportGroup> + <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'"> + <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" /> + </ImportGroup> + <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|Win32'"> + <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" /> + </ImportGroup> + <PropertyGroup Label="UserMacros" /> + <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'"> + <LinkIncremental>true</LinkIncremental> + <OutDir>$(SolutionDir)..\..\..\src\shaders\</OutDir> + </PropertyGroup> + <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'"> + <LinkIncremental>false</LinkIncremental> + <OutDir>$(SolutionDir)..\..\..\src\shaders\</OutDir> + </PropertyGroup> + <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'"> + <ClCompile> + <PrecompiledHeader>Use</PrecompiledHeader> + <WarningLevel>Level3</WarningLevel> + <Optimization>Disabled</Optimization> + <PreprocessorDefinitions>WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions> + </ClCompile> + <Link> + <SubSystem>Console</SubSystem> + <GenerateDebugInformation>true</GenerateDebugInformation> + </Link> + </ItemDefinitionGroup> + <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'"> + <ClCompile> + <WarningLevel>Level3</WarningLevel> + <PrecompiledHeader>Use</PrecompiledHeader> + <Optimization>MaxSpeed</Optimization> + <FunctionLevelLinking>true</FunctionLevelLinking> + <IntrinsicFunctions>true</IntrinsicFunctions> + <PreprocessorDefinitions>WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions> + </ClCompile> + <Link> + <SubSystem>Console</SubSystem> + <GenerateDebugInformation>true</GenerateDebugInformation> + <EnableCOMDATFolding>true</EnableCOMDATFolding> + <OptimizeReferences>true</OptimizeReferences> + </Link> + </ItemDefinitionGroup> + <ItemGroup> + <ClInclude Include="stdafx.h" /> + <ClInclude Include="targetver.h" /> + </ItemGroup> + <ItemGroup> + <ClCompile Include="stdafx.cpp"> + <PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Create</PrecompiledHeader> + <PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">Create</PrecompiledHeader> + </ClCompile> + <ClCompile Include="Stringify.cpp" /> + </ItemGroup> + <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" /> + <ImportGroup Label="ExtensionTargets"> + </ImportGroup> +</Project>
\ No newline at end of file diff --git a/build/tools/Stringify/Stringify.vcxproj.filters b/build/tools/Stringify/Stringify.vcxproj.filters new file mode 100644 index 0000000..7827edd --- /dev/null +++ b/build/tools/Stringify/Stringify.vcxproj.filters @@ -0,0 +1,33 @@ +<?xml version="1.0" encoding="utf-8"?> +<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> + <ItemGroup> + <Filter Include="Source Files"> + <UniqueIdentifier>{4FC737F1-C7A5-4376-A066-2A32D752A2FF}</UniqueIdentifier> + <Extensions>cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx</Extensions> + </Filter> + <Filter Include="Header Files"> + <UniqueIdentifier>{93995380-89BD-4b04-88EB-625FBE52EBFB}</UniqueIdentifier> + <Extensions>h;hpp;hxx;hm;inl;inc;xsd</Extensions> + </Filter> + <Filter Include="Resource Files"> + <UniqueIdentifier>{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}</UniqueIdentifier> + <Extensions>rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms</Extensions> + </Filter> + </ItemGroup> + <ItemGroup> + <ClInclude Include="stdafx.h"> + <Filter>Header Files</Filter> + </ClInclude> + <ClInclude Include="targetver.h"> + <Filter>Header Files</Filter> + </ClInclude> + </ItemGroup> + <ItemGroup> + <ClCompile Include="stdafx.cpp"> + <Filter>Source Files</Filter> + </ClCompile> + <ClCompile Include="Stringify.cpp"> + <Filter>Source Files</Filter> + </ClCompile> + </ItemGroup> +</Project>
\ No newline at end of file diff --git a/build/tools/Stringify/stdafx.cpp b/build/tools/Stringify/stdafx.cpp new file mode 100644 index 0000000..6586fa8 --- /dev/null +++ b/build/tools/Stringify/stdafx.cpp @@ -0,0 +1,8 @@ +// stdafx.cpp : source file that includes just the standard includes +// Stringify.pch will be the pre-compiled header +// stdafx.obj will contain the pre-compiled type information + +#include "stdafx.h" + +// TODO: reference any additional headers you need in STDAFX.H +// and not in this file diff --git a/build/tools/Stringify/stdafx.h b/build/tools/Stringify/stdafx.h new file mode 100644 index 0000000..946f86c --- /dev/null +++ b/build/tools/Stringify/stdafx.h @@ -0,0 +1,19 @@ +// stdafx.h : include file for standard system include files, +// or project specific include files that are used frequently, but +// are changed infrequently +// + +#pragma once + +#ifdef _MSC_VER +#define _CRT_SECURE_NO_WARNINGS +#endif + +#include "targetver.h" + +#include <stdio.h> +#include <tchar.h> +#include <stdlib.h> + + +// TODO: reference additional headers your program requires here diff --git a/build/tools/Stringify/targetver.h b/build/tools/Stringify/targetver.h new file mode 100644 index 0000000..87c0086 --- /dev/null +++ b/build/tools/Stringify/targetver.h @@ -0,0 +1,8 @@ +#pragma once + +// Including SDKDDKVer.h defines the highest available Windows platform. + +// If you wish to build your application for a previous Windows platform, include WinSDKVer.h and +// set the _WIN32_WINNT macro to the platform you wish to support before including SDKDDKVer.h. + +#include <SDKDDKVer.h> |