Merge remote-tracking branch 'Tarik02/feature/apple-silicon'

internals
Eric Mellino 3 years ago
commit ae3ecd014e
  1. 20
      download-native-deps.ps1
  2. 4
      src/ImGui.NET.SampleProgram.XNA/ImGui.NET.SampleProgram.XNA.csproj
  3. 2
      src/ImGui.NET.SampleProgram/ImGui.NET.SampleProgram.csproj
  4. 6
      src/ImGui.NET/ImGui.NET.csproj
  5. 5
      src/ImGui.NET/build/net40/ImGui.NET.targets

@ -1,7 +1,13 @@
param (
[Parameter(Mandatory=$false)][string]$repository,
[Parameter(Mandatory=$true)][string]$tag
)
if( -not $repository )
{
$repository="https://github.com/mellinoe/imgui.net-nativebuild"
}
Write-Host Downloading native binaries from GitHub Releases...
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
}
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-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.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")
if( -not $? )
{
@ -29,7 +35,7 @@ if( -not $? )
Write-Host "- cimgui.dll (x86)"
$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")
if( -not $? )
{
@ -41,7 +47,7 @@ if( -not $? )
Write-Host "- cimgui.dll (x64)"
$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")
if( -not $? )
{
@ -53,8 +59,8 @@ if( -not $? )
Write-Host - cimgui.so
$client.DownloadFile(
"https://github.com/mellinoe/imgui.net-nativebuild/releases/download/$tag/cimgui.dylib",
"$PSScriptRoot/deps/cimgui/osx-x64/cimgui.dylib")
"$repository/releases/download/$tag/cimgui.dylib",
"$PSScriptRoot/deps/cimgui/osx-universal/cimgui.dylib")
if( -not $? )
{
$msg = $Error[0].Exception.Message
@ -62,7 +68,7 @@ if( -not $? )
exit
}
Write-Host - cimgui.dylib
Write-Host "- cimgui.dylib"
$client.DownloadFile(
"https://github.com/mellinoe/imgui.net-nativebuild/releases/download/$tag/definitions.json",

@ -5,7 +5,7 @@
<AppendTargetFrameworkToOutputPath>false</AppendTargetFrameworkToOutputPath>
<AssemblyName>ImGuiNET.SampleProgram.XNA</AssemblyName>
<RootNamespace>ImGuiNET.SampleProgram.XNA</RootNamespace>
<TargetFramework>net472</TargetFramework>
<TargetFramework>net6.0</TargetFramework>
<OutputType>Exe</OutputType>
</PropertyGroup>
@ -15,7 +15,7 @@
<ItemGroup>
<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)" />
</ItemGroup>

@ -26,7 +26,7 @@
<ItemGroup>
<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" />
</ItemGroup>

@ -3,7 +3,7 @@
<Description>A .NET wrapper for the Dear ImGui library.</Description>
<AssemblyVersion>1.87.0</AssemblyVersion>
<Authors>Eric Mellino</Authors>
<TargetFramework>netstandard2.0</TargetFramework>
<TargetFramework>net6.0</TargetFramework>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
<DebugType>portable</DebugType>
<AssemblyName>ImGui.NET</AssemblyName>
@ -41,8 +41,8 @@
<PackagePath>runtimes/linux-x64/native/libcimgui.so</PackagePath>
<Pack>true</Pack>
</Content>
<Content Include="..\..\deps\cimgui\osx-x64\cimgui.dylib">
<PackagePath>runtimes/osx-x64/native/libcimgui.dylib</PackagePath>
<Content Include="..\..\deps\cimgui\osx-universal\cimgui.dylib">
<PackagePath>runtimes/osx-universal/native/libcimgui.dylib</PackagePath>
<Pack>true</Pack>
</Content>
<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>
<_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 '$(_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>
<_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>
</PropertyGroup>
<ItemGroup>

Loading…
Cancel
Save