Skip to content

Commit

Permalink
Change assets path.
Browse files Browse the repository at this point in the history
  • Loading branch information
Grabacr07 committed Sep 2, 2018
1 parent c728dd8 commit f15b2db
Show file tree
Hide file tree
Showing 26 changed files with 50 additions and 38 deletions.
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes.
File renamed without changes.
File renamed without changes.
16 changes: 16 additions & 0 deletions source/SylphyHorn/.build/post-build.ps1
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
# ビルド後に実行
# - SylphyHorn.exe (とその関連ファイル) を除くすべてのファイルを lib フォルダーに移動

Param ( $TargetDir )

$targets = $TargetDir
$lib = ($TargetDir + "lib\")
$excludes = ".assets", "AppxManifest.xml", "SylphyHorn.exe*", "SylphyHorn.pdb"

if ( Test-Path $lib ) {
Remove-Item $lib -Recurse
}

New-Item $lib -ItemType Directory

Get-ChildItem $targets -Exclude $excludes | Move-Item -Destination $lib
File renamed without changes.
1 change: 1 addition & 0 deletions source/SylphyHorn/App.config
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
</startup>
<runtime>
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
<probing privatePath="lib"/>
<dependentAssembly>
<assemblyIdentity name="Livet" publicKeyToken="b0b1d3f711ef38cb" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-1.3.0.0" newVersion="1.3.0.0" />
Expand Down
2 changes: 1 addition & 1 deletion source/SylphyHorn/ApplicationPreparation.cs
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ public TaskTrayIcon CreateTaskTrayIcon()
{
if (this._taskTrayIcon == null)
{
const string iconUri = "pack://application:,,,/SylphyHorn;Component/_assets/tasktray.ico";
const string iconUri = "pack://application:,,,/SylphyHorn;Component/.assets/tasktray.ico";

if (!Uri.TryCreate(iconUri, UriKind.Absolute, out var uri)) return null;

Expand Down
6 changes: 3 additions & 3 deletions source/SylphyHorn/AppxManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
<Properties>
<DisplayName>SylphyHorn</DisplayName>
<PublisherDisplayName>grabacr.net</PublisherDisplayName>
<Logo>_assets\StoreLogo.png</Logo>
<Logo>.assets\StoreLogo.png</Logo>
</Properties>
<Resources>
<Resource Language="en-us" />
Expand All @@ -29,8 +29,8 @@
Executable="SylphyHorn.exe"
EntryPoint="Windows.FullTrustApplication">
<uap:VisualElements DisplayName="SylphyHorn"
Square150x150Logo="_assets\Square150x150Logo.scale-100.png"
Square44x44Logo="_assets\Square44x44Logo.scale-100.png"
Square150x150Logo=".assets\Square150x150Logo.scale-100.png"
Square44x44Logo=".assets\Square44x44Logo.scale-100.png"
Description="Virtual Desktop Tools for Windows 10."
BackgroundColor="transparent" />
<Extensions>
Expand Down
2 changes: 1 addition & 1 deletion source/SylphyHorn/Properties/AssemblyInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -11,5 +11,5 @@

[assembly: ThemeInfo(ResourceDictionaryLocation.None, ResourceDictionaryLocation.SourceAssembly)]

[assembly: AssemblyVersion("3.0.0.0")]
[assembly: AssemblyVersion("3.1.0.0")]
[assembly: ComVisible(false)]
6 changes: 3 additions & 3 deletions source/SylphyHorn/Properties/LicenseInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -26,11 +26,11 @@ private LicenseInfo(string productName, string resourceName = null)
{
this.ProductName = productName;

var path = $@"SylphyHorn._licenses.{resourceName ?? $"{productName}.txt"}";
var path = $@"SylphyHorn..licenses.{resourceName ?? $"{productName}.txt"}";
var stream = Assembly.GetExecutingAssembly().GetManifestResourceStream(path);
if (stream == null) return;
using (var reader = new StreamReader(stream ,Encoding.UTF8))

using (var reader = new StreamReader(stream, Encoding.UTF8))
{
this.LicenseBody = reader.ReadToEnd();
}
Expand Down
53 changes: 24 additions & 29 deletions source/SylphyHorn/SylphyHorn.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@
<DefineConstants>TRACE</DefineConstants>
</PropertyGroup>
<PropertyGroup>
<ApplicationIcon>_assets\app.green.ico</ApplicationIcon>
<ApplicationIcon>.assets\app.green.ico</ApplicationIcon>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Release %28AppX%29|AnyCPU'">
<OutputPath>bin\Release %28AppX%29\</OutputPath>
Expand Down Expand Up @@ -317,6 +317,7 @@
<Compile Include="Properties\AssemblyInfo.cs">
<SubType>Code</SubType>
</Compile>
<None Include=".build\post-build.ps1" />
<None Include="app.manifest">
<SubType>Designer</SubType>
</None>
Expand All @@ -343,10 +344,9 @@
</ProjectReference>
</ItemGroup>
<ItemGroup>
<Resource Include="_assets\tasktray.ico" />
</ItemGroup>
<ItemGroup>
<Resource Include="_assets\app.white.ico" />
<Resource Include=".assets\tasktray.ico" />
<Resource Include=".assets\app.white.ico" />
<Resource Include=".assets\app.green.ico" />
</ItemGroup>
<ItemGroup>
<Service Include="{508349B6-6B84-4DF5-91F0-309BEEBAD82D}" />
Expand All @@ -356,48 +356,39 @@
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
<SubType>Designer</SubType>
</Content>
<EmbeddedResource Include="_licenses\MetroTrilithon.txt" />
<EmbeddedResource Include="_licenses\MetroRadiance.txt" />
<EmbeddedResource Include="_licenses\Livet.txt" />
<EmbeddedResource Include="_licenses\StatefulModel.txt" />
<EmbeddedResource Include="_licenses\Open.WinKeyboardHook.txt" />
<EmbeddedResource Include="_licenses\VirtualDesktop.txt" />
<EmbeddedResource Include=".licenses\MetroTrilithon.txt" />
<EmbeddedResource Include=".licenses\MetroRadiance.txt" />
<EmbeddedResource Include=".licenses\Livet.txt" />
<EmbeddedResource Include=".licenses\StatefulModel.txt" />
<EmbeddedResource Include=".licenses\Open.WinKeyboardHook.txt" />
<EmbeddedResource Include=".licenses\VirtualDesktop.txt" />
</ItemGroup>
<ItemGroup>
<None Include="_assets\Square150x150Logo.scale-200.png">
<None Include=".assets\Square150x150Logo.scale-200.png">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</None>
<None Include="_assets\Square44x44Logo.scale-200.png">
<None Include=".assets\Square44x44Logo.scale-200.png">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</None>
<None Include="_assets\Square44x44Logo.targetsize-24_altform-unplated.png">
<None Include=".assets\Square44x44Logo.targetsize-24_altform-unplated.png">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</None>
<None Include="_assets\StoreLogo.png">
<None Include=".assets\StoreLogo.png">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</None>
</ItemGroup>
<ItemGroup>
<None Include="_assets\BadgeLogo.png">
<None Include=".assets\BadgeLogo.png">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</None>
<None Include="_assets\SplashScreen.png">
<None Include=".assets\SplashScreen.png">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</None>
<None Include="_assets\Wide310x150Logo.scale-200.png">
<None Include=".assets\Wide310x150Logo.scale-200.png">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</None>
</ItemGroup>
<ItemGroup>
<Resource Include="_assets\app.green.ico" />
</ItemGroup>
<ItemGroup>
<None Include="_assets\Square44x44Logo.scale-100.png">
<None Include=".assets\Square44x44Logo.scale-100.png">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</None>
</ItemGroup>
<ItemGroup>
<None Include="_assets\Square150x150Logo.scale-100.png">
<None Include=".assets\Square150x150Logo.scale-100.png">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</None>
</ItemGroup>
Expand All @@ -410,7 +401,11 @@
<DependentUpon>Resources.resx</DependentUpon>
</EmbeddedResource>
</ItemGroup>
<ItemGroup />
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
<PropertyGroup>
<PostBuildEvent>powershell -ExecutionPolicy RemoteSigned -File "$(ProjectDir).build\post-build.ps1" "$(TargetDir)</PostBuildEvent>
</PropertyGroup>
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
Other similar extension points exist, see Microsoft.Common.targets.
<Target Name="BeforeBuild">
Expand Down
2 changes: 1 addition & 1 deletion source/SylphyHorn/UI/SettingsWindow.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
xmlns:services="clr-namespace:SylphyHorn.Services"
mc:Ignorable="d"
d:DataContext="{d:DesignInstance bindings:SettingsWindowViewModel}"
Icon="/SylphyHorn;component/_assets/app.white.ico"
Icon="/SylphyHorn;component/.assets/app.white.ico"
Title="{Binding Source={x:Static services:ResourceService.Current}, Path=Resources.Settings_Title}"
Width="720"
Height="600"
Expand Down

0 comments on commit f15b2db

Please sign in to comment.