add luaperks (cd, im, iuplua, luasockets) since our lua is customized and acts flaky with external dlls

This commit is contained in:
zeromus 2015-11-02 00:27:11 -06:00
parent 5ad6e95b3b
commit 3a61c850f3
9 changed files with 138 additions and 4 deletions

BIN
LuaInterface/Libs/7z.dll Normal file

Binary file not shown.

BIN
LuaInterface/Libs/7z.exe Normal file

Binary file not shown.

Binary file not shown.

BIN
LuaInterface/Libs/touch.exe Normal file

Binary file not shown.

View File

@ -0,0 +1,3 @@
cd %1
7z x -bd -y -o%2.libs %3
touch %4 %3 %4 %5 %6 %7 %8 %9

View File

@ -27,6 +27,34 @@ extern "C"
#include "lua.h"
#include "lualib.h"
#include "lauxlib.h"
int iuplua_open(lua_State * L);
int iupcontrolslua_open(lua_State * L);
int luaopen_winapi(lua_State * L);
//luasocket
int luaopen_socket_core(lua_State *L);
int luaopen_mime_core(lua_State *L);
static void luaperks(lua_State *L)
{
#ifdef LUAPERKS
iuplua_open(L);
iupcontrolslua_open(L);
luaopen_winapi(L);
//luasocket - yeah, have to open this in a weird way
lua_pushcfunction(L,luaopen_socket_core);
lua_setglobal(L,"tmp");
luaL_dostring(L, "package.preload[\"socket.core\"] = _G.tmp");
lua_pushcfunction(L,luaopen_mime_core);
lua_setglobal(L,"tmp");
luaL_dostring(L, "package.preload[\"mime.core\"] = _G.tmp");
#endif
}
}
// Not sure of the purpose of this, but I'm keeping it -kevinh
@ -209,6 +237,7 @@ namespace Lua511
static void luaL_openlibs(IntPtr luaState)
{
::luaL_openlibs(toState);
::luaperks(toState);
}
// Not yet wrapped

View File

@ -5,6 +5,10 @@
<Configuration>Debug</Configuration>
<Platform>Win32</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Release-LUAPERKS|Win32">
<Configuration>Release-LUAPERKS</Configuration>
<Platform>Win32</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Release|Win32">
<Configuration>Release</Configuration>
<Platform>Win32</Platform>
@ -25,6 +29,13 @@
<PlatformToolset>v100</PlatformToolset>
<WholeProgramOptimization>true</WholeProgramOptimization>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release-LUAPERKS|Win32'" Label="Configuration">
<ConfigurationType>DynamicLibrary</ConfigurationType>
<CharacterSet>Unicode</CharacterSet>
<CLRSupport>true</CLRSupport>
<PlatformToolset>v100</PlatformToolset>
<WholeProgramOptimization>true</WholeProgramOptimization>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
<ConfigurationType>DynamicLibrary</ConfigurationType>
<CharacterSet>Unicode</CharacterSet>
@ -37,6 +48,9 @@
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release-LUAPERKS|Win32'" Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
@ -49,18 +63,26 @@
<LinkKeyFile Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
</LinkKeyFile>
<OutDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(SolutionDir)$(Configuration)\</OutDir>
<OutDir Condition="'$(Configuration)|$(Platform)'=='Release-LUAPERKS|Win32'">$(SolutionDir)$(Configuration)\</OutDir>
<IntDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(Configuration)\</IntDir>
<IntDir Condition="'$(Configuration)|$(Platform)'=='Release-LUAPERKS|Win32'">$(Configuration)\</IntDir>
<LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">false</LinkIncremental>
<LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release-LUAPERKS|Win32'">false</LinkIncremental>
<LinkKeyFile Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
</LinkKeyFile>
<LinkKeyFile Condition="'$(Configuration)|$(Platform)'=='Release-LUAPERKS|Win32'" />
<CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">AllRules.ruleset</CodeAnalysisRuleSet>
<CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" />
<CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" />
<CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">AllRules.ruleset</CodeAnalysisRuleSet>
<CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Release-LUAPERKS|Win32'">AllRules.ruleset</CodeAnalysisRuleSet>
<CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" />
<CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Release-LUAPERKS|Win32'" />
<CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" />
<CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Release-LUAPERKS|Win32'" />
<LinkDelaySign Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
</LinkDelaySign>
<LinkDelaySign Condition="'$(Configuration)|$(Platform)'=='Release-LUAPERKS|Win32'" />
</PropertyGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<ClCompile>
@ -75,8 +97,7 @@
<DisableSpecificWarnings>4996;%(DisableSpecificWarnings)</DisableSpecificWarnings>
</ClCompile>
<Link>
<AdditionalDependencies>
</AdditionalDependencies>
<AdditionalDependencies>..\..\luaperks.lib;gdi32.lib;opengl32.lib;shell32.lib;user32.lib;comctl32.lib;kernel32.lib;ws2_32.lib;psapi.lib;AdvAPI32.Lib;ole32.lib;mpr.lib;comdlg32.lib;WinSpool.Lib</AdditionalDependencies>
<OutputFile>$(OutDir)$(TargetName).dll</OutputFile>
<GenerateDebugInformation>true</GenerateDebugInformation>
<AssemblyDebug>true</AssemblyDebug>
@ -96,10 +117,51 @@
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
<DisableSpecificWarnings>4996;%(DisableSpecificWarnings)</DisableSpecificWarnings>
<CallingConvention>Cdecl</CallingConvention>
<PreprocessorDefinitions>_WINDLL;%(PreprocessorDefinitions)</PreprocessorDefinitions>
</ClCompile>
<Link>
<AdditionalDependencies>
</AdditionalDependencies>
<AdditionalDependencies>.libs\luaperks.lib;gdi32.lib;opengl32.lib;shell32.lib;user32.lib;comctl32.lib;kernel32.lib;ws2_32.lib;psapi.lib;AdvAPI32.Lib;ole32.lib;mpr.lib;comdlg32.lib;WinSpool.Lib</AdditionalDependencies>
<OutputFile>$(OutDir)lua51.dll</OutputFile>
<GenerateDebugInformation>true</GenerateDebugInformation>
<ProgramDatabaseFile>$(OutDir)$(TargetName).pdb</ProgramDatabaseFile>
<GenerateMapFile>true</GenerateMapFile>
<MapFileName>$(OutDir)$(TargetName).map</MapFileName>
<MapExports>true</MapExports>
<RandomizedBaseAddress>false</RandomizedBaseAddress>
<DataExecutionPrevention>
</DataExecutionPrevention>
<ImportLibrary>$(OutDir)lua51.lib</ImportLibrary>
<TargetMachine>MachineX86</TargetMachine>
</Link>
<CustomBuildStep>
<Command>
</Command>
</CustomBuildStep>
<PostBuildEvent>
<Command>
</Command>
</PostBuildEvent>
<PostBuildEvent>
<Message>
</Message>
</PostBuildEvent>
<Manifest>
<AssemblyIdentity>
</AssemblyIdentity>
</Manifest>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release-LUAPERKS|Win32'">
<ClCompile>
<AdditionalIncludeDirectories>%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
<WarningLevel>Level3</WarningLevel>
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
<DisableSpecificWarnings>4996;%(DisableSpecificWarnings)</DisableSpecificWarnings>
<CallingConvention>Cdecl</CallingConvention>
<PreprocessorDefinitions>LUAPERKS;_WINDLL;%(PreprocessorDefinitions)</PreprocessorDefinitions>
</ClCompile>
<Link>
<AdditionalDependencies>.libs\luaperks.lib;gdi32.lib;opengl32.lib;shell32.lib;user32.lib;comctl32.lib;kernel32.lib;ws2_32.lib;psapi.lib;AdvAPI32.Lib;ole32.lib;mpr.lib;comdlg32.lib;WinSpool.Lib</AdditionalDependencies>
<OutputFile>$(OutDir)lua51.dll</OutputFile>
<GenerateDebugInformation>true</GenerateDebugInformation>
<ProgramDatabaseFile>$(OutDir)$(TargetName).pdb</ProgramDatabaseFile>
@ -138,6 +200,7 @@
<ItemGroup>
<ClCompile Include="LuaDLL.cpp">
<PreprocessToFile Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">false</PreprocessToFile>
<PreprocessToFile Condition="'$(Configuration)|$(Platform)'=='Release-LUAPERKS|Win32'">false</PreprocessToFile>
</ClCompile>
<ClCompile Include="luaglue.cpp" />
</ItemGroup>
@ -165,6 +228,17 @@
<ClInclude Include="lvm.h" />
<ClInclude Include="lzio.h" />
</ItemGroup>
<ItemGroup>
<CustomBuild Include="..\..\Libs\luaperks.7z">
<FileType>Document</FileType>
<Command Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">call $(ProjectDir)..\..\libs\un7z_and_touch.bat $(ProjectDir)\..\..\libs\ $(ProjectDir) luaperks.7z $(ProjectDir).libs\luaperks.lib $(ProjectDir).libs\luaperks.tag</Command>
<Command Condition="'$(Configuration)|$(Platform)'=='Release-LUAPERKS|Win32'">call $(ProjectDir)..\..\libs\un7z_and_touch.bat $(ProjectDir)\..\..\libs\ $(ProjectDir) luaperks.7z $(ProjectDir).libs\luaperks.lib $(ProjectDir).libs\luaperks.tag</Command>
<Outputs Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">.libs\luaperks.tag</Outputs>
<Outputs Condition="'$(Configuration)|$(Platform)'=='Release-LUAPERKS|Win32'">.libs\luaperks.tag</Outputs>
<AdditionalInputs Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">..\..\libs\7z.exe;..\..\libs\un7z_and_touch.bat</AdditionalInputs>
<AdditionalInputs Condition="'$(Configuration)|$(Platform)'=='Release-LUAPERKS|Win32'">..\..\libs\7z.exe;..\..\libs\un7z_and_touch.bat</AdditionalInputs>
</CustomBuild>
</ItemGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
<ImportGroup Label="ExtensionTargets">
</ImportGroup>

View File

@ -13,6 +13,9 @@ Global
Release|Any CPU = Release|Any CPU
Release|Mixed Platforms = Release|Mixed Platforms
Release|Win32 = Release|Win32
Release-LUAPERKS|Any CPU = Release-LUAPERKS|Any CPU
Release-LUAPERKS|Mixed Platforms = Release-LUAPERKS|Mixed Platforms
Release-LUAPERKS|Win32 = Release-LUAPERKS|Win32
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{0A82CC4C-9A27-461C-8DB0-A65AC6393748}.Debug|Any CPU.ActiveCfg = Debug|Win32
@ -25,6 +28,11 @@ Global
{0A82CC4C-9A27-461C-8DB0-A65AC6393748}.Release|Mixed Platforms.Build.0 = Release|Win32
{0A82CC4C-9A27-461C-8DB0-A65AC6393748}.Release|Win32.ActiveCfg = Release|Win32
{0A82CC4C-9A27-461C-8DB0-A65AC6393748}.Release|Win32.Build.0 = Release|Win32
{0A82CC4C-9A27-461C-8DB0-A65AC6393748}.Release-LUAPERKS|Any CPU.ActiveCfg = Release-LUAPERKS|Win32
{0A82CC4C-9A27-461C-8DB0-A65AC6393748}.Release-LUAPERKS|Mixed Platforms.ActiveCfg = Release-LUAPERKS|Win32
{0A82CC4C-9A27-461C-8DB0-A65AC6393748}.Release-LUAPERKS|Mixed Platforms.Build.0 = Release-LUAPERKS|Win32
{0A82CC4C-9A27-461C-8DB0-A65AC6393748}.Release-LUAPERKS|Win32.ActiveCfg = Release-LUAPERKS|Win32
{0A82CC4C-9A27-461C-8DB0-A65AC6393748}.Release-LUAPERKS|Win32.Build.0 = Release-LUAPERKS|Win32
{F55CABBB-4108-4A39-94E1-581FD46DC021}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{F55CABBB-4108-4A39-94E1-581FD46DC021}.Debug|Any CPU.Build.0 = Debug|Any CPU
{F55CABBB-4108-4A39-94E1-581FD46DC021}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU
@ -35,6 +43,11 @@ Global
{F55CABBB-4108-4A39-94E1-581FD46DC021}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU
{F55CABBB-4108-4A39-94E1-581FD46DC021}.Release|Mixed Platforms.Build.0 = Release|Any CPU
{F55CABBB-4108-4A39-94E1-581FD46DC021}.Release|Win32.ActiveCfg = Release|Any CPU
{F55CABBB-4108-4A39-94E1-581FD46DC021}.Release-LUAPERKS|Any CPU.ActiveCfg = Release-LUAPERKS|Any CPU
{F55CABBB-4108-4A39-94E1-581FD46DC021}.Release-LUAPERKS|Any CPU.Build.0 = Release-LUAPERKS|Any CPU
{F55CABBB-4108-4A39-94E1-581FD46DC021}.Release-LUAPERKS|Mixed Platforms.ActiveCfg = Release-LUAPERKS|Any CPU
{F55CABBB-4108-4A39-94E1-581FD46DC021}.Release-LUAPERKS|Mixed Platforms.Build.0 = Release-LUAPERKS|Any CPU
{F55CABBB-4108-4A39-94E1-581FD46DC021}.Release-LUAPERKS|Win32.ActiveCfg = Release-LUAPERKS|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE

View File

@ -69,6 +69,21 @@
<CodeAnalysisRuleSet>AllRules.ruleset</CodeAnalysisRuleSet>
<UseVSHostingProcess>false</UseVSHostingProcess>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Release-LUAPERKS|AnyCPU'">
<OutputPath>..\..\references\</OutputPath>
<DefineConstants>TRACE</DefineConstants>
<Optimize>true</Optimize>
<DebugType>pdbonly</DebugType>
<PlatformTarget>x86</PlatformTarget>
<CodeAnalysisLogFile>..\..\references\LuaInterface.dll.CodeAnalysisLog.xml</CodeAnalysisLogFile>
<CodeAnalysisUseTypeNameInSuppression>true</CodeAnalysisUseTypeNameInSuppression>
<CodeAnalysisModuleSuppressionsFile>GlobalSuppressions.cs</CodeAnalysisModuleSuppressionsFile>
<UseVSHostingProcess>false</UseVSHostingProcess>
<ErrorReport>prompt</ErrorReport>
<CodeAnalysisRuleSet>AllRules.ruleset</CodeAnalysisRuleSet>
<CodeAnalysisRuleSetDirectories>;C:\Program Files (x86)\Microsoft Visual Studio 10.0\Team Tools\Static Analysis Tools\\Rule Sets</CodeAnalysisRuleSetDirectories>
<CodeAnalysisRuleDirectories>;C:\Program Files (x86)\Microsoft Visual Studio 10.0\Team Tools\Static Analysis Tools\FxCop\\Rules</CodeAnalysisRuleDirectories>
</PropertyGroup>
<ItemGroup>
<Reference Include="System" />
<Reference Include="System.Data" />