Skip to content

Commit ea39056

Browse files
committed
AllowIcon File to be in sub folder
1 parent 13ece7f commit ea39056

File tree

3 files changed

+15
-12
lines changed

3 files changed

+15
-12
lines changed

Sources/Tomin.TotalCmd.AzureBlob/Tomin.TotalCmd.AzureBlob.csproj

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@
5555
<Prefer32Bit>false</Prefer32Bit>
5656
</PropertyGroup>
5757
<PropertyGroup>
58-
<ApplicationIcon>os-windows-multi-size.ico</ApplicationIcon>
58+
<ApplicationIcon>Resources\os-windows-multi-size.ico</ApplicationIcon>
5959
</PropertyGroup>
6060
<ItemGroup>
6161
<Reference Include="Microsoft.Data.Edm, Version=5.6.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
@@ -130,7 +130,7 @@
130130
</None>
131131
</ItemGroup>
132132
<ItemGroup>
133-
<Content Include="os-windows-multi-size.ico" />
133+
<Content Include="Resources\os-windows-multi-size.ico" />
134134
<Content Include="pluginst.inf">
135135
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
136136
</Content>
@@ -146,20 +146,16 @@
146146
<MSBuildCommunityTasksPath>$(MSBuildProjectDirectory)\..\..\Lib\MSBuild</MSBuildCommunityTasksPath>
147147
</PropertyGroup>
148148
<Import Project="$(MSBuildCommunityTasksPath)\MSBuild.Community.Tasks.targets" />
149-
150-
<Target Name="GenerateWfxPlugin" BeforeTargets="PostBuildEvent">
149+
<Target Name="GenerateWfxPlugin" BeforeTargets="PostBuildEvent">
151150
<CallTarget Targets="GenerateTotalCommanderWfxPlugin" />
152151
</Target>
153-
154152
<PropertyGroup>
155153
<PostBuildEvent>xcopy "$(TargetDir)*" "C:\Program Files\TotalComander\Plugins\wfx\AzureBlob\" /Y /S</PostBuildEvent>
156154
</PropertyGroup>
157-
158-
<Target Name="CreateZip" AfterTargets="GenerateWfxPlugin">
155+
<Target Name="CreateZip" AfterTargets="GenerateWfxPlugin">
159156
<ItemGroup>
160157
<Binaries Include="$(TargetDir)\**\*.*" Exclude="$(TargetDir)\*.zip" />
161158
</ItemGroup>
162159
<Zip Files="@(Binaries)" WorkingDirectory="$(TargetDir)" ZipFileName="$(MSBuildProjectDirectory)\..\..\Build\$(TargetName).zip" />
163160
</Target>
164-
165161
</Project>

Sources/TotalCommander.Plugin.Tasks/TotalCommander.Plugin.targets

Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,13 @@
1515

1616
<DllExport Source="$(OutputIL)" />
1717

18+
19+
<ItemGroup>
20+
<IconFile Include="$(ApplicationIcon)" />
21+
</ItemGroup>
22+
1823
<Copy SourceFiles="$(ApplicationIcon)" DestinationFolder="$(TargetDir)" Condition=" '$(ApplicationIcon)' != '' "/>
19-
<WriteLinesToFile File="$(TargetDir)$(TargetName).rc" Lines='1 ICON "$(ApplicationIcon)"' Overwrite="true" Condition=" '$(ApplicationIcon)' != '' "/>
24+
<WriteLinesToFile File="$(TargetDir)$(TargetName).rc" Lines="@(IconFile ->'1 ICON &quot;%(filename)%(extension)&quot;')" Overwrite="true" Condition=" '$(ApplicationIcon)' != '' "/>
2025
<RC ToolPath="$(MSBuildProjectDirectory)\..\..\Lib\Tools"
2126
Source="$(TargetDir)$(TargetName).rc" Condition=" '$(ApplicationIcon)' != '' ">
2227
<Output TaskParameter="Output" PropertyName="OutputRes"/>
@@ -27,10 +32,12 @@
2732
<ILAsm ToolPath="$(TargetedFrameworkDir)"
2833
Source="$(OutputIL)" Platform="x64" Resource="$(OutputRes)" Output="$(TargetDir)$(TargetName).wfx64"/>
2934

30-
<Delete Files="$(TargetDir)$(ApplicationIcon);$(TargetDir)TotalCommander.Plugin.Exports.il;$(TargetDir)TotalCommander.Plugin.Exports.res;$(TargetDir)$(TargetName).rc;$(TargetDir)$(TargetName).res" ContinueOnError="true"/>
35+
<Delete Files="@(IconFile ->'$(TargetDir)%(filename)%(extension)');$(TargetDir)TotalCommander.Plugin.Exports.il;$(TargetDir)TotalCommander.Plugin.Exports.res;$(TargetDir)$(TargetName).rc;$(TargetDir)$(TargetName).res" ContinueOnError="true"/>
3136
</Target>
3237

33-
<Target Name="GenerateTotalCommanderWcxPlugin">
38+
39+
<!--Modify to make similar to above-->
40+
<!--<Target Name="GenerateTotalCommanderWcxPlugin">
3441
<ILDasm Source="TotalCommander.Plugin.Exports.dll" OutputIL="$(TargetDir)TotalCommander.Plugin.Exports.il">
3542
<Output TaskParameter="OutputIL" PropertyName="OutputIL"/>
3643
</ILDasm>
@@ -47,4 +54,4 @@
4754
4855
<Delete Files="$(TargetDir)$(ApplicationIcon);$(TargetDir)TotalCommander.Plugin.Exports.il;$(TargetDir)TotalCommander.Plugin.Exports.res;$(TargetDir)$(TargetName).rc;$(TargetDir)$(TargetName).res" ContinueOnError="true"/>
4956
</Target>
50-
</Project>
57+
</Project>-->

0 commit comments

Comments
 (0)