Skip to content

Commit

Permalink
Added precache for win10 project
Browse files Browse the repository at this point in the history
  • Loading branch information
biohazard999 committed Apr 15, 2018
1 parent 68c7096 commit f4b4b71
Show file tree
Hide file tree
Showing 2 changed files with 29 additions and 0 deletions.
Expand Up @@ -7,6 +7,7 @@ namespace Scissors.FeatureCenter.Win
{
public partial class FeatureCenterWindowsFormsApplication : WinApplication
{
#if DEBUG
protected override string GetDcAssemblyFilePath()
=> Path.Combine(Windows.Storage.ApplicationData.Current.LocalFolder.Path, ApplicationName, DcAssemblyFileName);

Expand All @@ -18,7 +19,21 @@ protected override string GetModelCacheFileLocationPath()

protected override string GetModulesVersionInfoFilePath()
=> Path.Combine(Windows.Storage.ApplicationData.Current.LocalFolder.Path, ApplicationName, ModulesVersionInfoFileName);
#else
string OutputDirectory => Path.GetDirectoryName(GetType().Assembly.Location);

protected override string GetDcAssemblyFilePath()
=> Path.Combine(OutputDirectory, DcAssemblyFileName);

protected override string GetModelAssemblyFilePath()
=> Path.Combine(OutputDirectory, ModelAssemblyFileName);

protected override string GetModelCacheFileLocationPath()
=> OutputDirectory;

protected override string GetModulesVersionInfoFilePath()
=> Path.Combine(OutputDirectory, ModulesVersionInfoFileName);
#endif
protected override void OnCustomGetUserModelDifferencesPath(CustomGetUserModelDifferencesPathEventArgs args)
=> args.Path = Path.Combine(Windows.Storage.ApplicationData.Current.LocalFolder.Path, ApplicationName);
}
Expand Down
14 changes: 14 additions & 0 deletions Scissors.FeatureCenter.Win10/Scissors.FeatureCenter.Win10.csproj
Expand Up @@ -144,6 +144,14 @@
<DependentUpon>Resources.resx</DependentUpon>
<DesignTime>True</DesignTime>
</Compile>
<Content Include="..\Scissors.FeatureCenter.Cli\bin\Release\PreCompile\Model.Cache.xafml">
<Link>Model.Cache.xafml</Link>
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content>
<Content Include="..\Scissors.FeatureCenter.Cli\bin\Release\PreCompile\ModulesVersionInfo">
<Link>ModulesVersionInfo</Link>
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content>
<None Include="Properties\Settings.settings">
<Generator>SettingsSingleFileGenerator</Generator>
<LastGenOutput>Settings.Designer.cs</LastGenOutput>
Expand All @@ -162,6 +170,12 @@
<PackageReference Include="DevExpress.ExpressApp.Images" Version="17.2.7" />
<PackageReference Include="DevExpress.XtraReports" Version="17.2.7" />
</ItemGroup>
<ItemGroup>
<Content Include="..\Scissors.FeatureCenter.Cli\bin\Release\PreCompile\ModelAssembly.dll">
<Link>ModelAssembly.dll</Link>
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content>
</ItemGroup>
<Import Project="..\Scissors.FeatureCenter.Win.Shared\Scissors.FeatureCenter.Win.Shared.projitems" Label="Shared" />
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
</Project>

0 comments on commit f4b4b71

Please sign in to comment.