Skip to content

Commit

Permalink
Fixed build for Win-x86 and mac-arm64 (probably).
Browse files Browse the repository at this point in the history
Fixed DLL loading in 32bit process on x64 OS.
  • Loading branch information
DmitriySalnikov committed Oct 20, 2024
1 parent 8164a8b commit f46c6cd
Show file tree
Hide file tree
Showing 7 changed files with 68 additions and 68 deletions.
10 changes: 5 additions & 5 deletions .github/workflows/dotnet-desktop.yml
Original file line number Diff line number Diff line change
Expand Up @@ -105,11 +105,11 @@ jobs:
- name: Publish
shell: bash
run: |
dotnet publish Explorer/Console/GodotPCKExplorer.Console.csproj -p:PublishProfile=Win64 -p:PlatformTarget=x64 -o publish/Win64
dotnet publish Explorer/Console/GodotPCKExplorer.Console.csproj -p:PublishProfile=Win86 -p:PlatformTarget=x86 -o publish/Win86
dotnet publish Explorer/Console/GodotPCKExplorer.Console.csproj -p:PublishProfile=Linux64 -p:PlatformTarget=x64 -o publish/Linux64
dotnet publish Explorer/Console/GodotPCKExplorer.Console.csproj -p:PublishProfile=Mac64 -p:PlatformTarget=x64 -o publish/Mac64
dotnet publish Explorer/Console/GodotPCKExplorer.Console.csproj -p:PublishProfile=MacArm -p:PlatformTarget=Arm64 -o publish/MacArm
dotnet publish Explorer/Console/GodotPCKExplorer.Console.csproj -p:PublishProfile=Win64 -o publish/Win64
dotnet publish Explorer/Console/GodotPCKExplorer.Console.csproj -p:PublishProfile=Win86 -o publish/Win86
dotnet publish Explorer/Console/GodotPCKExplorer.Console.csproj -p:PublishProfile=Linux64 -o publish/Linux64
dotnet publish Explorer/Console/GodotPCKExplorer.Console.csproj -p:PublishProfile=Mac64 -o publish/Mac64
dotnet publish Explorer/Console/GodotPCKExplorer.Console.csproj -p:PublishProfile=MacArm -o publish/MacArm
- name: Prepare artifacts
shell: bash
Expand Down
2 changes: 1 addition & 1 deletion Core/GodotPCKExplorer/PCKActions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ static void LoadNativeLibs()
}
else
{
if (Environment.Is64BitOperatingSystem)
if (Environment.Is64BitProcess)
arch = "x64";
else
arch = "x86";
Expand Down
24 changes: 12 additions & 12 deletions Explorer/Console/Properties/PublishProfiles/Linux64.pubxml
Original file line number Diff line number Diff line change
Expand Up @@ -3,16 +3,16 @@
https://go.microsoft.com/fwlink/?LinkID=208121.
-->
<Project>
<PropertyGroup>
<Configuration>Release</Configuration>
<Platform>Any CPU</Platform>
<PublishDir>publish\Linux64</PublishDir>
<PublishProtocol>FileSystem</PublishProtocol>
<_TargetId>Folder</_TargetId>
<TargetFramework>net8.0</TargetFramework>
<RuntimeIdentifier>linux-x64</RuntimeIdentifier>
<SelfContained>true</SelfContained>
<PublishSingleFile>true</PublishSingleFile>
<PublishTrimmed>true</PublishTrimmed>
</PropertyGroup>
<PropertyGroup>
<Configuration>Release</Configuration>
<Platform>x64</Platform>
<PublishDir>publish\Linux64</PublishDir>
<PublishProtocol>FileSystem</PublishProtocol>
<_TargetId>Folder</_TargetId>
<TargetFramework>net8.0</TargetFramework>
<RuntimeIdentifier>linux-x64</RuntimeIdentifier>
<SelfContained>true</SelfContained>
<PublishSingleFile>true</PublishSingleFile>
<PublishTrimmed>true</PublishTrimmed>
</PropertyGroup>
</Project>
24 changes: 12 additions & 12 deletions Explorer/Console/Properties/PublishProfiles/Mac64.pubxml
Original file line number Diff line number Diff line change
Expand Up @@ -3,16 +3,16 @@
https://go.microsoft.com/fwlink/?LinkID=208121.
-->
<Project>
<PropertyGroup>
<Configuration>Release</Configuration>
<Platform>Any CPU</Platform>
<PublishDir>publish\Mac64</PublishDir>
<PublishProtocol>FileSystem</PublishProtocol>
<_TargetId>Folder</_TargetId>
<TargetFramework>net8.0</TargetFramework>
<RuntimeIdentifier>osx-x64</RuntimeIdentifier>
<SelfContained>true</SelfContained>
<PublishSingleFile>true</PublishSingleFile>
<PublishTrimmed>true</PublishTrimmed>
</PropertyGroup>
<PropertyGroup>
<Configuration>Release</Configuration>
<Platform>x64</Platform>
<PublishDir>publish\Mac64</PublishDir>
<PublishProtocol>FileSystem</PublishProtocol>
<_TargetId>Folder</_TargetId>
<TargetFramework>net8.0</TargetFramework>
<RuntimeIdentifier>osx-x64</RuntimeIdentifier>
<SelfContained>true</SelfContained>
<PublishSingleFile>true</PublishSingleFile>
<PublishTrimmed>true</PublishTrimmed>
</PropertyGroup>
</Project>
24 changes: 12 additions & 12 deletions Explorer/Console/Properties/PublishProfiles/MacArm.pubxml
Original file line number Diff line number Diff line change
Expand Up @@ -3,16 +3,16 @@
https://go.microsoft.com/fwlink/?LinkID=208121.
-->
<Project>
<PropertyGroup>
<Configuration>Release</Configuration>
<Platform>Any CPU</Platform>
<PublishDir>publish\MacArm</PublishDir>
<PublishProtocol>FileSystem</PublishProtocol>
<_TargetId>Folder</_TargetId>
<TargetFramework>net8.0</TargetFramework>
<RuntimeIdentifier>osx-arm64</RuntimeIdentifier>
<SelfContained>true</SelfContained>
<PublishSingleFile>true</PublishSingleFile>
<PublishTrimmed>true</PublishTrimmed>
</PropertyGroup>
<PropertyGroup>
<Configuration>Release</Configuration>
<Platform>ARM64</Platform>
<PublishDir>publish\MacArm</PublishDir>
<PublishProtocol>FileSystem</PublishProtocol>
<_TargetId>Folder</_TargetId>
<TargetFramework>net8.0</TargetFramework>
<RuntimeIdentifier>osx-arm64</RuntimeIdentifier>
<SelfContained>true</SelfContained>
<PublishSingleFile>true</PublishSingleFile>
<PublishTrimmed>true</PublishTrimmed>
</PropertyGroup>
</Project>
26 changes: 13 additions & 13 deletions Explorer/Console/Properties/PublishProfiles/Win64.pubxml
Original file line number Diff line number Diff line change
Expand Up @@ -3,17 +3,17 @@
https://go.microsoft.com/fwlink/?LinkID=208121.
-->
<Project>
<PropertyGroup>
<Configuration>Release</Configuration>
<Platform>Any CPU</Platform>
<PublishDir>publish\Win64</PublishDir>
<PublishProtocol>FileSystem</PublishProtocol>
<_TargetId>Folder</_TargetId>
<TargetFramework>net8.0</TargetFramework>
<RuntimeIdentifier>win-x64</RuntimeIdentifier>
<SelfContained>true</SelfContained>
<PublishSingleFile>true</PublishSingleFile>
<PublishReadyToRun>true</PublishReadyToRun>
<PublishTrimmed>true</PublishTrimmed>
</PropertyGroup>
<PropertyGroup>
<Configuration>Release</Configuration>
<Platform>x64</Platform>
<PublishDir>publish\Win64</PublishDir>
<PublishProtocol>FileSystem</PublishProtocol>
<_TargetId>Folder</_TargetId>
<TargetFramework>net8.0</TargetFramework>
<RuntimeIdentifier>win-x64</RuntimeIdentifier>
<SelfContained>true</SelfContained>
<PublishSingleFile>true</PublishSingleFile>
<PublishReadyToRun>true</PublishReadyToRun>
<PublishTrimmed>true</PublishTrimmed>
</PropertyGroup>
</Project>
26 changes: 13 additions & 13 deletions Explorer/Console/Properties/PublishProfiles/Win86.pubxml
Original file line number Diff line number Diff line change
Expand Up @@ -3,17 +3,17 @@
https://go.microsoft.com/fwlink/?LinkID=208121.
-->
<Project>
<PropertyGroup>
<Configuration>Release</Configuration>
<Platform>Any CPU</Platform>
<PublishDir>publish\Win86</PublishDir>
<PublishProtocol>FileSystem</PublishProtocol>
<_TargetId>Folder</_TargetId>
<TargetFramework>net8.0</TargetFramework>
<RuntimeIdentifier>win-x86</RuntimeIdentifier>
<SelfContained>true</SelfContained>
<PublishSingleFile>true</PublishSingleFile>
<PublishReadyToRun>true</PublishReadyToRun>
<PublishTrimmed>true</PublishTrimmed>
</PropertyGroup>
<PropertyGroup>
<Configuration>Release</Configuration>
<Platform>x86</Platform>
<PublishDir>publish\Win86</PublishDir>
<PublishProtocol>FileSystem</PublishProtocol>
<_TargetId>Folder</_TargetId>
<TargetFramework>net8.0</TargetFramework>
<RuntimeIdentifier>win-x86</RuntimeIdentifier>
<SelfContained>true</SelfContained>
<PublishSingleFile>true</PublishSingleFile>
<PublishReadyToRun>true</PublishReadyToRun>
<PublishTrimmed>true</PublishTrimmed>
</PropertyGroup>
</Project>

0 comments on commit f46c6cd

Please sign in to comment.