Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
WindowsPhone: Project now building correct for ARM and deploying to W…
…P8 successfully. Woohoo!

Related to issue #424.
  • Loading branch information
ycastonguay committed Sep 18, 2013
1 parent b699168 commit 11f2315
Show file tree
Hide file tree
Showing 9 changed files with 297 additions and 30 deletions.
31 changes: 31 additions & 0 deletions MPfm/MPfm.Core/MPfm.Core.WindowsPhone.csproj
Expand Up @@ -82,11 +82,42 @@
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug-ARM|AnyCPU'">
<DebugSymbols>true</DebugSymbols>
<OutputPath>bin\Debug-ARM\</OutputPath>
<DefineConstants>TRACE;DEBUG;SILVERLIGHT;WINDOWS_PHONE</DefineConstants>
<NoStdLib>true</NoStdLib>
<DebugType>full</DebugType>
<PlatformTarget>AnyCPU</PlatformTarget>
<ErrorReport>prompt</ErrorReport>
<CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug-ARM|x86'">
<DebugSymbols>true</DebugSymbols>
<OutputPath>bin\x86\Debug-ARM\</OutputPath>
<DefineConstants>DEBUG;TRACE;SILVERLIGHT;WINDOWS_PHONE</DefineConstants>
<NoStdLib>true</NoStdLib>
<DebugType>full</DebugType>
<PlatformTarget>AnyCPU</PlatformTarget>
<ErrorReport>prompt</ErrorReport>
<CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug-ARM|ARM'">
<DebugSymbols>true</DebugSymbols>
<OutputPath>bin\ARM\Debug-ARM\</OutputPath>
<DefineConstants>DEBUG;TRACE;SILVERLIGHT;WINDOWS_PHONE</DefineConstants>
<NoStdLib>true</NoStdLib>
<DebugType>full</DebugType>
<PlatformTarget>AnyCPU</PlatformTarget>
<ErrorReport>prompt</ErrorReport>
<CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet>
</PropertyGroup>
<ItemGroup />
<ItemGroup>
<Compile Include="ByteArrayQueue.cs" />
<Compile Include="CacheStore.cs" />
<Compile Include="Conversion.cs" />
<Compile Include="DatabaseFieldMap.cs" />
<Compile Include="DatabaseFieldNameAttribute.cs" />
<Compile Include="Normalizer.cs" />
<Compile Include="OS.cs" />
Expand Down
19 changes: 8 additions & 11 deletions MPfm/MPfm.Library/Database/WinRTSQLiteGateway.cs
Expand Up @@ -80,11 +80,11 @@ public SQLiteConnection GenerateConnection()
/// Returns the list of properties which have different database field names.
/// </summary>
/// <typeparam name="T">Object to scan (generic)</typeparam>
/// <returns>Dictionary of DatabaseFieldName/PropertyName</returns>
public Dictionary<string, string> GetMap<T>()
/// <returns>List of DatabaseFieldMap</returns>
public List<DatabaseFieldMap> GetMap<T>()
{
// Create map by scanning properties
Dictionary<string, string> dictMap = new Dictionary<string, string>();
List<DatabaseFieldMap> maps = new List<DatabaseFieldMap>();
var propertyInfos = typeof(T).GetTypeInfo().DeclaredProperties;
foreach (PropertyInfo propertyInfo in propertyInfos)
{
Expand All @@ -95,14 +95,11 @@ public SQLiteConnection GenerateConnection()
// Try to cast into attribute map
DatabaseFieldAttribute attrMap = attribute as DatabaseFieldAttribute;
if (attrMap != null)
{
// Add item to dictionary
dictMap.Add(attrMap.DatabaseFieldName, propertyInfo.Name);
}
maps.Add(new DatabaseFieldMap(propertyInfo.Name, attrMap.DatabaseFieldName, attrMap.SaveToDatabase));
}
}

return dictMap;
return maps;
}

/// <summary>
Expand Down Expand Up @@ -354,7 +351,7 @@ public List<T> Select<T>(string sql) where T : new()
//DbDataReader reader = null;
SQLiteCommand command = null;
List<T> list = new List<T>();
Dictionary<string, string> dictMap = GetMap<T>();
var maps = GetMap<T>();

return list;

Expand Down Expand Up @@ -483,7 +480,7 @@ public int Update<T>(T obj, string tableName, Dictionary<string, object> where)
{
SQLiteConnection connection = null;
SQLiteCommand command = null;
Dictionary<string, string> dictMap = GetMap<T>();
var maps = GetMap<T>();
StringBuilder sql = new StringBuilder();

return 0;
Expand Down Expand Up @@ -584,7 +581,7 @@ public int Insert<T>(T obj, string tableName)
{
SQLiteConnection connection = null;
SQLiteCommand command = null;
Dictionary<string, string> dictMap = GetMap<T>();
var map = GetMap<T>();
StringBuilder sql = new StringBuilder();

return 0;
Expand Down
31 changes: 31 additions & 0 deletions MPfm/MPfm.Library/MPfm.Library.WindowsPhone.csproj
Expand Up @@ -82,6 +82,36 @@
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug-ARM|AnyCPU'">
<DebugSymbols>true</DebugSymbols>
<OutputPath>bin\Debug-ARM\</OutputPath>
<DefineConstants>TRACE;DEBUG;SILVERLIGHT;WINDOWS_PHONE</DefineConstants>
<NoStdLib>true</NoStdLib>
<DebugType>full</DebugType>
<PlatformTarget>AnyCPU</PlatformTarget>
<ErrorReport>prompt</ErrorReport>
<CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug-ARM|x86'">
<DebugSymbols>true</DebugSymbols>
<OutputPath>bin\x86\Debug-ARM\</OutputPath>
<DefineConstants>TRACE;DEBUG;SILVERLIGHT;WINDOWS_PHONE;USE_WP8_NATIVE_SQLITE </DefineConstants>
<NoStdLib>true</NoStdLib>
<DebugType>full</DebugType>
<PlatformTarget>AnyCPU</PlatformTarget>
<ErrorReport>prompt</ErrorReport>
<CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug-ARM|ARM'">
<DebugSymbols>true</DebugSymbols>
<OutputPath>bin\ARM\Debug-ARM\</OutputPath>
<DefineConstants>TRACE;DEBUG;SILVERLIGHT;WINDOWS_PHONE;USE_WP8_NATIVE_SQLITE </DefineConstants>
<NoStdLib>true</NoStdLib>
<DebugType>full</DebugType>
<PlatformTarget>AnyCPU</PlatformTarget>
<ErrorReport>prompt</ErrorReport>
<CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet>
</PropertyGroup>
<ItemGroup>
<Content Include="Lib\taglib-sharp.dll" />
<EmbeddedResource Include="Scripts\1.03-1.04.sql" />
Expand Down Expand Up @@ -112,6 +142,7 @@
<Compile Include="Database\DatabaseFacade.cs" />
<Compile Include="Database\WinRTSQLiteGateway.cs" />
<Compile Include="Objects\NetworkState.cs" />
<Compile Include="Objects\PlaylistAudioFile.cs" />
<Compile Include="Objects\PlaylistFile.cs" />
<Compile Include="Objects\History.cs" />
<Compile Include="Objects\Setting.cs" />
Expand Down
42 changes: 41 additions & 1 deletion MPfm/MPfm.MVP/MPfm.MVP.WindowsPhone.csproj
Expand Up @@ -82,6 +82,36 @@
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug-ARM|AnyCPU'">
<DebugSymbols>true</DebugSymbols>
<OutputPath>bin\Debug-ARM\</OutputPath>
<DefineConstants>TRACE;DEBUG;SILVERLIGHT;WINDOWS_PHONE</DefineConstants>
<NoStdLib>true</NoStdLib>
<DebugType>full</DebugType>
<PlatformTarget>AnyCPU</PlatformTarget>
<ErrorReport>prompt</ErrorReport>
<CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug-ARM|x86'">
<DebugSymbols>true</DebugSymbols>
<OutputPath>bin\x86\Debug-ARM\</OutputPath>
<DefineConstants>DEBUG;TRACE;SILVERLIGHT;WINDOWS_PHONE</DefineConstants>
<NoStdLib>true</NoStdLib>
<DebugType>full</DebugType>
<PlatformTarget>AnyCPU</PlatformTarget>
<ErrorReport>prompt</ErrorReport>
<CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug-ARM|ARM'">
<DebugSymbols>true</DebugSymbols>
<OutputPath>bin\ARM\Debug-ARM\</OutputPath>
<DefineConstants>DEBUG;TRACE;SILVERLIGHT;WINDOWS_PHONE</DefineConstants>
<NoStdLib>true</NoStdLib>
<DebugType>full</DebugType>
<PlatformTarget>AnyCPU</PlatformTarget>
<ErrorReport>prompt</ErrorReport>
<CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet>
</PropertyGroup>
<ItemGroup>
<ProjectReference Include="..\MPfm.Core\MPfm.Core.WindowsPhone.csproj">
<Project>{5CA0AA57-8F15-4DC2-B5C6-25692F200869}</Project>
Expand All @@ -102,11 +132,18 @@
</ItemGroup>
<ItemGroup>
<Compile Include="AssemblyInfo.cs" />
<Compile Include="Messages\ActivateLockScreenMessage.cs" />
<Compile Include="Messages\ConnectionStatusChangedMessage.cs" />
<Compile Include="Messages\MobileLibraryBrowserItemClickedMessage.cs" />
<Compile Include="Messages\PlayerSetPositionMessage.cs" />
<Compile Include="Messages\PlaylistListUpdatedMessage.cs" />
<Compile Include="Messages\PlaylistUpdatedMessage.cs" />
<Compile Include="Models\PlaylistEntity.cs" />
<Compile Include="Navigation\MobileNavigationManager.cs" />
<Compile Include="Presenters\AddNewPlaylistPresenter.cs" />
<Compile Include="Presenters\AudioPreferencesPresenter.cs" />
<Compile Include="Presenters\Interfaces\IAddNewPlaylistPresenter.cs" />
<Compile Include="Presenters\Interfaces\ISelectPlaylistPresenter.cs" />
<Compile Include="Presenters\MobileFirstRunPresenter.cs" />
<Compile Include="Presenters\DesktopFirstRunPresenter.cs" />
<Compile Include="Presenters\EditSongMetadataPresenter.cs" />
Expand All @@ -120,8 +157,10 @@
<Compile Include="Presenters\LibraryPreferencesPresenter.cs" />
<Compile Include="Presenters\Interfaces\ILibraryPreferencesPresenter.cs" />
<Compile Include="Presenters\Interfaces\IAudioPreferencesPresenter.cs" />
<Compile Include="Presenters\SelectPlaylistPresenter.cs" />
<Compile Include="Presenters\UpdateLibraryPresenter.cs" />
<Compile Include="Models\PlayerPositionEntity.cs" />
<Compile Include="Views\IAddNewPlaylistView.cs" />
<Compile Include="Views\IMobileFirstRunView.cs" />
<Compile Include="Views\IDesktopFirstRunView.cs" />
<Compile Include="Views\IEditSongMetadataView.cs" />
Expand All @@ -130,6 +169,7 @@
<Compile Include="Views\ILibraryPreferencesView.cs" />
<Compile Include="Views\IGeneralPreferencesView.cs" />
<Compile Include="Views\IAudioPreferencesView.cs" />
<Compile Include="Views\ISelectPlaylistView.cs" />
<Compile Include="Views\IUpdateLibraryView.cs" />
<Compile Include="Bootstrap\Bootstrapper.cs" />
<Compile Include="Presenters\PlayerPresenter.cs" />
Expand Down Expand Up @@ -239,7 +279,7 @@
</ItemGroup>
<ItemGroup>
<Reference Include="TinyIoC">
<HintPath>Lib\PCL\TinyIoC.dll</HintPath>
<HintPath>..\MPfm.Core\Lib\PCL\TinyIoC.dll</HintPath>
</Reference>
</ItemGroup>
<Import Project="$(MSBuildExtensionsPath)\Microsoft\$(TargetFrameworkIdentifier)\$(TargetFrameworkVersion)\Microsoft.$(TargetFrameworkIdentifier).$(TargetFrameworkVersion).Overrides.targets" />
Expand Down
1 change: 0 additions & 1 deletion MPfm/MPfm.MVP/Presenters/SelectPlaylistPresenter.cs
Expand Up @@ -28,7 +28,6 @@
using MPfm.MVP.Presenters.Interfaces;
using MPfm.MVP.Views;
using MPfm.Sound.Playlists;
using TagLib.Ape;
using TinyMessenger;

namespace MPfm.MVP.Presenters
Expand Down
34 changes: 32 additions & 2 deletions MPfm/MPfm.Player/MPfm.Player.WindowsPhone.csproj
Expand Up @@ -82,6 +82,36 @@
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug-ARM|AnyCPU'">
<DebugSymbols>true</DebugSymbols>
<OutputPath>bin\Debug-ARM\</OutputPath>
<DefineConstants>TRACE;DEBUG;SILVERLIGHT;WINDOWS_PHONE</DefineConstants>
<NoStdLib>true</NoStdLib>
<DebugType>full</DebugType>
<PlatformTarget>AnyCPU</PlatformTarget>
<ErrorReport>prompt</ErrorReport>
<CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug-ARM|x86'">
<DebugSymbols>true</DebugSymbols>
<OutputPath>bin\x86\Debug-ARM\</OutputPath>
<DefineConstants>DEBUG;TRACE;SILVERLIGHT;WINDOWS_PHONE</DefineConstants>
<NoStdLib>true</NoStdLib>
<DebugType>full</DebugType>
<PlatformTarget>AnyCPU</PlatformTarget>
<ErrorReport>prompt</ErrorReport>
<CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug-ARM|ARM'">
<DebugSymbols>true</DebugSymbols>
<OutputPath>bin\ARM\Debug-ARM\</OutputPath>
<DefineConstants>DEBUG;TRACE;SILVERLIGHT;WINDOWS_PHONE</DefineConstants>
<NoStdLib>true</NoStdLib>
<DebugType>full</DebugType>
<PlatformTarget>AnyCPU</PlatformTarget>
<ErrorReport>prompt</ErrorReport>
<CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet>
</PropertyGroup>
<ItemGroup>
<Compile Include="Exceptions\PlayerCreateStreamException.cs" />
<Compile Include="IPlayer.cs" />
Expand All @@ -92,9 +122,9 @@
<Compile Include="Objects\EQPresetBand.cs" />
<Compile Include="Events\PlayerPlaylistIndexChangedData.cs" />
<Compile Include="Objects\Loop.cs" />
<Compile Include="Objects\Marker.cs" />
<Compile Include="Objects\Marker.cs" />
<Compile Include="Events\AudioInterruptedData.cs" />
<Compile Include="WinRT\Player.cs" />
<Compile Include="WinRT\Player.cs" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\MPfm.Core\MPfm.Core.WindowsPhone.csproj">
Expand Down
30 changes: 30 additions & 0 deletions MPfm/MPfm.Sound/MPfm.Sound.WindowsPhone.csproj
Expand Up @@ -82,6 +82,36 @@
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug-ARM|AnyCPU'">
<DebugSymbols>true</DebugSymbols>
<OutputPath>bin\Debug-ARM\</OutputPath>
<DefineConstants>TRACE;DEBUG;SILVERLIGHT;WINDOWS_PHONE</DefineConstants>
<NoStdLib>true</NoStdLib>
<DebugType>full</DebugType>
<PlatformTarget>AnyCPU</PlatformTarget>
<ErrorReport>prompt</ErrorReport>
<CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug-ARM|x86'">
<DebugSymbols>true</DebugSymbols>
<OutputPath>bin\x86\Debug-ARM\</OutputPath>
<DefineConstants>DEBUG;TRACE;SILVERLIGHT;WINDOWS_PHONE</DefineConstants>
<NoStdLib>true</NoStdLib>
<DebugType>full</DebugType>
<PlatformTarget>AnyCPU</PlatformTarget>
<ErrorReport>prompt</ErrorReport>
<CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug-ARM|ARM'">
<DebugSymbols>true</DebugSymbols>
<OutputPath>bin\ARM\Debug-ARM\</OutputPath>
<DefineConstants>DEBUG;TRACE;SILVERLIGHT;WINDOWS_PHONE</DefineConstants>
<NoStdLib>true</NoStdLib>
<DebugType>full</DebugType>
<PlatformTarget>AnyCPU</PlatformTarget>
<ErrorReport>prompt</ErrorReport>
<CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet>
</PropertyGroup>
<ItemGroup>
<Content Include="Lib\taglib-sharp.dll" />
<Content Include="Lib\WindowsPhone\x86\taglib-sharp.dll" />
Expand Down
30 changes: 30 additions & 0 deletions MPfm/MPfm.WindowsPhone/MPfm.WindowsPhone.csproj
Expand Up @@ -89,6 +89,36 @@
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug-ARM|AnyCPU'">
<DebugSymbols>true</DebugSymbols>
<OutputPath>bin\Debug-ARM\</OutputPath>
<DefineConstants>DEBUG;TRACE;SILVERLIGHT;WINDOWS_PHONE</DefineConstants>
<NoStdLib>true</NoStdLib>
<DebugType>full</DebugType>
<PlatformTarget>AnyCPU</PlatformTarget>
<ErrorReport>prompt</ErrorReport>
<CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug-ARM|x86'">
<DebugSymbols>true</DebugSymbols>
<OutputPath>bin\x86\Debug-ARM\</OutputPath>
<DefineConstants>DEBUG;TRACE;SILVERLIGHT;WINDOWS_PHONE</DefineConstants>
<NoStdLib>true</NoStdLib>
<DebugType>full</DebugType>
<PlatformTarget>AnyCPU</PlatformTarget>
<ErrorReport>prompt</ErrorReport>
<CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug-ARM|ARM'">
<DebugSymbols>true</DebugSymbols>
<OutputPath>bin\ARM\Debug-ARM\</OutputPath>
<DefineConstants>DEBUG;TRACE;SILVERLIGHT;WINDOWS_PHONE</DefineConstants>
<NoStdLib>true</NoStdLib>
<DebugType>full</DebugType>
<PlatformTarget>AnyCPU</PlatformTarget>
<ErrorReport>prompt</ErrorReport>
<CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet>
</PropertyGroup>
<ItemGroup>
<Compile Include="App.xaml.cs">
<DependentUpon>App.xaml</DependentUpon>
Expand Down

0 comments on commit 11f2315

Please sign in to comment.