Automatically versionize when building

This commit is contained in:
Ron Pedde 2006-05-07 07:35:43 +00:00
parent 6db7465303
commit 5afe726aeb
6 changed files with 35 additions and 12 deletions

View File

@ -6,12 +6,12 @@ using System.Runtime.CompilerServices;
// set of attributes. Change these attribute values to modify the information
// associated with an assembly.
//
[assembly: AssemblyTitle("")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyTitle("Firefly Configurator")]
[assembly: AssemblyDescription("Configuration Program for Firefly Media Server")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("")]
[assembly: AssemblyProduct("")]
[assembly: AssemblyCopyright("")]
[assembly: AssemblyCompany("Ron Pedde")]
[assembly: AssemblyProduct("FireflyConfig")]
[assembly: AssemblyCopyright("Copyright (C) 2006 Ron Pedde")]
[assembly: AssemblyTrademark("")]
[assembly: AssemblyCulture("")]
@ -26,7 +26,7 @@ using System.Runtime.CompilerServices;
// You can specify all the values or you can default the Revision and Build Numbers
// by using the '*' as shown below:
[assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("1.0.$WCREV$")]
//
// In order to sign your assembly you must specify a key to use. Refer to the

View File

@ -16,7 +16,7 @@
DefaultTargetSchema = "IE50"
DelaySign = "false"
OutputType = "WinExe"
PreBuildEvent = ""
PreBuildEvent = "..\..\..\versionize.bat"
PostBuildEvent = ""
RootNamespace = "FireflyConfig"
RunPostBuildEvent = "OnBuildSuccess"

View File

@ -116,7 +116,7 @@
/* #undef HAVE_VORBIS_CODEC_H */
/* Name of package */
#define PACKAGE "mt-daapd"
#define PACKAGE "Firefly Media Server"
/* Define to the address where bug reports for this package should be sent. */
#define PACKAGE_BUGREPORT ""
@ -149,6 +149,8 @@
#define HAVE_SQL
/* Version number of package */
#define VERSION "0.3.0"
#define VERSION "svn-$WCREV$"
#define BUILD_DATE "$WCNOW$"
#define REPO_DATE "$WCDATE$"
#include "win32.h"

View File

@ -47,7 +47,8 @@
<Tool
Name="VCPostBuildEventTool"/>
<Tool
Name="VCPreBuildEventTool"/>
Name="VCPreBuildEventTool"
CommandLine="versionize.bat"/>
<Tool
Name="VCPreLinkEventTool"/>
<Tool
@ -98,7 +99,8 @@
<Tool
Name="VCPostBuildEventTool"/>
<Tool
Name="VCPreBuildEventTool"/>
Name="VCPreBuildEventTool"
CommandLine="versionize.bat"/>
<Tool
Name="VCPreLinkEventTool"/>
<Tool

View File

@ -5,7 +5,7 @@
!define PRODUCT_NAME "Firefly Media Server"
!define PRODUCT_SERVICE "Firefly Media Server"
!define /date DATEVER "%Y%m%d"
!define PRODUCT_VERSION "svn-1004"
!define PRODUCT_VERSION "svn-$WCREV$"
!define PRODUCT_PUBLISHER "Ron Pedde"
!define PRODUCT_WEB_SITE "http://www.fireflymediaserver.org"
!define PRODUCT_DIR_REGKEY "Software\Microsoft\Windows\CurrentVersion\App Paths\firefly.exe"
@ -90,6 +90,7 @@ Section -Pre
lbl_continue:
; should really loop until service stops...
DetailPrint "Service is stopped..."
Sleep 1000
!include WinMessages.nsh
FindWindow $0 "" "Firefly Config"
@ -210,6 +211,8 @@ Section -Post
MessageBox MB_OK "Error installing service: $1"
lbl_install_success:
ExecWait 'netsh firewall add allowedprogram "$2\firefly.exe" "${PRODUCT_NAME}" enable'
nsSCM::Start "${PRODUCT_NAME}"
Exec "$2\FireflyConfig"
SectionEnd

16
win32/versionize.bat Normal file
View File

@ -0,0 +1,16 @@
@echo off
set SUBWC="c:\program files\tortoisesvn\bin\subwcrev.exe"
if not exist %SUBWC% goto NOSUBWC
echo Fixing version info...
%SUBWC% %0\..\.. %0\..\config.h.templ %0\..\config.h
%SUBWC% %0\..\.. %0\..\FireflyConfig\AssemblyInfo.cs.templ %0\..\FireflyConfig\AssemblyInfo.cs
%SUBWC% %0\..\.. %0\..\nsi\mt-daapd.nsi.templ %0\..\nsi\mt-daapd.nsi
goto END
:NOSUBWC
copy %0\..\config.h.templ %0\..\config.h
copy %0\..\FireflyConfig\AssemblyInfo.cs.templ %0\..\FireflyConfig\AssemblyInfo.cs
copy %0\..\nsi\mt-daapd.nsi.templ %0\..\nsi\mt-daapd.nsi
:END