Enable DevIL on Linux

Remove NO_DEVIL defines, and add devil.dll -> libIL.so.1 DLL mapping to app.config
This commit is contained in:
Kevin Caccamo 2019-09-02 03:06:33 -04:00
parent 15a7f02617
commit b5ad511671
5 changed files with 51 additions and 55 deletions

View file

@ -1,9 +1,46 @@
<?xml version="1.0"?>
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<startup useLegacyV2RuntimeActivationPolicy="true">
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.7.2"/>
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.7.2" />
</startup>
<runtime>
<loadFromRemoteSources enabled="true"/>
<loadFromRemoteSources enabled="true" />
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
<dependentAssembly>
<assemblyIdentity name="mscorlib" publicKeyToken="b77a5c561934e089" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-4.0.0.0" newVersion="4.0.0.0" />
</dependentAssembly>
</assemblyBinding>
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
<dependentAssembly>
<assemblyIdentity name="System" publicKeyToken="b77a5c561934e089" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-4.0.0.0" newVersion="4.0.0.0" />
</dependentAssembly>
</assemblyBinding>
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
<dependentAssembly>
<assemblyIdentity name="System.Data" publicKeyToken="b77a5c561934e089" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-4.0.0.0" newVersion="4.0.0.0" />
</dependentAssembly>
</assemblyBinding>
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
<dependentAssembly>
<assemblyIdentity name="System.Design" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-4.0.0.0" newVersion="4.0.0.0" />
</dependentAssembly>
</assemblyBinding>
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
<dependentAssembly>
<assemblyIdentity name="System.Drawing" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-4.0.0.0" newVersion="4.0.0.0" />
</dependentAssembly>
</assemblyBinding>
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
<dependentAssembly>
<assemblyIdentity name="System.Windows.Forms" publicKeyToken="b77a5c561934e089" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-4.0.0.0" newVersion="4.0.0.0" />
</dependentAssembly>
</assemblyBinding>
</runtime>
</configuration>
<dllmap dll="devil.dll" target="libIL.so.1" os="linux" />
</configuration>

View file

@ -27,7 +27,7 @@
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|x86' ">
<DebugSymbols>true</DebugSymbols>
<OutputPath>..\..\Build\</OutputPath>
<DefineConstants>TRACE;DEBUG;NO_SCINTILLA NO_FORMS_DESIGN NO_DEVIL NO_WIN32 NO_UPDATER</DefineConstants>
<DefineConstants>TRACE;DEBUG;NO_SCINTILLA NO_FORMS_DESIGN NO_WIN32 NO_UPDATER</DefineConstants>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
<DebugType>full</DebugType>
<PlatformTarget>x86</PlatformTarget>
@ -48,7 +48,7 @@
<ErrorReport>prompt</ErrorReport>
<DocumentationFile>
</DocumentationFile>
<DefineConstants>NO_SCINTILLA NO_FORMS_DESIGN NO_DEVIL NO_WIN32 NO_UPDATER</DefineConstants>
<DefineConstants>NO_SCINTILLA NO_FORMS_DESIGN NO_WIN32 NO_UPDATER</DefineConstants>
<WarningLevel>4</WarningLevel>
<DebugSymbols>true</DebugSymbols>
<NoWarn>1591</NoWarn>
@ -57,7 +57,7 @@
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug + Profiler|x86' ">
<DebugSymbols>true</DebugSymbols>
<OutputPath>..\..\Build\</OutputPath>
<DefineConstants>TRACE;DEBUG;PROFILE NO_SCINTILLA NO_FORMS_DESIGN NO_DEVIL NO_WIN32 NO_UPDATER</DefineConstants>
<DefineConstants>TRACE;DEBUG;PROFILE NO_SCINTILLA NO_FORMS_DESIGN NO_WIN32 NO_UPDATER</DefineConstants>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
<DocumentationFile>
</DocumentationFile>
@ -79,7 +79,7 @@
<PlatformTarget>x86</PlatformTarget>
<UseVSHostingProcess>false</UseVSHostingProcess>
<ErrorReport>prompt</ErrorReport>
<DefineConstants>TRACE;PROFILE NO_SCINTILLA NO_FORMS_DESIGN NO_DEVIL NO_WIN32 NO_UPDATER</DefineConstants>
<DefineConstants>TRACE;PROFILE NO_SCINTILLA NO_FORMS_DESIGN NO_WIN32 NO_UPDATER</DefineConstants>
<Prefer32Bit>false</Prefer32Bit>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug|x64'">
@ -89,7 +89,7 @@
</DocumentationFile>
<Prefer32Bit>false</Prefer32Bit>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
<DefineConstants>TRACE;DEBUG;NO_SCINTILLA NO_FORMS_DESIGN NO_DEVIL NO_WIN32 NO_UPDATER</DefineConstants>
<DefineConstants>TRACE;DEBUG;NO_SCINTILLA NO_FORMS_DESIGN NO_WIN32 NO_UPDATER</DefineConstants>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Release|x64'">
<PlatformTarget>x64</PlatformTarget>
@ -97,14 +97,14 @@
<Prefer32Bit>false</Prefer32Bit>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
<Optimize>true</Optimize>
<DefineConstants>TRACE;NO_SCINTILLA NO_FORMS_DESIGN NO_DEVIL NO_WIN32 NO_UPDATER</DefineConstants>
<DefineConstants>TRACE;NO_SCINTILLA NO_FORMS_DESIGN NO_WIN32 NO_UPDATER</DefineConstants>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug + Profiler|x64'">
<PlatformTarget>x64</PlatformTarget>
<OutputPath>..\..\Build\</OutputPath>
<Prefer32Bit>false</Prefer32Bit>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
<DefineConstants>TRACE;DEBUG;PROFILE NO_SCINTILLA NO_FORMS_DESIGN NO_DEVIL NO_WIN32 NO_UPDATER</DefineConstants>
<DefineConstants>TRACE;DEBUG;PROFILE NO_SCINTILLA NO_FORMS_DESIGN NO_WIN32 NO_UPDATER</DefineConstants>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Release + Profiler|x64'">
<PlatformTarget>x64</PlatformTarget>
@ -112,7 +112,7 @@
<Prefer32Bit>false</Prefer32Bit>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
<Optimize>true</Optimize>
<DefineConstants>PROFILE NO_SCINTILLA NO_FORMS_DESIGN NO_DEVIL NO_WIN32 NO_UPDATER</DefineConstants>
<DefineConstants>PROFILE NO_SCINTILLA NO_FORMS_DESIGN NO_WIN32 NO_UPDATER</DefineConstants>
</PropertyGroup>
<Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.

View file

@ -49,10 +49,8 @@ namespace CodeImp.DoomBuilder
{
#region ================== API Declarations
#if !NO_DEVIL
[DllImport("devil.dll")]
private static extern void ilInit();
#endif
#if NO_WIN32
@ -628,9 +626,8 @@ namespace CodeImp.DoomBuilder
// Initialize static classes
MapSet.Initialize();
#if !NO_DEVIL
ilInit();
#endif
// Create main window
General.WriteLogLine("Loading main interface window...");

View file

@ -43,43 +43,6 @@ namespace CodeImp.DoomBuilder.IO
internal const int IL_DDS = 0x0437; //!< DirectDraw Surface - .dds extension
}
#if NO_DEVIL
internal unsafe class FileImageReader : IImageReader
{
public FileImageReader()
{
//imagetype = DevilImageType.IL_TYPE_UNKNOWN;
}
public FileImageReader(uint devilImagetype)
{
}
public FileImageReader(uint devilImagetype, int guesstype, Playpal guesspalette)
{
}
public Bitmap ReadAsBitmap(Stream stream)
{
int x, y;
return ReadAsBitmap(stream, out x, out y);
}
public Bitmap ReadAsBitmap(Stream stream, out int offsetx, out int offsety)
{
offsetx = 0;
offsety = 0;
return new Bitmap(64, 64, PixelFormat.Format32bppArgb);
}
public void DrawToPixelData(Stream stream, PixelColor* target, int targetwidth, int targetheight, int x, int y)
{
}
}
#else
// [ZZ]
internal enum DevilError
{
@ -722,6 +685,4 @@ namespace CodeImp.DoomBuilder.IO
#endregion
}
#endif
}

View file

@ -6,4 +6,5 @@
<runtime>
<loadFromRemoteSources enabled="true"/>
</runtime>
<dllmap dll="devil.dll" target="libIL.so.1" os="linux" />
</configuration>