Skip to content

Commit

Permalink
Adding build & packaging support via Rake and Albacore.
Browse files Browse the repository at this point in the history
 * The AssemblyInfo.cs files are now updated by the build script.
 * The MusicSync.Server app no longer requires a separate ico file.
  • Loading branch information
nithinphilips committed Aug 30, 2011
1 parent de79e40 commit 13a3442
Show file tree
Hide file tree
Showing 12 changed files with 402 additions and 156 deletions.
3 changes: 2 additions & 1 deletion .gitignore
@@ -1,4 +1,5 @@

build/
TestResults/
bin/
obj/
deliverables/
Expand Down
59 changes: 8 additions & 51 deletions MusicSync.Desktop/Properties/AssemblyInfo.cs
@@ -1,55 +1,12 @@
using System.Reflection;
using System.Resources;
using System.Runtime.CompilerServices;
using System.Reflection;
using System.Runtime.InteropServices;
using System.Windows;

// General Information about an assembly is controlled through the following
// set of attributes. Change these attribute values to modify the information
// associated with an assembly.
[assembly: AssemblyTitle("Music Sync Desktop")]
[assembly: AssemblyDescription("A program to copy iTunes music to Blackberry phone and create playlists")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyTitle("MusicSync.Server")]
[assembly: AssemblyDescription("A server for wirelessly syncing music to BlackBerry phones")]
[assembly: AssemblyCompany("Nithin Philips")]
[assembly: AssemblyProduct("Wifi Music Sync")]
[assembly: AssemblyCopyright("(C) 2011 Nithin Philips")]
[assembly: AssemblyTrademark("")]
[assembly: AssemblyCulture("")]

// Setting ComVisible to false makes the types in this assembly not visible
// to COM components. If you need to access a type in this assembly from
// COM, set the ComVisible attribute to true on that type.
[assembly: ComVisible(false)]

//In order to begin building localizable applications, set
//<UICulture>CultureYouAreCodingWith</UICulture> in your .csproj file
//inside a <PropertyGroup>. For example, if you are using US english
//in your source files, set the <UICulture> to en-US. Then uncomment
//the NeutralResourceLanguage attribute below. Update the "en-US" in
//the line below to match the UICulture setting in the project file.

//[assembly: NeutralResourcesLanguage("en-US", UltimateResourceFallbackLocation.Satellite)]


[assembly: ThemeInfo(
ResourceDictionaryLocation.None, //where theme specific resource dictionaries are located
//(used if a resource is not found in the page,
// or application resource dictionaries)
ResourceDictionaryLocation.SourceAssembly //where the generic resource dictionary is located
//(used if a resource is not found in the page,
// app, or any theme specific resource dictionaries)
)]

[assembly: AssemblyProduct("BBWifiMusicSync")]
[assembly: AssemblyCopyright("(c) 2011 Nithin Philips")]
[assembly: AssemblyTrademark("BlackBerry(r) is a registered trademark of Research in Motion")]
[assembly: AssemblyVersion("0.2.0")]
[assembly: AssemblyFileVersion("0.2.0")]

// Version information for an assembly consists of the following four values:
//
// Major Version
// Minor Version
// Build Number
// Revision
//
// 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("0.2.0.0")]
[assembly: AssemblyFileVersion("0.2.0.0")]
8 changes: 4 additions & 4 deletions MusicSync.Installer/Installer.nsi
Expand Up @@ -27,10 +27,10 @@ SetCompressor lzma

; These fields add properties to the generated installer exe.
!ifndef PRODUCT_VERSION
!define PRODUCT_VERSION "0.2.0.0"
VIProductVersion "0.2.0.0"
!define PRODUCT_VERSION "latest"
VIProductVersion "0.0.0.0"
!else
VIProductVersion "${PRODUCT_VERSION}"
VIProductVersion "${PRODUCT_VERSION}.0"
!endif

VIAddVersionKey Comments "${PRODUCT_NAME} Installer"
Expand Down Expand Up @@ -165,7 +165,7 @@ SectionIn RO
File "..\MusicSync.Server\bin\Release\log4net.dll"
File "..\MusicSync.Server\bin\Release\log4net.xml"
File "..\MusicSync.Server\bin\Release\MusicSync.Server.exe"
File "..\MusicSync.Server\bin\Release\music-sync-server.ico"
File "..\MusicSync.Server\music-sync-server.ico"
File "..\MusicSync.Server\bin\Release\System.CoreEx.dll"
File "..\MusicSync.Server\bin\Release\System.Observable.dll"
File "..\MusicSync.Server\bin\Release\System.Reactive.dll"
Expand Down
17 changes: 13 additions & 4 deletions MusicSync.Server/MusicSync.Server.csproj
Expand Up @@ -91,6 +91,11 @@
<DesignTimeSharedInput>True</DesignTimeSharedInput>
<DependentUpon>Settings.settings</DependentUpon>
</Compile>
<Compile Include="Properties\Resources.Designer.cs">
<AutoGen>True</AutoGen>
<DesignTime>True</DesignTime>
<DependentUpon>Resources.resx</DependentUpon>
</Compile>
<Compile Include="ServerService.cs" />
<Compile Include="Settings.cs" />
</ItemGroup>
Expand Down Expand Up @@ -131,9 +136,13 @@
</None>
</ItemGroup>
<ItemGroup>
<Content Include="music-sync-server.ico">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</Content>
<Content Include="music-sync-server.ico" />
</ItemGroup>
<ItemGroup>
<EmbeddedResource Include="Properties\Resources.resx">
<Generator>ResXFileCodeGenerator</Generator>
<LastGenOutput>Resources.Designer.cs</LastGenOutput>
</EmbeddedResource>
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
Expand All @@ -143,4 +152,4 @@
<Target Name="AfterBuild">
</Target>
-->
</Project>
</Project>
2 changes: 1 addition & 1 deletion MusicSync.Server/Program.cs
Expand Up @@ -100,7 +100,7 @@ static void Main(string[] args)
Application.Exit();
});

notifyIcon.Icon = new Icon("music-sync-server.ico");
notifyIcon.Icon = Resources.music_sync_server;
notifyIcon.ContextMenu = new ContextMenu(new MenuItem[] { exitMenu });
notifyIcon.Text = "Music Sync Server Running";
notifyIcon.Visible = true;
Expand Down
40 changes: 8 additions & 32 deletions MusicSync.Server/Properties/AssemblyInfo.cs
@@ -1,36 +1,12 @@
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Reflection;
using System.Runtime.InteropServices;

// General Information about an assembly is controlled through the following
// set of attributes. Change these attribute values to modify the information
// associated with an assembly.
[assembly: AssemblyTitle("Wifi Sync Server")]
[assembly: AssemblyDescription("A server that, along with a client Blackberry app, allows wireless iTunes music syncing.")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyTitle("MusicSync.Desktop")]
[assembly: AssemblyDescription("A desktop client for syncing music to BlackBerry phones")]
[assembly: AssemblyCompany("Nithin Philips")]
[assembly: AssemblyProduct("Wifi Music Sync")]
[assembly: AssemblyCopyright("(C) 2011 Nithin Philips")]
[assembly: AssemblyTrademark("")]
[assembly: AssemblyCulture("")]

// Setting ComVisible to false makes the types in this assembly not visible
// to COM components. If you need to access a type in this assembly from
// COM, set the ComVisible attribute to true on that type.
[assembly: ComVisible(false)]

// The following GUID is for the ID of the typelib if this project is exposed to COM
[assembly: Guid("7388436a-42ee-4361-8d5b-880115a6d4c4")]
[assembly: AssemblyProduct("BBWifiMusicSync")]
[assembly: AssemblyCopyright("(c) 2011 Nithin Philips")]
[assembly: AssemblyTrademark("BlackBerry(r) is a registered trademark of Research in Motion")]
[assembly: AssemblyVersion("0.2.0")]
[assembly: AssemblyFileVersion("0.2.0")]

// Version information for an assembly consists of the following four values:
//
// Major Version
// Minor Version
// Build Number
// Revision
//
// 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("0.2.0.0")]
[assembly: AssemblyFileVersion("0.2.0.0")]
70 changes: 70 additions & 0 deletions MusicSync.Server/Properties/Resources.Designer.cs

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

124 changes: 124 additions & 0 deletions MusicSync.Server/Properties/Resources.resx
@@ -0,0 +1,124 @@
<?xml version="1.0" encoding="utf-8"?>
<root>
<!--
Microsoft ResX Schema
Version 2.0
The primary goals of this format is to allow a simple XML format
that is mostly human readable. The generation and parsing of the
various data types are done through the TypeConverter classes
associated with the data types.
Example:
... ado.net/XML headers & schema ...
<resheader name="resmimetype">text/microsoft-resx</resheader>
<resheader name="version">2.0</resheader>
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
<value>[base64 mime encoded serialized .NET Framework object]</value>
</data>
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
<comment>This is a comment</comment>
</data>
There are any number of "resheader" rows that contain simple
name/value pairs.
Each data row contains a name, and value. The row also contains a
type or mimetype. Type corresponds to a .NET class that support
text/value conversion through the TypeConverter architecture.
Classes that don't support this are serialized and stored with the
mimetype set.
The mimetype is used for serialized objects, and tells the
ResXResourceReader how to depersist the object. This is currently not
extensible. For a given mimetype the value must be set accordingly:
Note - application/x-microsoft.net.object.binary.base64 is the format
that the ResXResourceWriter will generate, however the reader can
read any of the formats listed below.
mimetype: application/x-microsoft.net.object.binary.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.soap.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.bytearray.base64
value : The object must be serialized into a byte array
: using a System.ComponentModel.TypeConverter
: and then encoded with base64 encoding.
-->
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
<xsd:element name="root" msdata:IsDataSet="true">
<xsd:complexType>
<xsd:choice maxOccurs="unbounded">
<xsd:element name="metadata">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" />
</xsd:sequence>
<xsd:attribute name="name" use="required" type="xsd:string" />
<xsd:attribute name="type" type="xsd:string" />
<xsd:attribute name="mimetype" type="xsd:string" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="assembly">
<xsd:complexType>
<xsd:attribute name="alias" type="xsd:string" />
<xsd:attribute name="name" type="xsd:string" />
</xsd:complexType>
</xsd:element>
<xsd:element name="data">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="resheader">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" />
</xsd:complexType>
</xsd:element>
</xsd:choice>
</xsd:complexType>
</xsd:element>
</xsd:schema>
<resheader name="resmimetype">
<value>text/microsoft-resx</value>
</resheader>
<resheader name="version">
<value>2.0</value>
</resheader>
<resheader name="reader">
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<assembly alias="System.Windows.Forms" name="System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
<data name="music_sync_server" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\music-sync-server.ico;System.Drawing.Icon, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
</root>

0 comments on commit 13a3442

Please sign in to comment.