diff --git a/.gitignore b/.gitignore index 7910f21..2f2233a 100644 --- a/.gitignore +++ b/.gitignore @@ -288,3 +288,4 @@ __pycache__/ *.xsd.cs /QuickLook.Plugin.PDFViewer/MoonPdfLib +/GitVersion.cs diff --git a/MakeZip.bat b/MakeZip.bat deleted file mode 100644 index afca551..0000000 --- a/MakeZip.bat +++ /dev/null @@ -1,2 +0,0 @@ -bc a -r Debug_%date:~-4,4%%date:~-7,2%%date:~-10,2%.zip Build\Debug\*.exe Build\Debug\*.dll -bc a -r Release_%date:~-4,4%%date:~-7,2%%date:~-10,2%.zip Build\Release\*.exe Build\Release\*.dll diff --git a/QuickLook.Plugin/QuickLook.Plugin.ArchiveViewer/Properties/AssemblyInfo.cs b/QuickLook.Plugin/QuickLook.Plugin.ArchiveViewer/Properties/AssemblyInfo.cs index b7bd3e9..7c2c7a7 100644 --- a/QuickLook.Plugin/QuickLook.Plugin.ArchiveViewer/Properties/AssemblyInfo.cs +++ b/QuickLook.Plugin/QuickLook.Plugin.ArchiveViewer/Properties/AssemblyInfo.cs @@ -30,6 +30,4 @@ using System.Runtime.InteropServices; // // You can specify all the values or you can default the Build and Revision Numbers // by using the '*' as shown below: -// [assembly: AssemblyVersion("1.0.*")] -[assembly: AssemblyVersion("1.0.0.0")] -[assembly: AssemblyFileVersion("1.0.0.0")] \ No newline at end of file +// [assembly: AssemblyVersion("1.0.*")] \ No newline at end of file diff --git a/QuickLook.Plugin/QuickLook.Plugin.ArchiveViewer/QuickLook.Plugin.ArchiveViewer.csproj b/QuickLook.Plugin/QuickLook.Plugin.ArchiveViewer/QuickLook.Plugin.ArchiveViewer.csproj index d2a4f12..0396404 100644 --- a/QuickLook.Plugin/QuickLook.Plugin.ArchiveViewer/QuickLook.Plugin.ArchiveViewer.csproj +++ b/QuickLook.Plugin/QuickLook.Plugin.ArchiveViewer/QuickLook.Plugin.ArchiveViewer.csproj @@ -50,6 +50,9 @@ + + Properties\GitVersion.cs + ArchiveInfoPanel.xaml diff --git a/QuickLook.Plugin/QuickLook.Plugin.ImageViewer/Properties/AssemblyInfo.cs b/QuickLook.Plugin/QuickLook.Plugin.ImageViewer/Properties/AssemblyInfo.cs index 910e15d..5e45b28 100644 --- a/QuickLook.Plugin/QuickLook.Plugin.ImageViewer/Properties/AssemblyInfo.cs +++ b/QuickLook.Plugin/QuickLook.Plugin.ImageViewer/Properties/AssemblyInfo.cs @@ -30,6 +30,4 @@ using System.Runtime.InteropServices; // // You can specify all the values or you can default the Build and Revision Numbers // by using the '*' as shown below: -// [assembly: AssemblyVersion("1.0.*")] -[assembly: AssemblyVersion("1.0.0.0")] -[assembly: AssemblyFileVersion("1.0.0.0")] \ No newline at end of file +// [assembly: AssemblyVersion("1.0.*")] \ No newline at end of file diff --git a/QuickLook.Plugin/QuickLook.Plugin.ImageViewer/QuickLook.Plugin.ImageViewer.csproj b/QuickLook.Plugin/QuickLook.Plugin.ImageViewer/QuickLook.Plugin.ImageViewer.csproj index 1079375..c15338b 100644 --- a/QuickLook.Plugin/QuickLook.Plugin.ImageViewer/QuickLook.Plugin.ImageViewer.csproj +++ b/QuickLook.Plugin/QuickLook.Plugin.ImageViewer/QuickLook.Plugin.ImageViewer.csproj @@ -49,6 +49,9 @@ + + Properties\GitVersion.cs + ImagePanel.xaml diff --git a/QuickLook.Plugin/QuickLook.Plugin.OfficeViewer/Properties/AssemblyInfo.cs b/QuickLook.Plugin/QuickLook.Plugin.OfficeViewer/Properties/AssemblyInfo.cs index 73e1574..c19697e 100644 --- a/QuickLook.Plugin/QuickLook.Plugin.OfficeViewer/Properties/AssemblyInfo.cs +++ b/QuickLook.Plugin/QuickLook.Plugin.OfficeViewer/Properties/AssemblyInfo.cs @@ -48,6 +48,4 @@ using System.Windows; // // You can specify all the values or you can default the Build and Revision Numbers // by using the '*' as shown below: -// [assembly: AssemblyVersion("1.0.*")] -[assembly: AssemblyVersion("1.0.0.0")] -[assembly: AssemblyFileVersion("1.0.0.0")] \ No newline at end of file +// [assembly: AssemblyVersion("1.0.*")] \ No newline at end of file diff --git a/QuickLook.Plugin/QuickLook.Plugin.OfficeViewer/QuickLook.Plugin.OfficeViewer.csproj b/QuickLook.Plugin/QuickLook.Plugin.OfficeViewer/QuickLook.Plugin.OfficeViewer.csproj index 1a00b91..3f5474e 100644 --- a/QuickLook.Plugin/QuickLook.Plugin.OfficeViewer/QuickLook.Plugin.OfficeViewer.csproj +++ b/QuickLook.Plugin/QuickLook.Plugin.OfficeViewer/QuickLook.Plugin.OfficeViewer.csproj @@ -67,6 +67,9 @@ + + Properties\GitVersion.cs + Code diff --git a/QuickLook.Plugin/QuickLook.Plugin.PDFViewer/Properties/AssemblyInfo.cs b/QuickLook.Plugin/QuickLook.Plugin.PDFViewer/Properties/AssemblyInfo.cs index 2c01534..0e301f0 100644 --- a/QuickLook.Plugin/QuickLook.Plugin.PDFViewer/Properties/AssemblyInfo.cs +++ b/QuickLook.Plugin/QuickLook.Plugin.PDFViewer/Properties/AssemblyInfo.cs @@ -30,6 +30,4 @@ using System.Runtime.InteropServices; // // You can specify all the values or you can default the Build and Revision Numbers // by using the '*' as shown below: -// [assembly: AssemblyVersion("1.0.*")] -[assembly: AssemblyVersion("1.0.0.0")] -[assembly: AssemblyFileVersion("1.0.0.0")] \ No newline at end of file +// [assembly: AssemblyVersion("1.0.*")] \ No newline at end of file diff --git a/QuickLook.Plugin/QuickLook.Plugin.PDFViewer/QuickLook.Plugin.PdfViewer.csproj b/QuickLook.Plugin/QuickLook.Plugin.PDFViewer/QuickLook.Plugin.PdfViewer.csproj index bb67856..3498cbc 100644 --- a/QuickLook.Plugin/QuickLook.Plugin.PDFViewer/QuickLook.Plugin.PdfViewer.csproj +++ b/QuickLook.Plugin/QuickLook.Plugin.PDFViewer/QuickLook.Plugin.PdfViewer.csproj @@ -49,6 +49,9 @@ + + Properties\GitVersion.cs + PdfViewerControl.xaml diff --git a/QuickLook.Plugin/QuickLook.Plugin.TextViewer/Properties/AssemblyInfo.cs b/QuickLook.Plugin/QuickLook.Plugin.TextViewer/Properties/AssemblyInfo.cs index dbb8cfe..fae95c8 100644 --- a/QuickLook.Plugin/QuickLook.Plugin.TextViewer/Properties/AssemblyInfo.cs +++ b/QuickLook.Plugin/QuickLook.Plugin.TextViewer/Properties/AssemblyInfo.cs @@ -30,6 +30,4 @@ using System.Runtime.InteropServices; // // You can specify all the values or you can default the Build and Revision Numbers // by using the '*' as shown below: -// [assembly: AssemblyVersion("1.0.*")] -[assembly: AssemblyVersion("1.0.0.0")] -[assembly: AssemblyFileVersion("1.0.0.0")] \ No newline at end of file +// [assembly: AssemblyVersion("1.0.*")] \ No newline at end of file diff --git a/QuickLook.Plugin/QuickLook.Plugin.TextViewer/QuickLook.Plugin.TextViewer.csproj b/QuickLook.Plugin/QuickLook.Plugin.TextViewer/QuickLook.Plugin.TextViewer.csproj index 3915e9a..7b1189d 100644 --- a/QuickLook.Plugin/QuickLook.Plugin.TextViewer/QuickLook.Plugin.TextViewer.csproj +++ b/QuickLook.Plugin/QuickLook.Plugin.TextViewer/QuickLook.Plugin.TextViewer.csproj @@ -46,6 +46,9 @@ + + Properties\GitVersion.cs + diff --git a/QuickLook.Plugin/QuickLook.Plugin.VideoViewer/Properties/AssemblyInfo.cs b/QuickLook.Plugin/QuickLook.Plugin.VideoViewer/Properties/AssemblyInfo.cs index 36e5d4e..7c8bc97 100644 --- a/QuickLook.Plugin/QuickLook.Plugin.VideoViewer/Properties/AssemblyInfo.cs +++ b/QuickLook.Plugin/QuickLook.Plugin.VideoViewer/Properties/AssemblyInfo.cs @@ -48,6 +48,4 @@ using System.Windows; // // You can specify all the values or you can default the Build and Revision Numbers // by using the '*' as shown below: -// [assembly: AssemblyVersion("1.0.*")] -[assembly: AssemblyVersion("1.0.0.0")] -[assembly: AssemblyFileVersion("1.0.0.0")] \ No newline at end of file +// [assembly: AssemblyVersion("1.0.*")] \ No newline at end of file diff --git a/QuickLook.Plugin/QuickLook.Plugin.VideoViewer/QuickLook.Plugin.VideoViewer.csproj b/QuickLook.Plugin/QuickLook.Plugin.VideoViewer/QuickLook.Plugin.VideoViewer.csproj index ab0e8e1..9e63017 100644 --- a/QuickLook.Plugin/QuickLook.Plugin.VideoViewer/QuickLook.Plugin.VideoViewer.csproj +++ b/QuickLook.Plugin/QuickLook.Plugin.VideoViewer/QuickLook.Plugin.VideoViewer.csproj @@ -60,6 +60,9 @@ MSBuild:Compile Designer + + Properties\GitVersion.cs + diff --git a/QuickLook.sln b/QuickLook.sln index 9385615..6909ff9 100644 --- a/QuickLook.sln +++ b/QuickLook.sln @@ -1,7 +1,7 @@  Microsoft Visual Studio Solution File, Format Version 12.00 # Visual Studio 15 -VisualStudioVersion = 15.0.26403.7 +VisualStudioVersion = 15.0.26430.4 MinimumVisualStudioVersion = 10.0.40219.1 Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "QuickLook", "QuickLook\QuickLook.csproj", "{8B4A9CE5-67B5-4A94-81CB-3771F688FDEB}" ProjectSection(ProjectDependencies) = postProject @@ -24,6 +24,11 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "QuickLook.Plugin.OfficeView EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "QuickLook.Plugin.VideoViewer", "QuickLook.Plugin\QuickLook.Plugin.VideoViewer\QuickLook.Plugin.VideoViewer.csproj", "{1B746D92-49A5-4A37-9D75-DCC490393290}" EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Items", "{BAE81497-98FA-4A7A-A0FB-2B86C9694B9C}" + ProjectSection(SolutionItems) = preProject + GitVersion.cs = GitVersion.cs + EndProjectSection +EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|x86 = Debug|x86 diff --git a/QuickLook/Properties/AssemblyInfo.cs b/QuickLook/Properties/AssemblyInfo.cs index 002b4b3..c6b1d91 100644 --- a/QuickLook/Properties/AssemblyInfo.cs +++ b/QuickLook/Properties/AssemblyInfo.cs @@ -48,6 +48,4 @@ using System.Windows; // // You can specify all the values or you can default the Build and Revision Numbers // by using the '*' as shown below: -// [assembly: AssemblyVersion("1.0.*")] -[assembly: AssemblyVersion("1.0.0.0")] -[assembly: AssemblyFileVersion("1.0.0.0")] \ No newline at end of file +// [assembly: AssemblyVersion("1.0.*")] \ No newline at end of file diff --git a/QuickLook/QuickLook.csproj b/QuickLook/QuickLook.csproj index 00ce624..a6b517f 100644 --- a/QuickLook/QuickLook.csproj +++ b/QuickLook/QuickLook.csproj @@ -78,6 +78,9 @@ MSBuild:Compile Designer + + Properties\GitVersion.cs + @@ -185,4 +188,7 @@ + + "$(SolutionDir)update-version.cmd" "$(SolutionDir)" "$(SolutionDir)GitVersion.cs" + \ No newline at end of file diff --git a/update-version.cmd b/update-version.cmd new file mode 100644 index 0000000..3067d02 --- /dev/null +++ b/update-version.cmd @@ -0,0 +1,10 @@ +rem @echo off +cd %1 +for /F "delims=" %%i in ('git describe --always --tags "--abbrev=0"') do set git_tag=%%i +for /F "delims=" %%i in ('git describe --always --tags') do set git_revision=%%i +echo // This file is generated by update-version.cmd > %2 +echo. >> %2 +echo using System.Reflection;>> %2 +echo. >> %2 +echo [assembly: AssemblyVersion("%git_tag%")]>> %2 +echo [assembly: AssemblyInformationalVersion("%git_revision%")]>> %2