From e39bad687e52ce95d13e174c261946babdbe51f0 Mon Sep 17 00:00:00 2001 From: Curtis Wensley Date: Fri, 27 Nov 2020 10:42:17 -0800 Subject: [PATCH] Mac packaging: fix path issues when creating .dmg - MacBundleName can now be derived from the OutputAppPath, if specified --- src/Eto.Mac/build/Dmg.targets | 4 ++-- src/Eto.Mac/build/Mac.targets | 11 +++++++---- 2 files changed, 9 insertions(+), 6 deletions(-) diff --git a/src/Eto.Mac/build/Dmg.targets b/src/Eto.Mac/build/Dmg.targets index a2b130a03a..495186f802 100644 --- a/src/Eto.Mac/build/Dmg.targets +++ b/src/Eto.Mac/build/Dmg.targets @@ -43,8 +43,8 @@ - <_DmgAppFiles Include="$(OutputAppPath)**\*" TargetPath="$([System.IO.Path]::GetFileName($(OutputAppPath.TrimEnd('/'))))\%(RecursiveDir)%(Filename)%(Extension)" /> - <_DmgFiles Include="@(_DmgAppFiles)" TargetPath="$([System.IO.Path]::GetFileName($(OutputAppPath.TrimEnd('/'))))\%(RecursiveDir)%(Filename)%(Extension)" /> + <_DmgAppFiles Include="$(OutputAppPath)**\*" /> + <_DmgFiles Include="@(_DmgAppFiles)" TargetPath="$(MacBundleName).app\%(RecursiveDir)%(Filename)%(Extension)" /> <_DmgFiles Include="@(DmgContent)" TargetPath="%(RecursiveDir)%(Filename)%(Extension)" Condition="%(TargetPath) == ''"/> <_DmgFiles Include="@(DmgContent)" Condition="%(TargetPath) != ''"/> diff --git a/src/Eto.Mac/build/Mac.targets b/src/Eto.Mac/build/Mac.targets index 68cb10d998..48527adbc3 100644 --- a/src/Eto.Mac/build/Mac.targets +++ b/src/Eto.Mac/build/Mac.targets @@ -24,18 +24,21 @@ True - $(MSBuildProjectName) + $([System.IO.Path]::GetFileName($(OutputAppPath.TrimEnd('/').TrimEnd('\')))) + $(MacBundleName.SubString(0, $([MSBuild]::Subtract($(MacBundleName.Length), 4)))) + $(MSBuildProjectName) - + - True + True - $(BaseOutputAppPath)$(MacBundleName).app\ + $(BaseOutputAppPath)$(MacBundleName).app\ + $(OutputAppPath)\