Skip to content

Commit

Permalink
Got MakeMSIX working!
Browse files Browse the repository at this point in the history
  • Loading branch information
DrusTheAxe committed Aug 28, 2020
1 parent 0a5aeee commit 9a10b18
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 33 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -290,19 +290,8 @@
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
<ImportGroup Label="ExtensionTargets">
</ImportGroup>
<ItemDefinitionGroup>
<CustomBuildStep>
<Command>CALL $(ProjectDir)..\makemsix.cmd $(ProjectDir) $(OutDir) $(TargetDir) $(TargetFileName) $(TargetName)</Command>
<Outputs>$(TargetName).msix</Outputs>
<Inputs>$(ProjectDir)appxmanifest.xml;$(ProjectDir)logo.png;$(TargetPathName)</Inputs>
<Message Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Create .msix via Custom Build Step</Message>
<Message Condition="'$(Configuration)|$(Platform)'=='Debug|ARM'">Create .msix via Custom Build Step</Message>
<Message Condition="'$(Configuration)|$(Platform)'=='Debug|ARM64'">Create .msix via Custom Build Step</Message>
<Message Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">Create .msix via Custom Build Step</Message>
<Message Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">Create .msix via Custom Build Step</Message>
<Message Condition="'$(Configuration)|$(Platform)'=='Release|ARM'">Create .msix via Custom Build Step</Message>
<Message Condition="'$(Configuration)|$(Platform)'=='Release|ARM64'">Create .msix via Custom Build Step</Message>
<Message Condition="'$(Configuration)|$(Platform)'=='Release|x64'">Create .msix via Custom Build Step</Message>
</CustomBuildStep>
</ItemDefinitionGroup>
<Target Name="MakeMSIX" AfterTargets="AfterBuild" Condition="Exists('$(ProjectDir)appxmanifest.template')" Inputs="$(ProjectDir)appxmanifest.template;$(ProjectDir)logo.png;$(TargetPathName)" Outputs="$(TargetName).msix">
<Message Text="Make MSIX $(TargetName).msix for $(ProjectName)"/>
<Exec Command="$(ProjectDir)..\makemsix.cmd $(ProjectDir) $(OutDir) $(TargetDir) $(TargetFileName) $(TargetName)" ConsoleToMsBuild="true" IgnoreExitCode="true"/>
</Target>
</Project>
Original file line number Diff line number Diff line change
Expand Up @@ -290,19 +290,8 @@
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
<ImportGroup Label="ExtensionTargets">
</ImportGroup>
<ItemDefinitionGroup>
<CustomBuildStep>
<Command>CALL $(ProjectDir)..\makemsix.cmd $(ProjectDir) $(OutDir) $(TargetDir) $(TargetFileName) $(TargetName)</Command>
<Outputs>$(TargetName).msix</Outputs>
<Inputs>$(ProjectDir)appxmanifest.xml;$(ProjectDir)logo.png;$(TargetPathName)</Inputs>
<Message Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Create .msix via Custom Build Step</Message>
<Message Condition="'$(Configuration)|$(Platform)'=='Debug|ARM'">Create .msix via Custom Build Step</Message>
<Message Condition="'$(Configuration)|$(Platform)'=='Debug|ARM64'">Create .msix via Custom Build Step</Message>
<Message Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">Create .msix via Custom Build Step</Message>
<Message Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">Create .msix via Custom Build Step</Message>
<Message Condition="'$(Configuration)|$(Platform)'=='Release|ARM'">Create .msix via Custom Build Step</Message>
<Message Condition="'$(Configuration)|$(Platform)'=='Release|ARM64'">Create .msix via Custom Build Step</Message>
<Message Condition="'$(Configuration)|$(Platform)'=='Release|x64'">Create .msix via Custom Build Step</Message>
</CustomBuildStep>
</ItemDefinitionGroup>
</Project>
<Target Name="MakeMSIX" AfterTargets="AfterBuild" Condition="Exists('$(ProjectDir)appxmanifest.template')" Inputs="$(ProjectDir)appxmanifest.template;$(ProjectDir)logo.png;$(TargetPathName)" Outputs="$(TargetName).msix">
<Message Text="Make MSIX $(TargetName).msix for $(ProjectName)"/>
<Exec Command="$(ProjectDir)..\makemsix.cmd $(ProjectDir) $(OutDir) $(TargetDir) $(TargetFileName) $(TargetName)" ConsoleToMsBuild="true" IgnoreExitCode="true"/>
</Target>
</Project>
4 changes: 2 additions & 2 deletions test/DynamicDependency/data/makemsix.cmd
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,9 @@ ECHO copy %TargetDir%\%TargetFileName% %OutDirMsix%\%TargetFileName%
copy %TargetDir%\%TargetFileName% %OutDirMsix%\%TargetFileName%

ECHO makeappx.exe pack /v /h SHA256 /d %OutDirMsix% /p %OutDir%%TargetName%.msix
makeappx.exe pack /v /h SHA256 /d %OutDirMsix% /p %OutDir%%TargetName%.msix
makeappx.exe pack /v /o /h SHA256 /d %OutDirMsix% /p %OutDir%%TargetName%.msix

:TheEnd
ENDLOCAL

ECHO /B 0
EXIT /B 0

0 comments on commit 9a10b18

Please sign in to comment.