Skip to content

Commit

Permalink
initial release
Browse files Browse the repository at this point in the history
  • Loading branch information
sidiandi committed Jan 10, 2016
1 parent 4f94fb0 commit c35a50c
Show file tree
Hide file tree
Showing 12 changed files with 82 additions and 33 deletions.
2 changes: 1 addition & 1 deletion CommonAssemblyInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,6 @@

[assembly: System.Reflection.AssemblyCopyright("Copyright (c) https://github.com/sidiandi 2016")]
[assembly: System.Reflection.AssemblyCompany("sidiandi")]
[assembly: System.Reflection.AssemblyProduct("tta")]
[assembly: System.Reflection.AssemblyProduct("ttaudio")]


40 changes: 20 additions & 20 deletions setup/Files.wxs
Original file line number Diff line number Diff line change
Expand Up @@ -23,18 +23,6 @@
<Component Id="cmp8841C0AC2F5771377A6D40464B9E9CA3" Guid="*">
<File Id="fil4265412E257F04FE87688FAC0C4C5E7D" KeyPath="yes" Source="$(var.BinDir)\taglib-sharp.dll" />
</Component>
<Component Id="cmpBF726E8AECBB99C1F6C4C49B6307B418" Guid="*">
<File Id="filC9B37937F7768B44C7A6D40B7AD9C80C" KeyPath="yes" Source="$(var.BinDir)\tta.exe" />
</Component>
<Component Id="cmp599EDC0521739D45EEE2AEC60A0935DC" Guid="*">
<File Id="fil865958BA87D8F61BCB31476D1CF56A8B" KeyPath="yes" Source="$(var.BinDir)\tta.exe.config" />
</Component>
<Component Id="cmpA4E68135E45606F6B5EC8CCF87BD4B95" Guid="*">
<File Id="fil72F2A52C68532F0E27CAC8C2642DBB8F" KeyPath="yes" Source="$(var.BinDir)\tta.pdb" />
</Component>
<Component Id="cmp4768DB9178A957B92CE5CD25BDD6B52B" Guid="*">
<File Id="fil3D0D32316D4BA5DECE1147D5DA3DFD86" KeyPath="yes" Source="$(var.BinDir)\tta.xml" />
</Component>
<Component Id="cmp740089BEBED0097C1242B5C0DE20315F" Guid="*">
<File Id="fil3AE215B2FB3885A999EE6B9D7354E454" KeyPath="yes" Source="$(var.BinDir)\ttaenc.dll" />
</Component>
Expand All @@ -56,6 +44,21 @@
<Component Id="cmp5504445BD4D6D9BBC2E6D076A5C1753C" Guid="*">
<File Id="filF847F0BFA8B06A3C3BE52120244824BA" KeyPath="yes" Source="$(var.BinDir)\ttaencTests.xml" />
</Component>
<Component Id="cmp40A4433BF9C4BB08D35E81BB6A78489B" Guid="*">
<File Id="filA9D9C96D11DB45D0701461807F22829C" KeyPath="yes" Source="$(var.BinDir)\ttaudio.exe" />
</Component>
<Component Id="cmp0D0FCDBFEEE4BD0CBC9B77D17024A379" Guid="*">
<File Id="filF44CD336137787B897332AE1144B8850" KeyPath="yes" Source="$(var.BinDir)\ttaudio.exe.config" />
</Component>
<Component Id="cmpD48423926F4089FE7A83D0B7FB2B5A3D" Guid="*">
<File Id="fil5F3C8EA2B83768C6DEA7ED3E1477B83F" KeyPath="yes" Source="$(var.BinDir)\ttaudio.ico" />
</Component>
<Component Id="cmp6379A1AB146081CD805945DEEAD891A2" Guid="*">
<File Id="filCD7A5227D7ACF08E1B4778E5D3EB722E" KeyPath="yes" Source="$(var.BinDir)\ttaudio.pdb" />
</Component>
<Component Id="cmpE3D7235DBF4E65F33806D4E820706729" Guid="*">
<File Id="fil931F2C9E210897024D37E719FFAD301D" KeyPath="yes" Source="$(var.BinDir)\ttaudio.xml" />
</Component>
<Directory Id="dirC7DE656D38A188464F92B57F9464B4CA" Name="media">
<Component Id="cmp58FB8CDBCAD1C9829CA7FA88F6189096" Guid="*">
<File Id="fil5229B149BF253024F4C38EC5A4A5E1C8" KeyPath="yes" Source="$(var.BinDir)\media\default-album-art.png" />
Expand Down Expand Up @@ -231,9 +234,6 @@
<Component Id="cmp4F5B9AF063ACE5B306EF8AB4B02311F8" Guid="*">
<File Id="fil3D6EBECE8D4D879A955BC55E31812099" KeyPath="yes" Source="$(var.BinDir)\tools\tttool-win32-1.5.1\contrib\smpeg.dll" />
</Component>
<Component Id="cmp409C21CD4CD7CFC276492CC06F0688C1" Guid="*">
<File Id="fil0059E4CEABA63390C3E48E065BCD076B" KeyPath="yes" Source="$(var.BinDir)\tools\tttool-win32-1.5.1\contrib\stdout.txt" />
</Component>
<Directory Id="dir66506DAE341221DF6386AFBF0549B75F" Name="espeak-data">
<Component Id="cmpFFDEB6C92D5A7F7C7D10AC6C7AE7EFDD" Guid="*">
<File Id="filF2CD11E930602C14182F1A5503E59744" KeyPath="yes" Source="$(var.BinDir)\tools\tttool-win32-1.5.1\contrib\espeak-data\af_dict" />
Expand Down Expand Up @@ -1141,17 +1141,18 @@
<ComponentRef Id="cmp0C02B03F271D69FF87C615C00C09CED8" />
<ComponentRef Id="cmp8DB197CC057AC7C94619B4892024F92C" />
<ComponentRef Id="cmp8841C0AC2F5771377A6D40464B9E9CA3" />
<ComponentRef Id="cmpBF726E8AECBB99C1F6C4C49B6307B418" />
<ComponentRef Id="cmp599EDC0521739D45EEE2AEC60A0935DC" />
<ComponentRef Id="cmpA4E68135E45606F6B5EC8CCF87BD4B95" />
<ComponentRef Id="cmp4768DB9178A957B92CE5CD25BDD6B52B" />
<ComponentRef Id="cmp740089BEBED0097C1242B5C0DE20315F" />
<ComponentRef Id="cmpF465CD5B7371CFD177DC738F0B5723DE" />
<ComponentRef Id="cmpB489D348242CFCA4DED808289F27532F" />
<ComponentRef Id="cmp77915993D94F6342C00682261561A5F5" />
<ComponentRef Id="cmp0F909904036FEA6A84104FE0BB892BD9" />
<ComponentRef Id="cmp55BAD5109824940A4ACE0999C3474692" />
<ComponentRef Id="cmp5504445BD4D6D9BBC2E6D076A5C1753C" />
<ComponentRef Id="cmp40A4433BF9C4BB08D35E81BB6A78489B" />
<ComponentRef Id="cmp0D0FCDBFEEE4BD0CBC9B77D17024A379" />
<ComponentRef Id="cmpD48423926F4089FE7A83D0B7FB2B5A3D" />
<ComponentRef Id="cmp6379A1AB146081CD805945DEEAD891A2" />
<ComponentRef Id="cmpE3D7235DBF4E65F33806D4E820706729" />
<ComponentRef Id="cmp58FB8CDBCAD1C9829CA7FA88F6189096" />
<ComponentRef Id="cmpA182E74189D38175A5177C0C89A4B8A3" />
<ComponentRef Id="cmpD37F97F8EA2E04C35857046D5E38E47C" />
Expand Down Expand Up @@ -1206,7 +1207,6 @@
<ComponentRef Id="cmp055AA7F00902F5C1DA7FBB4B34A7714C" />
<ComponentRef Id="cmp5FA13BD6CED7176587D0613E0856E2F5" />
<ComponentRef Id="cmp4F5B9AF063ACE5B306EF8AB4B02311F8" />
<ComponentRef Id="cmp409C21CD4CD7CFC276492CC06F0688C1" />
<ComponentRef Id="cmpFFDEB6C92D5A7F7C7D10AC6C7AE7EFDD" />
<ComponentRef Id="cmp419B637AAE900A843062247C2FE622B4" />
<ComponentRef Id="cmp93845AE284AA87D16745CD386BEC75DF" />
Expand Down
14 changes: 10 additions & 4 deletions setup/Product.wxs
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,11 @@
</Product>

<Fragment>
<Directory Id="TARGETDIR" Name="SourceDir">

<Icon Id="icon.ico" SourceFile="$(var.BinDir)\$(var.ProductName).ico" />
<Property Id="ARPPRODUCTICON" Value="icon.ico" />

<Directory Id="TARGETDIR" Name="SourceDir">
<Directory Id="ProgramMenuFolder">
<Directory Id="ApplicationProgramsFolder" Name="$(var.ProductName)"/>
</Directory>
Expand All @@ -31,10 +35,12 @@
<DirectoryRef Id="ApplicationProgramsFolder">
<Component Id="ApplicationShortcut" Guid="edb02483-facc-4a17-b10b-580ec5580599">
<Shortcut Id="ApplicationStartMenuShortcut"
Name="tta"
Name="$(var.ProductName)"
Description="Uploads audio files to an audio pen"
Target="[#filC9B37937F7768B44C7A6D40B7AD9C80C]"
WorkingDirectory="APPLICATIONROOTDIRECTORY"/>
Target="[#filA9D9C96D11DB45D0701461807F22829C]"
WorkingDirectory="APPLICATIONROOTDIRECTORY"
Icon="icon.ico"
/>
<RemoveFolder Id="ApplicationProgramsFolder" On="uninstall"/>
<RegistryValue Root="HKCU" Key="Software\Microsoft\MyApplicationName" Name="installed" Type="integer" Value="1" KeyPath="yes"/>
</Component>
Expand Down
2 changes: 1 addition & 1 deletion ttaenc/AlbumCollection.cs
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ namespace tta
public class AlbumCollection
{
public string Title;
public string ProductId;
public int ProductId;
public Album[] Album;
}
}
18 changes: 15 additions & 3 deletions ttaenc/AlbumMaker.cs
Original file line number Diff line number Diff line change
Expand Up @@ -168,16 +168,28 @@ public async Task Create(CancellationToken cancellationToken, AlbumCollection co
{
AlbumCollection = collection,
Name = PathUtil.GetValidFileName(collection.Title),
ProductId = GetNextProductId(),
ProductId = collection.ProductId
};
meta.GmeFile = Path.Combine(OutputDir, meta.Name + ".gme");

var metaXml = Path.Combine(TempDir, meta.Name + ".xml");

var oldMeta = PathUtil.ReadXml<AlbumCollectionMeta>(metaXml);
if (oldMeta != null)

if (collection.ProductId != 0)
{
meta.ProductId = collection.ProductId;
}
else
{
meta.ProductId = oldMeta.ProductId;
if (oldMeta == null)
{
meta.ProductId = GetNextProductId();
}
else
{
meta.ProductId = oldMeta.ProductId;
}
}

using (new LogScope(log, "Convert {0} (ProductId={1})", meta.Name, meta.ProductId))
Expand Down
22 changes: 22 additions & 0 deletions ttaenc/media/style.css
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,28 @@ body {
margin: 4px;
}

.printInstructions img {
float: left;
}

.printInstructions {
font-size: 12px;
border: solid;
border-width: 1px;

background-color: lightyellow;

padding: 4px;
margin: 4px;
}

@media print {

.printInstructions {
display: none;
}
}

h2
{
font-size: 1.0em;
Expand Down
2 changes: 1 addition & 1 deletion ttaudio.sln
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ttaenc", "ttaenc\ttaenc.csp
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ttaencTests", "ttaencTests\ttaencTests.csproj", "{096E46F8-4490-4B52-80EB-14C22E436D36}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "tta", "tta\tta.csproj", "{661C5C6F-01C3-4DF2-BD77-1CE590D01B25}"
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ttaudio", "ttaudio\ttaudio.csproj", "{661C5C6F-01C3-4DF2-BD77-1CE590D01B25}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Expand Down
2 changes: 1 addition & 1 deletion ttaudio/MainForm.Designer.cs

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

6 changes: 5 additions & 1 deletion ttaudio/MainForm.cs
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,11 @@ Task Convert(CancellationToken cancel, IList<string> files, string title, string
{
collection.Title = title;
}
collection.ProductId = productId;
if (!String.IsNullOrEmpty(productId))
{
collection.ProductId = UInt16.Parse(productId);
}
albumMaker.Create(cancel, collection).Wait();
}
catch (Exception ex)
Expand Down
2 changes: 1 addition & 1 deletion ttaudio/Properties/AssemblyInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
// 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("tta")]
[assembly: AssemblyTitle("ttaudio")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]

Expand Down
5 changes: 5 additions & 0 deletions ttaudio/tta.csproj → ttaudio/ttaudio.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,11 @@
<Name>ttaenc</Name>
</ProjectReference>
</ItemGroup>
<ItemGroup>
<Content Include="ttaudio.ico">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content>
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
<Import Project="..\packages\GitVersionTask.3.3.0\build\dotnet\GitVersionTask.targets" Condition="Exists('..\packages\GitVersionTask.3.3.0\build\dotnet\GitVersionTask.targets')" />
<Target Name="EnsureNuGetPackageBuildImports" BeforeTargets="PrepareForBuild">
Expand Down
File renamed without changes.

0 comments on commit c35a50c

Please sign in to comment.