fix subwcrev stuff. this time, fixes stale versions on f5 or ctrl+f5 builds.

in the future, we should use svn msbuild community tasks for even cleverer and leaner solutions (which dont depend on subwcrev.exe...)
This commit is contained in:
zeromus 2015-02-01 03:01:31 +00:00
parent bea4f1d7b3
commit c2621e798d
4 changed files with 15 additions and 14 deletions

View File

@ -20,6 +20,8 @@
</FileUpgradeFlags>
<OldToolsVersion>3.5</OldToolsVersion>
<UpgradeBackupLocation />
<TargetFrameworkProfile />
<DefineConstants Condition=" '$(OS)' == 'Windows_NT' ">WINDOWS</DefineConstants>
<PublishUrl>publish\</PublishUrl>
<Install>true</Install>
<InstallFrom>Disk</InstallFrom>
@ -34,8 +36,6 @@
<ApplicationVersion>1.0.0.%2a</ApplicationVersion>
<UseApplicationTrust>false</UseApplicationTrust>
<BootstrapperEnabled>true</BootstrapperEnabled>
<TargetFrameworkProfile />
<DefineConstants Condition=" '$(OS)' == 'Windows_NT' ">WINDOWS</DefineConstants>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|x86' ">
<DebugSymbols>true</DebugSymbols>

View File

@ -1,6 +1,8 @@

Microsoft Visual Studio Solution File, Format Version 11.00
# Visual Studio 2010
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Version", "Version\Version.csproj", "{0CE8B337-08E3-4602-BF10-C4D4C75D2F13}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "BizHawk.Client.Common", "BizHawk.Client.Common\BizHawk.Client.Common.csproj", "{24A0AA3C-B25F-4197-B23D-476D6462DBA0}"
ProjectSection(ProjectDependencies) = postProject
{0CE8B337-08E3-4602-BF10-C4D4C75D2F13} = {0CE8B337-08E3-4602-BF10-C4D4C75D2F13}
@ -52,8 +54,6 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "BizHawk.Bizware.BizwareGL.G
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "BizHawk.Bizware.BizwareGL.SlimDX", "Bizware\BizHawk.Bizware.BizwareGL.SlimDX\BizHawk.Bizware.BizwareGL.SlimDX.csproj", "{E6B436B1-A3CD-4C9A-8F76-5D7154726884}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Version", "Version\Version.csproj", "{0CE8B337-08E3-4602-BF10-C4D4C75D2F13}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|x86 = Debug|x86

View File

@ -1,39 +1,38 @@
@echo off
set TEMPFILE="%TEMP%\BIZBUILD-SVN-%RANDOM%-%RANDOM%-%RANDOM%-%RANDOM%"
set SVNREV="%~1svnrev.cs"
set SVNREV="%~1\svnrev.cs"
rem try generating svnrev from svn now. this will fail if svn is nonexistent, so...
"%~1SubWCRev.exe" "%~1\..\." "%~1svnrev_template" %TEMPFILE% > nul
"%~1\SubWCRev.exe" "%~1\..\." "%~1\svnrev_template" %TEMPFILE% > NUL
rem generate a svnrev with sed using no revision number, in case svn isnt available
if not exist %TEMPFILE% (
"%~1sed.exe" s/\$WCREV\$/0/ < "%~1svnrev_template" > %TEMPFILE%
"%~1\sed.exe" s/\$WCREV\$/0/ < "%~1\svnrev_template" > %TEMPFILE%
)
rem ... ignore the error
SET ERRORLEVEL=0
rem if we didnt even have a svnrev, then go ahead and copy it
if not exist %SVNREV% (
@copy /y %TEMPFILE% %SVNREV% > NUL
copy /y %TEMPFILE% %SVNREV% > NUL
) else if exist %TEMPFILE% (
rem check to see whether its any different, so we dont touch unchanged files
fc /b %TEMPFILE% %SVNREV% > nul
fc /b %TEMPFILE% %SVNREV% > NUL
if ERRORLEVEL 2 (
echo Updated svnrev file
@copy /y %TEMPFILE% %SVNREV% > NUL
copy /y %TEMPFILE% %SVNREV% > NUL
goto SKIP
)
if ERRORLEVEL 1 (
echo Updated svnrev file
@copy /y %TEMPFILE% %SVNREV% > NUL
copy /y %TEMPFILE% %SVNREV% > NUL
goto SKIP
)
if ERRORLEVEL 0 (
echo Not touching unchanged svnrev file
echo svnrev is indicating no changes
goto SKIP
)

View File

@ -1,5 +1,8 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Target Name="Build">
<Exec WorkingDirectory="$(MSBuildProjectDirectory)" Command='"$(MSBuildProjectDirectory)\subwcrev.bat" $(MSBuildProjectDirectory)' />
</Target>
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">x86</Platform>
@ -31,7 +34,6 @@
<WarningLevel>4</WarningLevel>
<PlatformTarget>x86</PlatformTarget>
</PropertyGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
<PropertyGroup>
<PreBuildEvent>"$(ProjectDir)subwcrev.bat" "$(ProjectDir)"</PreBuildEvent>
</PropertyGroup>