initial commit
This commit is contained in:
229
samples/asbuild/bin/config.txt
Normal file
229
samples/asbuild/bin/config.txt
Normal file
@@ -0,0 +1,229 @@
|
||||
// Configuration for AngelScript asrun sample
|
||||
// Generated with WriteConfigToFile after configuring the engine in asrun
|
||||
|
||||
// Engine properties
|
||||
ep 0 0
|
||||
ep 1 0
|
||||
ep 2 1
|
||||
ep 3 1
|
||||
ep 4 0
|
||||
ep 5 0
|
||||
ep 6 0
|
||||
ep 7 0
|
||||
ep 8 0
|
||||
ep 9 1
|
||||
ep 10 0
|
||||
ep 11 1
|
||||
ep 12 0
|
||||
ep 13 0
|
||||
ep 14 2
|
||||
ep 15 0
|
||||
ep 16 1
|
||||
ep 17 0
|
||||
ep 18 0
|
||||
ep 19 1
|
||||
ep 20 0
|
||||
ep 21 0
|
||||
ep 22 0
|
||||
ep 23 0
|
||||
ep 24 0
|
||||
ep 25 0
|
||||
ep 26 1
|
||||
ep 27 100
|
||||
|
||||
// Enums
|
||||
|
||||
// Types
|
||||
access ffffffff
|
||||
objtype "string" 7938
|
||||
objtype "array<T>" 69
|
||||
objtype "dictionaryValue" 1922
|
||||
objtype "dictionary" 5
|
||||
objtype "file" 1
|
||||
objtype "filesystem" 1
|
||||
objtype "datetime" 6922
|
||||
funcdef "bool array::less(const T&in, const T&in)"
|
||||
funcdef "void coroutine(dictionary@)"
|
||||
|
||||
// Template type members
|
||||
objbeh "array<T>" 3 "array<T>@ array(int&in)"
|
||||
objbeh "array<T>" 3 "array<T>@ array(int&in, uint)"
|
||||
objbeh "array<T>" 3 "array<T>@ array(int&in, uint, const T&in)"
|
||||
objbeh "array<T>" 5 "void $beh5()"
|
||||
objbeh "array<T>" 6 "void $beh6()"
|
||||
objbeh "array<T>" 9 "int $beh9()"
|
||||
objbeh "array<T>" 10 "void $beh10()"
|
||||
objbeh "array<T>" 11 "bool $beh11()"
|
||||
objbeh "array<T>" 12 "void $beh12(int&in)"
|
||||
objbeh "array<T>" 13 "void $beh13(int&in)"
|
||||
//objbeh "array<T>" 8 "bool $beh8(int&in, bool&out)"
|
||||
objbeh "array<T>" 4 "array<T>@ $beh4(int&in, int&in) { repeat T }"
|
||||
objmthd "array<T>" "T& opIndex(uint)"
|
||||
objmthd "array<T>" "const T& opIndex(uint) const"
|
||||
objmthd "array<T>" "array<T>& opAssign(const array<T>&in)"
|
||||
objmthd "array<T>" "void insertAt(uint, const T&in)"
|
||||
objmthd "array<T>" "void insertAt(uint, const array<T>&inout)"
|
||||
objmthd "array<T>" "void insertLast(const T&in)"
|
||||
objmthd "array<T>" "void removeAt(uint)"
|
||||
objmthd "array<T>" "void removeLast()"
|
||||
objmthd "array<T>" "void removeRange(uint, uint)"
|
||||
objmthd "array<T>" "uint length() const"
|
||||
objmthd "array<T>" "void reserve(uint)"
|
||||
objmthd "array<T>" "void resize(uint)"
|
||||
objmthd "array<T>" "void sortAsc()"
|
||||
objmthd "array<T>" "void sortAsc(uint, uint)"
|
||||
objmthd "array<T>" "void sortDesc()"
|
||||
objmthd "array<T>" "void sortDesc(uint, uint)"
|
||||
objmthd "array<T>" "void reverse()"
|
||||
objmthd "array<T>" "int find(const T&in) const"
|
||||
objmthd "array<T>" "int find(uint, const T&in) const"
|
||||
objmthd "array<T>" "int findByRef(const T&in) const"
|
||||
objmthd "array<T>" "int findByRef(uint, const T&in) const"
|
||||
objmthd "array<T>" "bool opEquals(const array<T>&in) const"
|
||||
objmthd "array<T>" "bool isEmpty() const"
|
||||
objmthd "array<T>" "void sort(array::less&in, uint = 0, uint = uint ( - 1 ))"
|
||||
objmthd "array<T>" "uint get_length() const"
|
||||
objmthd "array<T>" "void set_length(uint)"
|
||||
|
||||
// Type members
|
||||
objbeh "string" 2 "void string()"
|
||||
objbeh "string" 0 "void string()"
|
||||
objbeh "string" 0 "void string(const string&in)"
|
||||
objmthd "string" "string& opAssign(const string&in)"
|
||||
objmthd "string" "string& opAddAssign(const string&in)"
|
||||
objmthd "string" "bool opEquals(const string&in) const"
|
||||
objmthd "string" "int opCmp(const string&in) const"
|
||||
objmthd "string" "string opAdd(const string&in) const"
|
||||
objmthd "string" "uint length() const"
|
||||
objmthd "string" "void resize(uint)"
|
||||
objmthd "string" "uint get_length() const"
|
||||
objmthd "string" "void set_length(uint)"
|
||||
objmthd "string" "bool isEmpty() const"
|
||||
objmthd "string" "uint8& opIndex(uint)"
|
||||
objmthd "string" "const uint8& opIndex(uint) const"
|
||||
objmthd "string" "string& opAssign(double)"
|
||||
objmthd "string" "string& opAddAssign(double)"
|
||||
objmthd "string" "string opAdd(double) const"
|
||||
objmthd "string" "string opAdd_r(double) const"
|
||||
objmthd "string" "string& opAssign(float)"
|
||||
objmthd "string" "string& opAddAssign(float)"
|
||||
objmthd "string" "string opAdd(float) const"
|
||||
objmthd "string" "string opAdd_r(float) const"
|
||||
objmthd "string" "string& opAssign(int64)"
|
||||
objmthd "string" "string& opAddAssign(int64)"
|
||||
objmthd "string" "string opAdd(int64) const"
|
||||
objmthd "string" "string opAdd_r(int64) const"
|
||||
objmthd "string" "string& opAssign(uint64)"
|
||||
objmthd "string" "string& opAddAssign(uint64)"
|
||||
objmthd "string" "string opAdd(uint64) const"
|
||||
objmthd "string" "string opAdd_r(uint64) const"
|
||||
objmthd "string" "string& opAssign(bool)"
|
||||
objmthd "string" "string& opAddAssign(bool)"
|
||||
objmthd "string" "string opAdd(bool) const"
|
||||
objmthd "string" "string opAdd_r(bool) const"
|
||||
objmthd "string" "string substr(uint = 0, int = - 1) const"
|
||||
objmthd "string" "int findFirst(const string&in, uint = 0) const"
|
||||
objmthd "string" "int findFirstOf(const string&in, uint = 0) const"
|
||||
objmthd "string" "int findFirstNotOf(const string&in, uint = 0) const"
|
||||
objmthd "string" "int findLast(const string&in, int = - 1) const"
|
||||
objmthd "string" "int findLastOf(const string&in, int = - 1) const"
|
||||
objmthd "string" "int findLastNotOf(const string&in, int = - 1) const"
|
||||
objmthd "string" "void insert(uint, const string&in)"
|
||||
objmthd "string" "void erase(uint, int = - 1)"
|
||||
objmthd "string" "array<string>@ split(const string&in) const"
|
||||
objbeh "dictionaryValue" 2 "void dictionaryValue()"
|
||||
objbeh "dictionaryValue" 0 "void dictionaryValue()"
|
||||
objmthd "dictionaryValue" "dictionaryValue& opAssign(const dictionaryValue&in)"
|
||||
objmthd "dictionaryValue" "dictionaryValue& opHndlAssign(const ?&in)"
|
||||
objmthd "dictionaryValue" "dictionaryValue& opAssign(const ?&in)"
|
||||
objmthd "dictionaryValue" "dictionaryValue& opAssign(double)"
|
||||
objmthd "dictionaryValue" "dictionaryValue& opAssign(int64)"
|
||||
objmthd "dictionaryValue" "void opCast(?&out)"
|
||||
objmthd "dictionaryValue" "void opConv(?&out)"
|
||||
objmthd "dictionaryValue" "int64 opConv()"
|
||||
objmthd "dictionaryValue" "double opConv()"
|
||||
objbeh "dictionary" 3 "dictionary@ dictionary()"
|
||||
objbeh "dictionary" 5 "void $beh5()"
|
||||
objbeh "dictionary" 6 "void $beh6()"
|
||||
objbeh "dictionary" 9 "int $beh9()"
|
||||
objbeh "dictionary" 10 "void $beh10()"
|
||||
objbeh "dictionary" 11 "bool $beh11()"
|
||||
objbeh "dictionary" 12 "void $beh12(int&in)"
|
||||
objbeh "dictionary" 13 "void $beh13(int&in)"
|
||||
objbeh "dictionary" 4 "dictionary@ $beh4(int&in) { repeat { string, ? } }"
|
||||
objmthd "dictionary" "dictionary& opAssign(const dictionary&in)"
|
||||
objmthd "dictionary" "void set(const string&in, const ?&in)"
|
||||
objmthd "dictionary" "bool get(const string&in, ?&out) const"
|
||||
objmthd "dictionary" "void set(const string&in, const int64&in)"
|
||||
objmthd "dictionary" "bool get(const string&in, int64&out) const"
|
||||
objmthd "dictionary" "void set(const string&in, const double&in)"
|
||||
objmthd "dictionary" "bool get(const string&in, double&out) const"
|
||||
objmthd "dictionary" "bool exists(const string&in) const"
|
||||
objmthd "dictionary" "bool isEmpty() const"
|
||||
objmthd "dictionary" "uint getSize() const"
|
||||
objmthd "dictionary" "bool delete(const string&in)"
|
||||
objmthd "dictionary" "void deleteAll()"
|
||||
objmthd "dictionary" "array<string>@ getKeys() const"
|
||||
objmthd "dictionary" "dictionaryValue& opIndex(const string&in)"
|
||||
objmthd "dictionary" "const dictionaryValue& opIndex(const string&in) const"
|
||||
objbeh "file" 3 "file@ file()"
|
||||
objbeh "file" 5 "void $beh5()"
|
||||
objbeh "file" 6 "void $beh6()"
|
||||
objmthd "file" "int open(const string&in, const string&in)"
|
||||
objmthd "file" "int close()"
|
||||
objmthd "file" "int getSize() const"
|
||||
objmthd "file" "bool isEndOfFile() const"
|
||||
objmthd "file" "string readString(uint)"
|
||||
objmthd "file" "string readLine()"
|
||||
objmthd "file" "int64 readInt(uint)"
|
||||
objmthd "file" "uint64 readUInt(uint)"
|
||||
objmthd "file" "float readFloat()"
|
||||
objmthd "file" "double readDouble()"
|
||||
objmthd "file" "int writeString(const string&in)"
|
||||
objmthd "file" "int writeInt(int64, uint)"
|
||||
objmthd "file" "int writeUInt(uint64, uint)"
|
||||
objmthd "file" "int writeFloat(float)"
|
||||
objmthd "file" "int writeDouble(double)"
|
||||
objmthd "file" "int getPos() const"
|
||||
objmthd "file" "int setPos(int)"
|
||||
objmthd "file" "int movePos(int)"
|
||||
objprop "file" "bool mostSignificantByteFirst"
|
||||
objbeh "filesystem" 3 "filesystem@ filesystem()"
|
||||
objbeh "filesystem" 5 "void $beh5()"
|
||||
objbeh "filesystem" 6 "void $beh6()"
|
||||
objmthd "filesystem" "bool changeCurrentPath(const string&in)"
|
||||
objmthd "filesystem" "string getCurrentPath() const"
|
||||
objmthd "filesystem" "array<string>@ getDirs()"
|
||||
objmthd "filesystem" "array<string>@ getFiles()"
|
||||
objmthd "filesystem" "bool isDir(const string&in)"
|
||||
objbeh "datetime" 0 "void datetime()"
|
||||
objbeh "datetime" 0 "void datetime(const datetime&in)"
|
||||
objmthd "datetime" "datetime& opAssign(const datetime&in)"
|
||||
objmthd "datetime" "uint get_year() const"
|
||||
objmthd "datetime" "uint get_month() const"
|
||||
objmthd "datetime" "uint get_day() const"
|
||||
objmthd "datetime" "uint get_hour() const"
|
||||
objmthd "datetime" "uint get_minute() const"
|
||||
objmthd "datetime" "uint get_second() const"
|
||||
|
||||
// Functions
|
||||
func "string formatInt(int64, const string&in = \"\", uint = 0)"
|
||||
func "string formatUInt(uint64, const string&in = \"\", uint = 0)"
|
||||
func "string formatFloat(double, const string&in = \"\", uint = 0, uint = 0)"
|
||||
func "int64 parseInt(const string&in, uint = 10, uint&out = 0)"
|
||||
func "uint64 parseUInt(const string&in, uint = 10, uint&out = 0)"
|
||||
func "double parseFloat(const string&in, uint&out = 0)"
|
||||
func "string join(const array<string>&in, const string&in)"
|
||||
func "void print(const string&in)"
|
||||
func "string getInput()"
|
||||
func "array<string>@ getCommandLineArgs()"
|
||||
func "int exec(const string&in)"
|
||||
func "void yield()"
|
||||
func "void createCoRoutine(coroutine@, dictionary@)"
|
||||
|
||||
// Properties
|
||||
|
||||
// String factory
|
||||
strfactory "string"
|
||||
|
||||
// Default array type
|
||||
5
samples/asbuild/bin/script.as
Normal file
5
samples/asbuild/bin/script.as
Normal file
@@ -0,0 +1,5 @@
|
||||
void main()
|
||||
{
|
||||
string str = "hello world";
|
||||
print(str);
|
||||
}
|
||||
30
samples/asbuild/projects/gnuc/makefile
Normal file
30
samples/asbuild/projects/gnuc/makefile
Normal file
@@ -0,0 +1,30 @@
|
||||
# GCC Makefile
|
||||
CXX = g++
|
||||
CXXFLAGS = -g -I../../../../angelscript/include -D_LINUX_
|
||||
SRCDIR = ../../source
|
||||
OBJDIR = obj
|
||||
|
||||
SRCNAMES = \
|
||||
main.cpp
|
||||
|
||||
OBJ = $(addprefix $(OBJDIR)/, $(notdir $(SRCNAMES:.cpp=.o))) obj/asbuild.o
|
||||
BIN = ../../bin/asbuild
|
||||
DELETER = rm -f
|
||||
|
||||
all: $(BIN)
|
||||
|
||||
$(BIN): $(OBJ)
|
||||
$(CXX) -o $(BIN) $(OBJ) -langelscript -lpthread -L ../../../../angelscript/lib
|
||||
@echo -------------------------------------------------------------------
|
||||
@echo Done.
|
||||
|
||||
$(OBJDIR)/%.o: $(SRCDIR)/%.cpp
|
||||
$(CXX) $(CXXFLAGS) -o $@ -c $<
|
||||
|
||||
obj/asbuild.o: ../../../../add_on/scriptbuilder/scriptbuilder.cpp
|
||||
$(CXX) $(CXXFLAGS) -o $@ -c $<
|
||||
|
||||
clean:
|
||||
$(DELETER) $(OBJ) $(BIN)
|
||||
|
||||
.PHONY: all clean
|
||||
1
samples/asbuild/projects/gnuc/obj/delete.me
Normal file
1
samples/asbuild/projects/gnuc/obj/delete.me
Normal file
@@ -0,0 +1 @@
|
||||
.
|
||||
20
samples/asbuild/projects/msvc2012/asbuild.sln
Normal file
20
samples/asbuild/projects/msvc2012/asbuild.sln
Normal file
@@ -0,0 +1,20 @@
|
||||
|
||||
Microsoft Visual Studio Solution File, Format Version 12.00
|
||||
# Visual Studio Express 2012 for Windows Desktop
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "asbuild", "asbuild.vcxproj", "{1454C75F-8CE0-450D-A520-D9D487A37ACD}"
|
||||
EndProject
|
||||
Global
|
||||
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||
Debug|Win32 = Debug|Win32
|
||||
Release|Win32 = Release|Win32
|
||||
EndGlobalSection
|
||||
GlobalSection(ProjectConfigurationPlatforms) = postSolution
|
||||
{1454C75F-8CE0-450D-A520-D9D487A37ACD}.Debug|Win32.ActiveCfg = Debug|Win32
|
||||
{1454C75F-8CE0-450D-A520-D9D487A37ACD}.Debug|Win32.Build.0 = Debug|Win32
|
||||
{1454C75F-8CE0-450D-A520-D9D487A37ACD}.Release|Win32.ActiveCfg = Release|Win32
|
||||
{1454C75F-8CE0-450D-A520-D9D487A37ACD}.Release|Win32.Build.0 = Release|Win32
|
||||
EndGlobalSection
|
||||
GlobalSection(SolutionProperties) = preSolution
|
||||
HideSolutionNode = FALSE
|
||||
EndGlobalSection
|
||||
EndGlobal
|
||||
182
samples/asbuild/projects/msvc2012/asbuild.vcxproj
Normal file
182
samples/asbuild/projects/msvc2012/asbuild.vcxproj
Normal file
@@ -0,0 +1,182 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project DefaultTargets="Build" ToolsVersion="4.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">
|
||||
<ProjectGuid>{1454C75F-8CE0-450D-A520-D9D487A37ACD}</ProjectGuid>
|
||||
<RootNamespace>asbuild</RootNamespace>
|
||||
<Keyword>Win32Proj</Keyword>
|
||||
</PropertyGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
|
||||
<ConfigurationType>Application</ConfigurationType>
|
||||
<PlatformToolset>v110</PlatformToolset>
|
||||
<CharacterSet>Unicode</CharacterSet>
|
||||
<WholeProgramOptimization>true</WholeProgramOptimization>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
|
||||
<ConfigurationType>Application</ConfigurationType>
|
||||
<PlatformToolset>v110</PlatformToolset>
|
||||
<CharacterSet>Unicode</CharacterSet>
|
||||
<WholeProgramOptimization>true</WholeProgramOptimization>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
|
||||
<ConfigurationType>Application</ConfigurationType>
|
||||
<PlatformToolset>v110</PlatformToolset>
|
||||
<CharacterSet>Unicode</CharacterSet>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
|
||||
<ConfigurationType>Application</ConfigurationType>
|
||||
<PlatformToolset>v110</PlatformToolset>
|
||||
<CharacterSet>Unicode</CharacterSet>
|
||||
</PropertyGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
|
||||
<ImportGroup Label="ExtensionSettings">
|
||||
</ImportGroup>
|
||||
<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|x64'" 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>
|
||||
<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" />
|
||||
</ImportGroup>
|
||||
<PropertyGroup Label="UserMacros" />
|
||||
<PropertyGroup>
|
||||
<_ProjectFileVersion>11.0.60315.1</_ProjectFileVersion>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
|
||||
<OutDir>..\..\bin\</OutDir>
|
||||
<IntDir>$(Platform)\$(Configuration)\</IntDir>
|
||||
<LinkIncremental>true</LinkIncremental>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
|
||||
<LinkIncremental>true</LinkIncremental>
|
||||
<OutDir>$(Platform)\$(Configuration)\</OutDir>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
|
||||
<OutDir>..\..\bin\</OutDir>
|
||||
<IntDir>$(Platform)\$(Configuration)\</IntDir>
|
||||
<LinkIncremental>false</LinkIncremental>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
|
||||
<LinkIncremental>false</LinkIncremental>
|
||||
<OutDir>$(Platform)\$(Configuration)\</OutDir>
|
||||
</PropertyGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
|
||||
<ClCompile>
|
||||
<Optimization>Disabled</Optimization>
|
||||
<AdditionalIncludeDirectories>..\..\..\..\angelscript\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<PreprocessorDefinitions>WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<MinimalRebuild>true</MinimalRebuild>
|
||||
<BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
|
||||
<RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
|
||||
<PrecompiledHeader />
|
||||
<WarningLevel>Level3</WarningLevel>
|
||||
<DebugInformationFormat>EditAndContinue</DebugInformationFormat>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<AdditionalDependencies>../../../../angelscript/lib/angelscriptd.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||
<OutputFile>$(OutDir)$(ProjectName).exe</OutputFile>
|
||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||
<SubSystem>Console</SubSystem>
|
||||
<TargetMachine>MachineX86</TargetMachine>
|
||||
</Link>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
|
||||
<ClCompile>
|
||||
<Optimization>Disabled</Optimization>
|
||||
<AdditionalIncludeDirectories>..\..\..\..\angelscript\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<PreprocessorDefinitions>WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
|
||||
<RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
|
||||
<PrecompiledHeader>
|
||||
</PrecompiledHeader>
|
||||
<WarningLevel>Level3</WarningLevel>
|
||||
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<AdditionalDependencies>../../../../angelscript/lib/angelscript64d.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||
<OutputFile>$(OutDir)$(ProjectName).exe</OutputFile>
|
||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||
<SubSystem>Console</SubSystem>
|
||||
</Link>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
|
||||
<ClCompile>
|
||||
<Optimization>MaxSpeed</Optimization>
|
||||
<IntrinsicFunctions>true</IntrinsicFunctions>
|
||||
<AdditionalIncludeDirectories>..\..\..\..\angelscript\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<PreprocessorDefinitions>WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<RuntimeLibrary>MultiThreaded</RuntimeLibrary>
|
||||
<FunctionLevelLinking>true</FunctionLevelLinking>
|
||||
<PrecompiledHeader />
|
||||
<WarningLevel>Level3</WarningLevel>
|
||||
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<AdditionalDependencies>../../../../angelscript/lib/angelscript.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||
<OutputFile>$(OutDir)$(ProjectName).exe</OutputFile>
|
||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||
<SubSystem>Console</SubSystem>
|
||||
<OptimizeReferences>true</OptimizeReferences>
|
||||
<EnableCOMDATFolding>true</EnableCOMDATFolding>
|
||||
<TargetMachine>MachineX86</TargetMachine>
|
||||
</Link>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
|
||||
<ClCompile>
|
||||
<Optimization>MaxSpeed</Optimization>
|
||||
<IntrinsicFunctions>true</IntrinsicFunctions>
|
||||
<AdditionalIncludeDirectories>..\..\..\..\angelscript\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<PreprocessorDefinitions>WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<RuntimeLibrary>MultiThreaded</RuntimeLibrary>
|
||||
<FunctionLevelLinking>true</FunctionLevelLinking>
|
||||
<PrecompiledHeader>
|
||||
</PrecompiledHeader>
|
||||
<WarningLevel>Level3</WarningLevel>
|
||||
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<AdditionalDependencies>../../../../angelscript/lib/angelscript64.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||
<OutputFile>$(OutDir)$(ProjectName).exe</OutputFile>
|
||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||
<SubSystem>Console</SubSystem>
|
||||
<OptimizeReferences>true</OptimizeReferences>
|
||||
<EnableCOMDATFolding>true</EnableCOMDATFolding>
|
||||
</Link>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemGroup>
|
||||
<ClCompile Include="..\..\..\..\add_on\scripthelper\scripthelper.cpp" />
|
||||
<ClCompile Include="..\..\source\main.cpp" />
|
||||
<ClCompile Include="..\..\..\..\add_on\scriptbuilder\scriptbuilder.cpp" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClInclude Include="..\..\..\..\add_on\scripthelper\scripthelper.h" />
|
||||
<ClInclude Include="..\..\..\..\angelscript\include\angelscript.h" />
|
||||
<ClInclude Include="..\..\..\..\add_on\scriptbuilder\scriptbuilder.h" />
|
||||
</ItemGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
|
||||
<ImportGroup Label="ExtensionTargets">
|
||||
</ImportGroup>
|
||||
</Project>
|
||||
20
samples/asbuild/projects/msvc2015/asbuild.sln
Normal file
20
samples/asbuild/projects/msvc2015/asbuild.sln
Normal file
@@ -0,0 +1,20 @@
|
||||
|
||||
Microsoft Visual Studio Solution File, Format Version 12.00
|
||||
# Visual Studio Express 2012 for Windows Desktop
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "asbuild", "asbuild.vcxproj", "{1454C75F-8CE0-450D-A520-D9D487A37ACD}"
|
||||
EndProject
|
||||
Global
|
||||
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||
Debug|Win32 = Debug|Win32
|
||||
Release|Win32 = Release|Win32
|
||||
EndGlobalSection
|
||||
GlobalSection(ProjectConfigurationPlatforms) = postSolution
|
||||
{1454C75F-8CE0-450D-A520-D9D487A37ACD}.Debug|Win32.ActiveCfg = Debug|Win32
|
||||
{1454C75F-8CE0-450D-A520-D9D487A37ACD}.Debug|Win32.Build.0 = Debug|Win32
|
||||
{1454C75F-8CE0-450D-A520-D9D487A37ACD}.Release|Win32.ActiveCfg = Release|Win32
|
||||
{1454C75F-8CE0-450D-A520-D9D487A37ACD}.Release|Win32.Build.0 = Release|Win32
|
||||
EndGlobalSection
|
||||
GlobalSection(SolutionProperties) = preSolution
|
||||
HideSolutionNode = FALSE
|
||||
EndGlobalSection
|
||||
EndGlobal
|
||||
182
samples/asbuild/projects/msvc2015/asbuild.vcxproj
Normal file
182
samples/asbuild/projects/msvc2015/asbuild.vcxproj
Normal file
@@ -0,0 +1,182 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project DefaultTargets="Build" ToolsVersion="14.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">
|
||||
<ProjectGuid>{1454C75F-8CE0-450D-A520-D9D487A37ACD}</ProjectGuid>
|
||||
<RootNamespace>asbuild</RootNamespace>
|
||||
<Keyword>Win32Proj</Keyword>
|
||||
</PropertyGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
|
||||
<ConfigurationType>Application</ConfigurationType>
|
||||
<PlatformToolset>v140</PlatformToolset>
|
||||
<CharacterSet>Unicode</CharacterSet>
|
||||
<WholeProgramOptimization>true</WholeProgramOptimization>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
|
||||
<ConfigurationType>Application</ConfigurationType>
|
||||
<PlatformToolset>v140</PlatformToolset>
|
||||
<CharacterSet>Unicode</CharacterSet>
|
||||
<WholeProgramOptimization>true</WholeProgramOptimization>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
|
||||
<ConfigurationType>Application</ConfigurationType>
|
||||
<PlatformToolset>v140</PlatformToolset>
|
||||
<CharacterSet>Unicode</CharacterSet>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
|
||||
<ConfigurationType>Application</ConfigurationType>
|
||||
<PlatformToolset>v140</PlatformToolset>
|
||||
<CharacterSet>Unicode</CharacterSet>
|
||||
</PropertyGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
|
||||
<ImportGroup Label="ExtensionSettings">
|
||||
</ImportGroup>
|
||||
<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|x64'" 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>
|
||||
<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" />
|
||||
</ImportGroup>
|
||||
<PropertyGroup Label="UserMacros" />
|
||||
<PropertyGroup>
|
||||
<_ProjectFileVersion>11.0.60315.1</_ProjectFileVersion>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
|
||||
<OutDir>..\..\bin\</OutDir>
|
||||
<IntDir>$(Platform)\$(Configuration)\</IntDir>
|
||||
<LinkIncremental>true</LinkIncremental>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
|
||||
<LinkIncremental>true</LinkIncremental>
|
||||
<OutDir>$(Platform)\$(Configuration)\</OutDir>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
|
||||
<OutDir>..\..\bin\</OutDir>
|
||||
<IntDir>$(Platform)\$(Configuration)\</IntDir>
|
||||
<LinkIncremental>false</LinkIncremental>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
|
||||
<LinkIncremental>false</LinkIncremental>
|
||||
<OutDir>$(Platform)\$(Configuration)\</OutDir>
|
||||
</PropertyGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
|
||||
<ClCompile>
|
||||
<Optimization>Disabled</Optimization>
|
||||
<AdditionalIncludeDirectories>..\..\..\..\angelscript\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<PreprocessorDefinitions>WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<MinimalRebuild>true</MinimalRebuild>
|
||||
<BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
|
||||
<RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
|
||||
<PrecompiledHeader />
|
||||
<WarningLevel>Level3</WarningLevel>
|
||||
<DebugInformationFormat>EditAndContinue</DebugInformationFormat>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<AdditionalDependencies>../../../../angelscript/lib/angelscriptd.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||
<OutputFile>$(OutDir)$(ProjectName).exe</OutputFile>
|
||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||
<SubSystem>Console</SubSystem>
|
||||
<TargetMachine>MachineX86</TargetMachine>
|
||||
</Link>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
|
||||
<ClCompile>
|
||||
<Optimization>Disabled</Optimization>
|
||||
<AdditionalIncludeDirectories>..\..\..\..\angelscript\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<PreprocessorDefinitions>WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
|
||||
<RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
|
||||
<PrecompiledHeader>
|
||||
</PrecompiledHeader>
|
||||
<WarningLevel>Level3</WarningLevel>
|
||||
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<AdditionalDependencies>../../../../angelscript/lib/angelscript64d.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||
<OutputFile>$(OutDir)$(ProjectName).exe</OutputFile>
|
||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||
<SubSystem>Console</SubSystem>
|
||||
</Link>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
|
||||
<ClCompile>
|
||||
<Optimization>MaxSpeed</Optimization>
|
||||
<IntrinsicFunctions>true</IntrinsicFunctions>
|
||||
<AdditionalIncludeDirectories>..\..\..\..\angelscript\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<PreprocessorDefinitions>WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<RuntimeLibrary>MultiThreaded</RuntimeLibrary>
|
||||
<FunctionLevelLinking>true</FunctionLevelLinking>
|
||||
<PrecompiledHeader />
|
||||
<WarningLevel>Level3</WarningLevel>
|
||||
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<AdditionalDependencies>../../../../angelscript/lib/angelscript.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||
<OutputFile>$(OutDir)$(ProjectName).exe</OutputFile>
|
||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||
<SubSystem>Console</SubSystem>
|
||||
<OptimizeReferences>true</OptimizeReferences>
|
||||
<EnableCOMDATFolding>true</EnableCOMDATFolding>
|
||||
<TargetMachine>MachineX86</TargetMachine>
|
||||
</Link>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
|
||||
<ClCompile>
|
||||
<Optimization>MaxSpeed</Optimization>
|
||||
<IntrinsicFunctions>true</IntrinsicFunctions>
|
||||
<AdditionalIncludeDirectories>..\..\..\..\angelscript\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<PreprocessorDefinitions>WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<RuntimeLibrary>MultiThreaded</RuntimeLibrary>
|
||||
<FunctionLevelLinking>true</FunctionLevelLinking>
|
||||
<PrecompiledHeader>
|
||||
</PrecompiledHeader>
|
||||
<WarningLevel>Level3</WarningLevel>
|
||||
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<AdditionalDependencies>../../../../angelscript/lib/angelscript64.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||
<OutputFile>$(OutDir)$(ProjectName).exe</OutputFile>
|
||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||
<SubSystem>Console</SubSystem>
|
||||
<OptimizeReferences>true</OptimizeReferences>
|
||||
<EnableCOMDATFolding>true</EnableCOMDATFolding>
|
||||
</Link>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemGroup>
|
||||
<ClCompile Include="..\..\..\..\add_on\scripthelper\scripthelper.cpp" />
|
||||
<ClCompile Include="..\..\source\main.cpp" />
|
||||
<ClCompile Include="..\..\..\..\add_on\scriptbuilder\scriptbuilder.cpp" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClInclude Include="..\..\..\..\add_on\scripthelper\scripthelper.h" />
|
||||
<ClInclude Include="..\..\..\..\angelscript\include\angelscript.h" />
|
||||
<ClInclude Include="..\..\..\..\add_on\scriptbuilder\scriptbuilder.h" />
|
||||
</ItemGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
|
||||
<ImportGroup Label="ExtensionTargets">
|
||||
</ImportGroup>
|
||||
</Project>
|
||||
20
samples/asbuild/projects/msvc2017/asbuild.sln
Normal file
20
samples/asbuild/projects/msvc2017/asbuild.sln
Normal file
@@ -0,0 +1,20 @@
|
||||
|
||||
Microsoft Visual Studio Solution File, Format Version 12.00
|
||||
# Visual Studio Express 2012 for Windows Desktop
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "asbuild", "asbuild.vcxproj", "{1454C75F-8CE0-450D-A520-D9D487A37ACD}"
|
||||
EndProject
|
||||
Global
|
||||
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||
Debug|Win32 = Debug|Win32
|
||||
Release|Win32 = Release|Win32
|
||||
EndGlobalSection
|
||||
GlobalSection(ProjectConfigurationPlatforms) = postSolution
|
||||
{1454C75F-8CE0-450D-A520-D9D487A37ACD}.Debug|Win32.ActiveCfg = Debug|Win32
|
||||
{1454C75F-8CE0-450D-A520-D9D487A37ACD}.Debug|Win32.Build.0 = Debug|Win32
|
||||
{1454C75F-8CE0-450D-A520-D9D487A37ACD}.Release|Win32.ActiveCfg = Release|Win32
|
||||
{1454C75F-8CE0-450D-A520-D9D487A37ACD}.Release|Win32.Build.0 = Release|Win32
|
||||
EndGlobalSection
|
||||
GlobalSection(SolutionProperties) = preSolution
|
||||
HideSolutionNode = FALSE
|
||||
EndGlobalSection
|
||||
EndGlobal
|
||||
183
samples/asbuild/projects/msvc2017/asbuild.vcxproj
Normal file
183
samples/asbuild/projects/msvc2017/asbuild.vcxproj
Normal file
@@ -0,0 +1,183 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project DefaultTargets="Build" ToolsVersion="15.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">
|
||||
<ProjectGuid>{1454C75F-8CE0-450D-A520-D9D487A37ACD}</ProjectGuid>
|
||||
<RootNamespace>asbuild</RootNamespace>
|
||||
<Keyword>Win32Proj</Keyword>
|
||||
<WindowsTargetPlatformVersion>10.0.16299.0</WindowsTargetPlatformVersion>
|
||||
</PropertyGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
|
||||
<ConfigurationType>Application</ConfigurationType>
|
||||
<PlatformToolset>v141</PlatformToolset>
|
||||
<CharacterSet>Unicode</CharacterSet>
|
||||
<WholeProgramOptimization>true</WholeProgramOptimization>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
|
||||
<ConfigurationType>Application</ConfigurationType>
|
||||
<PlatformToolset>v141</PlatformToolset>
|
||||
<CharacterSet>Unicode</CharacterSet>
|
||||
<WholeProgramOptimization>true</WholeProgramOptimization>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
|
||||
<ConfigurationType>Application</ConfigurationType>
|
||||
<PlatformToolset>v141</PlatformToolset>
|
||||
<CharacterSet>Unicode</CharacterSet>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
|
||||
<ConfigurationType>Application</ConfigurationType>
|
||||
<PlatformToolset>v141</PlatformToolset>
|
||||
<CharacterSet>Unicode</CharacterSet>
|
||||
</PropertyGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
|
||||
<ImportGroup Label="ExtensionSettings">
|
||||
</ImportGroup>
|
||||
<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|x64'" 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>
|
||||
<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" />
|
||||
</ImportGroup>
|
||||
<PropertyGroup Label="UserMacros" />
|
||||
<PropertyGroup>
|
||||
<_ProjectFileVersion>11.0.60315.1</_ProjectFileVersion>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
|
||||
<OutDir>..\..\bin\</OutDir>
|
||||
<IntDir>$(Platform)\$(Configuration)\</IntDir>
|
||||
<LinkIncremental>true</LinkIncremental>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
|
||||
<LinkIncremental>true</LinkIncremental>
|
||||
<OutDir>$(Platform)\$(Configuration)\</OutDir>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
|
||||
<OutDir>..\..\bin\</OutDir>
|
||||
<IntDir>$(Platform)\$(Configuration)\</IntDir>
|
||||
<LinkIncremental>false</LinkIncremental>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
|
||||
<LinkIncremental>false</LinkIncremental>
|
||||
<OutDir>$(Platform)\$(Configuration)\</OutDir>
|
||||
</PropertyGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
|
||||
<ClCompile>
|
||||
<Optimization>Disabled</Optimization>
|
||||
<AdditionalIncludeDirectories>..\..\..\..\angelscript\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<PreprocessorDefinitions>WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<MinimalRebuild>true</MinimalRebuild>
|
||||
<BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
|
||||
<RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
|
||||
<PrecompiledHeader />
|
||||
<WarningLevel>Level3</WarningLevel>
|
||||
<DebugInformationFormat>EditAndContinue</DebugInformationFormat>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<AdditionalDependencies>../../../../angelscript/lib/angelscriptd.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||
<OutputFile>$(OutDir)$(ProjectName).exe</OutputFile>
|
||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||
<SubSystem>Console</SubSystem>
|
||||
<TargetMachine>MachineX86</TargetMachine>
|
||||
</Link>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
|
||||
<ClCompile>
|
||||
<Optimization>Disabled</Optimization>
|
||||
<AdditionalIncludeDirectories>..\..\..\..\angelscript\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<PreprocessorDefinitions>WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
|
||||
<RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
|
||||
<PrecompiledHeader>
|
||||
</PrecompiledHeader>
|
||||
<WarningLevel>Level3</WarningLevel>
|
||||
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<AdditionalDependencies>../../../../angelscript/lib/angelscript64d.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||
<OutputFile>$(OutDir)$(ProjectName).exe</OutputFile>
|
||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||
<SubSystem>Console</SubSystem>
|
||||
</Link>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
|
||||
<ClCompile>
|
||||
<Optimization>MaxSpeed</Optimization>
|
||||
<IntrinsicFunctions>true</IntrinsicFunctions>
|
||||
<AdditionalIncludeDirectories>..\..\..\..\angelscript\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<PreprocessorDefinitions>WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<RuntimeLibrary>MultiThreaded</RuntimeLibrary>
|
||||
<FunctionLevelLinking>true</FunctionLevelLinking>
|
||||
<PrecompiledHeader />
|
||||
<WarningLevel>Level3</WarningLevel>
|
||||
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<AdditionalDependencies>../../../../angelscript/lib/angelscript.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||
<OutputFile>$(OutDir)$(ProjectName).exe</OutputFile>
|
||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||
<SubSystem>Console</SubSystem>
|
||||
<OptimizeReferences>true</OptimizeReferences>
|
||||
<EnableCOMDATFolding>true</EnableCOMDATFolding>
|
||||
<TargetMachine>MachineX86</TargetMachine>
|
||||
</Link>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
|
||||
<ClCompile>
|
||||
<Optimization>MaxSpeed</Optimization>
|
||||
<IntrinsicFunctions>true</IntrinsicFunctions>
|
||||
<AdditionalIncludeDirectories>..\..\..\..\angelscript\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<PreprocessorDefinitions>WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<RuntimeLibrary>MultiThreaded</RuntimeLibrary>
|
||||
<FunctionLevelLinking>true</FunctionLevelLinking>
|
||||
<PrecompiledHeader>
|
||||
</PrecompiledHeader>
|
||||
<WarningLevel>Level3</WarningLevel>
|
||||
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<AdditionalDependencies>../../../../angelscript/lib/angelscript64.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||
<OutputFile>$(OutDir)$(ProjectName).exe</OutputFile>
|
||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||
<SubSystem>Console</SubSystem>
|
||||
<OptimizeReferences>true</OptimizeReferences>
|
||||
<EnableCOMDATFolding>true</EnableCOMDATFolding>
|
||||
</Link>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemGroup>
|
||||
<ClCompile Include="..\..\..\..\add_on\scripthelper\scripthelper.cpp" />
|
||||
<ClCompile Include="..\..\source\main.cpp" />
|
||||
<ClCompile Include="..\..\..\..\add_on\scriptbuilder\scriptbuilder.cpp" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClInclude Include="..\..\..\..\add_on\scripthelper\scripthelper.h" />
|
||||
<ClInclude Include="..\..\..\..\angelscript\include\angelscript.h" />
|
||||
<ClInclude Include="..\..\..\..\add_on\scriptbuilder\scriptbuilder.h" />
|
||||
</ItemGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
|
||||
<ImportGroup Label="ExtensionTargets">
|
||||
</ImportGroup>
|
||||
</Project>
|
||||
20
samples/asbuild/projects/msvc2019/asbuild.sln
Normal file
20
samples/asbuild/projects/msvc2019/asbuild.sln
Normal file
@@ -0,0 +1,20 @@
|
||||
|
||||
Microsoft Visual Studio Solution File, Format Version 12.00
|
||||
# Visual Studio Express 2012 for Windows Desktop
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "asbuild", "asbuild.vcxproj", "{1454C75F-8CE0-450D-A520-D9D487A37ACD}"
|
||||
EndProject
|
||||
Global
|
||||
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||
Debug|Win32 = Debug|Win32
|
||||
Release|Win32 = Release|Win32
|
||||
EndGlobalSection
|
||||
GlobalSection(ProjectConfigurationPlatforms) = postSolution
|
||||
{1454C75F-8CE0-450D-A520-D9D487A37ACD}.Debug|Win32.ActiveCfg = Debug|Win32
|
||||
{1454C75F-8CE0-450D-A520-D9D487A37ACD}.Debug|Win32.Build.0 = Debug|Win32
|
||||
{1454C75F-8CE0-450D-A520-D9D487A37ACD}.Release|Win32.ActiveCfg = Release|Win32
|
||||
{1454C75F-8CE0-450D-A520-D9D487A37ACD}.Release|Win32.Build.0 = Release|Win32
|
||||
EndGlobalSection
|
||||
GlobalSection(SolutionProperties) = preSolution
|
||||
HideSolutionNode = FALSE
|
||||
EndGlobalSection
|
||||
EndGlobal
|
||||
183
samples/asbuild/projects/msvc2019/asbuild.vcxproj
Normal file
183
samples/asbuild/projects/msvc2019/asbuild.vcxproj
Normal file
@@ -0,0 +1,183 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project DefaultTargets="Build" ToolsVersion="15.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">
|
||||
<ProjectGuid>{1454C75F-8CE0-450D-A520-D9D487A37ACD}</ProjectGuid>
|
||||
<RootNamespace>asbuild</RootNamespace>
|
||||
<Keyword>Win32Proj</Keyword>
|
||||
<WindowsTargetPlatformVersion>10.0</WindowsTargetPlatformVersion>
|
||||
</PropertyGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
|
||||
<ConfigurationType>Application</ConfigurationType>
|
||||
<PlatformToolset>v142</PlatformToolset>
|
||||
<CharacterSet>Unicode</CharacterSet>
|
||||
<WholeProgramOptimization>true</WholeProgramOptimization>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
|
||||
<ConfigurationType>Application</ConfigurationType>
|
||||
<PlatformToolset>v142</PlatformToolset>
|
||||
<CharacterSet>Unicode</CharacterSet>
|
||||
<WholeProgramOptimization>true</WholeProgramOptimization>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
|
||||
<ConfigurationType>Application</ConfigurationType>
|
||||
<PlatformToolset>v142</PlatformToolset>
|
||||
<CharacterSet>Unicode</CharacterSet>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
|
||||
<ConfigurationType>Application</ConfigurationType>
|
||||
<PlatformToolset>v142</PlatformToolset>
|
||||
<CharacterSet>Unicode</CharacterSet>
|
||||
</PropertyGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
|
||||
<ImportGroup Label="ExtensionSettings">
|
||||
</ImportGroup>
|
||||
<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|x64'" 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>
|
||||
<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" />
|
||||
</ImportGroup>
|
||||
<PropertyGroup Label="UserMacros" />
|
||||
<PropertyGroup>
|
||||
<_ProjectFileVersion>11.0.60315.1</_ProjectFileVersion>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
|
||||
<OutDir>..\..\bin\</OutDir>
|
||||
<IntDir>$(Platform)\$(Configuration)\</IntDir>
|
||||
<LinkIncremental>true</LinkIncremental>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
|
||||
<LinkIncremental>true</LinkIncremental>
|
||||
<OutDir>$(Platform)\$(Configuration)\</OutDir>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
|
||||
<OutDir>..\..\bin\</OutDir>
|
||||
<IntDir>$(Platform)\$(Configuration)\</IntDir>
|
||||
<LinkIncremental>false</LinkIncremental>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
|
||||
<LinkIncremental>false</LinkIncremental>
|
||||
<OutDir>$(Platform)\$(Configuration)\</OutDir>
|
||||
</PropertyGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
|
||||
<ClCompile>
|
||||
<Optimization>Disabled</Optimization>
|
||||
<AdditionalIncludeDirectories>..\..\..\..\angelscript\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<PreprocessorDefinitions>WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<MinimalRebuild>true</MinimalRebuild>
|
||||
<BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
|
||||
<RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
|
||||
<PrecompiledHeader />
|
||||
<WarningLevel>Level3</WarningLevel>
|
||||
<DebugInformationFormat>EditAndContinue</DebugInformationFormat>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<AdditionalDependencies>../../../../angelscript/lib/angelscriptd.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||
<OutputFile>$(OutDir)$(ProjectName).exe</OutputFile>
|
||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||
<SubSystem>Console</SubSystem>
|
||||
<TargetMachine>MachineX86</TargetMachine>
|
||||
</Link>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
|
||||
<ClCompile>
|
||||
<Optimization>Disabled</Optimization>
|
||||
<AdditionalIncludeDirectories>..\..\..\..\angelscript\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<PreprocessorDefinitions>WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
|
||||
<RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
|
||||
<PrecompiledHeader>
|
||||
</PrecompiledHeader>
|
||||
<WarningLevel>Level3</WarningLevel>
|
||||
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<AdditionalDependencies>../../../../angelscript/lib/angelscript64d.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||
<OutputFile>$(OutDir)$(ProjectName).exe</OutputFile>
|
||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||
<SubSystem>Console</SubSystem>
|
||||
</Link>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
|
||||
<ClCompile>
|
||||
<Optimization>MaxSpeed</Optimization>
|
||||
<IntrinsicFunctions>true</IntrinsicFunctions>
|
||||
<AdditionalIncludeDirectories>..\..\..\..\angelscript\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<PreprocessorDefinitions>WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<RuntimeLibrary>MultiThreaded</RuntimeLibrary>
|
||||
<FunctionLevelLinking>true</FunctionLevelLinking>
|
||||
<PrecompiledHeader />
|
||||
<WarningLevel>Level3</WarningLevel>
|
||||
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<AdditionalDependencies>../../../../angelscript/lib/angelscript.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||
<OutputFile>$(OutDir)$(ProjectName).exe</OutputFile>
|
||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||
<SubSystem>Console</SubSystem>
|
||||
<OptimizeReferences>true</OptimizeReferences>
|
||||
<EnableCOMDATFolding>true</EnableCOMDATFolding>
|
||||
<TargetMachine>MachineX86</TargetMachine>
|
||||
</Link>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
|
||||
<ClCompile>
|
||||
<Optimization>MaxSpeed</Optimization>
|
||||
<IntrinsicFunctions>true</IntrinsicFunctions>
|
||||
<AdditionalIncludeDirectories>..\..\..\..\angelscript\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<PreprocessorDefinitions>WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<RuntimeLibrary>MultiThreaded</RuntimeLibrary>
|
||||
<FunctionLevelLinking>true</FunctionLevelLinking>
|
||||
<PrecompiledHeader>
|
||||
</PrecompiledHeader>
|
||||
<WarningLevel>Level3</WarningLevel>
|
||||
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<AdditionalDependencies>../../../../angelscript/lib/angelscript64.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||
<OutputFile>$(OutDir)$(ProjectName).exe</OutputFile>
|
||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||
<SubSystem>Console</SubSystem>
|
||||
<OptimizeReferences>true</OptimizeReferences>
|
||||
<EnableCOMDATFolding>true</EnableCOMDATFolding>
|
||||
</Link>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemGroup>
|
||||
<ClCompile Include="..\..\..\..\add_on\scripthelper\scripthelper.cpp" />
|
||||
<ClCompile Include="..\..\source\main.cpp" />
|
||||
<ClCompile Include="..\..\..\..\add_on\scriptbuilder\scriptbuilder.cpp" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClInclude Include="..\..\..\..\add_on\scripthelper\scripthelper.h" />
|
||||
<ClInclude Include="..\..\..\..\angelscript\include\angelscript.h" />
|
||||
<ClInclude Include="..\..\..\..\add_on\scriptbuilder\scriptbuilder.h" />
|
||||
</ItemGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
|
||||
<ImportGroup Label="ExtensionTargets">
|
||||
</ImportGroup>
|
||||
</Project>
|
||||
20
samples/asbuild/projects/msvc9/asbuild.sln
Normal file
20
samples/asbuild/projects/msvc9/asbuild.sln
Normal file
@@ -0,0 +1,20 @@
|
||||
|
||||
Microsoft Visual Studio Solution File, Format Version 10.00
|
||||
# Visual C++ Express 2008
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "asbuild", "asbuild.vcproj", "{1454C75F-8CE0-450D-A520-D9D487A37ACD}"
|
||||
EndProject
|
||||
Global
|
||||
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||
Debug|Win32 = Debug|Win32
|
||||
Release|Win32 = Release|Win32
|
||||
EndGlobalSection
|
||||
GlobalSection(ProjectConfigurationPlatforms) = postSolution
|
||||
{1454C75F-8CE0-450D-A520-D9D487A37ACD}.Debug|Win32.ActiveCfg = Debug|Win32
|
||||
{1454C75F-8CE0-450D-A520-D9D487A37ACD}.Debug|Win32.Build.0 = Debug|Win32
|
||||
{1454C75F-8CE0-450D-A520-D9D487A37ACD}.Release|Win32.ActiveCfg = Release|Win32
|
||||
{1454C75F-8CE0-450D-A520-D9D487A37ACD}.Release|Win32.Build.0 = Release|Win32
|
||||
EndGlobalSection
|
||||
GlobalSection(SolutionProperties) = preSolution
|
||||
HideSolutionNode = FALSE
|
||||
EndGlobalSection
|
||||
EndGlobal
|
||||
211
samples/asbuild/projects/msvc9/asbuild.vcproj
Normal file
211
samples/asbuild/projects/msvc9/asbuild.vcproj
Normal file
@@ -0,0 +1,211 @@
|
||||
<?xml version="1.0" encoding="Windows-1252"?>
|
||||
<VisualStudioProject
|
||||
ProjectType="Visual C++"
|
||||
Version="9,00"
|
||||
Name="asbuild"
|
||||
ProjectGUID="{1454C75F-8CE0-450D-A520-D9D487A37ACD}"
|
||||
RootNamespace="asbuild"
|
||||
Keyword="Win32Proj"
|
||||
TargetFrameworkVersion="196613"
|
||||
>
|
||||
<Platforms>
|
||||
<Platform
|
||||
Name="Win32"
|
||||
/>
|
||||
</Platforms>
|
||||
<ToolFiles>
|
||||
</ToolFiles>
|
||||
<Configurations>
|
||||
<Configuration
|
||||
Name="Debug|Win32"
|
||||
OutputDirectory="$(SolutionDir)$(ConfigurationName)"
|
||||
IntermediateDirectory="$(ConfigurationName)"
|
||||
ConfigurationType="1"
|
||||
CharacterSet="1"
|
||||
>
|
||||
<Tool
|
||||
Name="VCPreBuildEventTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCCustomBuildTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCXMLDataGeneratorTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCWebServiceProxyGeneratorTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCMIDLTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
Optimization="0"
|
||||
AdditionalIncludeDirectories="..\..\..\..\angelscript\include"
|
||||
PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE"
|
||||
MinimalRebuild="true"
|
||||
BasicRuntimeChecks="3"
|
||||
RuntimeLibrary="1"
|
||||
UsePrecompiledHeader="0"
|
||||
WarningLevel="3"
|
||||
DebugInformationFormat="4"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCManagedResourceCompilerTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCResourceCompilerTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCPreLinkEventTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCLinkerTool"
|
||||
AdditionalDependencies="../../../../angelscript/lib/angelscriptd.lib"
|
||||
OutputFile="..\..\bin\$(ProjectName).exe"
|
||||
LinkIncremental="2"
|
||||
GenerateDebugInformation="true"
|
||||
SubSystem="1"
|
||||
TargetMachine="1"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCALinkTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCManifestTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCXDCMakeTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCBscMakeTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCFxCopTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCAppVerifierTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCPostBuildEventTool"
|
||||
/>
|
||||
</Configuration>
|
||||
<Configuration
|
||||
Name="Release|Win32"
|
||||
OutputDirectory="$(SolutionDir)$(ConfigurationName)"
|
||||
IntermediateDirectory="$(ConfigurationName)"
|
||||
ConfigurationType="1"
|
||||
CharacterSet="1"
|
||||
WholeProgramOptimization="1"
|
||||
>
|
||||
<Tool
|
||||
Name="VCPreBuildEventTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCCustomBuildTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCXMLDataGeneratorTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCWebServiceProxyGeneratorTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCMIDLTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
Optimization="2"
|
||||
EnableIntrinsicFunctions="true"
|
||||
AdditionalIncludeDirectories="..\..\..\..\angelscript\include"
|
||||
PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE"
|
||||
RuntimeLibrary="0"
|
||||
EnableFunctionLevelLinking="true"
|
||||
UsePrecompiledHeader="0"
|
||||
WarningLevel="3"
|
||||
DebugInformationFormat="3"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCManagedResourceCompilerTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCResourceCompilerTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCPreLinkEventTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCLinkerTool"
|
||||
AdditionalDependencies="../../../../angelscript/lib/angelscript.lib"
|
||||
OutputFile="..\..\bin\$(ProjectName).exe"
|
||||
LinkIncremental="1"
|
||||
GenerateDebugInformation="true"
|
||||
SubSystem="1"
|
||||
OptimizeReferences="2"
|
||||
EnableCOMDATFolding="2"
|
||||
TargetMachine="1"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCALinkTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCManifestTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCXDCMakeTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCBscMakeTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCFxCopTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCAppVerifierTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCPostBuildEventTool"
|
||||
/>
|
||||
</Configuration>
|
||||
</Configurations>
|
||||
<References>
|
||||
</References>
|
||||
<Files>
|
||||
<Filter
|
||||
Name="Source Files"
|
||||
Filter="cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx"
|
||||
UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}"
|
||||
>
|
||||
<File
|
||||
RelativePath="..\..\source\main.cpp"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\..\..\add_on\scriptbuilder\scriptbuilder.cpp"
|
||||
>
|
||||
</File>
|
||||
</Filter>
|
||||
<Filter
|
||||
Name="Header Files"
|
||||
Filter="h;hpp;hxx;hm;inl;inc;xsd"
|
||||
UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}"
|
||||
>
|
||||
<File
|
||||
RelativePath="..\..\..\..\angelscript\include\angelscript.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\..\..\add_on\scriptbuilder\scriptbuilder.h"
|
||||
>
|
||||
</File>
|
||||
</Filter>
|
||||
<Filter
|
||||
Name="Resource Files"
|
||||
Filter="rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav"
|
||||
UniqueIdentifier="{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}"
|
||||
>
|
||||
</Filter>
|
||||
</Files>
|
||||
<Globals>
|
||||
</Globals>
|
||||
</VisualStudioProject>
|
||||
321
samples/asbuild/source/main.cpp
Normal file
321
samples/asbuild/source/main.cpp
Normal file
@@ -0,0 +1,321 @@
|
||||
#include <iostream> // cout
|
||||
#include <assert.h> // assert()
|
||||
#include <string.h> // strstr()
|
||||
#include <angelscript.h>
|
||||
#include "../../../add_on/scriptbuilder/scriptbuilder.h"
|
||||
#include "../../../add_on/scripthelper/scripthelper.h"
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <sstream>
|
||||
#include <fstream>
|
||||
#if defined(_MSC_VER) && !defined(_WIN32_WCE)
|
||||
#include <direct.h>
|
||||
#include <crtdbg.h>
|
||||
#endif
|
||||
#ifdef _WIN32_WCE
|
||||
#include <windows.h> // For GetModuleFileName
|
||||
#endif
|
||||
|
||||
using namespace std;
|
||||
|
||||
// Function prototypes
|
||||
int ConfigureEngine(asIScriptEngine *engine, const char *configFile);
|
||||
int CompileScript(asIScriptEngine *engine, const char *scriptFile);
|
||||
int SaveBytecode(asIScriptEngine *engine, const char *outputFile);
|
||||
static const char *GetCurrentDir(char *buf, size_t size);
|
||||
|
||||
void MessageCallback(const asSMessageInfo *msg, void *param)
|
||||
{
|
||||
const char *type = "ERR ";
|
||||
if( msg->type == asMSGTYPE_WARNING )
|
||||
type = "WARN";
|
||||
else if( msg->type == asMSGTYPE_INFORMATION )
|
||||
type = "INFO";
|
||||
|
||||
printf("%s (%d, %d) : %s : %s\n", msg->section, msg->row, msg->col, type, msg->message);
|
||||
}
|
||||
|
||||
int main(int argc, char **argv)
|
||||
{
|
||||
#if defined(_MSC_VER)
|
||||
// Turn on memory leak detection (use _CrtSetBreakAlloc to break at specific allocation)
|
||||
_CrtSetDbgFlag(_CRTDBG_LEAK_CHECK_DF|_CRTDBG_ALLOC_MEM_DF);
|
||||
_CrtSetReportMode(_CRT_ASSERT,_CRTDBG_MODE_FILE);
|
||||
_CrtSetReportFile(_CRT_ASSERT,_CRTDBG_FILE_STDERR);
|
||||
|
||||
//_CrtSetBreakAlloc(6150);
|
||||
#endif
|
||||
|
||||
int r;
|
||||
|
||||
if( argc < 4 )
|
||||
{
|
||||
cout << "Usage: " << endl;
|
||||
cout << "asbuild <config file> <script file> <output>" << endl;
|
||||
cout << " <config file> is the file with the application interface" << endl;
|
||||
cout << " <script file> is the script file that should be compiled" << endl;
|
||||
cout << " <output> is the name that the compiled script will be saved as" << endl;
|
||||
return -1;
|
||||
}
|
||||
|
||||
// Create the script engine
|
||||
asIScriptEngine *engine = asCreateScriptEngine();
|
||||
if( engine == 0 )
|
||||
{
|
||||
cout << "Failed to create script engine." << endl;
|
||||
return -1;
|
||||
}
|
||||
|
||||
// The script compiler will send any compiler messages to the callback
|
||||
engine->SetMessageCallback(asFUNCTION(MessageCallback), 0, asCALL_CDECL);
|
||||
|
||||
// Configure the script engine with all the functions,
|
||||
// and variables that the script should be able to use.
|
||||
r = ConfigureEngine(engine, argv[1]);
|
||||
if( r < 0 ) return -1;
|
||||
|
||||
// Compile the script code
|
||||
r = CompileScript(engine, argv[2]);
|
||||
if( r < 0 ) return -1;
|
||||
|
||||
// Save the bytecode
|
||||
r = SaveBytecode(engine, argv[3]);
|
||||
if( r < 0 ) return -1;
|
||||
|
||||
// Shut down the engine
|
||||
engine->ShutDownAndRelease();
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
#ifdef AS_CAN_USE_CPP11
|
||||
// The string factory doesn't need to keep a specific order in the
|
||||
// cache, so the unordered_map is faster than the ordinary map
|
||||
#include <unordered_map> // std::unordered_map
|
||||
BEGIN_AS_NAMESPACE
|
||||
typedef unordered_map<string, int> map_t;
|
||||
END_AS_NAMESPACE
|
||||
#else
|
||||
#include <map> // std::map
|
||||
BEGIN_AS_NAMESPACE
|
||||
typedef map<string, int> map_t;
|
||||
END_AS_NAMESPACE
|
||||
#endif
|
||||
|
||||
// Default string factory. Removes duplicate string constants
|
||||
// This same implementation is provided in the scriptstdstring add-on
|
||||
class CStdStringFactory : public asIStringFactory
|
||||
{
|
||||
public:
|
||||
CStdStringFactory() {}
|
||||
~CStdStringFactory()
|
||||
{
|
||||
// The script engine must release each string
|
||||
// constant that it has requested
|
||||
assert(stringCache.size() == 0);
|
||||
}
|
||||
|
||||
const void *GetStringConstant(const char *data, asUINT length)
|
||||
{
|
||||
string str(data, length);
|
||||
map_t::iterator it = stringCache.find(str);
|
||||
if (it != stringCache.end())
|
||||
it->second++;
|
||||
else
|
||||
it = stringCache.insert(map_t::value_type(str, 1)).first;
|
||||
|
||||
return reinterpret_cast<const void*>(&it->first);
|
||||
}
|
||||
|
||||
int ReleaseStringConstant(const void *str)
|
||||
{
|
||||
if (str == 0)
|
||||
return asERROR;
|
||||
|
||||
map_t::iterator it = stringCache.find(*reinterpret_cast<const string*>(str));
|
||||
if (it == stringCache.end())
|
||||
return asERROR;
|
||||
|
||||
it->second--;
|
||||
if (it->second == 0)
|
||||
stringCache.erase(it);
|
||||
return asSUCCESS;
|
||||
}
|
||||
|
||||
int GetRawStringData(const void *str, char *data, asUINT *length) const
|
||||
{
|
||||
if (str == 0)
|
||||
return asERROR;
|
||||
|
||||
if (length)
|
||||
*length = (asUINT)reinterpret_cast<const string*>(str)->length();
|
||||
|
||||
if (data)
|
||||
memcpy(data, reinterpret_cast<const string*>(str)->c_str(), reinterpret_cast<const string*>(str)->length());
|
||||
|
||||
return asSUCCESS;
|
||||
}
|
||||
|
||||
// TODO: Make sure the access to the string cache is thread safe
|
||||
map_t stringCache;
|
||||
};
|
||||
|
||||
CStdStringFactory stringFactory;
|
||||
|
||||
// This function will register the application interface,
|
||||
// based on information read from a configuration file.
|
||||
int ConfigureEngine(asIScriptEngine *engine, const char *configFile)
|
||||
{
|
||||
int r;
|
||||
|
||||
ifstream strm;
|
||||
strm.open(configFile);
|
||||
if( strm.fail() )
|
||||
{
|
||||
// Write a message to the engine's message callback
|
||||
char buf[256];
|
||||
string msg = "Failed to open config file in path: '" + string(GetCurrentDir(buf, 256)) + "'";
|
||||
engine->WriteMessage(configFile, 0, 0, asMSGTYPE_ERROR, msg.c_str());
|
||||
return -1;
|
||||
}
|
||||
|
||||
// Configure the engine with the information from the file
|
||||
r = ConfigEngineFromStream(engine, strm, configFile, &stringFactory);
|
||||
if( r < 0 )
|
||||
{
|
||||
engine->WriteMessage(configFile, 0, 0, asMSGTYPE_ERROR, "Configuration failed");
|
||||
return -1;
|
||||
}
|
||||
|
||||
|
||||
engine->WriteMessage(configFile, 0, 0, asMSGTYPE_INFORMATION, "Configuration successfully registered");
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
int CompileScript(asIScriptEngine *engine, const char *scriptFile)
|
||||
{
|
||||
int r;
|
||||
|
||||
CScriptBuilder builder;
|
||||
r = builder.StartNewModule(engine, "build");
|
||||
if( r < 0 ) return -1;
|
||||
|
||||
r = builder.AddSectionFromFile(scriptFile);
|
||||
if( r < 0 ) return -1;
|
||||
|
||||
r = builder.BuildModule();
|
||||
if( r < 0 )
|
||||
{
|
||||
engine->WriteMessage(scriptFile, 0, 0, asMSGTYPE_ERROR, "Script failed to build");
|
||||
return -1;
|
||||
}
|
||||
|
||||
engine->WriteMessage(scriptFile, 0, 0, asMSGTYPE_INFORMATION, "Script successfully built");
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
class CBytecodeStream : public asIBinaryStream
|
||||
{
|
||||
public:
|
||||
CBytecodeStream() {f = 0;}
|
||||
~CBytecodeStream() { if( f ) fclose(f); }
|
||||
|
||||
int Open(const char *filename)
|
||||
{
|
||||
if( f ) return -1;
|
||||
#if _MSC_VER >= 1500
|
||||
fopen_s(&f, filename, "wb");
|
||||
#else
|
||||
f = fopen(filename, "wb");
|
||||
#endif
|
||||
if( f == 0 ) return -1;
|
||||
return 0;
|
||||
}
|
||||
int Write(const void *ptr, asUINT size)
|
||||
{
|
||||
if( size == 0 || f == 0 ) return 0;
|
||||
fwrite(ptr, size, 1, f);
|
||||
return 0;
|
||||
}
|
||||
int Read(void *, asUINT) { return -1; }
|
||||
|
||||
protected:
|
||||
FILE *f;
|
||||
};
|
||||
|
||||
int SaveBytecode(asIScriptEngine *engine, const char *outputFile)
|
||||
{
|
||||
CBytecodeStream stream;
|
||||
int r = stream.Open(outputFile);
|
||||
if( r < 0 )
|
||||
{
|
||||
engine->WriteMessage(outputFile, 0, 0, asMSGTYPE_ERROR, "Failed to open output file for writing");
|
||||
return -1;
|
||||
}
|
||||
|
||||
asIScriptModule *mod = engine->GetModule("build");
|
||||
if( mod == 0 )
|
||||
{
|
||||
engine->WriteMessage(outputFile, 0, 0, asMSGTYPE_ERROR, "Failed to retrieve the compiled bytecode");
|
||||
return -1;
|
||||
}
|
||||
|
||||
r = mod->SaveByteCode(&stream);
|
||||
if( r < 0 )
|
||||
{
|
||||
engine->WriteMessage(outputFile, 0, 0, asMSGTYPE_ERROR, "Failed to write the bytecode");
|
||||
return -1;
|
||||
}
|
||||
|
||||
engine->WriteMessage(outputFile, 0, 0, asMSGTYPE_INFORMATION, "Bytecode successfully saved");
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
static const char *GetCurrentDir(char *buf, size_t size)
|
||||
{
|
||||
#ifdef _MSC_VER
|
||||
#ifdef _WIN32_WCE
|
||||
static TCHAR apppath[MAX_PATH] = TEXT("");
|
||||
if (!apppath[0])
|
||||
{
|
||||
GetModuleFileName(NULL, apppath, MAX_PATH);
|
||||
|
||||
|
||||
int appLen = _tcslen(apppath);
|
||||
|
||||
// Look for the last backslash in the path, which would be the end
|
||||
// of the path itself and the start of the filename. We only want
|
||||
// the path part of the exe's full-path filename
|
||||
// Safety is that we make sure not to walk off the front of the
|
||||
// array (in case the path is nothing more than a filename)
|
||||
while (appLen > 1)
|
||||
{
|
||||
if (apppath[appLen-1] == TEXT('\\'))
|
||||
break;
|
||||
appLen--;
|
||||
}
|
||||
|
||||
// Terminate the string after the trailing backslash
|
||||
apppath[appLen] = TEXT('\0');
|
||||
}
|
||||
#ifdef _UNICODE
|
||||
wcstombs(buf, apppath, min(size, wcslen(apppath)*sizeof(wchar_t)));
|
||||
#else
|
||||
memcpy(buf, apppath, min(size, strlen(apppath)));
|
||||
#endif
|
||||
|
||||
return buf;
|
||||
#else
|
||||
return _getcwd(buf, (int)size);
|
||||
#endif
|
||||
#elif defined(__APPLE__)
|
||||
return getcwd(buf, size);
|
||||
#else
|
||||
return "";
|
||||
#endif
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user