Commit 705c39c4 authored by Laurent Le Brun's avatar Laurent Le Brun
Browse files

Update to Visual Studio 2015

parent 63ed602c
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<startup>
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.5" />
</startup>
<runtime>
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
<dependentAssembly>
<assemblyIdentity name="FSharp.Core" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" />
<bindingRedirect oldVersion="2.0.0.0" newVersion="4.4.0.0" />
<bindingRedirect oldVersion="2.3.0.0" newVersion="4.4.0.0" />
<bindingRedirect oldVersion="2.3.5.0" newVersion="4.4.0.0" />
<bindingRedirect oldVersion="4.0.0.0" newVersion="4.4.0.0" />
<bindingRedirect oldVersion="4.3.0.0" newVersion="4.4.0.0" />
<bindingRedirect oldVersion="3.3.1.0" newVersion="4.4.0.0" />
<bindingRedirect oldVersion="2.3.5.1" newVersion="4.4.0.0" />
<bindingRedirect oldVersion="3.78.3.1" newVersion="4.4.0.0" />
<bindingRedirect oldVersion="3.259.3.1" newVersion="4.4.0.0" />
<bindingRedirect oldVersion="4.3.1.0" newVersion="4.4.0.0" />
<bindingRedirect oldVersion="3.47.4.0" newVersion="4.4.0.0" />
<bindingRedirect oldVersion="3.78.4.0" newVersion="4.4.0.0" />
<bindingRedirect oldVersion="3.259.4.0" newVersion="4.4.0.0" />
</dependentAssembly>
</assemblyBinding>
</runtime>
</configuration>
\ No newline at end of file
......@@ -9,9 +9,11 @@
<OutputType>Exe</OutputType>
<RootNamespace>glsl_minifier</RootNamespace>
<AssemblyName>shader_minifier</AssemblyName>
<TargetFrameworkVersion>v3.5</TargetFrameworkVersion>
<TargetFrameworkVersion>v4.5</TargetFrameworkVersion>
<Name>Shader Minifier</Name>
<TargetFrameworkProfile />
<TargetFSharpCoreVersion>4.4.0.0</TargetFSharpCoreVersion>
<MinimumVisualStudioVersion Condition="'$(MinimumVisualStudioVersion)' == ''">11</MinimumVisualStudioVersion>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<DebugSymbols>true</DebugSymbols>
......@@ -21,6 +23,8 @@
<OutputPath>bin\Debug\</OutputPath>
<DefineConstants>DEBUG;TRACE</DefineConstants>
<WarningLevel>3</WarningLevel>
<StartArguments>
</StartArguments>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<DebugType>pdbonly</DebugType>
......@@ -29,11 +33,22 @@
<OutputPath>bin\Release\</OutputPath>
<DefineConstants>TRACE</DefineConstants>
<WarningLevel>3</WarningLevel>
<StartArguments>--smoothstep ../../test.in</StartArguments>
<StartArguments>-o "" ../../tests\unit\1.simple.frag</StartArguments>
<OtherFlags>--standalone</OtherFlags>
</PropertyGroup>
<Import Project="$(MSBuildExtensionsPath32)\FSharp\1.0\Microsoft.FSharp.Targets" Condition="!Exists('$(MSBuildToolsPath)\Microsoft.Build.Tasks.v4.0.dll')" />
<Import Project="$(MSBuildExtensionsPath32)\..\Microsoft F#\v4.0\Microsoft.FSharp.Targets" Condition="Exists('$(MSBuildToolsPath)\Microsoft.Build.Tasks.v4.0.dll')" />
<Choose>
<When Condition="'$(VisualStudioVersion)' == '11.0'">
<PropertyGroup>
<FSharpTargetsPath>$(MSBuildExtensionsPath32)\..\Microsoft SDKs\F#\3.0\Framework\v4.0\Microsoft.FSharp.Targets</FSharpTargetsPath>
</PropertyGroup>
</When>
<Otherwise>
<PropertyGroup>
<FSharpTargetsPath>$(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion)\FSharp\Microsoft.FSharp.Targets</FSharpTargetsPath>
</PropertyGroup>
</Otherwise>
</Choose>
<Import Project="$(FSharpTargetsPath)" Condition="Exists('$(FSharpTargetsPath)')" />
<ItemGroup>
<Compile Include="src\ast.fs" />
<Compile Include="src\printer.fs" />
......@@ -45,22 +60,46 @@
<None Include="App.config">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</None>
<Content Include="packages.config" />
</ItemGroup>
<ItemGroup>
<Reference Include="FParsec">
<HintPath>lib\FParsec.dll</HintPath>
<HintPath>packages\FParsec.1.0.2\lib\net40-client\FParsec.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="FParsecCS">
<HintPath>lib\FParsecCS.dll</HintPath>
<HintPath>packages\FParsec.1.0.2\lib\net40-client\FParsecCS.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="FSharp.Core, Version=$(TargetFSharpCoreVersion), Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<Private>True</Private>
</Reference>
<Reference Include="FSharp.PowerPack">
<HintPath>lib\FSharp.PowerPack.dll</HintPath>
<HintPath>packages\FSPowerPack.Core.Community.2.0.0.0\lib\Net40\FSharp.PowerPack.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="FSharp.PowerPack.Linq">
<HintPath>packages\FSPowerPack.Linq.Community.2.0.0.0\lib\Net40\FSharp.PowerPack.Linq.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="FSharp.PowerPack.Metadata">
<HintPath>packages\FSPowerPack.Metadata.Community.2.0.0.0\lib\Net40\FSharp.PowerPack.Metadata.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="FSharp.PowerPack.Parallel.Seq">
<HintPath>packages\FSPowerPack.Parallel.Seq.Community.2.0.0.0\lib\Net40\FSharp.PowerPack.Parallel.Seq.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<Private>True</Private>
<SpecificVersion>True</SpecificVersion>
</Reference>
<Reference Include="System">
<Private>True</Private>
</Reference>
<Reference Include="mscorlib" />
<Reference Include="FSharp.Core" />
<Reference Include="System" />
<Reference Include="System.Core">
<RequiredTargetFramework>3.5</RequiredTargetFramework>
<Private>True</Private>
</Reference>
</ItemGroup>
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
......

Microsoft Visual Studio Solution File, Format Version 11.00
# Visual Studio 2010
Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio 14
VisualStudioVersion = 14.0.25420.1
MinimumVisualStudioVersion = 10.0.40219.1
Project("{F2A71F9B-5D33-465A-A702-920D77279786}") = "Shader Minifier", "Shader Minifier.fsproj", "{059C6AF3-1877-4698-BE34-BF7EB55D060A}"
EndProject
Global
......
* Get a proper test suite. Seriously.
* Update to F# 3.0 (not tried, maybe it already works).
* Update to FParsec 1.0. This requires a couple of easy changes in
parse.fs.
* Simplify the release process. Ideally, we should get a single .exe file
that works both on Microsoft .NET and on Mono.
* Some antivirus (eg. Avast) don't like Shader Minifier. No idea why.
* Performance. I suspect that using StringBuffer in the printer would
drastically improve performance.
......
<?xml version="1.0" encoding="utf-8"?>
<packages>
<package id="FParsec" version="1.0.2" targetFramework="net45" />
<package id="FSPowerPack.Community" version="3.0.0.0" targetFramework="net45" />
<package id="FSPowerPack.Core.Community" version="2.0.0.0" targetFramework="net45" />
<package id="FSPowerPack.Linq.Community" version="2.0.0.0" targetFramework="net45" />
<package id="FSPowerPack.Metadata.Community" version="2.0.0.0" targetFramework="net45" />
<package id="FSPowerPack.Parallel.Seq.Community" version="2.0.0.0" targetFramework="net45" />
</packages>
\ No newline at end of file
......@@ -4,7 +4,7 @@ open System.Collections.Generic
type targetOutput = Text | CHeader | CList | JS | Nasm
let version = "1.1.3" // Shader Minifer version
let version = "1.1.4" // Shader Minifer version
let debugMode = false
let mutable outputName = "shader_code.h"
......
......@@ -14,7 +14,7 @@ let export ty name (newName:string) =
else
exportedValues := (ty, name, newName) :: !exportedValues
let output() =
let private output() =
if Ast.debugMode || Ast.outputName = "" then stdout
else new StreamWriter(Ast.outputName) :> TextWriter
......
......@@ -48,10 +48,17 @@ let rename code =
printSize code
code
let readFile file =
let stream =
if file = "" then new StreamReader(Console.OpenStandardInput())
else new StreamReader(file)
stream.ReadToEnd()
let minify file =
vprintf "Input file size is: %d\n" (FileInfo(file).Length)
let code = Parse.runParser file
let content = readFile file
let filename = if file = "" then "stdin" else file
vprintf "Input file size is: %d\n" (content.Length)
let code = Parse.runParser filename content
vprintf "File parsed. "; printSize code
let code = Rewriter.reorder code
......
This diff is collapsed.
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment