mirror of
https://github.com/ElectronNET/Electron.NET.git
synced 2026-02-03 21:25:13 +00:00
Fix up incorrect symlinks created by npm on Windows
This commit is contained in:
@@ -380,6 +380,23 @@
|
||||
|
||||
<Message Importance="High" Text="Electron setup failed!" Condition="'$(ExecExitCode)' != '0'" />
|
||||
|
||||
<!-- Fix up incorrect symlinks created by npm on Windows when targeting macOS -->
|
||||
<PropertyGroup>
|
||||
<_ElectronFrameworksDir>$(ElectronOutDir)node_modules\electron\dist\Electron.app\Contents\Frameworks</_ElectronFrameworksDir>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<_ElectronFrameworkDirs Include="$(_ElectronFrameworksDir)\Electron Framework.framework" />
|
||||
<_ElectronFrameworkDirs Include="$(_ElectronFrameworksDir)\Mantle.framework" />
|
||||
<_ElectronFrameworkDirs Include="$(_ElectronFrameworksDir)\ReactiveObjC.framework" />
|
||||
<_ElectronFrameworkDirs Include="$(_ElectronFrameworksDir)\Squirrel.framework" />
|
||||
</ItemGroup>
|
||||
|
||||
<!-- Only execute on Windows host when targeting macOS -->
|
||||
<Message Importance="High" Text="Fixing macOS framework Resources symlinks" Condition="'$(ElectronPlatform)' == 'mac' AND '$(_CurrentOSPlatform)' == 'win'" />
|
||||
|
||||
<Exec Command="cmd /c del Resources && mklink /D Resources "Versions\Current\Resources"" WorkingDirectory="%(_ElectronFrameworkDirs.Identity)" Condition="'$(ElectronPlatform)' == 'mac' AND '$(_CurrentOSPlatform)' == 'win'" />
|
||||
|
||||
</Target>
|
||||
|
||||
<Target Name="BeforePublishElectronApp" BeforeTargets="PrepareForPublish">
|
||||
|
||||
Reference in New Issue
Block a user