Tim Hughes
11 years ago
8 changed files with 416 additions and 9 deletions
@ -0,0 +1,217 @@ |
|||||
|
<?xml version="1.0" encoding="utf-8"?> |
||||
|
<Project DefaultTargets="Build" ToolsVersion="12.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> |
||||
|
<ItemGroup Label="ProjectConfigurations"> |
||||
|
<ProjectConfiguration Include="Debug|Win32"> |
||||
|
<Configuration>Debug</Configuration> |
||||
|
<Platform>Win32</Platform> |
||||
|
</ProjectConfiguration> |
||||
|
<ProjectConfiguration Include="Debug|x64"> |
||||
|
<Configuration>Debug</Configuration> |
||||
|
<Platform>x64</Platform> |
||||
|
</ProjectConfiguration> |
||||
|
<ProjectConfiguration Include="Release|Win32"> |
||||
|
<Configuration>Release</Configuration> |
||||
|
<Platform>Win32</Platform> |
||||
|
</ProjectConfiguration> |
||||
|
<ProjectConfiguration Include="Release|x64"> |
||||
|
<Configuration>Release</Configuration> |
||||
|
<Platform>x64</Platform> |
||||
|
</ProjectConfiguration> |
||||
|
</ItemGroup> |
||||
|
<PropertyGroup Label="Globals"> |
||||
|
<Keyword>Win32Proj</Keyword> |
||||
|
<RootNamespace>Alethzero</RootNamespace> |
||||
|
<ProjectName>Alethzero</ProjectName> |
||||
|
<ProjectGuid>{BFCFFC46-78A3-4350-9938-0EA3A2B1CCCD}</ProjectGuid> |
||||
|
</PropertyGroup> |
||||
|
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" /> |
||||
|
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration"> |
||||
|
<ConfigurationType>Application</ConfigurationType> |
||||
|
<UseDebugLibraries>true</UseDebugLibraries> |
||||
|
<PlatformToolset>v120</PlatformToolset> |
||||
|
</PropertyGroup> |
||||
|
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration"> |
||||
|
<ConfigurationType>Application</ConfigurationType> |
||||
|
<UseDebugLibraries>true</UseDebugLibraries> |
||||
|
<PlatformToolset>v120</PlatformToolset> |
||||
|
</PropertyGroup> |
||||
|
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration"> |
||||
|
<ConfigurationType>Application</ConfigurationType> |
||||
|
<UseDebugLibraries>false</UseDebugLibraries> |
||||
|
<WholeProgramOptimization>true</WholeProgramOptimization> |
||||
|
<PlatformToolset>v120</PlatformToolset> |
||||
|
</PropertyGroup> |
||||
|
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration"> |
||||
|
<ConfigurationType>Application</ConfigurationType> |
||||
|
<UseDebugLibraries>false</UseDebugLibraries> |
||||
|
<WholeProgramOptimization>true</WholeProgramOptimization> |
||||
|
<PlatformToolset>v120</PlatformToolset> |
||||
|
</PropertyGroup> |
||||
|
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" /> |
||||
|
<ImportGroup Label="ExtensionSettings"> |
||||
|
</ImportGroup> |
||||
|
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'"> |
||||
|
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" /> |
||||
|
<Import Project="LibEthereum.props" /> |
||||
|
</ImportGroup> |
||||
|
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="PropertySheets"> |
||||
|
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" /> |
||||
|
<Import Project="LibEthereum.props" /> |
||||
|
</ImportGroup> |
||||
|
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|Win32'"> |
||||
|
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" /> |
||||
|
<Import Project="LibEthereum.props" /> |
||||
|
</ImportGroup> |
||||
|
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="PropertySheets"> |
||||
|
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" /> |
||||
|
<Import Project="LibEthereum.props" /> |
||||
|
</ImportGroup> |
||||
|
<PropertyGroup Label="UserMacros" /> |
||||
|
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'"> |
||||
|
<LinkIncremental>true</LinkIncremental> |
||||
|
</PropertyGroup> |
||||
|
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" /> |
||||
|
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'"> |
||||
|
<LinkIncremental>false</LinkIncremental> |
||||
|
</PropertyGroup> |
||||
|
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'"> |
||||
|
<LinkIncremental>false</LinkIncremental> |
||||
|
</PropertyGroup> |
||||
|
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'"> |
||||
|
<ClCompile> |
||||
|
<PrecompiledHeader>Use</PrecompiledHeader> |
||||
|
<Optimization>Disabled</Optimization> |
||||
|
<PreprocessorDefinitions>WIN32;_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions> |
||||
|
<RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary> |
||||
|
<IntrinsicFunctions>true</IntrinsicFunctions> |
||||
|
<AdditionalIncludeDirectories>$(IntDir);..;$(QT_PATH)/$(Platform)/include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> |
||||
|
<ForcedIncludeFiles>stdafx.h</ForcedIncludeFiles> |
||||
|
</ClCompile> |
||||
|
<Link> |
||||
|
<SubSystem>Windows</SubSystem> |
||||
|
<GenerateDebugInformation>true</GenerateDebugInformation> |
||||
|
<LargeAddressAware>true</LargeAddressAware> |
||||
|
<AdditionalLibraryDirectories>$(QT_PATH)/$(Platform)/lib;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories> |
||||
|
<AdditionalDependencies>Qt5Cored.lib;Qt5GUId.lib;Qt5Widgetsd.lib;Qt5Networkd.lib;%(AdditionalDependencies)</AdditionalDependencies> |
||||
|
</Link> |
||||
|
</ItemDefinitionGroup> |
||||
|
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'"> |
||||
|
<ClCompile> |
||||
|
<PrecompiledHeader>Use</PrecompiledHeader> |
||||
|
<Optimization>Disabled</Optimization> |
||||
|
<PreprocessorDefinitions>WIN32;_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions> |
||||
|
<RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary> |
||||
|
<IntrinsicFunctions>true</IntrinsicFunctions> |
||||
|
<AdditionalIncludeDirectories>$(IntDir);..;$(QT_PATH)/$(Platform)/include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> |
||||
|
<ForcedIncludeFiles>stdafx.h</ForcedIncludeFiles> |
||||
|
</ClCompile> |
||||
|
<Link> |
||||
|
<SubSystem>Windows</SubSystem> |
||||
|
<GenerateDebugInformation>true</GenerateDebugInformation> |
||||
|
<AdditionalLibraryDirectories>$(QT_PATH)/$(Platform)/lib;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories> |
||||
|
<AdditionalDependencies>Qt5Cored.lib;Qt5GUId.lib;Qt5Widgetsd.lib;Qt5Networkd.lib;%(AdditionalDependencies)</AdditionalDependencies> |
||||
|
</Link> |
||||
|
</ItemDefinitionGroup> |
||||
|
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'"> |
||||
|
<ClCompile> |
||||
|
<PrecompiledHeader>Use</PrecompiledHeader> |
||||
|
<Optimization>MaxSpeed</Optimization> |
||||
|
<FunctionLevelLinking>true</FunctionLevelLinking> |
||||
|
<IntrinsicFunctions>true</IntrinsicFunctions> |
||||
|
<PreprocessorDefinitions>WIN32;NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions> |
||||
|
<RuntimeLibrary>MultiThreaded</RuntimeLibrary> |
||||
|
<StringPooling>true</StringPooling> |
||||
|
<InlineFunctionExpansion>AnySuitable</InlineFunctionExpansion> |
||||
|
<AdditionalIncludeDirectories>$(IntDir);..;$(QT_PATH)/$(Platform)/include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> |
||||
|
<ForcedIncludeFiles>stdafx.h</ForcedIncludeFiles> |
||||
|
</ClCompile> |
||||
|
<Link> |
||||
|
<SubSystem>Windows</SubSystem> |
||||
|
<GenerateDebugInformation>true</GenerateDebugInformation> |
||||
|
<EnableCOMDATFolding>true</EnableCOMDATFolding> |
||||
|
<OptimizeReferences>true</OptimizeReferences> |
||||
|
<LargeAddressAware>true</LargeAddressAware> |
||||
|
<AdditionalLibraryDirectories>$(QT_PATH)/$(Platform)/lib;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories> |
||||
|
<AdditionalDependencies>Qt5Core.lib;Qt5GUI.lib;Qt5Widgets.lib;Qt5Network.lib;%(AdditionalDependencies)</AdditionalDependencies> |
||||
|
</Link> |
||||
|
</ItemDefinitionGroup> |
||||
|
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'"> |
||||
|
<ClCompile> |
||||
|
<PrecompiledHeader>Use</PrecompiledHeader> |
||||
|
<Optimization>MaxSpeed</Optimization> |
||||
|
<FunctionLevelLinking>true</FunctionLevelLinking> |
||||
|
<IntrinsicFunctions>true</IntrinsicFunctions> |
||||
|
<PreprocessorDefinitions>WIN32;NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions> |
||||
|
<RuntimeLibrary>MultiThreaded</RuntimeLibrary> |
||||
|
<StringPooling>true</StringPooling> |
||||
|
<InlineFunctionExpansion>AnySuitable</InlineFunctionExpansion> |
||||
|
<AdditionalIncludeDirectories>$(IntDir);..;$(QT_PATH)/$(Platform)/include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> |
||||
|
<ForcedIncludeFiles>stdafx.h</ForcedIncludeFiles> |
||||
|
</ClCompile> |
||||
|
<Link> |
||||
|
<SubSystem>Windows</SubSystem> |
||||
|
<GenerateDebugInformation>true</GenerateDebugInformation> |
||||
|
<EnableCOMDATFolding>true</EnableCOMDATFolding> |
||||
|
<OptimizeReferences>true</OptimizeReferences> |
||||
|
<AdditionalLibraryDirectories>$(QT_PATH)/$(Platform)/lib;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories> |
||||
|
<AdditionalDependencies>Qt5Core.lib;Qt5GUI.lib;Qt5Widgets.lib;Qt5Network.lib;%(AdditionalDependencies)</AdditionalDependencies> |
||||
|
</Link> |
||||
|
</ItemDefinitionGroup> |
||||
|
<ItemGroup> |
||||
|
<ProjectReference Include="..\windows\LibEthereum.vcxproj"> |
||||
|
<Project>{826e68cb-d3ee-4a8a-b540-59a8c3f38d4f}</Project> |
||||
|
</ProjectReference> |
||||
|
</ItemGroup> |
||||
|
<ItemGroup> |
||||
|
<ClCompile Include="..\alethzero\main.cpp" /> |
||||
|
<ClCompile Include="..\alethzero\MainWin.cpp" /> |
||||
|
<ClCompile Include="..\alethzero\WinMain.cpp" /> |
||||
|
<ClCompile Include="stdafx.cpp"> |
||||
|
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Create</PrecompiledHeader> |
||||
|
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">Create</PrecompiledHeader> |
||||
|
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">Create</PrecompiledHeader> |
||||
|
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Release|x64'">Create</PrecompiledHeader> |
||||
|
</ClCompile> |
||||
|
</ItemGroup> |
||||
|
<ItemGroup> |
||||
|
<CustomBuild Include="..\alethzero\MainWin.h"> |
||||
|
<Command Condition="'$(Configuration)|$(Platform)'=='Release|x64'">..\..\bin\lua52 moc.lua "$(QT_PATH)/$(Platform)/bin/moc" "$(IntDir)moc_%(FileName).cpp" "@(ClCompile->'%(AdditionalIncludeDirectories)');$(IncludePath)" "@(ClCompile->'%(PreprocessorDefinitions)');_MSC_VER=1800" "%(FullPath)"</Command> |
||||
|
<Outputs Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(IntDir)moc_%(FileName).cpp</Outputs> |
||||
|
<Message Condition="'$(Configuration)|$(Platform)'=='Release|x64'"> |
||||
|
</Message> |
||||
|
<Command Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">..\..\bin\lua52 moc.lua "$(QT_PATH)/$(Platform)/bin/moc" "$(IntDir)moc_%(FileName).cpp" "@(ClCompile->'%(AdditionalIncludeDirectories)');$(IncludePath)" "@(ClCompile->'%(PreprocessorDefinitions)');_MSC_VER=1800" "%(FullPath)"</Command> |
||||
|
<Message Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'"> |
||||
|
</Message> |
||||
|
<Command Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">..\..\bin\lua52 moc.lua "$(QT_PATH)/$(Platform)/bin/moc" "$(IntDir)moc_%(FileName).cpp" "@(ClCompile->'%(AdditionalIncludeDirectories)');$(IncludePath)" "@(ClCompile->'%(PreprocessorDefinitions)');_MSC_VER=1800" "%(FullPath)"</Command> |
||||
|
<Message Condition="'$(Configuration)|$(Platform)'=='Release|Win32'"> |
||||
|
</Message> |
||||
|
<Command Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">..\..\bin\lua52 moc.lua "$(QT_PATH)/$(Platform)/bin/moc" "$(IntDir)moc_%(FileName).cpp" "@(ClCompile->'%(AdditionalIncludeDirectories)');$(IncludePath)" "@(ClCompile->'%(PreprocessorDefinitions)');_MSC_VER=1800" "%(FullPath)"</Command> |
||||
|
<Message Condition="'$(Configuration)|$(Platform)'=='Debug|x64'"> |
||||
|
</Message> |
||||
|
<Outputs Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(IntDir)moc_%(FileName).cpp</Outputs> |
||||
|
<Outputs Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(IntDir)moc_%(FileName).cpp</Outputs> |
||||
|
<Outputs Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(IntDir)moc_%(FileName).cpp</Outputs> |
||||
|
</CustomBuild> |
||||
|
<ClInclude Include="stdafx.h" /> |
||||
|
</ItemGroup> |
||||
|
<ItemGroup> |
||||
|
<CustomBuild Include="..\alethzero\Main.ui"> |
||||
|
<FileType>Document</FileType> |
||||
|
<Command Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">"$(QT_PATH)/$(Platform)/bin/uic" -o "$(IntDir)ui_%(FileName).h" "%(FullPath)"</Command> |
||||
|
<Message Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">"$(QT_PATH)/$(Platform)/bin/uic" -o "$(IntDir)ui_%(FileName).h" "%(FullPath)"</Message> |
||||
|
<Outputs Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(IntDir)ui_%(FileName).h</Outputs> |
||||
|
<Command Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">"$(QT_PATH)/$(Platform)/bin/uic" -o "$(IntDir)ui_%(FileName).h" "%(FullPath)"</Command> |
||||
|
<Message Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">"$(QT_PATH)/$(Platform)/bin/uic" -o "$(IntDir)ui_%(FileName).h" "%(FullPath)"</Message> |
||||
|
<Outputs Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(IntDir)ui_%(FileName).h</Outputs> |
||||
|
<Command Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">"$(QT_PATH)/$(Platform)/bin/uic" -o "$(IntDir)ui_%(FileName).h" "%(FullPath)"</Command> |
||||
|
<Message Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">"$(QT_PATH)/$(Platform)/bin/uic" -o "$(IntDir)ui_%(FileName).h" "%(FullPath)"</Message> |
||||
|
<Outputs Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(IntDir)ui_%(FileName).h</Outputs> |
||||
|
<Command Condition="'$(Configuration)|$(Platform)'=='Release|x64'">"$(QT_PATH)/$(Platform)/bin/uic" -o "$(IntDir)ui_%(FileName).h" "%(FullPath)"</Command> |
||||
|
<Message Condition="'$(Configuration)|$(Platform)'=='Release|x64'">"$(QT_PATH)/$(Platform)/bin/uic" -o "$(IntDir)ui_%(FileName).h" "%(FullPath)"</Message> |
||||
|
<Outputs Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(IntDir)ui_%(FileName).h</Outputs> |
||||
|
</CustomBuild> |
||||
|
</ItemGroup> |
||||
|
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" /> |
||||
|
<ImportGroup Label="ExtensionTargets"> |
||||
|
</ImportGroup> |
||||
|
</Project> |
@ -0,0 +1,27 @@ |
|||||
|
<?xml version="1.0" encoding="utf-8"?> |
||||
|
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> |
||||
|
<ItemGroup> |
||||
|
<ClCompile Include="..\alethzero\main.cpp" /> |
||||
|
<ClCompile Include="..\alethzero\MainWin.cpp" /> |
||||
|
<ClCompile Include="stdafx.cpp"> |
||||
|
<Filter>Windows</Filter> |
||||
|
</ClCompile> |
||||
|
<ClCompile Include="..\alethzero\WinMain.cpp"> |
||||
|
<Filter>Windows</Filter> |
||||
|
</ClCompile> |
||||
|
</ItemGroup> |
||||
|
<ItemGroup> |
||||
|
<ClInclude Include="stdafx.h"> |
||||
|
<Filter>Windows</Filter> |
||||
|
</ClInclude> |
||||
|
</ItemGroup> |
||||
|
<ItemGroup> |
||||
|
<Filter Include="Windows"> |
||||
|
<UniqueIdentifier>{049fb46c-1677-45cb-95ae-3a2d9e3090be}</UniqueIdentifier> |
||||
|
</Filter> |
||||
|
</ItemGroup> |
||||
|
<ItemGroup> |
||||
|
<CustomBuild Include="..\alethzero\MainWin.h" /> |
||||
|
<CustomBuild Include="..\alethzero\Main.ui" /> |
||||
|
</ItemGroup> |
||||
|
</Project> |
@ -0,0 +1,72 @@ |
|||||
|
// http://www.flipcode.com/archives/WinMain_Command_Line_Parser.shtml
|
||||
|
// COTD Entry submitted by Max McGuire [amcguire@andrew.cmu.edu]
|
||||
|
|
||||
|
#include <windows.h> |
||||
|
|
||||
|
extern int main(int argc, char* argv[]); |
||||
|
|
||||
|
int WINAPI WinMain(HINSTANCE instance, HINSTANCE prev_instance, char* command_line, int show_command) |
||||
|
{ |
||||
|
int argc; |
||||
|
char** argv; |
||||
|
char* arg; |
||||
|
int index; |
||||
|
int result; |
||||
|
|
||||
|
// count the arguments
|
||||
|
argc = 1; |
||||
|
arg = command_line; |
||||
|
|
||||
|
while (arg[0] != 0) |
||||
|
{ |
||||
|
while (arg[0] != 0 && arg[0] == ' ') |
||||
|
{ |
||||
|
arg++; |
||||
|
} |
||||
|
if (arg[0] != 0) |
||||
|
{ |
||||
|
argc++; |
||||
|
while (arg[0] != 0 && arg[0] != ' ') |
||||
|
{ |
||||
|
arg++; |
||||
|
} |
||||
|
} |
||||
|
} |
||||
|
|
||||
|
// tokenize the arguments
|
||||
|
argv = (char**)malloc(argc * sizeof(char*)); |
||||
|
arg = command_line; |
||||
|
index = 1; |
||||
|
|
||||
|
while (arg[0] != 0) |
||||
|
{ |
||||
|
while (arg[0] != 0 && arg[0] == ' ') |
||||
|
{ |
||||
|
arg++; |
||||
|
} |
||||
|
if (arg[0] != 0) |
||||
|
{ |
||||
|
argv[index] = arg; |
||||
|
index++; |
||||
|
while (arg[0] != 0 && arg[0] != ' ') |
||||
|
{ |
||||
|
arg++; |
||||
|
} |
||||
|
if (arg[0] != 0) |
||||
|
{ |
||||
|
arg[0] = 0; |
||||
|
arg++; |
||||
|
} |
||||
|
} |
||||
|
} |
||||
|
|
||||
|
// put the program name into argv[0]
|
||||
|
char filename[_MAX_PATH]; |
||||
|
GetModuleFileName(NULL, filename, _MAX_PATH); |
||||
|
argv[0] = filename; |
||||
|
|
||||
|
// call the user specified main function
|
||||
|
result = main(argc, argv); |
||||
|
free(argv); |
||||
|
return result; |
||||
|
} |
@ -0,0 +1,38 @@ |
|||||
|
|
||||
|
local function quote(x) |
||||
|
return '"' .. x .. '"' |
||||
|
end |
||||
|
|
||||
|
local function toForward(x) |
||||
|
return x:gsub('\\', '/') |
||||
|
end |
||||
|
|
||||
|
-- arguments are in this order |
||||
|
local cmd = arg[1] |
||||
|
local outFile = arg[2] |
||||
|
local includes = toForward(arg[3]) |
||||
|
local defines = arg[4] |
||||
|
local inFile = arg[5] |
||||
|
|
||||
|
-- build list of includes |
||||
|
local includes2 = "" |
||||
|
for i in string.gmatch(includes, "[^;]+") do |
||||
|
includes2 = includes2.." -I "..quote(i) |
||||
|
end |
||||
|
includes = includes2; |
||||
|
|
||||
|
-- build list of defines |
||||
|
local defines2 = "" |
||||
|
for i in string.gmatch(defines, "[^;]+") do |
||||
|
defines2 = defines2.." -D"..i |
||||
|
end |
||||
|
defines = defines2 |
||||
|
|
||||
|
-- moc doesn't compile boost correctly, so skip those headers |
||||
|
workarounds=' -DBOOST_MP_CPP_INT_HPP -DBOOST_THREAD_WEK01082003_HPP' |
||||
|
|
||||
|
-- build command |
||||
|
cmd = quote(cmd).." -o "..quote(outFile)..includes..defines..workarounds..' '..quote(inFile) |
||||
|
print(cmd) |
||||
|
os.execute(quote(cmd)) |
||||
|
|
Loading…
Reference in new issue