Apple Silicon support

Signed-off-by: Tarik02 <Taras.Fomin@gmail.com>
internals
Tarik02 3 years ago
parent 7243a0f3c4
commit 7644b2c959
No known key found for this signature in database
GPG Key ID: 8FF447805FD64597
  1. BIN
      deps/cimgui/linux-x64/cimgui.so
  2. BIN
      deps/cimgui/osx-x64/cimgui.dylib
  3. BIN
      deps/cimgui/win-x64/cimgui.dll
  4. BIN
      deps/cimgui/win-x86/cimgui.dll
  5. 20
      download-native-deps.ps1
  6. 4
      src/ImGui.NET.SampleProgram.XNA/ImGui.NET.SampleProgram.XNA.csproj
  7. 4
      src/ImGui.NET.SampleProgram/ImGui.NET.SampleProgram.csproj
  8. 6
      src/ImGui.NET/ImGui.NET.csproj
  9. 5
      src/ImGui.NET/build/net40/ImGui.NET.targets

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

@ -1,7 +1,13 @@
param ( param (
[Parameter(Mandatory=$false)][string]$repository,
[Parameter(Mandatory=$true)][string]$tag [Parameter(Mandatory=$true)][string]$tag
) )
if( -not $repository )
{
$repository="https://github.com/mellinoe/imgui.net-nativebuild"
}
Write-Host Downloading native binaries from GitHub Releases... Write-Host Downloading native binaries from GitHub Releases...
if (Test-Path $PSScriptRoot\deps\cimgui\) if (Test-Path $PSScriptRoot\deps\cimgui\)
@ -9,7 +15,7 @@ if (Test-Path $PSScriptRoot\deps\cimgui\)
Remove-Item $PSScriptRoot\deps\cimgui\ -Force -Recurse | Out-Null Remove-Item $PSScriptRoot\deps\cimgui\ -Force -Recurse | Out-Null
} }
New-Item -ItemType Directory -Force -Path $PSScriptRoot\deps\cimgui\linux-x64 | Out-Null New-Item -ItemType Directory -Force -Path $PSScriptRoot\deps\cimgui\linux-x64 | Out-Null
New-Item -ItemType Directory -Force -Path $PSScriptRoot\deps\cimgui\osx-x64 | Out-Null New-Item -ItemType Directory -Force -Path $PSScriptRoot\deps\cimgui\osx-universal | Out-Null
New-Item -ItemType Directory -Force -Path $PSScriptRoot\deps\cimgui\win-x86 | Out-Null New-Item -ItemType Directory -Force -Path $PSScriptRoot\deps\cimgui\win-x86 | Out-Null
New-Item -ItemType Directory -Force -Path $PSScriptRoot\deps\cimgui\win-x64 | Out-Null New-Item -ItemType Directory -Force -Path $PSScriptRoot\deps\cimgui\win-x64 | Out-Null
@ -17,7 +23,7 @@ New-Item -ItemType Directory -Force -Path $PSScriptRoot\deps\cimgui\win-x64 | Ou
$client = New-Object System.Net.WebClient $client = New-Object System.Net.WebClient
$client.DownloadFile( $client.DownloadFile(
"https://github.com/mellinoe/imgui.net-nativebuild/releases/download/$tag/cimgui.win-x86.dll", "$repository/releases/download/$tag/cimgui.win-x86.dll",
"$PSScriptRoot/deps/cimgui/win-x86/cimgui.dll") "$PSScriptRoot/deps/cimgui/win-x86/cimgui.dll")
if( -not $? ) if( -not $? )
{ {
@ -29,7 +35,7 @@ if( -not $? )
Write-Host "- cimgui.dll (x86)" Write-Host "- cimgui.dll (x86)"
$client.DownloadFile( $client.DownloadFile(
"https://github.com/mellinoe/imgui.net-nativebuild/releases/download/$tag/cimgui.win-x64.dll", "$repository/releases/download/$tag/cimgui.win-x64.dll",
"$PSScriptRoot/deps/cimgui/win-x64/$configuration/cimgui.dll") "$PSScriptRoot/deps/cimgui/win-x64/$configuration/cimgui.dll")
if( -not $? ) if( -not $? )
{ {
@ -41,7 +47,7 @@ if( -not $? )
Write-Host "- cimgui.dll (x64)" Write-Host "- cimgui.dll (x64)"
$client.DownloadFile( $client.DownloadFile(
"https://github.com/mellinoe/imgui.net-nativebuild/releases/download/$tag/cimgui.so", "$repository/releases/download/$tag/cimgui.so",
"$PSScriptRoot/deps/cimgui/linux-x64/cimgui.so") "$PSScriptRoot/deps/cimgui/linux-x64/cimgui.so")
if( -not $? ) if( -not $? )
{ {
@ -53,8 +59,8 @@ if( -not $? )
Write-Host - cimgui.so Write-Host - cimgui.so
$client.DownloadFile( $client.DownloadFile(
"https://github.com/mellinoe/imgui.net-nativebuild/releases/download/$tag/cimgui.dylib", "$repository/releases/download/$tag/cimgui.dylib",
"$PSScriptRoot/deps/cimgui/osx-x64/cimgui.dylib") "$PSScriptRoot/deps/cimgui/osx-universal/cimgui.dylib")
if( -not $? ) if( -not $? )
{ {
$msg = $Error[0].Exception.Message $msg = $Error[0].Exception.Message
@ -62,4 +68,4 @@ if( -not $? )
exit exit
} }
Write-Host - cimgui.dylib Write-Host "- cimgui.dylib"

@ -5,7 +5,7 @@
<AppendTargetFrameworkToOutputPath>false</AppendTargetFrameworkToOutputPath> <AppendTargetFrameworkToOutputPath>false</AppendTargetFrameworkToOutputPath>
<AssemblyName>ImGuiNET.SampleProgram.XNA</AssemblyName> <AssemblyName>ImGuiNET.SampleProgram.XNA</AssemblyName>
<RootNamespace>ImGuiNET.SampleProgram.XNA</RootNamespace> <RootNamespace>ImGuiNET.SampleProgram.XNA</RootNamespace>
<TargetFramework>net472</TargetFramework> <TargetFramework>net6.0</TargetFramework>
<OutputType>Exe</OutputType> <OutputType>Exe</OutputType>
</PropertyGroup> </PropertyGroup>
@ -15,7 +15,7 @@
<ItemGroup> <ItemGroup>
<Content Include="$(RepositoryRootDirectory)/deps/cimgui/win-x64/cimgui.dll" CopyToOutputDirectory="PreserveNewest" /> <Content Include="$(RepositoryRootDirectory)/deps/cimgui/win-x64/cimgui.dll" CopyToOutputDirectory="PreserveNewest" />
<Content Include="$(RepositoryRootDirectory)/deps/cimgui/osx-x64/cimgui.dylib" CopyToOutputDirectory="PreserveNewest" Link="lib%(Filename)%(Extension)" /> <Content Include="$(RepositoryRootDirectory)/deps/cimgui/osx-universal/cimgui.dylib" CopyToOutputDirectory="PreserveNewest" Link="lib%(Filename)%(Extension)" />
<Content Include="$(RepositoryRootDirectory)/deps/cimgui/linux-x64/cimgui.so" CopyToOutputDirectory="PreserveNewest" Link="lib%(Filename)%(Extension)" /> <Content Include="$(RepositoryRootDirectory)/deps/cimgui/linux-x64/cimgui.so" CopyToOutputDirectory="PreserveNewest" Link="lib%(Filename)%(Extension)" />
</ItemGroup> </ItemGroup>

@ -2,7 +2,7 @@
<PropertyGroup> <PropertyGroup>
<OutputType>Exe</OutputType> <OutputType>Exe</OutputType>
<TargetFramework>netcoreapp2.0</TargetFramework> <TargetFramework>net6.0</TargetFramework>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks> <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
</PropertyGroup> </PropertyGroup>
@ -26,7 +26,7 @@
<ItemGroup> <ItemGroup>
<Content Include="$(RepositoryRootDirectory)/deps/cimgui/win-x64/cimgui.dll" CopyToOutputDirectory="PreserveNewest" /> <Content Include="$(RepositoryRootDirectory)/deps/cimgui/win-x64/cimgui.dll" CopyToOutputDirectory="PreserveNewest" />
<Content Include="$(RepositoryRootDirectory)/deps/cimgui/osx-x64/cimgui.dylib" CopyToOutputDirectory="PreserveNewest" /> <Content Include="$(RepositoryRootDirectory)/deps/cimgui/osx-universal/cimgui.dylib" CopyToOutputDirectory="PreserveNewest" />
<Content Include="$(RepositoryRootDirectory)/deps/cimgui/linux-x64/cimgui.so" CopyToOutputDirectory="PreserveNewest" /> <Content Include="$(RepositoryRootDirectory)/deps/cimgui/linux-x64/cimgui.so" CopyToOutputDirectory="PreserveNewest" />
</ItemGroup> </ItemGroup>

@ -3,7 +3,7 @@
<Description>A .NET wrapper for the Dear ImGui library.</Description> <Description>A .NET wrapper for the Dear ImGui library.</Description>
<AssemblyVersion>1.82.0</AssemblyVersion> <AssemblyVersion>1.82.0</AssemblyVersion>
<Authors>Eric Mellino</Authors> <Authors>Eric Mellino</Authors>
<TargetFramework>netstandard2.0</TargetFramework> <TargetFramework>net6.0</TargetFramework>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks> <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
<DebugType>portable</DebugType> <DebugType>portable</DebugType>
<AssemblyName>ImGui.NET</AssemblyName> <AssemblyName>ImGui.NET</AssemblyName>
@ -41,8 +41,8 @@
<PackagePath>runtimes/linux-x64/native/libcimgui.so</PackagePath> <PackagePath>runtimes/linux-x64/native/libcimgui.so</PackagePath>
<Pack>true</Pack> <Pack>true</Pack>
</Content> </Content>
<Content Include="..\..\deps\cimgui\osx-x64\cimgui.dylib"> <Content Include="..\..\deps\cimgui\osx-universal\cimgui.dylib">
<PackagePath>runtimes/osx-x64/native/libcimgui.dylib</PackagePath> <PackagePath>runtimes/osx-universal/native/libcimgui.dylib</PackagePath>
<Pack>true</Pack> <Pack>true</Pack>
</Content> </Content>
<Content Include="build\net40\ImGui.NET.targets"> <Content Include="build\net40\ImGui.NET.targets">

@ -5,13 +5,14 @@
<_IsMacOS Condition="'$([System.Runtime.InteropServices.RuntimeInformation]::IsOSPlatform($([System.Runtime.InteropServices.OSPlatform]::OSX)))' == 'true'">true</_IsMacOS> <_IsMacOS Condition="'$([System.Runtime.InteropServices.RuntimeInformation]::IsOSPlatform($([System.Runtime.InteropServices.OSPlatform]::OSX)))' == 'true'">true</_IsMacOS>
<_IsLinux Condition="'$([System.Runtime.InteropServices.RuntimeInformation]::IsOSPlatform($([System.Runtime.InteropServices.OSPlatform]::Linux)))' == 'true'">true</_IsLinux> <_IsLinux Condition="'$([System.Runtime.InteropServices.RuntimeInformation]::IsOSPlatform($([System.Runtime.InteropServices.OSPlatform]::Linux)))' == 'true'">true</_IsLinux>
<_NativeRuntime Condition=" '$(_NativeRuntime)' == '' And '$(_IsMacOS)' == 'true' And ('$(Prefer32Bit)' == 'false' Or '$(PlatformTarget)' == 'x64')">osx-x64</_NativeRuntime> <_NativeRuntime Condition=" '$(_NativeRuntime)' == '' And '$(_IsMacOS)' == 'true' And '$(PlatformTarget)' == 'x64'">osx-x64</_NativeRuntime>
<_NativeRuntime Condition=" '$(_NativeRuntime)' == '' And '$(_IsMacOS)' == 'true' And '$(PlatformTarget)' == 'ARM64'">osx-arm64</_NativeRuntime>
<_NativeRuntime Condition=" '$(_NativeRuntime)' == '' And '$(_IsLinux)' == 'true' And ('$(Prefer32Bit)' == 'false' Or '$(PlatformTarget)' == 'x64')">linux-x64</_NativeRuntime> <_NativeRuntime Condition=" '$(_NativeRuntime)' == '' And '$(_IsLinux)' == 'true' And ('$(Prefer32Bit)' == 'false' Or '$(PlatformTarget)' == 'x64')">linux-x64</_NativeRuntime>
<_NativeRuntime Condition=" '$(_NativeRuntime)' == '' And '$(_IsWindows)' == 'true' And ('$(Prefer32Bit)' == 'true' Or '$(PlatformTarget)' == 'x86')">win-x86</_NativeRuntime> <_NativeRuntime Condition=" '$(_NativeRuntime)' == '' And '$(_IsWindows)' == 'true' And ('$(Prefer32Bit)' == 'true' Or '$(PlatformTarget)' == 'x86')">win-x86</_NativeRuntime>
<_NativeRuntime Condition=" '$(_NativeRuntime)' == '' And '$(_IsWindows)' == 'true' And ('$(Prefer32Bit)' == 'false' Or '$(PlatformTarget)' == 'x64')">win-x64</_NativeRuntime> <_NativeRuntime Condition=" '$(_NativeRuntime)' == '' And '$(_IsWindows)' == 'true' And ('$(Prefer32Bit)' == 'false' Or '$(PlatformTarget)' == 'x64')">win-x64</_NativeRuntime>
<_NativeLibName Condition="'$(_NativeRuntime)' == 'win-x86' Or '$(_NativeRuntime)' == 'win-x64'">cimgui.dll</_NativeLibName> <_NativeLibName Condition="'$(_NativeRuntime)' == 'win-x86' Or '$(_NativeRuntime)' == 'win-x64'">cimgui.dll</_NativeLibName>
<_NativeLibName Condition="'$(_NativeRuntime)' == 'osx-x64'">libcimgui.dylib</_NativeLibName> <_NativeLibName Condition="'$(_NativeRuntime)' == 'osx-x64' Or '$(_NativeRuntime)' == 'osx-arm64'">libcimgui.dylib</_NativeLibName>
<_NativeLibName Condition="'$(_NativeRuntime)' == 'linux-x64'">libcimgui.so</_NativeLibName> <_NativeLibName Condition="'$(_NativeRuntime)' == 'linux-x64'">libcimgui.so</_NativeLibName>
</PropertyGroup> </PropertyGroup>
<ItemGroup> <ItemGroup>

Loading…
Cancel
Save