summaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
author Antonio Giner <calamity15khz@gmail.com>2016-03-21 17:01:57 +0100
committer Antonio Giner <calamity15khz@gmail.com>2016-03-21 17:01:57 +0100
commit7d22cfaaf69b181ae9685019d97e183d60a1227e (patch)
tree0dc6c3a78bd0d8564b849ce385123dc607607080
parent24d72668da6daaa43cb445a0086762cf2ce4fa85 (diff)
parentbc272081b936a4312284d1c299e06fbee4232cd0 (diff)
Merge remote-tracking branch 'refs/remotes/mamedev/master'
-rw-r--r--3rdparty/bgfx/src/shader_spirv.cpp96
-rw-r--r--3rdparty/compat/winsdk-override/wrl/client.h4
-rw-r--r--3rdparty/genie/README.md37
-rw-r--r--3rdparty/genie/build/gmake.darwin/genie.make11
-rw-r--r--3rdparty/genie/build/gmake.linux/genie.make11
-rw-r--r--3rdparty/genie/build/gmake.windows/genie.make9
-rw-r--r--3rdparty/genie/src/actions/make/make_cpp.lua3
-rw-r--r--3rdparty/genie/src/actions/vstudio/_vstudio.lua3
-rw-r--r--3rdparty/genie/src/actions/vstudio/vs200x_vcproj.lua2
-rw-r--r--3rdparty/genie/src/actions/vstudio/vs2010_vcxproj.lua174
-rw-r--r--3rdparty/genie/src/actions/vstudio/vs2010_vcxproj_filters.lua16
-rw-r--r--3rdparty/genie/src/base/api.lua9
-rw-r--r--3rdparty/genie/src/base/bake.lua14
-rw-r--r--3rdparty/genie/src/base/cmdline.lua17
-rw-r--r--3rdparty/genie/src/base/globals.lua73
-rw-r--r--3rdparty/genie/src/base/path.lua5
-rw-r--r--3rdparty/genie/src/host/scripts.c179
-rw-r--r--3rdparty/genie/src/tools/gcc.lua38
-rw-r--r--3rdparty/genie/src/tools/ghs.lua12
-rw-r--r--3rdparty/genie/src/tools/ow.lua13
-rw-r--r--3rdparty/genie/src/tools/snc.lua12
-rw-r--r--src/mame/drivers/pacman.cpp176
-rw-r--r--src/mame/drivers/symbolics.cpp4
-rw-r--r--src/mame/drivers/tispeak.cpp1
-rw-r--r--src/osd/modules/render/d3d/d3dhlsl.cpp4
-rw-r--r--src/osd/modules/render/d3d/d3dhlsl.h4
26 files changed, 610 insertions, 317 deletions
diff --git a/3rdparty/bgfx/src/shader_spirv.cpp b/3rdparty/bgfx/src/shader_spirv.cpp
index 7226f90fe78..2d30e996af6 100644
--- a/3rdparty/bgfx/src/shader_spirv.cpp
+++ b/3rdparty/bgfx/src/shader_spirv.cpp
@@ -706,54 +706,54 @@ namespace bgfx
SpvOperand::Enum operands[2];
};
- static const SpvDecorationInfo s_spvDecorationInfo[] =
- {
- { /* RelaxedPrecision */ SPV_OPERAND(_) },
- { /* SpecId */ SPV_OPERAND(LiteralNumber) },
- { /* Block */ SPV_OPERAND(_) },
- { /* BufferBlock */ SPV_OPERAND(_) },
- { /* RowMajor */ SPV_OPERAND(_) },
- { /* ColMajor */ SPV_OPERAND(_) },
- { /* ArrayStride */ SPV_OPERAND(LiteralNumber) },
- { /* MatrixStride */ SPV_OPERAND(LiteralNumber) },
- { /* GLSLShared */ SPV_OPERAND(_) },
- { /* GLSLPacked */ SPV_OPERAND(_) },
- { /* CPacked */ SPV_OPERAND(_) },
- { /* BuiltIn */ SPV_OPERAND(LiteralNumber) },
- { /* Unknown12 */ SPV_OPERAND(_) },
- { /* NoPerspective */ SPV_OPERAND(_) },
- { /* Flat */ SPV_OPERAND(_) },
- { /* Patch */ SPV_OPERAND(_) },
- { /* Centroid */ SPV_OPERAND(_) },
- { /* Sample */ SPV_OPERAND(_) },
- { /* Invariant */ SPV_OPERAND(_) },
- { /* Restrict */ SPV_OPERAND(_) },
- { /* Aliased */ SPV_OPERAND(_) },
- { /* Volatile */ SPV_OPERAND(_) },
- { /* Constant */ SPV_OPERAND(_) },
- { /* Coherent */ SPV_OPERAND(_) },
- { /* NonWritable */ SPV_OPERAND(_) },
- { /* NonReadable */ SPV_OPERAND(_) },
- { /* Uniform */ SPV_OPERAND(_) },
- { /* Unknown27 */ SPV_OPERAND(_) },
- { /* SaturatedConversion */ SPV_OPERAND(_) },
- { /* Stream */ SPV_OPERAND(LiteralNumber) },
- { /* Location */ SPV_OPERAND(LiteralNumber) },
- { /* Component */ SPV_OPERAND(LiteralNumber) },
- { /* Index */ SPV_OPERAND(LiteralNumber) },
- { /* Binding */ SPV_OPERAND(LiteralNumber) },
- { /* DescriptorSet */ SPV_OPERAND(LiteralNumber) },
- { /* Offset */ SPV_OPERAND(LiteralNumber) },
- { /* XfbBuffer */ SPV_OPERAND(LiteralNumber) },
- { /* XfbStride */ SPV_OPERAND(LiteralNumber) },
- { /* FuncParamAttr */ SPV_OPERAND(_) },
- { /* FPRoundingMode */ SPV_OPERAND(_) },
- { /* FPFastMathMode */ SPV_OPERAND(_) },
- { /* LinkageAttributes */ SPV_OPERAND(LiteralString, LinkageType) },
- { /* NoContraction */ SPV_OPERAND(_) },
- { /* InputAttachmentIndex */ SPV_OPERAND(LiteralNumber) },
- { /* Alignment */ SPV_OPERAND(LiteralNumber) },
- };
+// static const SpvDecorationInfo s_spvDecorationInfo[] =
+// {
+// { /* RelaxedPrecision */ SPV_OPERAND(_) },
+// { /* SpecId */ SPV_OPERAND(LiteralNumber) },
+// { /* Block */ SPV_OPERAND(_) },
+// { /* BufferBlock */ SPV_OPERAND(_) },
+// { /* RowMajor */ SPV_OPERAND(_) },
+// { /* ColMajor */ SPV_OPERAND(_) },
+// { /* ArrayStride */ SPV_OPERAND(LiteralNumber) },
+// { /* MatrixStride */ SPV_OPERAND(LiteralNumber) },
+// { /* GLSLShared */ SPV_OPERAND(_) },
+// { /* GLSLPacked */ SPV_OPERAND(_) },
+// { /* CPacked */ SPV_OPERAND(_) },
+// { /* BuiltIn */ SPV_OPERAND(LiteralNumber) },
+// { /* Unknown12 */ SPV_OPERAND(_) },
+// { /* NoPerspective */ SPV_OPERAND(_) },
+// { /* Flat */ SPV_OPERAND(_) },
+// { /* Patch */ SPV_OPERAND(_) },
+// { /* Centroid */ SPV_OPERAND(_) },
+// { /* Sample */ SPV_OPERAND(_) },
+// { /* Invariant */ SPV_OPERAND(_) },
+// { /* Restrict */ SPV_OPERAND(_) },
+// { /* Aliased */ SPV_OPERAND(_) },
+// { /* Volatile */ SPV_OPERAND(_) },
+// { /* Constant */ SPV_OPERAND(_) },
+// { /* Coherent */ SPV_OPERAND(_) },
+// { /* NonWritable */ SPV_OPERAND(_) },
+// { /* NonReadable */ SPV_OPERAND(_) },
+// { /* Uniform */ SPV_OPERAND(_) },
+// { /* Unknown27 */ SPV_OPERAND(_) },
+// { /* SaturatedConversion */ SPV_OPERAND(_) },
+// { /* Stream */ SPV_OPERAND(LiteralNumber) },
+// { /* Location */ SPV_OPERAND(LiteralNumber) },
+// { /* Component */ SPV_OPERAND(LiteralNumber) },
+// { /* Index */ SPV_OPERAND(LiteralNumber) },
+// { /* Binding */ SPV_OPERAND(LiteralNumber) },
+// { /* DescriptorSet */ SPV_OPERAND(LiteralNumber) },
+// { /* Offset */ SPV_OPERAND(LiteralNumber) },
+// { /* XfbBuffer */ SPV_OPERAND(LiteralNumber) },
+// { /* XfbStride */ SPV_OPERAND(LiteralNumber) },
+// { /* FuncParamAttr */ SPV_OPERAND(_) },
+// { /* FPRoundingMode */ SPV_OPERAND(_) },
+// { /* FPFastMathMode */ SPV_OPERAND(_) },
+// { /* LinkageAttributes */ SPV_OPERAND(LiteralString, LinkageType) },
+// { /* NoContraction */ SPV_OPERAND(_) },
+// { /* InputAttachmentIndex */ SPV_OPERAND(LiteralNumber) },
+// { /* Alignment */ SPV_OPERAND(LiteralNumber) },
+// };
static const char* s_spvDecoration[] =
{
diff --git a/3rdparty/compat/winsdk-override/wrl/client.h b/3rdparty/compat/winsdk-override/wrl/client.h
index 5e3e0c35fb1..f54e82dc5b2 100644
--- a/3rdparty/compat/winsdk-override/wrl/client.h
+++ b/3rdparty/compat/winsdk-override/wrl/client.h
@@ -79,10 +79,6 @@ namespace Microsoft {
ComPtr() throw() : ptr_(nullptr) {}
ComPtr(decltype(nullptr)) throw() : ptr_(nullptr) {}
- template<class U> ComPtr(U *other) throw() : ptr_(other.ptr_) {
- InternalAddRef();
- }
-
ComPtr(const ComPtr &other) throw() : ptr_(other.ptr_) {
InternalAddRef();
}
diff --git a/3rdparty/genie/README.md b/3rdparty/genie/README.md
index 82296292415..63622ccd584 100644
--- a/3rdparty/genie/README.md
+++ b/3rdparty/genie/README.md
@@ -35,9 +35,9 @@ derivative of the original Torque Engine.
Download (stable)
-----------------
-[![Build Status](https://travis-ci.org/bkaradzic/genie.svg?branch=master)](https://travis-ci.org/bkaradzic/genie)
+[![Build Status](https://travis-ci.org/bkaradzic/GENie.svg?branch=master)](https://travis-ci.org/bkaradzic/GENie)
- version 366 (commit b887178737cd74cf60899899c4c65b9bf02efb26)
+ version 405 (commit 8f8ab7d903a1495180175784adb7d3b5657c68bb)
Linux:
https://github.com/bkaradzic/bx/raw/master/tools/bin/linux/genie
@@ -107,39 +107,6 @@ intention to keep it compatible with it.
- Added edit & continue support for 64-bit builds in VS2013 upwards.
- Added `windowstargetplatformversion` to specify VS Windows target version.
-## Why fork?
-
-At the time of writing this, September 2014, Premake project is on long hiatus.
-The last official release 4.3 is released in November 2010, 4.4 beta 5 was
-released in November 2013, and the main developer is focusing on Premake 5.
-
-Multiple requests for releasing new version end up with this type of [answer](http://industriousone.com/topic/premake-release-neglect-becoming-critical):
-
- Then help fix the bugs marked 4.4 in the SourceForge tracker so that we can
- make a release. Or review and improve the patches so that I may get them
- applied more quickly. Or pay me to do it so that I can spend more time on
- it, instead of doing other work that you value less (but which actually, you
- know, pays me).
-
-So author has high expectations for release, but he is not working on it, but
-rather working on completely different... Pay me to finish this sentence...
-You get the point. :)
-
-This long period between releases where multiple versions are in flight cause
-confusion for users who are not familiar with Premake, and they just need to
-use Premake to generate project files for project they are interested in.
-
-I've been using Premake for [a while](https://web.archive.org/web/20120119020903/http://carbongames.com/2011/08/Premake),
-I really like it's simplicity, and that it does one thing really well.
-
-I was considering replacing Premake with other build systems that also could
-generate project files, but all these projects fail at being simple and doing
-only one thing. I don't need build system, or package manager, etc. just a
-simple project generator.
-
-In conclusion, forking it and maintaining it is not much different from current
-state of Premake, it's just acknowledging the problem, and dealing with it.
-
[License](https://github.com/bkaradzic/genie/blob/master/LICENSE)
-----------------------------------------------------------------
diff --git a/3rdparty/genie/build/gmake.darwin/genie.make b/3rdparty/genie/build/gmake.darwin/genie.make
index 2bcdf220196..d424a93c156 100644
--- a/3rdparty/genie/build/gmake.darwin/genie.make
+++ b/3rdparty/genie/build/gmake.darwin/genie.make
@@ -14,6 +14,9 @@ endif
ifeq (/bin,$(findstring /bin,$(SHELL)))
SHELLTYPE := posix
endif
+ifeq (/bin,$(findstring /bin,$(MAKESHELL)))
+ SHELLTYPE := posix
+endif
ifeq (posix,$(SHELLTYPE))
MKDIR = $(SILENT) mkdir -p "$(1)"
@@ -51,6 +54,7 @@ ifeq ($(config),release)
ALL_LDFLAGS += $(LDFLAGS) -L. -mmacosx-version-min=10.4
LDDEPS +=
LIBS += $(LDDEPS) -framework CoreServices
+ EXTERNAL_LIBS +=
LINKCMD = $(CC) -o $(TARGET) $(OBJECTS) $(RESOURCES) $(ARCH) $(ALL_LDFLAGS) $(LIBS)
OBJECTS := \
$(OBJDIR)/src/host/os_getcwd.o \
@@ -128,6 +132,7 @@ ifeq ($(config),debug)
ALL_LDFLAGS += $(LDFLAGS) -L. -mmacosx-version-min=10.4
LDDEPS +=
LIBS += $(LDDEPS) -framework CoreServices
+ EXTERNAL_LIBS +=
LINKCMD = $(CC) -o $(TARGET) $(OBJECTS) $(RESOURCES) $(ARCH) $(ALL_LDFLAGS) $(LIBS)
OBJECTS := \
$(OBJDIR)/src/host/os_getcwd.o \
@@ -206,6 +211,7 @@ ifeq ($(config),releaseuniv32)
ALL_LDFLAGS += $(LDFLAGS) -L. -arch i386 -arch ppc -mmacosx-version-min=10.4
LDDEPS +=
LIBS += $(LDDEPS) -framework CoreServices
+ EXTERNAL_LIBS +=
LINKCMD = $(CC) -o $(TARGET) $(OBJECTS) $(RESOURCES) $(ARCH) $(ALL_LDFLAGS) $(LIBS)
OBJECTS := \
$(OBJDIR)/src/host/os_getcwd.o \
@@ -284,6 +290,7 @@ ifeq ($(config),debuguniv32)
ALL_LDFLAGS += $(LDFLAGS) -L. -arch i386 -arch ppc -mmacosx-version-min=10.4
LDDEPS +=
LIBS += $(LDDEPS) -framework CoreServices
+ EXTERNAL_LIBS +=
LINKCMD = $(CC) -o $(TARGET) $(OBJECTS) $(RESOURCES) $(ARCH) $(ALL_LDFLAGS) $(LIBS)
OBJECTS := \
$(OBJDIR)/src/host/os_getcwd.o \
@@ -359,7 +366,7 @@ RESOURCES := \
all: $(OBJDIRS) prebuild prelink $(TARGET) | $(TARGETDIR)
@:
-$(TARGET): $(OBJDIRS) $(GCH) $(OBJECTS) $(LDDEPS) $(RESOURCES) | $(TARGETDIR)
+$(TARGET): $(GCH) $(OBJECTS) $(LDDEPS) $(EXTERNAL_LIBS) $(RESOURCES) | $(TARGETDIR) $(OBJDIRS)
@echo Linking genie
$(SILENT) $(LINKCMD)
$(POSTBUILDCMDS)
@@ -389,7 +396,7 @@ prelink:
$(PRELINKCMDS)
ifneq (,$(PCH))
-$(GCH): $(PCH)
+$(GCH): $(PCH) | $(OBJDIR)
@echo $(notdir $<)
$(SILENT) $(CC) $(ALL_CFLAGS) -x c-header $(DEFINES) $(INCLUDES) -o "$@" -c "$<"
endif
diff --git a/3rdparty/genie/build/gmake.linux/genie.make b/3rdparty/genie/build/gmake.linux/genie.make
index 101a999a603..5ec330896f0 100644
--- a/3rdparty/genie/build/gmake.linux/genie.make
+++ b/3rdparty/genie/build/gmake.linux/genie.make
@@ -14,6 +14,9 @@ endif
ifeq (/bin,$(findstring /bin,$(SHELL)))
SHELLTYPE := posix
endif
+ifeq (/bin,$(findstring /bin,$(MAKESHELL)))
+ SHELLTYPE := posix
+endif
ifeq (posix,$(SHELLTYPE))
MKDIR = $(SILENT) mkdir -p "$(1)"
@@ -51,6 +54,7 @@ ifeq ($(config),release)
ALL_LDFLAGS += $(LDFLAGS) -L. -s -rdynamic
LDDEPS +=
LIBS += $(LDDEPS) -ldl -lm
+ EXTERNAL_LIBS +=
LINKCMD = $(CC) -o $(TARGET) $(OBJECTS) $(RESOURCES) $(ARCH) $(ALL_LDFLAGS) $(LIBS)
OBJECTS := \
$(OBJDIR)/src/host/os_getcwd.o \
@@ -128,6 +132,7 @@ ifeq ($(config),debug)
ALL_LDFLAGS += $(LDFLAGS) -L. -rdynamic
LDDEPS +=
LIBS += $(LDDEPS) -ldl -lm
+ EXTERNAL_LIBS +=
LINKCMD = $(CC) -o $(TARGET) $(OBJECTS) $(RESOURCES) $(ARCH) $(ALL_LDFLAGS) $(LIBS)
OBJECTS := \
$(OBJDIR)/src/host/os_getcwd.o \
@@ -193,8 +198,8 @@ endif
OBJDIRS := \
$(OBJDIR) \
- $(OBJDIR)/src/host/lua-5.3.0/src \
$(OBJDIR)/src/host \
+ $(OBJDIR)/src/host/lua-5.3.0/src \
RESOURCES := \
@@ -203,7 +208,7 @@ RESOURCES := \
all: $(OBJDIRS) prebuild prelink $(TARGET) | $(TARGETDIR)
@:
-$(TARGET): $(OBJDIRS) $(GCH) $(OBJECTS) $(LDDEPS) $(RESOURCES) | $(TARGETDIR)
+$(TARGET): $(GCH) $(OBJECTS) $(LDDEPS) $(EXTERNAL_LIBS) $(RESOURCES) | $(TARGETDIR) $(OBJDIRS)
@echo Linking genie
$(SILENT) $(LINKCMD)
$(POSTBUILDCMDS)
@@ -233,7 +238,7 @@ prelink:
$(PRELINKCMDS)
ifneq (,$(PCH))
-$(GCH): $(PCH)
+$(GCH): $(PCH) | $(OBJDIR)
@echo $(notdir $<)
$(SILENT) $(CC) $(ALL_CFLAGS) -x c-header $(DEFINES) $(INCLUDES) -o "$@" -c "$<"
endif
diff --git a/3rdparty/genie/build/gmake.windows/genie.make b/3rdparty/genie/build/gmake.windows/genie.make
index 3c7a3ff5a73..02e5b88916c 100644
--- a/3rdparty/genie/build/gmake.windows/genie.make
+++ b/3rdparty/genie/build/gmake.windows/genie.make
@@ -14,6 +14,9 @@ endif
ifeq (/bin,$(findstring /bin,$(SHELL)))
SHELLTYPE := posix
endif
+ifeq (/bin,$(findstring /bin,$(MAKESHELL)))
+ SHELLTYPE := posix
+endif
ifeq (posix,$(SHELLTYPE))
MKDIR = $(SILENT) mkdir -p "$(1)"
@@ -51,6 +54,7 @@ ifeq ($(config),release)
ALL_LDFLAGS += $(LDFLAGS) -L. -s
LDDEPS +=
LIBS += $(LDDEPS) -lole32
+ EXTERNAL_LIBS +=
LINKCMD = $(CC) -o $(TARGET) $(OBJECTS) $(RESOURCES) $(ARCH) $(ALL_LDFLAGS) $(LIBS)
OBJECTS := \
$(OBJDIR)/src/host/os_getcwd.o \
@@ -128,6 +132,7 @@ ifeq ($(config),debug)
ALL_LDFLAGS += $(LDFLAGS) -L.
LDDEPS +=
LIBS += $(LDDEPS) -lole32
+ EXTERNAL_LIBS +=
LINKCMD = $(CC) -o $(TARGET) $(OBJECTS) $(RESOURCES) $(ARCH) $(ALL_LDFLAGS) $(LIBS)
OBJECTS := \
$(OBJDIR)/src/host/os_getcwd.o \
@@ -203,7 +208,7 @@ RESOURCES := \
all: $(OBJDIRS) prebuild prelink $(TARGET) | $(TARGETDIR)
@:
-$(TARGET): $(OBJDIRS) $(GCH) $(OBJECTS) $(LDDEPS) $(RESOURCES) | $(TARGETDIR)
+$(TARGET): $(GCH) $(OBJECTS) $(LDDEPS) $(EXTERNAL_LIBS) $(RESOURCES) | $(TARGETDIR) $(OBJDIRS)
@echo Linking genie
$(SILENT) $(LINKCMD)
$(POSTBUILDCMDS)
@@ -233,7 +238,7 @@ prelink:
$(PRELINKCMDS)
ifneq (,$(PCH))
-$(GCH): $(PCH)
+$(GCH): $(PCH) | $(OBJDIR)
@echo $(notdir $<)
$(SILENT) $(CC) $(ALL_CFLAGS) -x c-header $(DEFINES) $(INCLUDES) -o "$@" -c "$<"
endif
diff --git a/3rdparty/genie/src/actions/make/make_cpp.lua b/3rdparty/genie/src/actions/make/make_cpp.lua
index 795b74a491a..6eb0f54efc5 100644
--- a/3rdparty/genie/src/actions/make/make_cpp.lua
+++ b/3rdparty/genie/src/actions/make/make_cpp.lua
@@ -86,7 +86,7 @@
end
-- target build rule
- _p('$(TARGET): $(GCH) $(OBJECTS) $(LDDEPS) $(RESOURCES) | $(TARGETDIR) $(OBJDIRS)')
+ _p('$(TARGET): $(GCH) $(OBJECTS) $(LDDEPS) $(EXTERNAL_LIBS) $(RESOURCES) | $(TARGETDIR) $(OBJDIRS)')
if prj.kind == "StaticLib" then
if prj.msgarchiving then
@@ -385,6 +385,7 @@
_p(' LDDEPS +=%s', make.list(_MAKE.esc(premake.getlinks(cfg, "siblings", "fullpath"))))
_p(' LIBS += $(LDDEPS)%s', make.list(cc.getlinkflags(cfg)))
+ _p(' EXTERNAL_LIBS +=%s', make.list(cc.getlibfiles(cfg)))
if cfg.kind == "StaticLib" then
if (not prj.options.ArchiveSplit) then
diff --git a/3rdparty/genie/src/actions/vstudio/_vstudio.lua b/3rdparty/genie/src/actions/vstudio/_vstudio.lua
index 9dafd85aabc..d545d8eb6c2 100644
--- a/3rdparty/genie/src/actions/vstudio/_vstudio.lua
+++ b/3rdparty/genie/src/actions/vstudio/_vstudio.lua
@@ -37,7 +37,8 @@
PS3 = "PS3",
Xbox360 = "Xbox 360",
ARM = "ARM",
- Orbis = "Orbis"
+ Orbis = "Orbis",
+ Durango = "Durango",
}
diff --git a/3rdparty/genie/src/actions/vstudio/vs200x_vcproj.lua b/3rdparty/genie/src/actions/vstudio/vs200x_vcproj.lua
index 6bde4f98c39..8dee08db7aa 100644
--- a/3rdparty/genie/src/actions/vstudio/vs200x_vcproj.lua
+++ b/3rdparty/genie/src/actions/vstudio/vs200x_vcproj.lua
@@ -276,7 +276,7 @@
_p(4,'EnableFunctionLevelLinking="%s"', bool(true))
- if cfg.platform ~= "Xbox360" and cfg.platform ~= "x64" then
+ if cfg.platform ~= "Xbox360" and cfg.platform ~= "x64" and cfg.platform ~= "Durango" then
if cfg.flags.EnableSSE then
_p(4,'EnableEnhancedInstructionSet="1"')
elseif cfg.flags.EnableSSE2 then
diff --git a/3rdparty/genie/src/actions/vstudio/vs2010_vcxproj.lua b/3rdparty/genie/src/actions/vstudio/vs2010_vcxproj.lua
index a2be4f51f96..29b3299c48e 100644
--- a/3rdparty/genie/src/actions/vstudio/vs2010_vcxproj.lua
+++ b/3rdparty/genie/src/actions/vstudio/vs2010_vcxproj.lua
@@ -23,30 +23,42 @@
local function vs2010_globals(prj)
local action = premake.action.current()
_p(1,'<PropertyGroup Label="Globals">')
- _p(2,'<ProjectGuid>{%s}</ProjectGuid>',prj.uuid)
- _p(2,'<RootNamespace>%s</RootNamespace>',prj.name)
- local windowsTargetPlatformVersion = prj.windowstargetplatformversion or action.vstudio.windowsTargetPlatformVersion
- if windowsTargetPlatformVersion ~= nil then
- _p(2,'<WindowsTargetPlatformVersion>%s</WindowsTargetPlatformVersion>',windowsTargetPlatformVersion)
+ _p(2, '<ProjectGuid>{%s}</ProjectGuid>',prj.uuid)
+ _p(2, '<RootNamespace>%s</RootNamespace>',prj.name)
+ if vstudio.storeapp ~= "durango" then
+ local windowsTargetPlatformVersion = prj.windowstargetplatformversion or action.vstudio.windowsTargetPlatformVersion
+ if windowsTargetPlatformVersion ~= nil then
+ _p(2,'<WindowsTargetPlatformVersion>%s</WindowsTargetPlatformVersion>',windowsTargetPlatformVersion)
+
+ if windowsTargetPlatformVersion and string.startswith(windowsTargetPlatformVersion, "10.") then
+ _p(2,'<WindowsTargetPlatformMinVersion>%s</WindowsTargetPlatformMinVersion>', prj.windowstargetplatformminversion or "10.0.10240.0")
+ end
+ end
end
--if prj.flags is required as it is not set at project level for tests???
--vs200x generator seems to swap a config for the prj in test setup
if prj.flags and prj.flags.Managed then
- _p(2,'<TargetFrameworkVersion>v4.0</TargetFrameworkVersion>')
- _p(2,'<Keyword>ManagedCProj</Keyword>')
+ _p(2, '<TargetFrameworkVersion>v4.0</TargetFrameworkVersion>')
+ _p(2, '<Keyword>ManagedCProj</Keyword>')
elseif vstudio.iswinrt() then
- _p(2,'<DefaultLanguage>en-US</DefaultLanguage>')
- _p(2,'<MinimumVisualStudioVersion>12.0</MinimumVisualStudioVersion>')
- _p(2,'<AppContainerApplication>true</AppContainerApplication>')
- if vstudio.toolset == "v120_wp81" then
- _p(2,'<ApplicationType>Windows Phone</ApplicationType>')
+ _p(2, '<DefaultLanguage>en-US</DefaultLanguage>')
+ if vstudio.storeapp == "durango" then
+ _p(2, '<MinimumVisualStudioVersion>14.0</MinimumVisualStudioVersion>')
+ _p(2, '<TargetRuntime>Native</TargetRuntime>')
else
- _p(2,'<ApplicationType>Windows Store</ApplicationType>')
+ _p(2, '<AppContainerApplication>true</AppContainerApplication>')
+ _p(2, '<MinimumVisualStudioVersion>12.0</MinimumVisualStudioVersion>')
+ if vstudio.toolset == "v120_wp81" then
+ _p(2, '<ApplicationType>Windows Phone</ApplicationType>')
+ else
+ _p(2, '<ApplicationType>Windows Store</ApplicationType>')
+ end
+ _p(2, '<ApplicationTypeRevision>%s</ApplicationTypeRevision>', vstudio.storeapp)
end
- _p(2,'<ApplicationTypeRevision>%s</ApplicationTypeRevision>', vstudio.storeapp)
else
- _p(2,'<Keyword>Win32Proj</Keyword>')
+ _p(2, '<Keyword>Win32Proj</Keyword>')
end
+
_p(1,'</PropertyGroup>')
end
@@ -151,6 +163,14 @@
_p(2,'<IgnoreImportLibrary>%s</IgnoreImportLibrary>', tostring(ignore))
end
+ if cfg.platform == "Durango" then
+ _p(2, '<ReferencePath>$(Console_SdkLibPath);$(Console_SdkWindowsMetadataPath)</ReferencePath>')
+ _p(2, '<LibraryPath>$(Console_SdkLibPath)</LibraryPath>')
+ _p(2, '<LibraryWPath>$(Console_SdkLibPath);$(Console_SdkWindowsMetadataPath)</LibraryWPath>')
+ _p(2, '<IncludePath>$(Console_SdkIncludeRoot)</IncludePath>')
+ _p(2, '<ExecutablePath>$(Console_SdkRoot)bin;$(VCInstallDir)bin\\x86_amd64;$(VCInstallDir)bin;$(WindowsSDK_ExecutablePath_x86);$(VSInstallDir)Common7\\Tools\\bin;$(VSInstallDir)Common7\\tools;$(VSInstallDir)Common7\\ide;$(ProgramFiles)\\HTML Help Workshop;$(MSBuildToolsPath32);$(FxCopDir);$(PATH);</ExecutablePath>')
+ end
+
if cfg.kind ~= "StaticLib" then
_p(2,'<LinkIncremental>%s</LinkIncremental>', tostring(premake.config.isincrementallink(cfg)))
end
@@ -210,9 +230,9 @@
local function exceptions(cfg)
if cfg.flags.NoExceptions then
- _p(2,'<ExceptionHandling>false</ExceptionHandling>')
+ _p(3, '<ExceptionHandling>false</ExceptionHandling>')
elseif cfg.flags.SEH then
- _p(2,'<ExceptionHandling>Async</ExceptionHandling>')
+ _p(3, '<ExceptionHandling>Async</ExceptionHandling>')
--SEH is not required for Managed and is implied
end
end
@@ -231,7 +251,7 @@
end
end
- local function wchar_t_buildin(cfg)
+ local function wchar_t_builtin(cfg)
if cfg.flags.NativeWChar then
_p(3,'<TreatWChar_tAsBuiltInType>true</TreatWChar_tAsBuiltInType>')
elseif cfg.flags.NoNativeWChar then
@@ -329,7 +349,12 @@
_p(3,'<StringPooling>true</StringPooling>')
end
- _p(3,'<RuntimeLibrary>%s</RuntimeLibrary>', runtime(cfg))
+ if cfg.platform == "Durango" then
+ _p(3, '<CompileAsWinRT>false</CompileAsWinRT>')
+ else
+ _p(3,'<RuntimeLibrary>%s</RuntimeLibrary>', runtime(cfg))
+ end
+
_p(3,'<FunctionLevelLinking>true</FunctionLevelLinking>')
-- If we aren't running NoMultiprocessorCompilation and not wanting a minimal rebuild,
@@ -355,7 +380,7 @@
exceptions(cfg)
rtti(cfg)
calling_convention(cfg)
- wchar_t_buildin(cfg)
+ wchar_t_builtin(cfg)
sse(cfg)
floating_point(cfg)
debug_info(cfg)
@@ -451,8 +476,9 @@
_p(3,'<OutputFile>$(OutDir)%s</OutputFile>', cfg.buildtarget.name)
if #cfg.libdirs > 0 then
- _p(3,'<AdditionalLibraryDirectories>%s;%%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>',
- premake.esc(path.translate(table.concat(cfg.libdirs, ';'), '\\')))
+ _p(3,'<AdditionalLibraryDirectories>%s;%%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>'
+ , premake.esc(path.translate(table.concat(cfg.libdirs, ';'), '\\'))
+ )
end
if vc2010.config_type(cfg) == 'Application' and not cfg.flags.WinMain and not cfg.flags.Managed then
@@ -487,8 +513,13 @@
function vc2010.additionalDependencies(cfg)
local links = premake.getlinks(cfg, "system", "fullpath")
if #links > 0 then
- _p(3,'<AdditionalDependencies>%s;%%(AdditionalDependencies)</AdditionalDependencies>',
- table.concat(links, ";"))
+ _p(3,'<AdditionalDependencies>%s;%s</AdditionalDependencies>'
+ , table.concat(links, ";")
+ , iif(cfg.platform == "Durango"
+ , '$(XboxExtensionsDependencies)'
+ , '%(AdditionalDependencies)'
+ )
+ )
end
end
@@ -522,7 +553,8 @@
None = {},
ResourceCompile = {},
AppxManifest = {},
- Image = {}
+ Image = {},
+ DeploymentContent = {}
}
local foundAppxManifest = false
@@ -535,14 +567,13 @@
end
elseif path.isresourcefile(file.name) then
table.insert(sortedfiles.ResourceCompile, file)
+ elseif path.isappxmanifest(file.name) then
+ foundAppxManifest = true
+ table.insert(sortedfiles.AppxManifest, file)
+ elseif file.flags and table.icontains(file.flags, "DeploymentContent") then
+ table.insert(sortedfiles.DeploymentContent, file)
else
- local ext = path.getextension(file.name):lower()
- if ext == ".appxmanifest" then
- foundAppxManifest = true
- table.insert(sortedfiles.AppxManifest, file)
- else
- table.insert(sortedfiles.None, file)
- end
+ table.insert(sortedfiles.None, file)
end
end
@@ -582,6 +613,7 @@
vc2010.simplefilesgroup(prj, "ResourceCompile")
vc2010.simplefilesgroup(prj, "AppxManifest")
vc2010.deploymentcontentgroup(prj, "Image")
+ vc2010.deploymentcontentgroup(prj, "DeploymentContent", "None")
end
function vc2010.customtaskgroup(prj)
@@ -652,14 +684,20 @@
end
end
- function vc2010.deploymentcontentgroup(prj, section)
+ function vc2010.deploymentcontentgroup(prj, section, filetype)
+ if filetype == nil then
+ filetype = section
+ end
+
local files = vc2010.getfilegroup(prj, section)
if #files > 0 then
_p(1,'<ItemGroup>')
for _, file in ipairs(files) do
- _p(2,'<%s Include=\"%s\">', section, path.translate(file.name, "\\"))
+ _p(2,'<%s Include=\"%s\">', filetype, path.translate(file.name, "\\"))
+
_p(3,'<DeploymentContent>true</DeploymentContent>')
- _p(2,'</%s>', section)
+ _p(3,'<Link>%s</Link>', path.translate(file.vpath, "\\"))
+ _p(2,'</%s>', filetype)
end
_p(1,'</ItemGroup>')
end
@@ -684,6 +722,12 @@
_p(3, '<ObjectFileName>$(IntDir)%s.obj</ObjectFileName>'
, premake.esc(path.translate(path.trimdots(path.removeext(file.name))))
)
+
+ --For Windows Store Builds, if the file is .c we have to exclude it from /ZW compilation
+ if vstudio.iswinrt() and string.len(file.name) > 2 and string.sub(file.name, -2) == ".c" then
+ _p(3,'<CompileAsWinRT>FALSE</CompileAsWinRT>')
+ end
+
for _, cfginfo in ipairs(configs) do
if config_mappings[cfginfo] and translatedpath == config_mappings[cfginfo] then
_p(3,'<PrecompiledHeader '.. if_config_and_platform() .. '>Create</PrecompiledHeader>', premake.esc(cfginfo.name))
@@ -841,6 +885,8 @@
_p('<Package xmlns="http://schemas.microsoft.com/appx/2010/manifest" xmlns:m2="http://schemas.microsoft.com/appx/2013/manifest" xmlns:m3="http://schemas.microsoft.com/appx/2014/manifest" xmlns:mp="http://schemas.microsoft.com/appx/2014/phone/manifest">')
elseif vstudio.storeapp == "8.1" then
_p('<Package xmlns="http://schemas.microsoft.com/appx/2010/manifest" xmlns:m3="http://schemas.microsoft.com/appx/2013/manifest">')
+ elseif vstudio.storeapp == "durango" then
+ _p('<Package xmlns="http://schemas.microsoft.com/appx/2010/manifest" xmlns:mx="http://schemas.microsoft.com/appx/2013/xbox/manifest" IgnorableNamespaces="mx">')
else
_p('<Package xmlns="http://schemas.microsoft.com/appx/manifest/foundation/windows10" xmlns:mp="http://schemas.microsoft.com/appx/2014/phone/manifest" xmlns:m3="http://schemas.microsoft.com/appx/manifest/uap/windows10">')
end
@@ -860,14 +906,19 @@
_p(1,'</Properties>')
if vstudio.storeapp == "8.2" then
- _p(1,'<Dependencies>')
- _p(2,'<TargetDeviceFamily Name="Windows.Universal" MinVersion="10.0.10069.0" MaxVersionTested="10.0.10069.0" />')
- _p(1,'</Dependencies>')
+ _p(1, '<Dependencies>')
+ _p(2, '<TargetDeviceFamily Name="Windows.Universal" MinVersion="10.0.10069.0" MaxVersionTested="10.0.10069.0" />')
+ _p(1, '</Dependencies>')
+ elseif vstudio.storeapp == "durango" then
+ _p(1, '<Prerequisites>')
+ _p(2, '<OSMinVersion>6.2</OSMinVersion>')
+ _p(2, '<OSMaxVersionTested>6.2</OSMaxVersionTested>')
+ _p(1, '</Prerequisites>')
else
- _p(1,'<Prerequisites>')
- _p(2,'<OSMinVersion>6.3.0</OSMinVersion>')
- _p(2,'<OSMaxVersionTested>6.3.0</OSMaxVersionTested>')
- _p(1,'</Prerequisites>')
+ _p(1, '<Prerequisites>')
+ _p(2, '<OSMinVersion>6.3.0</OSMinVersion>')
+ _p(2, '<OSMaxVersionTested>6.3.0</OSMaxVersionTested>')
+ _p(1, '</Prerequisites>')
end
_p(1,'<Resources>')
@@ -878,19 +929,36 @@
_p(2,'<Application Id="App"')
_p(3,'Executable="$targetnametoken$.exe"')
_p(3,'EntryPoint="App">')
- _p(3,'<m3:VisualElements')
- _p(4,'DisplayName="Blah"')
- _p(4,'Square150x150Logo="Assets\\Logo.png"')
- if vstudio.toolset == "v120_wp81" or vstudio.storeapp == "8.2" then
- _p(4,'Square44x44Logo="Assets\\SmallLogo.png"')
+ if vstudio.storeapp == "durango" then
+ _p(3, '<VisualElements')
+ _p(4, 'DisplayName="GENie"')
+ _p(4, 'Logo="Assets\\Logo.png"')
+ _p(4, 'SmallLogo="Assets\\SmallLogo.png"')
+ _p(4, 'Description="GENie"')
+ _p(4, 'ForegroundText="light"')
+ _p(4, 'BackgroundColor="transparent">')
+ _p(5, '<SplashScreen Image="Assets\\SplashScreen.png" />')
+ _p(3, '</VisualElements>')
+ _p(3, '<Extensions>')
+ _p(4, '<mx:Extension Category="xbox.system.resources">')
+ _p(4, '<mx:XboxSystemResources />')
+ _p(4, '</mx:Extension>')
+ _p(3, '</Extensions>')
else
- _p(4,'Square30x30Logo="Assets\\SmallLogo.png"')
+ _p(3, '<m3:VisualElements')
+ _p(4, 'DisplayName="GENie"')
+ _p(4, 'Square150x150Logo="Assets\\Logo.png"')
+ if vstudio.toolset == "v120_wp81" or vstudio.storeapp == "8.2" then
+ _p(4, 'Square44x44Logo="Assets\\SmallLogo.png"')
+ else
+ _p(4, 'Square30x30Logo="Assets\\SmallLogo.png"')
+ end
+ _p(4, 'Description="GENie"')
+ _p(4, 'ForegroundText="light"')
+ _p(4, 'BackgroundColor="transparent">')
+ _p(4, '<m3:SplashScreen Image="%s" />', path.getname(vstudio.splashpath))
+ _p(3, '</m3:VisualElements>')
end
- _p(4,'Description="Blah"')
- _p(4,'ForegroundText="light"')
- _p(4,'BackgroundColor="transparent">')
- _p(4,'<m3:SplashScreen Image="%s" />', path.getname(vstudio.splashpath))
- _p(3,'</m3:VisualElements>')
_p(2,'</Application>')
_p(1,'</Applications>')
diff --git a/3rdparty/genie/src/actions/vstudio/vs2010_vcxproj_filters.lua b/3rdparty/genie/src/actions/vstudio/vs2010_vcxproj_filters.lua
index 18e6578fe6d..ba68571f314 100644
--- a/3rdparty/genie/src/actions/vstudio/vs2010_vcxproj_filters.lua
+++ b/3rdparty/genie/src/actions/vstudio/vs2010_vcxproj_filters.lua
@@ -82,8 +82,13 @@
-- "ResourceCompile", or "None".
--
- function vc2010.filefiltergroup(prj, section)
+ function vc2010.filefiltergroup(prj, section, kind)
local files = vc2010.getfilegroup(prj, section) or {}
+
+ if kind == nill then
+ kind = section
+ end
+
if (section == "CustomBuild") then
for _, custombuildtask in ipairs(prj.custombuildtask or {}) do
for _, buildtask in ipairs(custombuildtask or {}) do
@@ -105,11 +110,11 @@
end
if filter ~= "." then
- _p(2,'<%s Include=\"%s\">', section, path.translate(file.name, "\\"))
+ _p(2,'<%s Include=\"%s\">', kind, path.translate(file.name, "\\"))
_p(3,'<Filter>%s</Filter>', path.translate(filter, "\\"))
- _p(2,'</%s>', section)
+ _p(2,'</%s>', kind)
else
- _p(2,'<%s Include=\"%s\" />', section, path.translate(file.name, "\\"))
+ _p(2,'<%s Include=\"%s\" />', kind, path.translate(file.name, "\\"))
end
end
_p(1,'</ItemGroup>')
@@ -130,5 +135,8 @@
vc2010.filefiltergroup(prj, "ClCompile")
vc2010.filefiltergroup(prj, "ResourceCompile")
vc2010.filefiltergroup(prj, "CustomBuild")
+ vc2010.filefiltergroup(prj, "AppxManifest")
+ vc2010.filefiltergroup(prj, "Image")
+ vc2010.filefiltergroup(prj, "DeploymentContent", "None")
_p('</Project>')
end
diff --git a/3rdparty/genie/src/base/api.lua b/3rdparty/genie/src/base/api.lua
index 09976de941a..f784209b677 100644
--- a/3rdparty/genie/src/base/api.lua
+++ b/3rdparty/genie/src/base/api.lua
@@ -139,6 +139,7 @@
ATL = 1,
DebugEnvsDontMerge = 1,
DebugEnvsInherit = 1,
+ DeploymentContent = 1,
EnableMinimalRebuild = 1,
EnableSSE = 1,
EnableSSE2 = 1,
@@ -216,10 +217,16 @@
kind = "string",
scope = "project",
},
+
+ windowstargetplatformminversion =
+ {
+ kind = "string",
+ scope = "project",
+ },
forcedincludes =
{
- kind = "absolutefilelist",
+ kind = "list",
scope = "config",
},
diff --git a/3rdparty/genie/src/base/bake.lua b/3rdparty/genie/src/base/bake.lua
index 0c4a7473ee3..ab50612671d 100644
--- a/3rdparty/genie/src/base/bake.lua
+++ b/3rdparty/genie/src/base/bake.lua
@@ -724,9 +724,21 @@
end
-- build configuration objects for all files
+ -- TODO: can I build this as a tree instead, and avoid the extra
+ -- step of building it later?
cfg.__fileconfigs = { }
for _, fname in ipairs(cfg.files) do
- local fcfg = { }
+ cfg.terms.required = fname:lower()
+ local fcfg = {}
+ for _, blk in ipairs(cfg.project.blocks) do
+ if (premake.iskeywordsmatch(blk.keywords, cfg.terms)) then
+ mergeobject(fcfg, blk)
+ end
+ end
+
+ -- add indexed by name and integer
+ -- TODO: when everything is converted to trees I won't need
+ -- to index by name any longer
fcfg.name = fname
cfg.__fileconfigs[fname] = fcfg
table.insert(cfg.__fileconfigs, fcfg)
diff --git a/3rdparty/genie/src/base/cmdline.lua b/3rdparty/genie/src/base/cmdline.lua
index e186ac3eaf2..6e135785a9c 100644
--- a/3rdparty/genie/src/base/cmdline.lua
+++ b/3rdparty/genie/src/base/cmdline.lua
@@ -9,7 +9,7 @@
-- Built-in command line options
--
- newoption
+ newoption
{
trigger = "cc",
value = "VALUE",
@@ -39,13 +39,13 @@
value = "FILE",
description = "Read FILE as a Premake script; default is 'premake4.lua'"
}
-
+
newoption
{
trigger = "help",
description = "Display this information"
}
-
+
newoption
{
trigger = "os",
@@ -71,24 +71,25 @@
{ "universal", "Mac OS X Universal, 32- and 64-bit" },
{ "universal32", "Mac OS X Universal, 32-bit only" },
{ "universal64", "Mac OS X Universal, 64-bit only" },
- { "ps3", "Playstation 3 (experimental)" },
+ { "ps3", "Playstation 3" },
{ "orbis", "Playstation 4" },
- { "xbox360", "Xbox 360 (experimental)" },
+ { "xbox360", "Xbox 360" },
+ { "durango", "Xbox One" },
{ "ARM", "ARM" },
{ "PowerPC", "PowerPC" },
}
}
-
+
newoption
{
trigger = "scripts",
value = "path",
description = "Search for additional scripts on the given path"
}
-
+
newoption
{
trigger = "version",
description = "Display version information"
}
-
+
diff --git a/3rdparty/genie/src/base/globals.lua b/3rdparty/genie/src/base/globals.lua
index 436aadd1469..9e1182d96fe 100644
--- a/3rdparty/genie/src/base/globals.lua
+++ b/3rdparty/genie/src/base/globals.lua
@@ -3,43 +3,43 @@
-- Global tables and variables, replacements and extensions to Lua's global functions.
-- Copyright (c) 2002-2009 Jason Perkins and the Premake project
--
-
-
+
+
-- A top-level namespace for support functions
premake = { }
-
+
-- The list of supported platforms; also update list in cmdline.lua
- premake.platforms =
+ premake.platforms =
{
- Native =
- {
+ Native =
+ {
cfgsuffix = "",
},
- x32 =
- {
+ x32 =
+ {
cfgsuffix = "32",
},
- x64 =
- {
+ x64 =
+ {
cfgsuffix = "64",
},
- Universal =
- {
+ Universal =
+ {
cfgsuffix = "univ",
},
- Universal32 =
- {
+ Universal32 =
+ {
cfgsuffix = "univ32",
},
- Universal64 =
- {
+ Universal64 =
+ {
cfgsuffix = "univ64",
},
- PS3 =
- {
+ PS3 =
+ {
cfgsuffix = "ps3",
iscrosscompiler = true,
nosharedlibs = true,
@@ -51,8 +51,8 @@
iscrosscompiler = true,
namestyle = "PS3",
},
- Xbox360 =
- {
+ Xbox360 =
+ {
cfgsuffix = "xbox360",
iscrosscompiler = true,
namestyle = "windows",
@@ -67,13 +67,20 @@
cfgsuffix = "ARM",
iscrosscompiler = true,
},
- Orbis =
- {
+ Orbis =
+ {
cfgsuffix = "orbis",
iscrosscompiler = true,
nosharedlibs = true, -- @thendrix, Fix this to allow SPRXs
namestyle = "Orbis",
},
+ Durango =
+ {
+ cfgsuffix = "durango",
+ iscrosscompiler = true,
+ nosharedlibs = true,
+ namestyle = "windows",
+ },
}
@@ -100,14 +107,14 @@
-- use the absolute path to the script file, to avoid any file name
-- ambiguity if an error should arise
_SCRIPT = path.getabsolute(fname)
-
+
-- switch the working directory to the new script location
local newcwd = path.getdirectory(_SCRIPT)
os.chdir(newcwd)
-
+
-- run the chunk. How can I catch variable return values?
local a, b, c, d, e, f = builtin_dofile(_SCRIPT)
-
+
-- restore the previous working directory when done
_SCRIPT = oldfile
os.chdir(oldcwd)
@@ -127,9 +134,9 @@
return falseval
end
end
-
-
-
+
+
+
--
-- A shortcut for including another build file, often used for projects.
--
@@ -139,7 +146,7 @@
if dir ~= nil then
return dofile(dir .. "/" .. name)
end
-
+
return nil
end
@@ -154,14 +161,14 @@
print(string.format(msg, table.unpack(arg)))
end
-
-
+
+
--
-- An extension to type() to identify project object types by reading the
-- "__type" field from the metatable.
--
- local builtin_type = type
+ local builtin_type = type
function type(t)
local mt = getmetatable(t)
if (mt) then
@@ -171,4 +178,4 @@
end
return builtin_type(t)
end
- \ No newline at end of file
+
diff --git a/3rdparty/genie/src/base/path.lua b/3rdparty/genie/src/base/path.lua
index 92346db644d..ee0a928fab3 100644
--- a/3rdparty/genie/src/base/path.lua
+++ b/3rdparty/genie/src/base/path.lua
@@ -222,6 +222,11 @@
return table.contains(extensions, ext)
end
+ function path.isappxmanifest(fname)
+ local extensions = { ".appxmanifest" }
+ local ext = path.getextension(fname):lower()
+ return table.contains(extensions, ext)
+ end
--
diff --git a/3rdparty/genie/src/host/scripts.c b/3rdparty/genie/src/host/scripts.c
index 148cd4bc97b..bb67db9cada 100644
--- a/3rdparty/genie/src/host/scripts.c
+++ b/3rdparty/genie/src/host/scripts.c
@@ -13,9 +13,9 @@ const char* builtin_scripts[] = {
/* base/path.lua */
"function path.getabsolute(p)\np = path.translate(p, \"/\")\nif (p == \"\") then p = \".\" end\nlocal result = iif (path.isabsolute(p), nil, os.getcwd())\nfor n, part in ipairs(p:explode(\"/\", true)) do\nif (part == \"\" and n == 1) then\nresult = \"/\"\nelseif (part == \"..\") then\nresult = path.getdirectory(result)\nelseif (part ~= \".\") then\nif (part:startswith(\"$\") and n > 1) then\nresult = result .. \"/\" .. part\nelse\nresult = path.join(result, part)\nend\nend\nend\nresult = iif(result:endswith(\"/\"), result:sub(1, -2), result)\nreturn result\nend\nfunction path.getbasename(p)\nlocal name = path.getname(p)\nlocal i = name:findlast(\".\", true)\nif (i) then\nreturn name:sub(1, i - 1)\nelse\nreturn name\nend\nend\nfunction path.removeext(name)\nlocal i = name:findlast(\".\", true)\nif (i) then\nreturn name:sub(1, i - 1)\nelse\nreturn name\nend\nend\nfunction path.getdirectory(p)\nlocal i = p:findlast(\"/\", true)\nif (i) then\nif i > 1 then i = i - 1 end\nreturn p:sub(1, i)\nelse\nreturn \".\"\nend"
"\nend\nfunction path.getdrive(p)\nlocal ch1 = p:sub(1,1)\nlocal ch2 = p:sub(2,2)\nif ch2 == \":\" then\nreturn ch1\nend\nend\nfunction path.getextension(p)\nlocal i = p:findlast(\".\", true)\nif (i) then\nreturn p:sub(i)\nelse\nreturn \"\"\nend\nend\nfunction path.getname(p)\nlocal i = p:findlast(\"[/\\\\]\")\nif (i) then\nreturn p:sub(i + 1)\nelse\nreturn p\nend\nend\nfunction path.getrelative(src, dst)\nsrc = path.getabsolute(src)\ndst = path.getabsolute(dst)\nif (src == dst) then\nreturn \".\"\nend\nif dst:startswith(\"$\") then\nreturn dst\nend\nsrc = src .. \"/\"\ndst = dst .. \"/\"\nlocal idx = 0\nwhile (true) do\nlocal tst = src:find(\"/\", idx + 1, true)\nif tst then\nif src:sub(1,tst) == dst:sub(1,tst) then\nidx = tst\nelse\nbreak\nend\nelse\nbreak\nend\nend\nlocal first = src:find(\"/\", 0, true)\nif idx <= first then\nreturn dst:sub(1, -2)\nend\nsrc = src:sub(idx + 1)\ndst = dst:sub(idx + 1)\nlocal result = \"\"\nidx = src:find(\"/\")\nwhile (idx) do\nresult = result .. \"../\"\nidx = src:find(\"/\""
- ", idx + 1)\nend\nresult = result .. dst\nreturn result:sub(1, -2)\nend\nfunction path.iscfile(fname)\nlocal extensions = { \".c\", \".s\", \".m\" }\nlocal ext = path.getextension(fname):lower()\nreturn table.contains(extensions, ext)\nend\nfunction path.iscppfile(fname)\nlocal extensions = { \".cc\", \".cpp\", \".cxx\", \".c\", \".s\", \".m\", \".mm\" }\nlocal ext = path.getextension(fname):lower()\nreturn table.contains(extensions, ext)\nend\nfunction path.isobjcfile(fname)\nlocal extensions = { \".m\", \".mm\" }\nlocal ext = path.getextension(fname):lower()\nreturn table.contains(extensions, ext)\nend\nfunction path.iscppheader(fname)\nlocal extensions = { \".h\", \".hh\", \".hpp\", \".hxx\" }\nlocal ext = path.getextension(fname):lower()\nreturn table.contains(extensions, ext)\nend\nfunction path.isresourcefile(fname)\nlocal extensions = { \".rc\" }\nlocal ext = path.getextension(fname):lower()\nreturn table.contains(extensions, ext)\nend\nfunction path.join(...)\nlocal arg={...}\nlocal numargs = select(\"#"
- "\", ...)\nif numargs == 0 then\nreturn \"\";\nend\nlocal allparts = {}\nfor i = numargs, 1, -1 do\nlocal part = select(i, ...)\nif part and #part > 0 and part ~= \".\" then\nwhile part:endswith(\"/\") do\npart = part:sub(1, -2)\nend\ntable.insert(allparts, 1, part)\nif path.isabsolute(part) then\nbreak\nend\nend\nend\nreturn table.concat(allparts, \"/\")\nend\nfunction path.rebase(p, oldbase, newbase)\np = path.getabsolute(path.join(oldbase, p))\np = path.getrelative(newbase, p)\nreturn p\nend\nfunction path.translate(p, sep)\nif (type(p) == \"table\") then\nlocal result = { }\nfor _, value in ipairs(p) do\ntable.insert(result, path.translate(value))\nend\nreturn result\nelse\nif (not sep) then\nif (os.is(\"windows\")) then\nsep = \"\\\\\"\nelse\nsep = \"/\"\nend\nend\nlocal result = p:gsub(\"[/\\\\]\", sep)\nreturn result\nend\nend\nfunction path.wildcards(pattern)\npattern = pattern:gsub(\"([%+%.%-%^%$%(%)%%])\", \"%%%1\")\npattern = pattern:gsub(\"%*%*\", \"\\001\")\npattern = pattern:gsub(\"%*\", \"\\002\""
- ")\npattern = pattern:gsub(\"\\001\", \".*\")\npattern = pattern:gsub(\"\\002\", \"[^/]*\")\nreturn pattern\nend\nfunction path.trimdots(p)\nlocal changed\nrepeat\nchanged = true\nif p:startswith(\"./\") then\np = p:sub(3)\nelseif p:startswith(\"../\") then\np = p:sub(4)\nelse\nchanged = false\nend\nuntil not changed\nreturn p\nend\n",
+ ", idx + 1)\nend\nresult = result .. dst\nreturn result:sub(1, -2)\nend\nfunction path.iscfile(fname)\nlocal extensions = { \".c\", \".s\", \".m\" }\nlocal ext = path.getextension(fname):lower()\nreturn table.contains(extensions, ext)\nend\nfunction path.iscppfile(fname)\nlocal extensions = { \".cc\", \".cpp\", \".cxx\", \".c\", \".s\", \".m\", \".mm\" }\nlocal ext = path.getextension(fname):lower()\nreturn table.contains(extensions, ext)\nend\nfunction path.isobjcfile(fname)\nlocal extensions = { \".m\", \".mm\" }\nlocal ext = path.getextension(fname):lower()\nreturn table.contains(extensions, ext)\nend\nfunction path.iscppheader(fname)\nlocal extensions = { \".h\", \".hh\", \".hpp\", \".hxx\" }\nlocal ext = path.getextension(fname):lower()\nreturn table.contains(extensions, ext)\nend\nfunction path.isappxmanifest(fname)\nlocal extensions = { \".appxmanifest\" }\nlocal ext = path.getextension(fname):lower()\nreturn table.contains(extensions, ext)\nend\nfunction path.isresourcefile(fname)\nlocal extensions = { "
+ "\".rc\" }\nlocal ext = path.getextension(fname):lower()\nreturn table.contains(extensions, ext)\nend\nfunction path.join(...)\nlocal arg={...}\nlocal numargs = select(\"#\", ...)\nif numargs == 0 then\nreturn \"\";\nend\nlocal allparts = {}\nfor i = numargs, 1, -1 do\nlocal part = select(i, ...)\nif part and #part > 0 and part ~= \".\" then\nwhile part:endswith(\"/\") do\npart = part:sub(1, -2)\nend\ntable.insert(allparts, 1, part)\nif path.isabsolute(part) then\nbreak\nend\nend\nend\nreturn table.concat(allparts, \"/\")\nend\nfunction path.rebase(p, oldbase, newbase)\np = path.getabsolute(path.join(oldbase, p))\np = path.getrelative(newbase, p)\nreturn p\nend\nfunction path.translate(p, sep)\nif (type(p) == \"table\") then\nlocal result = { }\nfor _, value in ipairs(p) do\ntable.insert(result, path.translate(value))\nend\nreturn result\nelse\nif (not sep) then\nif (os.is(\"windows\")) then\nsep = \"\\\\\"\nelse\nsep = \"/\"\nend\nend\nlocal result = p:gsub(\"[/\\\\]\", sep)\nreturn result\nend\nend\nfunction "
+ "path.wildcards(pattern)\npattern = pattern:gsub(\"([%+%.%-%^%$%(%)%%])\", \"%%%1\")\npattern = pattern:gsub(\"%*%*\", \"\\001\")\npattern = pattern:gsub(\"%*\", \"\\002\")\npattern = pattern:gsub(\"\\001\", \".*\")\npattern = pattern:gsub(\"\\002\", \"[^/]*\")\nreturn pattern\nend\nfunction path.trimdots(p)\nlocal changed\nrepeat\nchanged = true\nif p:startswith(\"./\") then\np = p:sub(3)\nelseif p:startswith(\"../\") then\np = p:sub(4)\nelse\nchanged = false\nend\nuntil not changed\nreturn p\nend\n",
/* base/string.lua */
"function string.explode(s, pattern, plain)\nif (pattern == '') then return false end\nlocal pos = 0\nlocal arr = { }\nfor st,sp in function() return s:find(pattern, pos, plain) end do\ntable.insert(arr, s:sub(pos, st-1))\npos = sp + 1\nend\ntable.insert(arr, s:sub(pos))\nreturn arr\nend\nfunction string.findlast(s, pattern, plain)\nlocal curr = 0\nrepeat\nlocal next = s:find(pattern, curr + 1, plain)\nif (next) then curr = next end\nuntil (not next)\nif (curr > 0) then\nreturn curr\nend\nend\nfunction string.startswith(haystack, needle)\nreturn (haystack:find(needle, 1, true) == 1)\nend\n",
@@ -28,8 +28,9 @@ const char* builtin_scripts[] = {
"function io.capture()\nio.captured = ''\nend\nfunction io.endcapture()\nlocal captured = io.captured\nio.captured = nil\nreturn captured\nend\nlocal builtin_open = io.open\nfunction io.open(fname, mode)\nif (mode) then\nif (mode:find(\"w\")) then\nlocal dir = path.getdirectory(fname)\nok, err = os.mkdir(dir)\nif (not ok) then\nerror(err, 0)\nend\nend\nend\nreturn builtin_open(fname, mode)\nend\nfunction io.printf(msg, ...)\nlocal arg={...}\nif not io.eol then\nio.eol = \"\\n\"\nend\nif not io.indent then\nio.indent = \"\\t\"\nend\nif type(msg) == \"number\" then\ns = string.rep(io.indent, msg) .. string.format(table.unpack(arg))\nelse\ns = string.format(msg, table.unpack(arg))\nend\nif io.captured then\nio.captured = io.captured .. s .. io.eol\nelse\nio.write(s)\nio.write(io.eol)\nend\nend\n_p = io.printf\n",
/* base/globals.lua */
- "premake = { }\npremake.platforms = \n{\nNative = \n{ \ncfgsuffix = \"\",\n},\nx32 = \n{ \ncfgsuffix = \"32\",\n},\nx64 = \n{ \ncfgsuffix = \"64\",\n},\nUniversal = \n{ \ncfgsuffix = \"univ\",\n},\nUniversal32 = \n{ \ncfgsuffix = \"univ32\",\n},\nUniversal64 = \n{ \ncfgsuffix = \"univ64\",\n},\nPS3 = \n{ \ncfgsuffix = \"ps3\",\niscrosscompiler = true,\nnosharedlibs = true,\nnamestyle = \"PS3\",\n},\nWiiDev =\n{\ncfgsuffix = \"wii\",\niscrosscompiler = true,\nnamestyle = \"PS3\",\n},\nXbox360 = \n{ \ncfgsuffix = \"xbox360\",\niscrosscompiler = true,\nnamestyle = \"windows\",\n},\nPowerPC =\n{\ncfgsuffix = \"ppc\",\niscrosscompiler = true,\n},\nARM =\n{\ncfgsuffix = \"ARM\",\niscrosscompiler = true,\n},\nOrbis = \n{ \ncfgsuffix = \"orbis\",\niscrosscompiler = true,\nnosharedlibs = true, -- @thendrix, Fix this to allow SPRXs\nnamestyle = \"Orbis\",\n},\n}\nlocal builtin_dofile = dofile\nfunction dofile(fname)\nlo"
- "cal oldcwd = os.getcwd()\nlocal oldfile = _SCRIPT\nif (not os.isfile(fname)) then\nlocal path = os.pathsearch(fname, _OPTIONS[\"scripts\"], os.getenv(\"PREMAKE_PATH\"))\nif (path) then\nfname = path..\"/\"..fname\nend\nend\n_SCRIPT = path.getabsolute(fname)\nlocal newcwd = path.getdirectory(_SCRIPT)\nos.chdir(newcwd)\nlocal a, b, c, d, e, f = builtin_dofile(_SCRIPT)\n_SCRIPT = oldfile\nos.chdir(oldcwd)\nreturn a, b, c, d, e, f\nend\nfunction iif(expr, trueval, falseval)\nif (expr) then\nreturn trueval\nelse\nreturn falseval\nend\nend\nfunction include(fname)\nlocal dir, name = premake.findDefaultScript(fname, false)\nif dir ~= nil then\nreturn dofile(dir .. \"/\" .. name)\nend\nreturn nil\nend\nfunction printf(msg, ...)\nlocal arg={...}\nprint(string.format(msg, table.unpack(arg)))\nend\nlocal builtin_type = type\nfunction type(t)\nlocal mt = getmetatable(t)\nif (mt) then\nif (mt.__type) then\nreturn mt.__type\nend\nend\nreturn builtin_type(t)\nend\n",
+ "premake = { }\npremake.platforms =\n{\nNative =\n{\ncfgsuffix = \"\",\n},\nx32 =\n{\ncfgsuffix = \"32\",\n},\nx64 =\n{\ncfgsuffix = \"64\",\n},\nUniversal =\n{\ncfgsuffix = \"univ\",\n},\nUniversal32 =\n{\ncfgsuffix = \"univ32\",\n},\nUniversal64 =\n{\ncfgsuffix = \"univ64\",\n},\nPS3 =\n{\ncfgsuffix = \"ps3\",\niscrosscompiler = true,\nnosharedlibs = true,\nnamestyle = \"PS3\",\n},\nWiiDev =\n{\ncfgsuffix = \"wii\",\niscrosscompiler = true,\nnamestyle = \"PS3\",\n},\nXbox360 =\n{\ncfgsuffix = \"xbox360\",\niscrosscompiler = true,\nnamestyle = \"windows\",\n},\nPowerPC =\n{\ncfgsuffix = \"ppc\",\niscrosscompiler = true,\n},\nARM =\n{\ncfgsuffix = \"ARM\",\niscrosscompiler = true,\n},\nOrbis =\n{\ncfgsuffix = \"orbis\",\niscrosscompiler = true,\nnosharedlibs = true, -- @thendrix, Fix this to allow SPRXs\nnamestyle = \"Orbis\",\n},\nDurango =\n{\ncfgsuffix = \"durango\",\niscrosscompiler = true,\nnoshared"
+ "libs = true,\nnamestyle = \"windows\",\n},\n}\nlocal builtin_dofile = dofile\nfunction dofile(fname)\nlocal oldcwd = os.getcwd()\nlocal oldfile = _SCRIPT\nif (not os.isfile(fname)) then\nlocal path = os.pathsearch(fname, _OPTIONS[\"scripts\"], os.getenv(\"PREMAKE_PATH\"))\nif (path) then\nfname = path..\"/\"..fname\nend\nend\n_SCRIPT = path.getabsolute(fname)\nlocal newcwd = path.getdirectory(_SCRIPT)\nos.chdir(newcwd)\nlocal a, b, c, d, e, f = builtin_dofile(_SCRIPT)\n_SCRIPT = oldfile\nos.chdir(oldcwd)\nreturn a, b, c, d, e, f\nend\nfunction iif(expr, trueval, falseval)\nif (expr) then\nreturn trueval\nelse\nreturn falseval\nend\nend\nfunction include(fname)\nlocal dir, name = premake.findDefaultScript(fname, false)\nif dir ~= nil then\nreturn dofile(dir .. \"/\" .. name)\nend\nreturn nil\nend\nfunction printf(msg, ...)\nlocal arg={...}\nprint(string.format(msg, table.unpack(arg)))\nend\nlocal builtin_type = type\nfunction type(t)\nlocal mt = getmetatable(t)\nif (mt) then\nif (mt.__type) then\nretur"
+ "n mt.__type\nend\nend\nreturn builtin_type(t)\nend\n",
/* base/action.lua */
"premake.action = { }\npremake.action.list = { }\nfunction premake.action.add(a)\nlocal missing\nfor _, field in ipairs({\"description\", \"trigger\"}) do\nif (not a[field]) then\nmissing = field\nend\nend\nif (missing) then\nerror(\"action needs a \" .. missing, 3)\nend\npremake.action.list[a.trigger] = a\nend\nfunction premake.action.call(name)\nlocal a = premake.action.list[name]\nfor sln in premake.solution.each() do\nif a.onsolution then\na.onsolution(sln)\nend\nfor prj in premake.solution.eachproject(sln) do\nif a.onproject then\na.onproject(prj)\nend\nend\nend\nif a.execute then\na.execute()\nend\nend\nfunction premake.action.current()\nreturn premake.action.get(_ACTION)\nend\nfunction premake.action.get(name)\nreturn premake.action.list[name]\nend\nfunction premake.action.each()\nlocal keys = { }\nfor _, action in pairs(premake.action.list) do\ntable.insert(keys, action.trigger)\nend\ntable.sort(keys)\nlocal i = 0\nreturn function()\ni = i + 1\nreturn premake.action.list[keys[i]]\nend\nend\nfunction pre"
@@ -77,29 +78,29 @@ const char* builtin_scripts[] = {
" entries and apply their usage project data\n -- to the given configuration. It will copy compiling information for the projects that are\n -- not listed as linkage-only. It will copy the linking information for projects only if\n -- the source project is not a static library. It won't copy linking information\n -- if the project is in this solution; instead it will add that project to the configuration's\n -- links field, expecting that Premake will handle the rest.\n --\n local function copyusagedata(cfg, cfgname, linkToProjs)\n local myPrj = cfg.project;\n local bIsStaticLib = (getCfgKind(cfg) == \"StaticLib\");\n for prjName, prjEntry in pairs(linkToProjs) do\n local srcPrj = prjEntry.usageProj;\n local srcCfg = srcPrj.__configs[cfgname];\n for name, field in pairs(premake.fields) do\n if(srcCfg[name]) then\n if(field.usagecopy) then\n if(not prjEntry.bLinkageOnly) then\n copydependentfield(srcCfg, cfg, name)\n end\n elseif(field.linkagecopy) then\n --Copy the linkage data if we're buil"
"ding a non-static thing\n --and this is a pure usage project. If it's not pure-usage, then\n --we will simply put the project's name in the links field later.\n if((not bIsStaticLib) and (not prjEntry.proj)) then\n copydependentfield(srcCfg, cfg, name)\n end\n end\n end\n end\n if((not bIsStaticLib) and prjEntry.proj) then\n table.insert(cfg.links, prjEntry.proj.name);\n end\n end\n end\nfunction premake.bake.buildconfigs()\nfor sln in premake.solution.each() do\nfor _, prj in ipairs(sln.projects) do\nprj.location = prj.location or sln.location or prj.basedir\nadjustpaths(prj.location, prj)\nfor _, blk in ipairs(prj.blocks) do\nadjustpaths(prj.location, blk)\nend\nend\nsln.location = sln.location or sln.basedir\nend\nfor sln in premake.solution.each() do\nlocal basis = collapse(sln)\nfor _, prj in ipairs(sln.projects) do\nprj.__configs = collapse(prj, basis)\nfor _, cfg in pairs(prj.__configs) do\nbake.postprocess(prj, cfg)\nend\nend\nend\nfor sln in premake.solution.each() do\nfor prjIx, prj in i"
"pairs(sln.projects) do\nif(not prj.usage) then\nfor cfgname, cfg in pairs(prj.__configs) do\nlocal usesPrjs = getprojectsconnections(cfg, cfgname);\ncopyusagedata(cfg, cfgname, usesPrjs)\nend\nend\nend\nend\nfor sln in premake.solution.each() do\nlocal removeList = {};\nfor index, prj in ipairs(sln.projects) do\nif(prj.usage) then\ntable.insert(removeList, 1, index); --Add in reverse order.\nend\nend\nfor _, index in ipairs(removeList) do\ntable.remove(sln.projects, index);\nend\nend\nbuilduniquedirs()\nbuildtargets(cfg)\nend\nfunction premake.bake.postprocess(prj, cfg)\ncfg.project = prj\ncfg.shortname = premake.getconfigname(cfg.name, cfg.platform, true)\ncfg.longname = premake.getconfigname(cfg.name, cfg.platform)\ncfg.location = cfg.location or cfg.basedir\nlocal platform = premake.platforms[cfg.platform]\nif platform.iscrosscompiler then\ncfg.system = cfg.platform\nelse\ncfg.system = os.get()\nend\nif cfg.kind == \"SharedLib\" and platform.nosharedlibs then\ncfg.kind = \"StaticLib\"\nend\nlocal removef"
- "iles = cfg.removefiles\nif _ACTION == 'gmake' then\nremovefiles = table.join(removefiles, cfg.excludes)\nend\nlocal files = {}\nfor _, fname in ipairs(cfg.files) do\nif not table.icontains(removefiles, fname) then\ntable.insert(files, fname)\nend\nend\ncfg.files = files\nfor name, field in pairs(premake.fields) do\nif field.isflags then\nlocal values = cfg[name]\nfor _, flag in ipairs(values) do values[flag] = true end\nend\nend\ncfg.__fileconfigs = { }\nfor _, fname in ipairs(cfg.files) do\nlocal fcfg = { }\nfcfg.name = fname\ncfg.__fileconfigs[fname] = fcfg\ntable.insert(cfg.__fileconfigs, fcfg)\nend\nend\n",
+ "iles = cfg.removefiles\nif _ACTION == 'gmake' then\nremovefiles = table.join(removefiles, cfg.excludes)\nend\nlocal files = {}\nfor _, fname in ipairs(cfg.files) do\nif not table.icontains(removefiles, fname) then\ntable.insert(files, fname)\nend\nend\ncfg.files = files\nfor name, field in pairs(premake.fields) do\nif field.isflags then\nlocal values = cfg[name]\nfor _, flag in ipairs(values) do values[flag] = true end\nend\nend\ncfg.__fileconfigs = { }\nfor _, fname in ipairs(cfg.files) do\ncfg.terms.required = fname:lower()\nlocal fcfg = {}\nfor _, blk in ipairs(cfg.project.blocks) do\nif (premake.iskeywordsmatch(blk.keywords, cfg.terms)) then\nmergeobject(fcfg, blk)\nend\nend\nfcfg.name = fname\ncfg.__fileconfigs[fname] = fcfg\ntable.insert(cfg.__fileconfigs, fcfg)\nend\nend\n",
/* base/api.lua */
"premake.fields =\n{\narchivesplit_size =\n{\nkind = \"string\",\nscope = \"config\",\n},\nbasedir =\n{\nkind = \"path\",\nscope = \"container\",\n},\nbuildaction =\n{\nkind = \"string\",\nscope = \"config\",\nallowed = {\n\"Compile\",\n\"Copy\",\n\"Embed\",\n\"None\"\n}\n},\nbuildoptions =\n{\nkind = \"list\",\nscope = \"config\",\n},\nbuildoptions_c =\n{\nkind = \"list\",\nscope = \"config\",\n},\nbuildoptions_cpp =\n{\nkind = \"list\",\nscope = \"config\",\n},\nbuildoptions_objc =\n{\nkind = \"list\",\nscope = \"config\",\n},\nconfigurations =\n{\nkind = \"list\",\nscope = \"solution\",\n},\ncustombuildtask =\n{\nkind = \"table\",\nscope = \"config\",\n},\ndebugargs =\n{\nkind = \"list\",\nscope = \"config\",\n},\ndebugdir =\n{\nkind = \"path\",\nscope = \"config\",\n},\ndebugenvs =\n{\nkind = \"list\",\nscope = \"config\",\n},\ndefines =\n{\nkind = \"list\",\nscope = \"config\",\n},\ndeploymentoptions =\n{\nkind = \"list\",\nscope = \"config\",\nusagecopy = true,\n},\ndependency =\n{\nkind = \""
- "table\",\nscope = \"config\",\n},\nexcludes =\n{\nkind = \"filelist\",\nscope = \"config\",\n},\nfiles =\n{\nkind = \"filelist\",\nscope = \"config\",\n},\nremovefiles =\n{\nkind = \"filelist\",\nscope = \"config\",\n},\nflags =\n{\nkind = \"list\",\nscope = \"config\",\nisflags = true,\nusagecopy = true,\nallowed = function(value)\nlocal allowed_flags = {\nATL = 1,\nDebugEnvsDontMerge = 1,\nDebugEnvsInherit = 1,\nEnableMinimalRebuild = 1,\nEnableSSE = 1,\nEnableSSE2 = 1,\nExtraWarnings = 1,\nFatalWarnings = 1,\nFloatFast = 1,\nFloatStrict = 1,\nManaged = 1,\nMFC = 1,\nNativeWChar = 1,\nNo64BitChecks = 1,\nNoEditAndContinue = 1,\nNoExceptions = 1,\nNoFramePointer = 1,\nNoImportLib = 1,\nNoIncrementalLink = 1,\nNoManifest = 1,\nNoMultiProcessorCompilation = 1,\nNoNativeWChar = 1,\nNoPCH = 1,\nNoRTTI = 1,\nFastCall = 1,\nStdCall = 1,\nSingleOutputDir = 1,\nOptimize = 1,\nOptimizeSize = 1,\nOptimizeSpeed = 1,\nDebugRuntime = 1,\nReleaseRuntime = 1,\nSEH = 1,\nStaticATL = 1,\nStaticRuntime = 1,\nSymbols = 1,\n"
- "Unicode = 1,\nUnsafe = 1,\nUnsignedChar = 1,\nWinMain = 1,\n}\nlocal englishToAmericanSpelling =\n{\noptimise = 'optimize',\noptimisesize = 'optimizesize',\noptimisespeed = 'optimizespeed',\n}\nlocal lowervalue = value:lower()\nlowervalue = englishToAmericanSpelling[lowervalue] or lowervalue\nfor v, _ in pairs(allowed_flags) do\nif v:lower() == lowervalue then\nreturn v\nend\nend\nreturn nil, \"invalid flag\"\nend,\n},\nframework =\n{\nkind = \"string\",\nscope = \"container\",\nallowed = {\n\"1.0\",\n\"1.1\",\n\"2.0\",\n\"3.0\",\n\"3.5\",\n\"4.0\",\n\"4.5\",\n}\n},\nwindowstargetplatformversion =\n{\nkind = \"string\",\nscope = \"project\",\n},\nforcedincludes =\n{\nkind = \"absolutefilelist\",\nscope = \"config\",\n},\nimagepath =\n{\nkind = \"path\",\nscope = \"config\",\n},\nimageoptions =\n{\nkind = \"list\",\nscope = \"config\",\n},\nimplibdir =\n{\nkind = \"path\",\nscope = \"config\",\n},\nimplibextension =\n{\nkind = \"string\",\nscope = \"config\",\n},\nimplibname =\n{\nkind = \"string\",\nscop"
- "e = \"config\",\n},\nimplibprefix =\n{\nkind = \"string\",\nscope = \"config\",\n},\nimplibsuffix =\n{\nkind = \"string\",\nscope = \"config\",\n},\nincludedirs =\n{\nkind = \"dirlist\",\nscope = \"config\",\nusagecopy = true,\n},\nkind =\n{\nkind = \"string\",\nscope = \"config\",\nallowed = {\n\"ConsoleApp\",\n\"WindowedApp\",\n\"StaticLib\",\n\"SharedLib\"\n}\n},\nlanguage =\n{\nkind = \"string\",\nscope = \"container\",\nallowed = {\n\"C\",\n\"C++\",\n\"C#\"\n}\n},\nlibdirs =\n{\nkind = \"dirlist\",\nscope = \"config\",\nlinkagecopy = true,\n},\nlinkoptions =\n{\nkind = \"list\",\nscope = \"config\",\n},\nlinks =\n{\nkind = \"list\",\nscope = \"config\",\nallowed = function(value)\nif value:find('/', nil, true) then\nvalue = path.getabsolute(value)\nend\nreturn value\nend,\nlinkagecopy = true,\n},\nlocation =\n{\nkind = \"path\",\nscope = \"container\",\n},\nmakesettings =\n{\nkind = \"list\",\nscope = \"config\",\n},\nmessageskip =\n{\nkind = \"list\",\nscope = \"solution\",\nisflags = true,\nus"
- "agecopy = true,\nallowed = function(value)\nlocal allowed_messages = {\nSkipCreatingMessage = 1,\nSkipBuildingMessage = 1,\nSkipCleaningMessage = 1,\n}\nlocal lowervalue = value:lower()\nfor v, _ in pairs(allowed_messages) do\nif v:lower() == lowervalue then\nreturn v\nend\nend\nreturn nil, \"invalid message to skip\"\nend,\n},\nmsgarchiving =\n{\nkind = \"string\",\nscope = \"config\",\n},\nmsgcompile =\n{\nkind = \"string\",\nscope = \"config\",\n},\nmsgprecompile =\n{\nkind = \"string\",\nscope = \"config\",\n},\nmsgcompile_objc =\n{\nkind = \"string\",\nscope = \"config\",\n},\nmsgresource =\n{\nkind = \"string\",\nscope = \"config\",\n},\nmsglinking =\n{\nkind = \"string\",\nscope = \"config\",\n},\nobjdir =\n{\nkind = \"path\",\nscope = \"config\",\n},\noptions =\n{\nkind = \"list\",\nscope = \"container\",\nisflags = true,\nusagecopy = true,\nallowed = function(value)\nlocal allowed_options = {\nForceCPP = 1,\nArchiveSplit = 1\n}\nlocal lowervalue = value:lower()\nfor v, _ in pairs(allowed_optio"
- "ns) do\nif v:lower() == lowervalue then\nreturn v\nend\nend\nreturn nil, \"invalid option\"\nend,\n},\npchheader =\n{\nkind = \"string\",\nscope = \"config\",\n},\npchsource =\n{\nkind = \"path\",\nscope = \"config\",\n},\nplatforms =\n{\nkind = \"list\",\nscope = \"solution\",\nallowed = table.keys(premake.platforms),\n},\npostbuildcommands =\n{\nkind = \"list\",\nscope = \"config\",\n},\nprebuildcommands =\n{\nkind = \"list\",\nscope = \"config\",\n},\npostcompiletasks =\n{\nkind = \"list\",\nscope = \"config\",\n},\nprelinkcommands =\n{\nkind = \"list\",\nscope = \"config\",\n},\nresdefines =\n{\nkind = \"list\",\nscope = \"config\",\n},\nresincludedirs =\n{\nkind = \"dirlist\",\nscope = \"config\",\n},\nresoptions =\n{\nkind = \"list\",\nscope = \"config\",\n},\nstartproject =\n{\nkind = \"string\",\nscope = \"solution\",\n},\ntargetdir =\n{\nkind = \"path\",\nscope = \"config\",\n},\ntargetsubdir =\n{\nkind = \"string\",\nscope = \"config\",\n},\ntargetextension =\n{\nkind = \"string\",\nsco"
- "pe = \"config\",\n},\ntargetname =\n{\nkind = \"string\",\nscope = \"config\",\n},\ntargetprefix =\n{\nkind = \"string\",\nscope = \"config\",\n},\ntargetsuffix =\n{\nkind = \"string\",\nscope = \"config\",\n},\ntrimpaths =\n{\nkind = \"dirlist\",\nscope = \"config\",\n},\nuuid =\n{\nkind = \"string\",\nscope = \"container\",\nallowed = function(value)\nlocal ok = true\nif (#value ~= 36) then ok = false end\nfor i=1,36 do\nlocal ch = value:sub(i,i)\nif (not ch:find(\"[ABCDEFabcdef0123456789-]\")) then ok = false end\nend\nif (value:sub(9,9) ~= \"-\") then ok = false end\nif (value:sub(14,14) ~= \"-\") then ok = false end\nif (value:sub(19,19) ~= \"-\") then ok = false end\nif (value:sub(24,24) ~= \"-\") then ok = false end\nif (not ok) then\nreturn nil, \"invalid UUID\"\nend\nreturn value:upper()\nend\n},\nuses =\n{\nkind = \"list\",\nscope = \"config\",\n},\nvpaths =\n{\nkind = \"keypath\",\nscope = \"container\",\n},\n}\npremake.check_paths = false\nfunction premake.checkvalue(value, allowed)\nif (all"
- "owed) then\nif (type(allowed) == \"function\") then\nreturn allowed(value)\nelse\nfor _,v in ipairs(allowed) do\nif (value:lower() == v:lower()) then\nreturn v\nend\nend\nreturn nil, \"invalid value '\" .. value .. \"'\"\nend\nelse\nreturn value\nend\nend\nfunction premake.getobject(t)\nlocal container\nif (t == \"container\" or t == \"solution\") then\ncontainer = premake.CurrentContainer\nelse\ncontainer = premake.CurrentConfiguration\nend\nif t == \"solution\" then\nif type(container) == \"project\" then\ncontainer = container.solution\nend\nif type(container) ~= \"solution\" then\ncontainer = nil\nend\nend\nlocal msg\nif (not container) then\nif (t == \"container\") then\nmsg = \"no active solution or project\"\nelseif (t == \"solution\") then\nmsg = \"no active solution\"\nelse\nmsg = \"no active solution, project, or configuration\"\nend\nend\nreturn container, msg\nend\nfunction premake.setarray(obj, fieldname, value, allowed)\nobj[fieldname] = obj[fieldname] or {}\nlocal function add(value, depth)\nif "
- "type(value) == \"table\" then\nfor _,v in ipairs(value) do\nadd(v, depth + 1)\nend\nelse\nvalue, err = premake.checkvalue(value, allowed)\nif not value then\nerror(err, depth)\nend\ntable.insert(obj[fieldname], value)\nend\nend\nif value then\nadd(value, 5)\nend\nreturn obj[fieldname]\nend\nfunction premake.settable(obj, fieldname, value, allowed)\nobj[fieldname] = obj[fieldname] or {}\ntable.insert(obj[fieldname], value)\nreturn obj[fieldname]\nend\nlocal function domatchedarray(ctype, fieldname, value, matchfunc)\nlocal result = { }\nfunction makeabsolute(value, depth)\nif (type(value) == \"table\") then\nfor _, item in ipairs(value) do\nmakeabsolute(item, depth + 1)\nend\nelseif type(value) == \"string\" then\nif value:find(\"*\") then\nlocal arr = matchfunc(value);\nif (premake.check_paths) and (#arr == 0) then\nerror(\"Can't find matching files for pattern :\" .. value)\nend\nmakeabsolute(arr, depth + 1)\nelse\ntable.insert(result, path.getabsolute(value))\nend\nelse\nerror(\"Invalid value in list: expect"
- "ed string, got \" .. type(value), depth)\nend\nend\nmakeabsolute(value, 3)\nreturn premake.setarray(ctype, fieldname, result)\nend\nfunction premake.setdirarray(ctype, fieldname, value)\nreturn domatchedarray(ctype, fieldname, value, os.matchdirs)\nend\nfunction premake.setfilearray(ctype, fieldname, value)\nreturn domatchedarray(ctype, fieldname, value, os.matchfiles)\nend\nfunction premake.setkeyvalue(ctype, fieldname, values)\nlocal container, err = premake.getobject(ctype)\nif not container then\nerror(err, 4)\nend\nif not container[fieldname] then\ncontainer[fieldname] = {}\nend\nif type(values) ~= \"table\" then\nerror(\"invalid value; table expected\", 4)\nend\nlocal field = container[fieldname]\nfor key,value in pairs(values) do\nif not field[key] then\nfield[key] = {}\nend\ntable.insertflat(field[key], value)\nend\nreturn field\nend\nfunction premake.setstring(ctype, fieldname, value, allowed)\nlocal container, err = premake.getobject(ctype)\nif (not container) then\nerror(err, 4)\nend\nif (value) the"
- "n\nvalue, err = premake.checkvalue(value, allowed)\nif (not value) then\nerror(err, 4)\nend\ncontainer[fieldname] = value\nend\nreturn container[fieldname]\nend\nfunction premake.remove(fieldname, value)\nlocal cfg = premake.CurrentConfiguration\ncfg.removes = cfg.removes or {}\ncfg.removes[fieldname] = premake.setarray(cfg.removes, fieldname, value)\nend\nlocal function accessor(name, value)\nlocal kind = premake.fields[name].kind\nlocal scope = premake.fields[name].scope\nlocal allowed = premake.fields[name].allowed\nif (kind == \"string\" or kind == \"path\") and value then\nif type(value) ~= \"string\" then\nerror(\"string value expected\", 3)\nend\nend\nlocal container, err = premake.getobject(scope)\nif (not container) then\nerror(err, 3)\nend\nif kind == \"string\" then\nreturn premake.setstring(scope, name, value, allowed)\nelseif kind == \"path\" then\nif value then value = path.getabsolute(value) end\nreturn premake.setstring(scope, name, value)\nelseif kind == \"list\" then\nreturn premake.seta"
- "rray(container, name, value, allowed)\nelseif kind == \"table\" then\nreturn premake.settable(container, name, value, allowed)\nelseif kind == \"dirlist\" then\nreturn premake.setdirarray(container, name, value)\nelseif kind == \"filelist\" or kind == \"absolutefilelist\" then\nreturn premake.setfilearray(container, name, value)\nelseif kind == \"keyvalue\" or kind == \"keypath\" then\nreturn premake.setkeyvalue(scope, name, value)\nend\nend\nfor name, info in pairs(premake.fields) do\n_G[name] = function(value)\nreturn accessor(name, value)\nend\nif info.kind == \"list\"\nor info.kind == \"dirlist\"\nor info.kind == \"filelist\"\nor info.kind == \"absolutefilelist\"\nthen\nif name ~= \"removefiles\"\nand name ~= \"files\" then\n_G[\"remove\"..name] = function(value)\npremake.remove(name, value)\nend\nend\nend\nend\nfunction configuration(terms)\nif not terms then\nreturn premake.CurrentConfiguration\nend\nlocal container, err = premake.getobject(\"container\")\nif (not container) then\nerror(err, 2)\nend\nlo"
- "cal cfg = { }\ncfg.terms = table.flatten({terms})\ntable.insert(container.blocks, cfg)\npremake.CurrentConfiguration = cfg\ncfg.keywords = { }\nfor _, word in ipairs(cfg.terms) do\ntable.insert(cfg.keywords, path.wildcards(word):lower())\nend\nfor name, field in pairs(premake.fields) do\nif (field.kind ~= \"string\" and field.kind ~= \"path\") then\ncfg[name] = { }\nend\nend\nreturn cfg\nend\nlocal function creategroup(name, sln, curpath, parent, inpath)\nlocal group = {}\nsetmetatable(group, {\n__type = \"group\"\n})\ntable.insert(sln.groups, group)\nsln.groups[inpath] = group\ngroup.solution = sln\ngroup.name = name\ngroup.uuid = os.uuid(curpath)\ngroup.parent = parent\nreturn group\nend\nlocal function creategroupsfrompath(inpath, sln)\nif inpath == nil then return nil end\ninpath = path.translate(inpath, \"/\")\nlocal groups = string.explode(inpath, \"/\")\nlocal curpath = \"\"\nlocal lastgroup = nil\nfor i, v in ipairs(groups) do\ncurpath = curpath .. \"/\" .. v:lower()\nlocal group = sln.groups[curpath]"
- "\nif group == nil then\ngroup = creategroup(v, sln, curpath, lastgroup, curpath)\nend\nlastgroup = group\nend\nreturn lastgroup\nend\nlocal function createproject(name, sln, isUsage)\nlocal prj = {}\nsetmetatable(prj, {\n__type = \"project\",\n})\ntable.insert(sln.projects, prj)\nif(isUsage) then\nif(sln.projects[name]) then\nsln.projects[name].usageProj = prj;\nelse\nsln.projects[name] = prj\nend\nelse\nif(sln.projects[name]) then\nprj.usageProj = sln.projects[name];\nend\nsln.projects[name] = prj\nend\nlocal group = creategroupsfrompath(premake.CurrentGroup, sln)\nprj.solution = sln\nprj.name = name\nprj.basedir = os.getcwd()\nprj.uuid = os.uuid(prj.name)\nprj.blocks = { }\nprj.usage = isUsage\nprj.group = group\nreturn prj;\nend\nfunction usage(name)\nif (not name) then\nif(type(premake.CurrentContainer) ~= \"project\") then return nil end\nif(not premake.CurrentContainer.usage) then return nil end\nreturn premake.CurrentContainer\nend\nlocal sln\ni"
- "f (type(premake.CurrentContainer) == \"project\") then\nsln = premake.CurrentContainer.solution\nelse\nsln = premake.CurrentContainer\nend\nif (type(sln) ~= \"solution\") then\nerror(\"no active solution\", 2)\nend\nif((not sln.projects[name]) or\n((not sln.projects[name].usage) and (not sln.projects[name].usageProj))) then\npremake.CurrentContainer = createproject(name, sln, true)\nelse\npremake.CurrentContainer = iff(sln.projects[name].usage,\nsln.projects[name], sln.projects[name].usageProj)\nend\nconfiguration { }\nreturn premake.CurrentContainer\nend\nfunction project(name)\nif (not name) then\nif(type(premake.CurrentContainer) ~= \"project\") then return nil end\nif(premake.CurrentContainer.usage) then return nil end\nreturn premake.CurrentContainer\nend\nlocal sln\nif (type(premake.CurrentContainer) == \"project\") then\nsln = premake.CurrentContainer.solution\nelse\nsln = premake.CurrentContainer\nend\nif (type(sln) ~= \"solution\") then\nerror(\"no active solution\", 2)\nend\nif((not sln.projects[name"
- "]) or sln.projects[name].usage) then\npremake.CurrentContainer = createproject(name, sln)\nelse\npremake.CurrentContainer = sln.projects[name];\nend\nconfiguration { }\nreturn premake.CurrentContainer\nend\nfunction solution(name)\nif not name then\nif type(premake.CurrentContainer) == \"project\" then\nreturn premake.CurrentContainer.solution\nelse\nreturn premake.CurrentContainer\nend\nend\npremake.CurrentContainer = premake.solution.get(name)\nif (not premake.CurrentContainer) then\npremake.CurrentContainer = premake.solution.new(name)\nend\nconfiguration { }\nreturn premake.CurrentContainer\nend\nfunction group(name)\nif not name then\nreturn premake.CurrentGroup\nend\npremake.CurrentGroup = name\nreturn premake.CurrentGroup\nend\nfunction newaction(a)\npremake.action.add(a)\nend\nfunction newoption(opt)\npremake.option.add(opt)\nend\n",
+ "table\",\nscope = \"config\",\n},\nexcludes =\n{\nkind = \"filelist\",\nscope = \"config\",\n},\nfiles =\n{\nkind = \"filelist\",\nscope = \"config\",\n},\nremovefiles =\n{\nkind = \"filelist\",\nscope = \"config\",\n},\nflags =\n{\nkind = \"list\",\nscope = \"config\",\nisflags = true,\nusagecopy = true,\nallowed = function(value)\nlocal allowed_flags = {\nATL = 1,\nDebugEnvsDontMerge = 1,\nDebugEnvsInherit = 1,\nDeploymentContent = 1,\nEnableMinimalRebuild = 1,\nEnableSSE = 1,\nEnableSSE2 = 1,\nExtraWarnings = 1,\nFatalWarnings = 1,\nFloatFast = 1,\nFloatStrict = 1,\nManaged = 1,\nMFC = 1,\nNativeWChar = 1,\nNo64BitChecks = 1,\nNoEditAndContinue = 1,\nNoExceptions = 1,\nNoFramePointer = 1,\nNoImportLib = 1,\nNoIncrementalLink = 1,\nNoManifest = 1,\nNoMultiProcessorCompilation = 1,\nNoNativeWChar = 1,\nNoPCH = 1,\nNoRTTI = 1,\nFastCall = 1,\nStdCall = 1,\nSingleOutputDir = 1,\nOptimize = 1,\nOptimizeSize = 1,\nOptimizeSpeed = 1,\nDebugRuntime = 1,\nReleaseRuntime = 1,\nSEH = 1,\nStaticATL = 1,\nStaticRunt"
+ "ime = 1,\nSymbols = 1,\nUnicode = 1,\nUnsafe = 1,\nUnsignedChar = 1,\nWinMain = 1,\n}\nlocal englishToAmericanSpelling =\n{\noptimise = 'optimize',\noptimisesize = 'optimizesize',\noptimisespeed = 'optimizespeed',\n}\nlocal lowervalue = value:lower()\nlowervalue = englishToAmericanSpelling[lowervalue] or lowervalue\nfor v, _ in pairs(allowed_flags) do\nif v:lower() == lowervalue then\nreturn v\nend\nend\nreturn nil, \"invalid flag\"\nend,\n},\nframework =\n{\nkind = \"string\",\nscope = \"container\",\nallowed = {\n\"1.0\",\n\"1.1\",\n\"2.0\",\n\"3.0\",\n\"3.5\",\n\"4.0\",\n\"4.5\",\n}\n},\nwindowstargetplatformversion =\n{\nkind = \"string\",\nscope = \"project\",\n},\nwindowstargetplatformminversion =\n{\nkind = \"string\",\nscope = \"project\",\n},\nforcedincludes =\n{\nkind = \"list\",\nscope = \"config\",\n},\nimagepath =\n{\nkind = \"path\",\nscope = \"config\",\n},\nimageoptions =\n{\nkind = \"list\",\nscope = \"config\",\n},\nimplibdir =\n{\nkind = \"path\",\nscope = \"config\",\n},\nimplibextensio"
+ "n =\n{\nkind = \"string\",\nscope = \"config\",\n},\nimplibname =\n{\nkind = \"string\",\nscope = \"config\",\n},\nimplibprefix =\n{\nkind = \"string\",\nscope = \"config\",\n},\nimplibsuffix =\n{\nkind = \"string\",\nscope = \"config\",\n},\nincludedirs =\n{\nkind = \"dirlist\",\nscope = \"config\",\nusagecopy = true,\n},\nkind =\n{\nkind = \"string\",\nscope = \"config\",\nallowed = {\n\"ConsoleApp\",\n\"WindowedApp\",\n\"StaticLib\",\n\"SharedLib\"\n}\n},\nlanguage =\n{\nkind = \"string\",\nscope = \"container\",\nallowed = {\n\"C\",\n\"C++\",\n\"C#\"\n}\n},\nlibdirs =\n{\nkind = \"dirlist\",\nscope = \"config\",\nlinkagecopy = true,\n},\nlinkoptions =\n{\nkind = \"list\",\nscope = \"config\",\n},\nlinks =\n{\nkind = \"list\",\nscope = \"config\",\nallowed = function(value)\nif value:find('/', nil, true) then\nvalue = path.getabsolute(value)\nend\nreturn value\nend,\nlinkagecopy = true,\n},\nlocation =\n{\nkind = \"path\",\nscope = \"container\",\n},\nmakesettings =\n{\nkind = \"list\",\nscope = "
+ "\"config\",\n},\nmessageskip =\n{\nkind = \"list\",\nscope = \"solution\",\nisflags = true,\nusagecopy = true,\nallowed = function(value)\nlocal allowed_messages = {\nSkipCreatingMessage = 1,\nSkipBuildingMessage = 1,\nSkipCleaningMessage = 1,\n}\nlocal lowervalue = value:lower()\nfor v, _ in pairs(allowed_messages) do\nif v:lower() == lowervalue then\nreturn v\nend\nend\nreturn nil, \"invalid message to skip\"\nend,\n},\nmsgarchiving =\n{\nkind = \"string\",\nscope = \"config\",\n},\nmsgcompile =\n{\nkind = \"string\",\nscope = \"config\",\n},\nmsgprecompile =\n{\nkind = \"string\",\nscope = \"config\",\n},\nmsgcompile_objc =\n{\nkind = \"string\",\nscope = \"config\",\n},\nmsgresource =\n{\nkind = \"string\",\nscope = \"config\",\n},\nmsglinking =\n{\nkind = \"string\",\nscope = \"config\",\n},\nobjdir =\n{\nkind = \"path\",\nscope = \"config\",\n},\noptions =\n{\nkind = \"list\",\nscope = \"container\",\nisflags = true,\nusagecopy = true,\nallowed = function(value)\nlocal allowed_options = {\nForce"
+ "CPP = 1,\nArchiveSplit = 1\n}\nlocal lowervalue = value:lower()\nfor v, _ in pairs(allowed_options) do\nif v:lower() == lowervalue then\nreturn v\nend\nend\nreturn nil, \"invalid option\"\nend,\n},\npchheader =\n{\nkind = \"string\",\nscope = \"config\",\n},\npchsource =\n{\nkind = \"path\",\nscope = \"config\",\n},\nplatforms =\n{\nkind = \"list\",\nscope = \"solution\",\nallowed = table.keys(premake.platforms),\n},\npostbuildcommands =\n{\nkind = \"list\",\nscope = \"config\",\n},\nprebuildcommands =\n{\nkind = \"list\",\nscope = \"config\",\n},\npostcompiletasks =\n{\nkind = \"list\",\nscope = \"config\",\n},\nprelinkcommands =\n{\nkind = \"list\",\nscope = \"config\",\n},\nresdefines =\n{\nkind = \"list\",\nscope = \"config\",\n},\nresincludedirs =\n{\nkind = \"dirlist\",\nscope = \"config\",\n},\nresoptions =\n{\nkind = \"list\",\nscope = \"config\",\n},\nstartproject =\n{\nkind = \"string\",\nscope = \"solution\",\n},\ntargetdir =\n{\nkind = \"path\",\nscope = \"config\",\n},\ntargetsubdir ="
+ "\n{\nkind = \"string\",\nscope = \"config\",\n},\ntargetextension =\n{\nkind = \"string\",\nscope = \"config\",\n},\ntargetname =\n{\nkind = \"string\",\nscope = \"config\",\n},\ntargetprefix =\n{\nkind = \"string\",\nscope = \"config\",\n},\ntargetsuffix =\n{\nkind = \"string\",\nscope = \"config\",\n},\ntrimpaths =\n{\nkind = \"dirlist\",\nscope = \"config\",\n},\nuuid =\n{\nkind = \"string\",\nscope = \"container\",\nallowed = function(value)\nlocal ok = true\nif (#value ~= 36) then ok = false end\nfor i=1,36 do\nlocal ch = value:sub(i,i)\nif (not ch:find(\"[ABCDEFabcdef0123456789-]\")) then ok = false end\nend\nif (value:sub(9,9) ~= \"-\") then ok = false end\nif (value:sub(14,14) ~= \"-\") then ok = false end\nif (value:sub(19,19) ~= \"-\") then ok = false end\nif (value:sub(24,24) ~= \"-\") then ok = false end\nif (not ok) then\nreturn nil, \"invalid UUID\"\nend\nreturn value:upper()\nend\n},\nuses =\n{\nkind = \"list\",\nscope = \"config\",\n},\nvpaths =\n{\nkind = \"keypath\",\nscope = \"conta"
+ "iner\",\n},\n}\npremake.check_paths = false\nfunction premake.checkvalue(value, allowed)\nif (allowed) then\nif (type(allowed) == \"function\") then\nreturn allowed(value)\nelse\nfor _,v in ipairs(allowed) do\nif (value:lower() == v:lower()) then\nreturn v\nend\nend\nreturn nil, \"invalid value '\" .. value .. \"'\"\nend\nelse\nreturn value\nend\nend\nfunction premake.getobject(t)\nlocal container\nif (t == \"container\" or t == \"solution\") then\ncontainer = premake.CurrentContainer\nelse\ncontainer = premake.CurrentConfiguration\nend\nif t == \"solution\" then\nif type(container) == \"project\" then\ncontainer = container.solution\nend\nif type(container) ~= \"solution\" then\ncontainer = nil\nend\nend\nlocal msg\nif (not container) then\nif (t == \"container\") then\nmsg = \"no active solution or project\"\nelseif (t == \"solution\") then\nmsg = \"no active solution\"\nelse\nmsg = \"no active solution, project, or configuration\"\nend\nend\nreturn container, msg\nend\nfunction premake.setarray(obj, fieldna"
+ "me, value, allowed)\nobj[fieldname] = obj[fieldname] or {}\nlocal function add(value, depth)\nif type(value) == \"table\" then\nfor _,v in ipairs(value) do\nadd(v, depth + 1)\nend\nelse\nvalue, err = premake.checkvalue(value, allowed)\nif not value then\nerror(err, depth)\nend\ntable.insert(obj[fieldname], value)\nend\nend\nif value then\nadd(value, 5)\nend\nreturn obj[fieldname]\nend\nfunction premake.settable(obj, fieldname, value, allowed)\nobj[fieldname] = obj[fieldname] or {}\ntable.insert(obj[fieldname], value)\nreturn obj[fieldname]\nend\nlocal function domatchedarray(ctype, fieldname, value, matchfunc)\nlocal result = { }\nfunction makeabsolute(value, depth)\nif (type(value) == \"table\") then\nfor _, item in ipairs(value) do\nmakeabsolute(item, depth + 1)\nend\nelseif type(value) == \"string\" then\nif value:find(\"*\") then\nlocal arr = matchfunc(value);\nif (premake.check_paths) and (#arr == 0) then\nerror(\"Can't find matching files for pattern :\" .. value)\nend\nmakeabsolute(arr, depth + 1)\nelse"
+ "\ntable.insert(result, path.getabsolute(value))\nend\nelse\nerror(\"Invalid value in list: expected string, got \" .. type(value), depth)\nend\nend\nmakeabsolute(value, 3)\nreturn premake.setarray(ctype, fieldname, result)\nend\nfunction premake.setdirarray(ctype, fieldname, value)\nreturn domatchedarray(ctype, fieldname, value, os.matchdirs)\nend\nfunction premake.setfilearray(ctype, fieldname, value)\nreturn domatchedarray(ctype, fieldname, value, os.matchfiles)\nend\nfunction premake.setkeyvalue(ctype, fieldname, values)\nlocal container, err = premake.getobject(ctype)\nif not container then\nerror(err, 4)\nend\nif not container[fieldname] then\ncontainer[fieldname] = {}\nend\nif type(values) ~= \"table\" then\nerror(\"invalid value; table expected\", 4)\nend\nlocal field = container[fieldname]\nfor key,value in pairs(values) do\nif not field[key] then\nfield[key] = {}\nend\ntable.insertflat(field[key], value)\nend\nreturn field\nend\nfunction premake.setstring(ctype, fieldname, value, allowed)\nlocal conta"
+ "iner, err = premake.getobject(ctype)\nif (not container) then\nerror(err, 4)\nend\nif (value) then\nvalue, err = premake.checkvalue(value, allowed)\nif (not value) then\nerror(err, 4)\nend\ncontainer[fieldname] = value\nend\nreturn container[fieldname]\nend\nfunction premake.remove(fieldname, value)\nlocal cfg = premake.CurrentConfiguration\ncfg.removes = cfg.removes or {}\ncfg.removes[fieldname] = premake.setarray(cfg.removes, fieldname, value)\nend\nlocal function accessor(name, value)\nlocal kind = premake.fields[name].kind\nlocal scope = premake.fields[name].scope\nlocal allowed = premake.fields[name].allowed\nif (kind == \"string\" or kind == \"path\") and value then\nif type(value) ~= \"string\" then\nerror(\"string value expected\", 3)\nend\nend\nlocal container, err = premake.getobject(scope)\nif (not container) then\nerror(err, 3)\nend\nif kind == \"string\" then\nreturn premake.setstring(scope, name, value, allowed)\nelseif kind == \"path\" then\nif value then value = path.getabsolute(value) end"
+ "\nreturn premake.setstring(scope, name, value)\nelseif kind == \"list\" then\nreturn premake.setarray(container, name, value, allowed)\nelseif kind == \"table\" then\nreturn premake.settable(container, name, value, allowed)\nelseif kind == \"dirlist\" then\nreturn premake.setdirarray(container, name, value)\nelseif kind == \"filelist\" or kind == \"absolutefilelist\" then\nreturn premake.setfilearray(container, name, value)\nelseif kind == \"keyvalue\" or kind == \"keypath\" then\nreturn premake.setkeyvalue(scope, name, value)\nend\nend\nfor name, info in pairs(premake.fields) do\n_G[name] = function(value)\nreturn accessor(name, value)\nend\nif info.kind == \"list\"\nor info.kind == \"dirlist\"\nor info.kind == \"filelist\"\nor info.kind == \"absolutefilelist\"\nthen\nif name ~= \"removefiles\"\nand name ~= \"files\" then\n_G[\"remove\"..name] = function(value)\npremake.remove(name, value)\nend\nend\nend\nend\nfunction configuration(terms)\nif not terms then\nreturn premake.CurrentConfiguration\nend\nlocal c"
+ "ontainer, err = premake.getobject(\"container\")\nif (not container) then\nerror(err, 2)\nend\nlocal cfg = { }\ncfg.terms = table.flatten({terms})\ntable.insert(container.blocks, cfg)\npremake.CurrentConfiguration = cfg\ncfg.keywords = { }\nfor _, word in ipairs(cfg.terms) do\ntable.insert(cfg.keywords, path.wildcards(word):lower())\nend\nfor name, field in pairs(premake.fields) do\nif (field.kind ~= \"string\" and field.kind ~= \"path\") then\ncfg[name] = { }\nend\nend\nreturn cfg\nend\nlocal function creategroup(name, sln, curpath, parent, inpath)\nlocal group = {}\nsetmetatable(group, {\n__type = \"group\"\n})\ntable.insert(sln.groups, group)\nsln.groups[inpath] = group\ngroup.solution = sln\ngroup.name = name\ngroup.uuid = os.uuid(curpath)\ngroup.parent = parent\nreturn group\nend\nlocal function creategroupsfrompath(inpath, sln)\nif inpath == nil then return nil end\ninpath = path.translate(inpath, \"/\")\nlocal groups = string.explode(inpath, \"/\")\nlocal curpath = \"\"\nlocal lastgroup = nil\nfor i, v "
+ "in ipairs(groups) do\ncurpath = curpath .. \"/\" .. v:lower()\nlocal group = sln.groups[curpath]\nif group == nil then\ngroup = creategroup(v, sln, curpath, lastgroup, curpath)\nend\nlastgroup = group\nend\nreturn lastgroup\nend\nlocal function createproject(name, sln, isUsage)\nlocal prj = {}\nsetmetatable(prj, {\n__type = \"project\",\n})\ntable.insert(sln.projects, prj)\nif(isUsage) then\nif(sln.projects[name]) then\nsln.projects[name].usageProj = prj;\nelse\nsln.projects[name] = prj\nend\nelse\nif(sln.projects[name]) then\nprj.usageProj = sln.projects[name];\nend\nsln.projects[name] = prj\nend\nlocal group = creategroupsfrompath(premake.CurrentGroup, sln)\nprj.solution = sln\nprj.name = name\nprj.basedir = os.getcwd()\nprj.uuid = os.uuid(prj.name)\nprj.blocks = { }\nprj.usage = isUsage\nprj.group = group\nreturn prj;\nend\nfunction usage(name)\nif (not name) then\nif(type(premake.CurrentContainer) ~= \"project\") then return nil end\nif(not premake"
+ ".CurrentContainer.usage) then return nil end\nreturn premake.CurrentContainer\nend\nlocal sln\nif (type(premake.CurrentContainer) == \"project\") then\nsln = premake.CurrentContainer.solution\nelse\nsln = premake.CurrentContainer\nend\nif (type(sln) ~= \"solution\") then\nerror(\"no active solution\", 2)\nend\nif((not sln.projects[name]) or\n((not sln.projects[name].usage) and (not sln.projects[name].usageProj))) then\npremake.CurrentContainer = createproject(name, sln, true)\nelse\npremake.CurrentContainer = iff(sln.projects[name].usage,\nsln.projects[name], sln.projects[name].usageProj)\nend\nconfiguration { }\nreturn premake.CurrentContainer\nend\nfunction project(name)\nif (not name) then\nif(type(premake.CurrentContainer) ~= \"project\") then return nil end\nif(premake.CurrentContainer.usage) then return nil end\nreturn premake.CurrentContainer\nend\nlocal sln\nif (type(premake.CurrentContainer) == \"project\") then\nsln = premake.CurrentContainer.solution\nelse\nsln = premake.CurrentContainer\nend\nif (t"
+ "ype(sln) ~= \"solution\") then\nerror(\"no active solution\", 2)\nend\nif((not sln.projects[name]) or sln.projects[name].usage) then\npremake.CurrentContainer = createproject(name, sln)\nelse\npremake.CurrentContainer = sln.projects[name];\nend\nconfiguration { }\nreturn premake.CurrentContainer\nend\nfunction solution(name)\nif not name then\nif type(premake.CurrentContainer) == \"project\" then\nreturn premake.CurrentContainer.solution\nelse\nreturn premake.CurrentContainer\nend\nend\npremake.CurrentContainer = premake.solution.get(name)\nif (not premake.CurrentContainer) then\npremake.CurrentContainer = premake.solution.new(name)\nend\nconfiguration { }\nreturn premake.CurrentContainer\nend\nfunction group(name)\nif not name then\nreturn premake.CurrentGroup\nend\npremake.CurrentGroup = name\nreturn premake.CurrentGroup\nend\nfunction newaction(a)\npremake.action.add(a)\nend\nfunction newoption(opt)\npremake.option.add(opt)\nend\n",
/* base/cmdline.lua */
- "newoption \n{\ntrigger = \"cc\",\nvalue = \"VALUE\",\ndescription = \"Choose a C/C++ compiler set\",\nallowed = {\n{ \"gcc\", \"GNU GCC (gcc/g++)\" },\n{ \"ow\", \"OpenWatcom\" },\n{ \"ghs\", \"Green Hills Software\" },\n}\n}\nnewoption\n{\ntrigger = \"dotnet\",\nvalue = \"VALUE\",\ndescription = \"Choose a .NET compiler set\",\nallowed = {\n{ \"msnet\", \"Microsoft .NET (csc)\" },\n{ \"mono\", \"Novell Mono (mcs)\" },\n{ \"pnet\", \"Portable.NET (cscc)\" },\n}\n}\nnewoption\n{\ntrigger = \"file\",\nvalue = \"FILE\",\ndescription = \"Read FILE as a Premake script; default is 'premake4.lua'\"\n}\nnewoption\n{\ntrigger = \"help\",\ndescription = \"Display this information\"\n}\nnewoption\n{\ntrigger = \"os\",\nvalue = \"VALUE\",\ndescription = \"Generate files for a different operating system\",\nallowed = {\n{ \"bsd\", \"OpenBSD, NetBSD, or FreeBSD\" },\n{ \"linux\", \"Linux\" },\n{ \"macosx\", \"Apple Mac OS X\" },\n{ \"solaris\", \"Sol"
- "aris\" },\n{ \"windows\", \"Microsoft Windows\" },\n}\n}\nnewoption\n{\ntrigger = \"platform\",\nvalue = \"VALUE\",\ndescription = \"Add target architecture (if supported by action)\",\nallowed = {\n{ \"x32\", \"32-bit\" },\n{ \"x64\", \"64-bit\" },\n{ \"universal\", \"Mac OS X Universal, 32- and 64-bit\" },\n{ \"universal32\", \"Mac OS X Universal, 32-bit only\" },\n{ \"universal64\", \"Mac OS X Universal, 64-bit only\" },\n{ \"ps3\", \"Playstation 3 (experimental)\" },\n{ \"orbis\", \"Playstation 4\" },\n{ \"xbox360\", \"Xbox 360 (experimental)\" },\n{ \"ARM\", \"ARM\" },\n{ \"PowerPC\", \"PowerPC\" },\n}\n}\nnewoption\n{\ntrigger = \"scripts\",\nvalue = \"path\",\ndescription = \"Search for additional scripts on the given path\"\n}\nnewoption\n{\ntrigger = \"version\",\ndescription = \"Display version information\"\n}\n",
+ "newoption\n{\ntrigger = \"cc\",\nvalue = \"VALUE\",\ndescription = \"Choose a C/C++ compiler set\",\nallowed = {\n{ \"gcc\", \"GNU GCC (gcc/g++)\" },\n{ \"ow\", \"OpenWatcom\" },\n{ \"ghs\", \"Green Hills Software\" },\n}\n}\nnewoption\n{\ntrigger = \"dotnet\",\nvalue = \"VALUE\",\ndescription = \"Choose a .NET compiler set\",\nallowed = {\n{ \"msnet\", \"Microsoft .NET (csc)\" },\n{ \"mono\", \"Novell Mono (mcs)\" },\n{ \"pnet\", \"Portable.NET (cscc)\" },\n}\n}\nnewoption\n{\ntrigger = \"file\",\nvalue = \"FILE\",\ndescription = \"Read FILE as a Premake script; default is 'premake4.lua'\"\n}\nnewoption\n{\ntrigger = \"help\",\ndescription = \"Display this information\"\n}\nnewoption\n{\ntrigger = \"os\",\nvalue = \"VALUE\",\ndescription = \"Generate files for a different operating system\",\nallowed = {\n{ \"bsd\", \"OpenBSD, NetBSD, or FreeBSD\" },\n{ \"linux\", \"Linux\" },\n{ \"macosx\", \"Apple Mac OS X\" },\n{ \"solaris\", \"Sola"
+ "ris\" },\n{ \"windows\", \"Microsoft Windows\" },\n}\n}\nnewoption\n{\ntrigger = \"platform\",\nvalue = \"VALUE\",\ndescription = \"Add target architecture (if supported by action)\",\nallowed = {\n{ \"x32\", \"32-bit\" },\n{ \"x64\", \"64-bit\" },\n{ \"universal\", \"Mac OS X Universal, 32- and 64-bit\" },\n{ \"universal32\", \"Mac OS X Universal, 32-bit only\" },\n{ \"universal64\", \"Mac OS X Universal, 64-bit only\" },\n{ \"ps3\", \"Playstation 3\" },\n{ \"orbis\", \"Playstation 4\" },\n{ \"xbox360\", \"Xbox 360\" },\n{ \"durango\", \"Xbox One\" },\n{ \"ARM\", \"ARM\" },\n{ \"PowerPC\", \"PowerPC\" },\n}\n}\nnewoption\n{\ntrigger = \"scripts\",\nvalue = \"path\",\ndescription = \"Search for additional scripts on the given path\"\n}\nnewoption\n{\ntrigger = \"version\",\ndescription = \"Display version information\"\n}\n",
/* base/inspect.lua */
"-- Copyright (c) 2013 Enrique García Cota\nlocal function smartQuote(str)\n if str:match('\"') and not str:match(\"'\") then\n return \"'\" .. str .. \"'\"\n end\n return '\"' .. str:gsub('\"', '\\\\\"') .. '\"'\nend\nlocal controlCharsTranslation = {\n [\"\\a\"] = \"\\\\a\", [\"\\b\"] = \"\\\\b\", [\"\\f\"] = \"\\\\f\", [\"\\n\"] = \"\\\\n\",\n [\"\\r\"] = \"\\\\r\", [\"\\t\"] = \"\\\\t\", [\"\\v\"] = \"\\\\v\"\n}\nlocal function escapeChar(c) return controlCharsTranslation[c] end\nlocal function escape(str)\n local result = str:gsub(\"\\\\\", \"\\\\\\\\\"):gsub(\"(%c)\", escapeChar)\n return result\nend\nlocal function isIdentifier(str)\n return type(str) == 'string' and str:match( \"^[_%a][_%a%d]*$\" )\nend\nlocal function isArrayKey(k, length)\n return type(k) == 'number' and 1 <= k and k <= length\nend\nlocal function isDictionaryKey(k, length)\n return not isArrayKey(k, length)\nend\nlocal defaultTypeOrders = {\n ['number'] = 1, ['boolean'] = 2, ['string'] = 3, ['table'] = 4,\n ['fu"
@@ -118,25 +119,26 @@ const char* builtin_scripts[] = {
"premake.gcc = { }\npremake.gcc.cc = \"gcc\"\npremake.gcc.cxx = \"g++\"\npremake.gcc.ar = \"ar\"\npremake.gcc.llvm = false\nlocal cflags =\n{\nEnableSSE = \"-msse\",\nEnableSSE2 = \"-msse2\",\nExtraWarnings = \"-Wall -Wextra\",\nFatalWarnings = \"-Werror\",\nFloatFast = \"-ffast-math\",\nFloatStrict = \"-ffloat-store\",\nNoFramePointer = \"-fomit-frame-pointer\",\nOptimize = \"-O2\",\nOptimizeSize = \"-Os\",\nOptimizeSpeed = \"-O3\",\nSymbols = \"-g\",\n}\nlocal cxxflags =\n{\nNoExceptions = \"-fno-exceptions\",\nNoRTTI = \"-fno-rtti\",\nUnsignedChar = \"-funsigned-char\",\n}\npremake.gcc.platforms =\n{\nNative = {\ncppflags = \"-MMD -MP\",\n},\nx32 = {\ncppflags = \"-MMD -MP\",\nflags = \"-m32\",\n},\nx64 = {\ncppflags = \"-MMD -MP\",\nflags = \"-m64\",\n},\nUniversal = {\nar = \"libtool\",\ncppflags = \"-MMD -MP\",\nflags = \"-arch i386 -arch x86_64 -arch ppc -arch ppc64\",\n},\nUniversal32 = {\nar = \"libtool\",\ncppflags = \"-M"
"MD -MP\",\nflags = \"-arch i386 -arch ppc\",\n},\nUniversal64 = {\nar = \"libtool\",\ncppflags = \"-MMD -MP\",\nflags = \"-arch x86_64 -arch ppc64\",\n},\nPS3 = {\ncc = \"ppu-lv2-g++\",\ncxx = \"ppu-lv2-g++\",\nar = \"ppu-lv2-ar\",\ncppflags = \"-MMD -MP\",\n},\nWiiDev = {\ncppflags = \"-MMD -MP -I$(LIBOGC_INC) $(MACHDEP)\",\nldflags= \"-L$(LIBOGC_LIB) $(MACHDEP)\",\ncfgsettings = [[\n ifeq ($(strip $(DEVKITPPC)),)\n $(error \"DEVKITPPC environment variable is not set\")'\n endif\n include $(DEVKITPPC)/wii_rules']],\n},\nOrbis = {\ncc = \"orbis-clang\",\ncxx = \"orbis-clang++\",\nar = \"orbis-ar\",\ncppflags = \"-MMD -MP\",\n}\n}\nlocal platforms = premake.gcc.platforms\nfunction premake.gcc.getcppflags(cfg)\nlocal flags = { }\ntable.insert(flags, platforms[cfg.platform].cppflags)\nif flags[1]:startswith(\"-MMD\") then\ntable.insert(flags, \"-MP\")\nend\nreturn flags\nend\nfunction premake.gcc.getcflags(cfg)\nlocal result = table.translate("
"cfg.flags, cflags)\ntable.insert(result, platforms[cfg.platform].flags)\nif cfg.system ~= \"windows\" and cfg.kind == \"SharedLib\" then\ntable.insert(result, \"-fPIC\")\nend\nreturn result\nend\nfunction premake.gcc.getcxxflags(cfg)\nlocal result = table.translate(cfg.flags, cxxflags)\nreturn result\nend\nfunction premake.gcc.getldflags(cfg)\nlocal result = { }\nif not cfg.flags.Symbols then\nif cfg.system == \"macosx\" then\nelse\ntable.insert(result, \"-s\")\nend\nend\nif cfg.kind == \"SharedLib\" then\nif cfg.system == \"macosx\" then\ntable.insert(result, \"-dynamiclib\")\nelse\ntable.insert(result, \"-shared\")\nend\nif cfg.system == \"windows\" and not cfg.flags.NoImportLib then\ntable.insert(result, '-Wl,--out-implib=\"' .. cfg.linktarget.fullpath .. '\"')\nend\nend\nif cfg.kind == \"WindowedApp\" and cfg.system == \"windows\" then\ntable.insert(result, \"-mwindows\")\nend\nlocal platform = platforms[cfg.platform]\ntable.insert(result, platform.flags)\ntable.insert(result, platform.ldflags)\nreturn res"
- "ult\nend\nfunction premake.gcc.getlibdirflags(cfg)\nlocal result = { }\nfor _, value in ipairs(premake.getlinks(cfg, \"all\", \"directory\")) do\ntable.insert(result, '-L' .. _MAKE.esc(value))\nend\nreturn result\nend\nfunction premake.gcc.getlinkflags(cfg)\nlocal result = {}\nfor _, value in ipairs(premake.getlinks(cfg, \"system\", \"name\")) do\nif path.getextension(value) == \".framework\" then\ntable.insert(result, '-framework ' .. _MAKE.esc(path.getbasename(value)))\nelse\ntable.insert(result, '-l' .. _MAKE.esc(value))\nend\nend\nreturn result\nend\nfunction premake.gcc.getarchiveflags(prj, cfg, ndx)\nlocal result = {}\nif cfg.platform:startswith(\"Universal\") then\nif prj.options.ArchiveSplit then\nerror(\"gcc tool 'Universal*' platforms do not support split archives\")\nend\ntable.insert(result, '-o')\nelse\nif (not prj.options.ArchiveSplit) then\nif premake.gcc.llvm then\ntable.insert(result, 'rcs')\nelse\ntable.insert(result, '-rcs')\nend\nelse\nif premake.gcc.llvm then\nif (not ndx) then\ntable.inse"
- "rt(result, 'qc')\nelse\ntable.insert(result, 'cs')\nend\nelse\nif (not ndx) then\ntable.insert(result, '-qc')\nelse\ntable.insert(result, '-cs')\nend\nend\nend\nend\nreturn result\nend\nfunction premake.gcc.getdefines(defines)\nlocal result = { }\nfor _,def in ipairs(defines) do\ntable.insert(result, '-D' .. def)\nend\nreturn result\nend\nfunction premake.gcc.getincludedirs(includedirs)\nlocal result = { }\nfor _,dir in ipairs(includedirs) do\ntable.insert(result, \"-I\" .. _MAKE.esc(dir))\nend\nreturn result\nend\nfunction premake.gcc.getcfgsettings(cfg)\nreturn platforms[cfg.platform].cfgsettings\nend\n",
+ "ult\nend\nfunction premake.gcc.getlibdirflags(cfg)\nlocal result = { }\nfor _, value in ipairs(premake.getlinks(cfg, \"all\", \"directory\")) do\ntable.insert(result, '-L' .. _MAKE.esc(value))\nend\nreturn result\nend\nfunction premake.gcc.islibfile(p)\nif path.getextension(p) == \".a\" then\nreturn true\nend\nreturn false\nend\nfunction premake.gcc.getlibfiles(cfg)\nlocal result = {}\nfor _, value in ipairs(premake.getlinks(cfg, \"system\", \"fullpath\")) do\nif premake.gcc.islibfile(value) then\ntable.insert(result, _MAKE.esc(value))\nend\nend\nreturn result\nend\nfunction premake.gcc.getlinkflags(cfg)\nlocal result = {}\nfor _, value in ipairs(premake.getlinks(cfg, \"system\", \"fullpath\")) do\nif premake.gcc.islibfile(value) then\ntable.insert(result, _MAKE.esc(value))\nelseif path.getextension(value) == \".framework\" then\ntable.insert(result, '-framework ' .. _MAKE.esc(path.getbasename(value)))\nelse\ntable.insert(result, '-l' .. _MAKE.esc(path.getname(value)))\nend\nend\nreturn result\nend\nfunction p"
+ "remake.gcc.getarchiveflags(prj, cfg, ndx)\nlocal result = {}\nif cfg.platform:startswith(\"Universal\") then\nif prj.options.ArchiveSplit then\nerror(\"gcc tool 'Universal*' platforms do not support split archives\")\nend\ntable.insert(result, '-o')\nelse\nif (not prj.options.ArchiveSplit) then\nif premake.gcc.llvm then\ntable.insert(result, 'rcs')\nelse\ntable.insert(result, '-rcs')\nend\nelse\nif premake.gcc.llvm then\nif (not ndx) then\ntable.insert(result, 'qc')\nelse\ntable.insert(result, 'cs')\nend\nelse\nif (not ndx) then\ntable.insert(result, '-qc')\nelse\ntable.insert(result, '-cs')\nend\nend\nend\nend\nreturn result\nend\nfunction premake.gcc.getdefines(defines)\nlocal result = { }\nfor _,def in ipairs(defines) do\ntable.insert(result, '-D' .. def)\nend\nreturn result\nend\nfunction premake.gcc.getincludedirs(includedirs)\nlocal result = { }\nfor _,dir in ipairs(includedirs) do\ntable.insert(result, \"-I\" .. _MAKE.esc(dir))\nend\nreturn result\nend\nfunction premake.gcc.getcfgsettings(cfg)\nreturn p"
+ "latforms[cfg.platform].cfgsettings\nend\n",
/* tools/ghs.lua */
"premake.ghs = { }\npremake.ghs.namestyle = \"PS3\"\npremake.ghs.cc = \"ccppc\"\npremake.ghs.cxx = \"cxppc\"\npremake.ghs.ar = \"cxppc\"\nlocal cflags =\n{\nFatalWarnings = \"--quit_after_warnings\",\nOptimize = \"-Ogeneral\",\nOptimizeSize = \"-Osize\",\nOptimizeSpeed = \"-Ospeed\",\nSymbols = \"-g\",\n}\nlocal cxxflags =\n{\nNoExceptions = \"--no_exceptions\",\nNoRTTI = \"--no_rtti\",\nUnsignedChar = \"--unsigned_chars\",\n}\npremake.ghs.platforms =\n{\nNative = {\ncppflags = \"-MMD\",\n},\nPowerPC = {\ncc = \"ccppc\",\ncxx = \"cxppc\",\nar = \"cxppc\",\ncppflags = \"-MMD\",\narflags = \"-archive -o\",\n},\nARM = {\ncc = \"ccarm\",\ncxx = \"cxarm\",\nar = \"cxarm\",\ncppflags = \"-MMD\",\narflags = \"-archive -o\",\n}\n}\nlocal platforms = premake.ghs.platforms\nfunction premake.ghs.getcppflags(cfg)\nlocal flags = { }\ntable.insert(flags, platforms[cfg.platform].cppflags)\nreturn flags\nend\nfunction premake.ghs.getcf"
- "lags(cfg)\nlocal result = table.translate(cfg.flags, cflags)\ntable.insert(result, platforms[cfg.platform].flags)\nreturn result\nend\nfunction premake.ghs.getcxxflags(cfg)\nlocal result = table.translate(cfg.flags, cxxflags)\nreturn result\nend\nfunction premake.ghs.getldflags(cfg)\nlocal result = { }\nlocal platform = platforms[cfg.platform]\ntable.insert(result, platform.flags)\ntable.insert(result, platform.ldflags)\nreturn result\nend\nfunction premake.ghs.getlibdirflags(cfg)\nlocal result = { }\nfor _, value in ipairs(premake.getlinks(cfg, \"all\", \"directory\")) do\ntable.insert(result, '-L' .. _MAKE.esc(value))\nend\nreturn result\nend\nfunction premake.ghs.getlinkflags(cfg)\nlocal result = {}\nfor _, value in ipairs(premake.getlinks(cfg, \"system\", \"name\")) do\ntable.insert(result, '-lnk=' .. _MAKE.esc(value))\nend\nreturn result\nend\nfunction premake.ghs.getarchiveflags(prj, cfg, ndx)\nif prj.options.ArchiveSplit then\nerror(\"ghs tool does not support split archives\")\nend\nlocal result = {}\n"
- "local platform = platforms[cfg.platform]\ntable.insert(result, platform.arflags)\nreturn result\nend\nfunction premake.ghs.getdefines(defines)\nlocal result = { }\nfor _,def in ipairs(defines) do\ntable.insert(result, '-D' .. def)\nend\nreturn result\nend\nfunction premake.ghs.getincludedirs(includedirs)\nlocal result = { }\nfor _,dir in ipairs(includedirs) do\ntable.insert(result, \"-I\" .. _MAKE.esc(dir))\nend\nreturn result\nend\nfunction premake.ghs.getcfgsettings(cfg)\nreturn platforms[cfg.platform].cfgsettings\nend\n",
+ "lags(cfg)\nlocal result = table.translate(cfg.flags, cflags)\ntable.insert(result, platforms[cfg.platform].flags)\nreturn result\nend\nfunction premake.ghs.getcxxflags(cfg)\nlocal result = table.translate(cfg.flags, cxxflags)\nreturn result\nend\nfunction premake.ghs.getldflags(cfg)\nlocal result = { }\nlocal platform = platforms[cfg.platform]\ntable.insert(result, platform.flags)\ntable.insert(result, platform.ldflags)\nreturn result\nend\nfunction premake.ghs.getlibdirflags(cfg)\nlocal result = { }\nfor _, value in ipairs(premake.getlinks(cfg, \"all\", \"directory\")) do\ntable.insert(result, '-L' .. _MAKE.esc(value))\nend\nreturn result\nend\nfunction premake.ghs.getlibfiles(cfg)\nlocal result = {}\nreturn result\nend\nfunction premake.ghs.getlinkflags(cfg)\nlocal result = {}\nfor _, value in ipairs(premake.getlinks(cfg, \"system\", \"name\")) do\ntable.insert(result, '-lnk=' .. _MAKE.esc(value))\nend\nreturn result\nend\nfunction premake.ghs.getarchiveflags(prj, cfg, ndx)\nif prj.options.ArchiveSplit then"
+ "\nerror(\"ghs tool does not support split archives\")\nend\nlocal result = {}\nlocal platform = platforms[cfg.platform]\ntable.insert(result, platform.arflags)\nreturn result\nend\nfunction premake.ghs.getdefines(defines)\nlocal result = { }\nfor _,def in ipairs(defines) do\ntable.insert(result, '-D' .. def)\nend\nreturn result\nend\nfunction premake.ghs.getincludedirs(includedirs)\nlocal result = { }\nfor _,dir in ipairs(includedirs) do\ntable.insert(result, \"-I\" .. _MAKE.esc(dir))\nend\nreturn result\nend\nfunction premake.ghs.getcfgsettings(cfg)\nreturn platforms[cfg.platform].cfgsettings\nend\n",
/* tools/msc.lua */
"premake.msc = { }\npremake.msc.namestyle = \"windows\"\n",
/* tools/ow.lua */
"premake.ow = { }\npremake.ow.namestyle = \"windows\"\npremake.ow.cc = \"WCL386\"\npremake.ow.cxx = \"WCL386\"\npremake.ow.ar = \"ar\"\nlocal cflags =\n{\nExtraWarnings = \"-wx\",\nFatalWarning = \"-we\",\nFloatFast = \"-omn\",\nFloatStrict = \"-op\",\nOptimize = \"-ox\",\nOptimizeSize = \"-os\",\nOptimizeSpeed = \"-ot\",\nSymbols = \"-d2\",\n}\nlocal cxxflags =\n{\nNoExceptions = \"-xd\",\nNoRTTI = \"-xr\",\n}\npremake.ow.platforms = \n{\nNative = { \nflags = \"\" \n},\n}\nfunction premake.ow.getcppflags(cfg)\nreturn {}\nend\nfunction premake.ow.getcflags(cfg)\nlocal result = table.translate(cfg.flags, cflags)\nif (cfg.flags.Symbols) then\ntable.insert(result, \"-hw\") -- Watcom debug format for Watcom debugger\nend\nreturn result\nend\nfunction premake.ow.getcxxflags(cfg)\nlocal result = table.translate(cfg.flags, cxxflags)\nreturn result\nend\nfunction premake.ow.getldflags(cfg)\nlocal result = { }\nif (cfg.flags.Symbols) then\ntable.insert(result, \"op symf"
- "\")\nend\nreturn result\nend\nfunction premake.ow.getlinkflags(cfg)\nlocal result = { }\nreturn result\nend\nfunction premake.ow.getdefines(defines)\nlocal result = { }\nfor _,def in ipairs(defines) do\ntable.insert(result, '-D' .. def)\nend\nreturn result\nend\nfunction premake.ow.getincludedirs(includedirs)\nlocal result = { }\nfor _,dir in ipairs(includedirs) do\ntable.insert(result, '-I \"' .. dir .. '\"')\nend\nreturn result\nend\n",
+ "\")\nend\nreturn result\nend\nfunction premake.ow.getlibfiles(cfg)\nlocal result = {}\nreturn result\nend\nfunction premake.ow.getlinkflags(cfg)\nlocal result = { }\nreturn result\nend\nfunction premake.ow.getdefines(defines)\nlocal result = { }\nfor _,def in ipairs(defines) do\ntable.insert(result, '-D' .. def)\nend\nreturn result\nend\nfunction premake.ow.getincludedirs(includedirs)\nlocal result = { }\nfor _,dir in ipairs(includedirs) do\ntable.insert(result, '-I \"' .. dir .. '\"')\nend\nreturn result\nend\n",
/* tools/snc.lua */
"premake.snc = { }\npremake.snc.cc = \"snc\"\npremake.snc.cxx = \"g++\"\npremake.snc.ar = \"ar\"\nlocal cflags =\n{\nExtraWarnings = \"-Xdiag=2\",\nFatalWarnings = \"-Xquit=2\",\n}\nlocal cxxflags =\n{\nNoExceptions = \"\", -- No exceptions is the default in the SNC compiler.\nNoRTTI = \"-Xc-=rtti\",\n}\npremake.snc.platforms = \n{\nPS3 = {\ncc = \"ppu-lv2-g++\",\ncxx = \"ppu-lv2-g++\",\nar = \"ppu-lv2-ar\",\ncppflags = \"-MMD -MP\",\n}\n}\nlocal platforms = premake.snc.platforms\nfunction premake.snc.getcppflags(cfg)\nlocal result = { }\ntable.insert(result, platforms[cfg.platform].cppflags)\nreturn result\nend\nfunction premake.snc.getcflags(cfg)\nlocal result = table.translate(cfg.flags, cflags)\ntable.insert(result, platforms[cfg.platform].flags)\nif cfg.kind == \"SharedLib\" then\ntable.insert(result, \"-fPIC\")\nend\nreturn result\nend\nfunction premake.snc.getcxxflags(cfg)\nlocal result = table.translate(cfg.flags, cxxflags)\nreturn result\nend\nfunction pr"
- "emake.snc.getldflags(cfg)\nlocal result = { }\nif not cfg.flags.Symbols then\ntable.insert(result, \"-s\")\nend\nif cfg.kind == \"SharedLib\" then\ntable.insert(result, \"-shared\")\nif not cfg.flags.NoImportLib then\ntable.insert(result, '-Wl,--out-implib=\"' .. cfg.linktarget.fullpath .. '\"')\nend\nend\nlocal platform = platforms[cfg.platform]\ntable.insert(result, platform.flags)\ntable.insert(result, platform.ldflags)\nreturn result\nend\nfunction premake.snc.getlibdirflags(cfg)\nlocal result = { }\nfor _, value in ipairs(premake.getlinks(cfg, \"all\", \"directory\")) do\ntable.insert(result, '-L' .. _MAKE.esc(value))\nend\nreturn result\nend\nfunction premake.snc.getlinkflags(cfg)\nlocal result = {}\nfor _, value in ipairs(premake.getlinks(cfg, \"system\", \"name\")) do\ntable.insert(result, '-l' .. _MAKE.esc(value))\nend\nreturn result\nend\nfunction premake.snc.getdefines(defines)\nlocal result = { }\nfor _,def in ipairs(defines) do\ntable.insert(result, '-D' .. def)\nend\nreturn result\nend\nfunction "
- "premake.snc.getincludedirs(includedirs)\nlocal result = { }\nfor _,dir in ipairs(includedirs) do\ntable.insert(result, \"-I\" .. _MAKE.esc(dir))\nend\nreturn result\nend\n",
+ "emake.snc.getldflags(cfg)\nlocal result = { }\nif not cfg.flags.Symbols then\ntable.insert(result, \"-s\")\nend\nif cfg.kind == \"SharedLib\" then\ntable.insert(result, \"-shared\")\nif not cfg.flags.NoImportLib then\ntable.insert(result, '-Wl,--out-implib=\"' .. cfg.linktarget.fullpath .. '\"')\nend\nend\nlocal platform = platforms[cfg.platform]\ntable.insert(result, platform.flags)\ntable.insert(result, platform.ldflags)\nreturn result\nend\nfunction premake.snc.getlibdirflags(cfg)\nlocal result = { }\nfor _, value in ipairs(premake.getlinks(cfg, \"all\", \"directory\")) do\ntable.insert(result, '-L' .. _MAKE.esc(value))\nend\nreturn result\nend\nfunction premake.snc.getlibfiles(cfg)\nlocal result = {}\nreturn result\nend\nfunction premake.snc.getlinkflags(cfg)\nlocal result = {}\nfor _, value in ipairs(premake.getlinks(cfg, \"system\", \"name\")) do\ntable.insert(result, '-l' .. _MAKE.esc(value))\nend\nreturn result\nend\nfunction premake.snc.getdefines(defines)\nlocal result = { }\nfor _,def in ipairs(defi"
+ "nes) do\ntable.insert(result, '-D' .. def)\nend\nreturn result\nend\nfunction premake.snc.getincludedirs(includedirs)\nlocal result = { }\nfor _,dir in ipairs(includedirs) do\ntable.insert(result, \"-I\" .. _MAKE.esc(dir))\nend\nreturn result\nend\n",
/* base/validate.lua */
"function premake.checkprojects()\nlocal action = premake.action.current()\nfor sln in premake.solution.each() do\nif (#sln.projects == 0) then\nreturn nil, \"solution '\" .. sln.name .. \"' needs at least one project\"\nend\nif (#sln.configurations == 0) then\nreturn nil, \"solution '\" .. sln.name .. \"' needs configurations\"\nend\nfor prj in premake.solution.eachproject(sln) do\nif (not prj.language) then\nreturn nil, \"project '\" ..prj.name .. \"' needs a language\"\nend\nif (action.valid_languages) then\nif (not table.contains(action.valid_languages, prj.language)) then\nreturn nil, \"the \" .. action.shortname .. \" action does not support \" .. prj.language .. \" projects\"\nend\nend\nfor cfg in premake.eachconfig(prj) do\nif (not cfg.kind) then\nreturn nil, \"project '\" ..prj.name .. \"' needs a kind in configuration '\" .. cfg.name .. \"'\"\nend\nif (action.valid_kinds) then\nif (not table.contains(action.valid_kinds, cfg.kind)) then\nreturn nil, \"the \" .. action.shortname .. \" action does not su"
@@ -196,18 +198,18 @@ const char* builtin_scripts[] = {
/* actions/make/make_cpp.lua */
"premake.make.cpp = { }\npremake.make.override = { }\nlocal cpp = premake.make.cpp\nlocal make = premake.make\nfunction premake.make_cpp(prj)\nlocal cc = premake.gettool(prj)\nlocal platforms = premake.filterplatforms(prj.solution, cc.platforms, \"Native\")\npremake.gmake_cpp_header(prj, cc, platforms)\nfor _, platform in ipairs(platforms) do\nfor cfg in premake.eachconfig(prj, platform) do\npremake.gmake_cpp_config(prj, cfg, cc)\nend\nend\nlocal objdirs = {}\nlocal additionalobjdirs = {}\nfor _, file in ipairs(prj.files) do\nif path.iscppfile(file) then\nobjdirs[_MAKE.esc(path.getdirectory(path.trimdots(file)))] = 1\nend\nend\nfor _, custombuildtask in ipairs(prj.custombuildtask or {}) do\nfor _, buildtask in ipairs(custombuildtask or {}) do\nadditionalobjdirs[_MAKE.esc(path.getdirectory(path.getrelative(prj.location,buildtask[2])))] = 1\nend\nend\n_p('OBJDIRS := \\\\')\n_p('\\t$(OBJDIR) \\\\')\nfor dir, _ in pairs(objdirs) do\n_p('\\t$(OBJDIR)/%s \\\\', dir)\nend\nfor dir, _ in pairs(additionalobjdirs) do\n_p"
- "('\\t%s \\\\', dir)\nend\n_p('')\n_p('RESOURCES := \\\\')\nfor _, file in ipairs(prj.files) do\nif path.isresourcefile(file) then\n_p('\\t$(OBJDIR)/%s.res \\\\', _MAKE.esc(path.getbasename(file)))\nend\nend\n_p('')\n_p('.PHONY: clean prebuild prelink')\n_p('')\nif os.is(\"MacOSX\") and prj.kind == \"WindowedApp\" then\n_p('all: $(OBJDIRS) prebuild prelink $(TARGET) $(dir $(TARGETDIR))PkgInfo $(dir $(TARGETDIR))Info.plist | $(TARGETDIR)')\nelse\n_p('all: $(OBJDIRS) prebuild prelink $(TARGET) | $(TARGETDIR)')\nend\n_p('\\t@:')\n_p('')\nif (prj.kind == \"StaticLib\" and prj.options.ArchiveSplit) then\n_p('define max_args')\n_p('\\t$(eval _args:=)')\n_p('\\t$(foreach obj,$3,$(eval _args+=$(obj))$(if $(word $2,$(_args)),$1$(_args)$(EOL)$(eval _args:=)))')\n_p('\\t$(if $(_args),$1$(_args))')\n_p('endef')\n_p('')\n_p('define EOL')\n_p('')\n_p('')\n_p('endef')\n_p('')\nend\n_p('$(TARGET): $(GCH) $(OBJECTS) $(LDDEPS) $(RESOURCES) | $(TARGETDIR) $(OBJDIRS)')\nif prj.kind == \"StaticLib\" then\nif prj.msgarchiving then\n"
- "_p('\\t@echo ' .. prj.msgarchiving)\nelse\n_p('\\t@echo Archiving %s', prj.name)\nend\nif (not prj.archivesplit_size) then\nprj.archivesplit_size=200\nend\nif (not prj.options.ArchiveSplit) then\n_p('\\t$(SILENT) $(LINKCMD) $(OBJECTS)' .. (os.is(\"MacOSX\") and \" 2>&1 > /dev/null | sed -e '/.o) has no symbols$$/d'\" or \"\"))\nelse\n_p('\\t$(call RM,$(TARGET))')\n_p('\\t@$(call max_args,$(LINKCMD),'.. prj.archivesplit_size ..',$(OBJECTS))' .. (os.is(\"MacOSX\") and \" 2>&1 > /dev/null | sed -e '/.o) has no symbols$$/d'\" or \"\"))\n_p('\\t$(SILENT) $(LINKCMD_NDX)')\nend\nelse\nif prj.msglinking then\n_p('\\t@echo ' .. prj.msglinking)\nelse\n_p('\\t@echo Linking %s', prj.name)\nend\n_p('\\t$(SILENT) $(LINKCMD)')\nend\n_p('\\t$(POSTBUILDCMDS)')\n_p('')\n_p('$(TARGETDIR):')\npremake.make_mkdirrule(\"$(TARGETDIR)\")\n_p('$(OBJDIRS):')\nif (not prj.solution.messageskip) or (not table.contains(prj.solution.messageskip, \"SkipCreatingMessage\")) then\n_p('\\t@echo Creating $(@)')\nend\n_p('\\t-$(call MKDIR,$@)')\n_p"
- "('')\nif os.is(\"MacOSX\") and prj.kind == \"WindowedApp\" then\n_p('$(dir $(TARGETDIR))PkgInfo:')\n_p('$(dir $(TARGETDIR))Info.plist:')\n_p('')\nend\n_p('clean:')\nif (not prj.solution.messageskip) or (not table.contains(prj.solution.messageskip, \"SkipCleaningMessage\")) then\n_p('\\t@echo Cleaning %s', prj.name)\nend\n_p('ifeq (posix,$(SHELLTYPE))')\n_p('\\t$(SILENT) rm -f $(TARGET)')\n_p('\\t$(SILENT) rm -rf $(OBJDIR)')\n_p('else')\n_p('\\t$(SILENT) if exist $(subst /,\\\\\\\\,$(TARGET)) del $(subst /,\\\\\\\\,$(TARGET))')\n_p('\\t$(SILENT) if exist $(subst /,\\\\\\\\,$(OBJDIR)) rmdir /s /q $(subst /,\\\\\\\\,$(OBJDIR))')\n_p('endif')\n_p('')\n_p('prebuild:')\n_p('\\t$(PREBUILDCMDS)')\n_p('')\n_p('prelink:')\n_p('\\t$(PRELINKCMDS)')\n_p('')\ncpp.pchrules(prj)\ncpp.fileRules(prj)\ncpp.dependencyRules(prj)\nfor _, custombuildtask in ipairs(prj.custombuildtask or {}) do\nfor _, buildtask in ipairs(custombuildtask or {}) do\nlocal deps = string.format(\"%s \",path.getrelative(prj.location,buildtask[1]))\nfor"
- " _, depdata in ipairs(buildtask[3] or {}) do\ndeps = deps .. string.format(\"%s \",path.getrelative(prj.location,depdata))\nend\n_p('%s: %s | $(TARGETDIR) $(OBJDIRS)'\n,path.getrelative(prj.location,buildtask[2])\n, deps\n)\nfor _, cmdline in ipairs(buildtask[4] or {}) do\nlocal cmd = cmdline\nlocal num = 1\nfor _, depdata in ipairs(buildtask[3] or {}) do\ncmd = string.gsub(cmd,\"%$%(\" .. num ..\"%)\", string.format(\"%s \",path.getrelative(prj.location,depdata)))\nnum = num + 1\nend\ncmd = string.gsub(cmd, \"%$%(<%)\", \"$<\")\ncmd = string.gsub(cmd, \"%$%(@%)\", \"$@\")\n_p('\\t$(SILENT) %s',cmd)\nend\n_p('')\nend\nend\n_p('-include $(OBJECTS:%%.o=%%.d)')\n_p('ifneq (,$(PCH))')\n_p(' -include $(OBJDIR)/$(notdir $(PCH)).d')\n_p('endif')\nend\nfunction premake.gmake_cpp_header(prj, cc, platforms)\n_p('# %s project makefile autogenerated by GENie', premake.action.current().shortname)\n_p('ifndef config')\n_p(' config=%s', _MAKE.esc(premake.getconfigname(prj.solution.configurations[1], platforms[1], true)))\n"
- "_p('endif')\n_p('')\n_p('ifndef verbose')\n_p(' SILENT = @')\n_p('endif')\n_p('')\n_p('SHELLTYPE := msdos')\n_p('ifeq (,$(ComSpec)$(COMSPEC))')\n_p(' SHELLTYPE := posix')\n_p('endif')\n_p('ifeq (/bin,$(findstring /bin,$(SHELL)))')\n_p(' SHELLTYPE := posix')\n_p('endif')\n_p('ifeq (/bin,$(findstring /bin,$(MAKESHELL)))')\n_p(' SHELLTYPE := posix')\n_p('endif')\n_p('')\n_p('ifeq (posix,$(SHELLTYPE))')\n_p(' MKDIR = $(SILENT) mkdir -p \"$(1)\"')\n_p(' COPY = $(SILENT) cp -fR \"$(1)\" \"$(2)\"')\n_p(' RM= $(SILENT) rm -f \"$(1)\"')\n_p('else')\n_p(' MKDIR = $(SILENT) mkdir \"$(subst /,\\\\\\\\,$(1))\" 2> nul || exit 0')\n_p(' COPY = $(SILENT) copy /Y \"$(subst /,\\\\\\\\,$(1))\" \"$(subst /,\\\\\\\\,$(2))\"')\n_p(' RM = $(SILENT) del /F \"$(subst /,\\\\\\\\,$(1))\" 2> nul || exit 0')\n_p('endif')\n_p('')\n_p('CC = %s', cc.cc)\n_p('CXX = %s', cc.cxx)\n_p('AR = %s', cc.ar)\n_p('')\n_p('ifndef RESCOMP')\n_p(' ifdef WINDRES')\n_p(' RESCOMP = $(WINDRES)')\n_p(' else')\n_p(' RESCOMP = windres')"
- "\n_p(' endif')\n_p('endif')\n_p('')\nend\nfunction premake.gmake_cpp_config(prj, cfg, cc)\n_p('ifeq ($(config),%s)', _MAKE.esc(cfg.shortname))\ncpp.platformtools(cfg, cc)\n_p(' ' .. (table.contains(premake.make.override,\"OBJDIR\") and \"override \" or \"\") .. 'OBJDIR = %s', _MAKE.esc(cfg.objectsdir))\n_p(' ' .. (table.contains(premake.make.override,\"TARGETDIR\") and \"override \" or \"\") .. 'TARGETDIR = %s', _MAKE.esc(cfg.buildtarget.directory))\n_p(' ' .. (table.contains(premake.make.override,\"TARGET\") and \"override \" or \"\") .. 'TARGET = $(TARGETDIR)/%s', _MAKE.esc(cfg.buildtarget.name))\n_p(' DEFINES +=%s', make.list(cc.getdefines(cfg.defines)))\n_p(' INCLUDES +=%s', make.list(cc.getincludedirs(cfg.includedirs)))\ncpp.pchconfig(cfg)\ncpp.flags(cfg, cc)\ncpp.linker(prj, cfg, cc)\n_p(' OBJECTS := \\\\')\nfor _, file in ipairs(prj.files) do\nif path.iscppfile(file) then\nif not table.icontains(cfg.excludes, file) then\n_p('\\t$(OBJDIR)/%s.o \\\\'\n, _MAKE.esc(path.trimdots(pat"
- "h.removeext(file)))\n)\nend\nend\nend\n_p('')\n_p(' define PREBUILDCMDS')\nif #cfg.prebuildcommands > 0 then\n_p('\\t@echo Running pre-build commands')\n_p('\\t%s', table.implode(cfg.prebuildcommands, \"\", \"\", \"\\n\\t\"))\nend\n_p(' endef')\n_p(' define PRELINKCMDS')\nif #cfg.prelinkcommands > 0 then\n_p('\\t@echo Running pre-link commands')\n_p('\\t%s', table.implode(cfg.prelinkcommands, \"\", \"\", \"\\n\\t\"))\nend\n_p(' endef')\n_p(' define POSTBUILDCMDS')\nif #cfg.postbuildcommands > 0 then\n_p('\\t@echo Running post-build commands')\n_p('\\t%s', table.implode(cfg.postbuildcommands, \"\", \"\", \"\\n\\t\"))\nend\n_p(' endef')\nmake.settings(cfg, cc)\n_p('endif')\n_p('')\nend\nfunction cpp.platformtools(cfg, cc)\nlocal platform = cc.platforms[cfg.platform]\nif platform.cc then\n_p(' CC = %s', platform.cc)\nend\nif platform.cxx then\n_p(' CXX = %s', platform.cxx)\nend\nif platform.ar then\n_p(' AR = %s', platform.ar)\nend\nend\nfunction cpp.flags(cfg, cc)\nif cfg.pchheade"
- "r and not cfg.flags.NoPCH then\n_p(' FORCE_INCLUDE += -include $(OBJDIR)/$(notdir $(PCH))')\nend\nif #cfg.forcedincludes > 0 then\n_p(' FORCE_INCLUDE += -include %s'\n,_MAKE.esc(table.concat(cfg.forcedincludes, \";\")))\nend\n_p(' ALL_CPPFLAGS += $(CPPFLAGS) %s $(DEFINES) $(INCLUDES)', table.concat(cc.getcppflags(cfg), \" \"))\n_p(' ALL_CFLAGS += $(CFLAGS) $(ALL_CPPFLAGS) $(ARCH)%s', make.list(table.join(cc.getcflags(cfg), cfg.buildoptions, cfg.buildoptions_c)))\n_p(' ALL_CXXFLAGS += $(CXXFLAGS) $(CFLAGS) $(ALL_CPPFLAGS) $(ARCH)%s', make.list(table.join(cc.getcflags(cfg), cc.getcxxflags(cfg), cfg.buildoptions, cfg.buildoptions_cpp)))\n_p(' ALL_OBJCFLAGS += $(CXXFLAGS) $(CFLAGS) $(ALL_CPPFLAGS) $(ARCH)%s', make.list(table.join(cc.getcflags(cfg), cc.getcxxflags(cfg), cfg.buildoptions, cfg.buildoptions_objc)))\n_p(' ALL_RESFLAGS += $(RESFLAGS) $(DEFINES) $(INCLUDES)%s',\n make.list(table.join(cc.getdefines(cfg.resdefines),\n cc.getincludedirs(cfg.resincludedirs),"
- " cfg.resoptions)))\nend\nfunction cpp.linker(prj, cfg, cc)\n_p(' ALL_LDFLAGS += $(LDFLAGS)%s', make.list(table.join(cc.getlibdirflags(cfg), cc.getldflags(cfg), cfg.linkoptions)))\n_p(' LDDEPS +=%s', make.list(_MAKE.esc(premake.getlinks(cfg, \"siblings\", \"fullpath\"))))\n_p(' LIBS += $(LDDEPS)%s', make.list(cc.getlinkflags(cfg)))\nif cfg.kind == \"StaticLib\" then\nif (not prj.options.ArchiveSplit) then\n_p(' LINKCMD = $(AR) %s $(TARGET)', make.list(cc.getarchiveflags(prj, cfg, false)))\nelse\n_p(' LINKCMD = $(AR) %s $(TARGET)', make.list(cc.getarchiveflags(prj, cfg, false)))\n_p(' LINKCMD_NDX= $(AR) %s $(TARGET)', make.list(cc.getarchiveflags(prj, cfg, true)))\nend\nelse\nlocal tool = iif(cfg.language == \"C\", \"CC\", \"CXX\")\n_p(' LINKCMD = $(%s) -o $(TARGET) $(OBJECTS) $(RESOURCES) $(ARCH) $(ALL_LDFLAGS) $(LIBS)', tool)\nend\nend\nfunction cpp.pchconfig(cfg)\nif not cfg.pchheader or cfg.flags.NoPCH then\nreturn\nend\nlocal pch = cfg.pchheader\nfor _, incdir in ipairs(cfg.include"
- "dirs) do\nlocal abspath = path.getabsolute(path.join(cfg.project.location, incdir))\nlocal testname = path.join(abspath, pch)\nif os.isfile(testname) then\npch = path.getrelative(cfg.location, testname)\nbreak\nend\nend\n_p(' PCH = %s', _MAKE.esc(pch))\n_p(' GCH = $(OBJDIR)/$(notdir $(PCH)).gch')\nend\nfunction cpp.pchrules(prj)\n_p('ifneq (,$(PCH))')\n_p('$(GCH): $(PCH) | $(OBJDIR)')\nif prj.msgprecompile then\n_p('\\t@echo ' .. prj.msgprecompile)\nelse\n_p('\\t@echo $(notdir $<)')\nend\nlocal cmd = iif(prj.language == \"C\", \"$(CC) $(ALL_CFLAGS) -x c-header\", \"$(CXX) $(ALL_CXXFLAGS) -x c++-header\")\n_p('\\t$(SILENT) %s $(DEFINES) $(INCLUDES) -o \"$@\" -c \"$<\"', cmd)\n_p('endif')\n_p('')\nend\nfunction cpp.fileRules(prj)\nfor _, file in ipairs(prj.files or {}) do\nif path.iscppfile(file) then\n_p('$(OBJDIR)/%s.o: %s $(GCH)'\n, _MAKE.esc(path.trimdots(path.removeext(file)))\n, _MAKE.esc(file)\n)\nif (path.isobjcfile(file) and prj.msgcompile_objc) then\n_p('\\t@echo ' .. prj.msgcompile_obj"
- "c)\nelseif prj.msgcompile then\n_p('\\t@echo ' .. prj.msgcompile)\nelse\n_p('\\t@echo $(notdir $<)')\nend\nif (path.isobjcfile(file)) then\n_p('\\t$(SILENT) $(CXX) $(ALL_OBJCFLAGS) $(FORCE_INCLUDE) -o \"$@\" -c \"$<\"')\nelse\ncpp.buildcommand(path.iscfile(file) and not prj.options.ForceCPP, \"o\")\nend\nfor _, task in ipairs(prj.postcompiletasks or {}) do\n_p('\\t$(SILENT) %s', task)\n_p('')\nend\n_p('')\nelseif (path.getextension(file) == \".rc\") then\n_p('$(OBJDIR)/%s.res: %s', _MAKE.esc(path.getbasename(file)), _MAKE.esc(file))\nif prj.msgresource then\n_p('\\t@echo ' .. prj.msgresource)\nelse\n_p('\\t@echo $(notdir $<)')\nend\n_p('\\t$(SILENT) $(RESCOMP) $< -O coff -o \"$@\" $(ALL_RESFLAGS)')\n_p('')\nend\nend\nend\nfunction cpp.dependencyRules(prj)\nfor _, dependency in ipairs(prj.dependency or {}) do\nfor _, dep in ipairs(dependency or {}) do\nif (dep[3]==nil or dep[3]==false) then\n_p('$(OBJDIR)/%s.o: %s'\n, _MAKE.esc(path.trimdots(path.removeext(path.getrelative(prj.location, dep[1]))))\n, _MAKE.esc("
- "path.getrelative(prj.location, dep[2]))\n)\nelse\n_p('%s: %s'\n, _MAKE.esc(dep[1])\n, _MAKE.esc(path.getrelative(prj.location, dep[2]))\n)\nend\n_p('')\nend\nend\nend\nfunction cpp.buildcommand(iscfile, objext)\nlocal flags = iif(iscfile, '$(CC) $(ALL_CFLAGS)', '$(CXX) $(ALL_CXXFLAGS)')\n_p('\\t$(SILENT) %s $(FORCE_INCLUDE) -o \"$@\" -c \"$<\"', flags, objext)\nend\n",
+ "('\\t%s \\\\', dir)\nend\n_p('')\n_p('RESOURCES := \\\\')\nfor _, file in ipairs(prj.files) do\nif path.isresourcefile(file) then\n_p('\\t$(OBJDIR)/%s.res \\\\', _MAKE.esc(path.getbasename(file)))\nend\nend\n_p('')\n_p('.PHONY: clean prebuild prelink')\n_p('')\nif os.is(\"MacOSX\") and prj.kind == \"WindowedApp\" then\n_p('all: $(OBJDIRS) prebuild prelink $(TARGET) $(dir $(TARGETDIR))PkgInfo $(dir $(TARGETDIR))Info.plist | $(TARGETDIR)')\nelse\n_p('all: $(OBJDIRS) prebuild prelink $(TARGET) | $(TARGETDIR)')\nend\n_p('\\t@:')\n_p('')\nif (prj.kind == \"StaticLib\" and prj.options.ArchiveSplit) then\n_p('define max_args')\n_p('\\t$(eval _args:=)')\n_p('\\t$(foreach obj,$3,$(eval _args+=$(obj))$(if $(word $2,$(_args)),$1$(_args)$(EOL)$(eval _args:=)))')\n_p('\\t$(if $(_args),$1$(_args))')\n_p('endef')\n_p('')\n_p('define EOL')\n_p('')\n_p('')\n_p('endef')\n_p('')\nend\n_p('$(TARGET): $(GCH) $(OBJECTS) $(LDDEPS) $(EXTERNAL_LIBS) $(RESOURCES) | $(TARGETDIR) $(OBJDIRS)')\nif prj.kind == \"StaticLib\" then\nif prj.ms"
+ "garchiving then\n_p('\\t@echo ' .. prj.msgarchiving)\nelse\n_p('\\t@echo Archiving %s', prj.name)\nend\nif (not prj.archivesplit_size) then\nprj.archivesplit_size=200\nend\nif (not prj.options.ArchiveSplit) then\n_p('\\t$(SILENT) $(LINKCMD) $(OBJECTS)' .. (os.is(\"MacOSX\") and \" 2>&1 > /dev/null | sed -e '/.o) has no symbols$$/d'\" or \"\"))\nelse\n_p('\\t$(call RM,$(TARGET))')\n_p('\\t@$(call max_args,$(LINKCMD),'.. prj.archivesplit_size ..',$(OBJECTS))' .. (os.is(\"MacOSX\") and \" 2>&1 > /dev/null | sed -e '/.o) has no symbols$$/d'\" or \"\"))\n_p('\\t$(SILENT) $(LINKCMD_NDX)')\nend\nelse\nif prj.msglinking then\n_p('\\t@echo ' .. prj.msglinking)\nelse\n_p('\\t@echo Linking %s', prj.name)\nend\n_p('\\t$(SILENT) $(LINKCMD)')\nend\n_p('\\t$(POSTBUILDCMDS)')\n_p('')\n_p('$(TARGETDIR):')\npremake.make_mkdirrule(\"$(TARGETDIR)\")\n_p('$(OBJDIRS):')\nif (not prj.solution.messageskip) or (not table.contains(prj.solution.messageskip, \"SkipCreatingMessage\")) then\n_p('\\t@echo Creating $(@)')\nend\n_p('\\t-$(cal"
+ "l MKDIR,$@)')\n_p('')\nif os.is(\"MacOSX\") and prj.kind == \"WindowedApp\" then\n_p('$(dir $(TARGETDIR))PkgInfo:')\n_p('$(dir $(TARGETDIR))Info.plist:')\n_p('')\nend\n_p('clean:')\nif (not prj.solution.messageskip) or (not table.contains(prj.solution.messageskip, \"SkipCleaningMessage\")) then\n_p('\\t@echo Cleaning %s', prj.name)\nend\n_p('ifeq (posix,$(SHELLTYPE))')\n_p('\\t$(SILENT) rm -f $(TARGET)')\n_p('\\t$(SILENT) rm -rf $(OBJDIR)')\n_p('else')\n_p('\\t$(SILENT) if exist $(subst /,\\\\\\\\,$(TARGET)) del $(subst /,\\\\\\\\,$(TARGET))')\n_p('\\t$(SILENT) if exist $(subst /,\\\\\\\\,$(OBJDIR)) rmdir /s /q $(subst /,\\\\\\\\,$(OBJDIR))')\n_p('endif')\n_p('')\n_p('prebuild:')\n_p('\\t$(PREBUILDCMDS)')\n_p('')\n_p('prelink:')\n_p('\\t$(PRELINKCMDS)')\n_p('')\ncpp.pchrules(prj)\ncpp.fileRules(prj)\ncpp.dependencyRules(prj)\nfor _, custombuildtask in ipairs(prj.custombuildtask or {}) do\nfor _, buildtask in ipairs(custombuildtask or {}) do\nlocal deps = string.format(\"%s \",path.getrelative(prj.location,bu"
+ "ildtask[1]))\nfor _, depdata in ipairs(buildtask[3] or {}) do\ndeps = deps .. string.format(\"%s \",path.getrelative(prj.location,depdata))\nend\n_p('%s: %s | $(TARGETDIR) $(OBJDIRS)'\n,path.getrelative(prj.location,buildtask[2])\n, deps\n)\nfor _, cmdline in ipairs(buildtask[4] or {}) do\nlocal cmd = cmdline\nlocal num = 1\nfor _, depdata in ipairs(buildtask[3] or {}) do\ncmd = string.gsub(cmd,\"%$%(\" .. num ..\"%)\", string.format(\"%s \",path.getrelative(prj.location,depdata)))\nnum = num + 1\nend\ncmd = string.gsub(cmd, \"%$%(<%)\", \"$<\")\ncmd = string.gsub(cmd, \"%$%(@%)\", \"$@\")\n_p('\\t$(SILENT) %s',cmd)\nend\n_p('')\nend\nend\n_p('-include $(OBJECTS:%%.o=%%.d)')\n_p('ifneq (,$(PCH))')\n_p(' -include $(OBJDIR)/$(notdir $(PCH)).d')\n_p('endif')\nend\nfunction premake.gmake_cpp_header(prj, cc, platforms)\n_p('# %s project makefile autogenerated by GENie', premake.action.current().shortname)\n_p('ifndef config')\n_p(' config=%s', _MAKE.esc(premake.getconfigname(prj.solution.configurations[1], platfo"
+ "rms[1], true)))\n_p('endif')\n_p('')\n_p('ifndef verbose')\n_p(' SILENT = @')\n_p('endif')\n_p('')\n_p('SHELLTYPE := msdos')\n_p('ifeq (,$(ComSpec)$(COMSPEC))')\n_p(' SHELLTYPE := posix')\n_p('endif')\n_p('ifeq (/bin,$(findstring /bin,$(SHELL)))')\n_p(' SHELLTYPE := posix')\n_p('endif')\n_p('ifeq (/bin,$(findstring /bin,$(MAKESHELL)))')\n_p(' SHELLTYPE := posix')\n_p('endif')\n_p('')\n_p('ifeq (posix,$(SHELLTYPE))')\n_p(' MKDIR = $(SILENT) mkdir -p \"$(1)\"')\n_p(' COPY = $(SILENT) cp -fR \"$(1)\" \"$(2)\"')\n_p(' RM= $(SILENT) rm -f \"$(1)\"')\n_p('else')\n_p(' MKDIR = $(SILENT) mkdir \"$(subst /,\\\\\\\\,$(1))\" 2> nul || exit 0')\n_p(' COPY = $(SILENT) copy /Y \"$(subst /,\\\\\\\\,$(1))\" \"$(subst /,\\\\\\\\,$(2))\"')\n_p(' RM = $(SILENT) del /F \"$(subst /,\\\\\\\\,$(1))\" 2> nul || exit 0')\n_p('endif')\n_p('')\n_p('CC = %s', cc.cc)\n_p('CXX = %s', cc.cxx)\n_p('AR = %s', cc.ar)\n_p('')\n_p('ifndef RESCOMP')\n_p(' ifdef WINDRES')\n_p(' RESCOMP = $(WINDRES)')\n_p(' else')\n_p(' RES"
+ "COMP = windres')\n_p(' endif')\n_p('endif')\n_p('')\nend\nfunction premake.gmake_cpp_config(prj, cfg, cc)\n_p('ifeq ($(config),%s)', _MAKE.esc(cfg.shortname))\ncpp.platformtools(cfg, cc)\n_p(' ' .. (table.contains(premake.make.override,\"OBJDIR\") and \"override \" or \"\") .. 'OBJDIR = %s', _MAKE.esc(cfg.objectsdir))\n_p(' ' .. (table.contains(premake.make.override,\"TARGETDIR\") and \"override \" or \"\") .. 'TARGETDIR = %s', _MAKE.esc(cfg.buildtarget.directory))\n_p(' ' .. (table.contains(premake.make.override,\"TARGET\") and \"override \" or \"\") .. 'TARGET = $(TARGETDIR)/%s', _MAKE.esc(cfg.buildtarget.name))\n_p(' DEFINES +=%s', make.list(cc.getdefines(cfg.defines)))\n_p(' INCLUDES +=%s', make.list(cc.getincludedirs(cfg.includedirs)))\ncpp.pchconfig(cfg)\ncpp.flags(cfg, cc)\ncpp.linker(prj, cfg, cc)\n_p(' OBJECTS := \\\\')\nfor _, file in ipairs(prj.files) do\nif path.iscppfile(file) then\nif not table.icontains(cfg.excludes, file) then\n_p('\\t$(OBJDIR)/%s.o \\\\'\n, _MAKE.esc(p"
+ "ath.trimdots(path.removeext(file)))\n)\nend\nend\nend\n_p('')\n_p(' define PREBUILDCMDS')\nif #cfg.prebuildcommands > 0 then\n_p('\\t@echo Running pre-build commands')\n_p('\\t%s', table.implode(cfg.prebuildcommands, \"\", \"\", \"\\n\\t\"))\nend\n_p(' endef')\n_p(' define PRELINKCMDS')\nif #cfg.prelinkcommands > 0 then\n_p('\\t@echo Running pre-link commands')\n_p('\\t%s', table.implode(cfg.prelinkcommands, \"\", \"\", \"\\n\\t\"))\nend\n_p(' endef')\n_p(' define POSTBUILDCMDS')\nif #cfg.postbuildcommands > 0 then\n_p('\\t@echo Running post-build commands')\n_p('\\t%s', table.implode(cfg.postbuildcommands, \"\", \"\", \"\\n\\t\"))\nend\n_p(' endef')\nmake.settings(cfg, cc)\n_p('endif')\n_p('')\nend\nfunction cpp.platformtools(cfg, cc)\nlocal platform = cc.platforms[cfg.platform]\nif platform.cc then\n_p(' CC = %s', platform.cc)\nend\nif platform.cxx then\n_p(' CXX = %s', platform.cxx)\nend\nif platform.ar then\n_p(' AR = %s', platform.ar)\nend\nend\nfunction cpp.flags(cfg, cc)"
+ "\nif cfg.pchheader and not cfg.flags.NoPCH then\n_p(' FORCE_INCLUDE += -include $(OBJDIR)/$(notdir $(PCH))')\nend\nif #cfg.forcedincludes > 0 then\n_p(' FORCE_INCLUDE += -include %s'\n,_MAKE.esc(table.concat(cfg.forcedincludes, \";\")))\nend\n_p(' ALL_CPPFLAGS += $(CPPFLAGS) %s $(DEFINES) $(INCLUDES)', table.concat(cc.getcppflags(cfg), \" \"))\n_p(' ALL_CFLAGS += $(CFLAGS) $(ALL_CPPFLAGS) $(ARCH)%s', make.list(table.join(cc.getcflags(cfg), cfg.buildoptions, cfg.buildoptions_c)))\n_p(' ALL_CXXFLAGS += $(CXXFLAGS) $(CFLAGS) $(ALL_CPPFLAGS) $(ARCH)%s', make.list(table.join(cc.getcflags(cfg), cc.getcxxflags(cfg), cfg.buildoptions, cfg.buildoptions_cpp)))\n_p(' ALL_OBJCFLAGS += $(CXXFLAGS) $(CFLAGS) $(ALL_CPPFLAGS) $(ARCH)%s', make.list(table.join(cc.getcflags(cfg), cc.getcxxflags(cfg), cfg.buildoptions, cfg.buildoptions_objc)))\n_p(' ALL_RESFLAGS += $(RESFLAGS) $(DEFINES) $(INCLUDES)%s',\n make.list(table.join(cc.getdefines(cfg.resdefines),\n cc.getincludedirs(cfg"
+ ".resincludedirs), cfg.resoptions)))\nend\nfunction cpp.linker(prj, cfg, cc)\n_p(' ALL_LDFLAGS += $(LDFLAGS)%s', make.list(table.join(cc.getlibdirflags(cfg), cc.getldflags(cfg), cfg.linkoptions)))\n_p(' LDDEPS +=%s', make.list(_MAKE.esc(premake.getlinks(cfg, \"siblings\", \"fullpath\"))))\n_p(' LIBS += $(LDDEPS)%s', make.list(cc.getlinkflags(cfg)))\n_p(' EXTERNAL_LIBS +=%s', make.list(cc.getlibfiles(cfg)))\nif cfg.kind == \"StaticLib\" then\nif (not prj.options.ArchiveSplit) then\n_p(' LINKCMD = $(AR) %s $(TARGET)', make.list(cc.getarchiveflags(prj, cfg, false)))\nelse\n_p(' LINKCMD = $(AR) %s $(TARGET)', make.list(cc.getarchiveflags(prj, cfg, false)))\n_p(' LINKCMD_NDX= $(AR) %s $(TARGET)', make.list(cc.getarchiveflags(prj, cfg, true)))\nend\nelse\nlocal tool = iif(cfg.language == \"C\", \"CC\", \"CXX\")\n_p(' LINKCMD = $(%s) -o $(TARGET) $(OBJECTS) $(RESOURCES) $(ARCH) $(ALL_LDFLAGS) $(LIBS)', tool)\nend\nend\nfunction cpp.pchconfig(cfg)\nif not cfg.pchheader or cfg.flags.NoPCH then"
+ "\nreturn\nend\nlocal pch = cfg.pchheader\nfor _, incdir in ipairs(cfg.includedirs) do\nlocal abspath = path.getabsolute(path.join(cfg.project.location, incdir))\nlocal testname = path.join(abspath, pch)\nif os.isfile(testname) then\npch = path.getrelative(cfg.location, testname)\nbreak\nend\nend\n_p(' PCH = %s', _MAKE.esc(pch))\n_p(' GCH = $(OBJDIR)/$(notdir $(PCH)).gch')\nend\nfunction cpp.pchrules(prj)\n_p('ifneq (,$(PCH))')\n_p('$(GCH): $(PCH) | $(OBJDIR)')\nif prj.msgprecompile then\n_p('\\t@echo ' .. prj.msgprecompile)\nelse\n_p('\\t@echo $(notdir $<)')\nend\nlocal cmd = iif(prj.language == \"C\", \"$(CC) $(ALL_CFLAGS) -x c-header\", \"$(CXX) $(ALL_CXXFLAGS) -x c++-header\")\n_p('\\t$(SILENT) %s $(DEFINES) $(INCLUDES) -o \"$@\" -c \"$<\"', cmd)\n_p('endif')\n_p('')\nend\nfunction cpp.fileRules(prj)\nfor _, file in ipairs(prj.files or {}) do\nif path.iscppfile(file) then\n_p('$(OBJDIR)/%s.o: %s $(GCH)'\n, _MAKE.esc(path.trimdots(path.removeext(file)))\n, _MAKE.esc(file)\n)\nif (path.isobjcf"
+ "ile(file) and prj.msgcompile_objc) then\n_p('\\t@echo ' .. prj.msgcompile_objc)\nelseif prj.msgcompile then\n_p('\\t@echo ' .. prj.msgcompile)\nelse\n_p('\\t@echo $(notdir $<)')\nend\nif (path.isobjcfile(file)) then\n_p('\\t$(SILENT) $(CXX) $(ALL_OBJCFLAGS) $(FORCE_INCLUDE) -o \"$@\" -c \"$<\"')\nelse\ncpp.buildcommand(path.iscfile(file) and not prj.options.ForceCPP, \"o\")\nend\nfor _, task in ipairs(prj.postcompiletasks or {}) do\n_p('\\t$(SILENT) %s', task)\n_p('')\nend\n_p('')\nelseif (path.getextension(file) == \".rc\") then\n_p('$(OBJDIR)/%s.res: %s', _MAKE.esc(path.getbasename(file)), _MAKE.esc(file))\nif prj.msgresource then\n_p('\\t@echo ' .. prj.msgresource)\nelse\n_p('\\t@echo $(notdir $<)')\nend\n_p('\\t$(SILENT) $(RESCOMP) $< -O coff -o \"$@\" $(ALL_RESFLAGS)')\n_p('')\nend\nend\nend\nfunction cpp.dependencyRules(prj)\nfor _, dependency in ipairs(prj.dependency or {}) do\nfor _, dep in ipairs(dependency or {}) do\nif (dep[3]==nil or dep[3]==false) then\n_p('$(OBJDIR)/%s.o: %s'\n, _MAKE.esc(path.tr"
+ "imdots(path.removeext(path.getrelative(prj.location, dep[1]))))\n, _MAKE.esc(path.getrelative(prj.location, dep[2]))\n)\nelse\n_p('%s: %s'\n, _MAKE.esc(dep[1])\n, _MAKE.esc(path.getrelative(prj.location, dep[2]))\n)\nend\n_p('')\nend\nend\nend\nfunction cpp.buildcommand(iscfile, objext)\nlocal flags = iif(iscfile, '$(CC) $(ALL_CFLAGS)', '$(CXX) $(ALL_CXXFLAGS)')\n_p('\\t$(SILENT) %s $(FORCE_INCLUDE) -o \"$@\" -c \"$<\"', flags, objext)\nend\n",
/* actions/make/make_csharp.lua */
"local function getresourcefilename(cfg, fname)\nif path.getextension(fname) == \".resx\" then\n local name = cfg.buildtarget.basename .. \".\"\n local dir = path.getdirectory(fname)\n if dir ~= \".\" then \nname = name .. path.translate(dir, \".\") .. \".\"\nend\nreturn \"$(OBJDIR)/\" .. _MAKE.esc(name .. path.getbasename(fname)) .. \".resources\"\nelse\nreturn fname\nend\nend\nfunction premake.make_csharp(prj)\nlocal csc = premake.dotnet\nlocal cfglibs = { }\nlocal cfgpairs = { }\nlocal anycfg\nfor cfg in premake.eachconfig(prj) do\nanycfg = cfg\ncfglibs[cfg] = premake.getlinks(cfg, \"siblings\", \"fullpath\")\ncfgpairs[cfg] = { }\nfor _, fname in ipairs(cfglibs[cfg]) do\nif path.getdirectory(fname) ~= cfg.buildtarget.directory then\ncfgpairs[cfg][\"$(TARGETDIR)/\" .. _MAKE.esc(path.getname(fname))] = _MAKE.esc(fname)\nend\nend\nend\nlocal sources = {}\nlocal embedded = { }\nlocal copypairs = { }\nfor fcfg in premake.project.eachfile(prj) do\nlocal action = csc.getbuildaction(fcfg)\nif action == \"Co"
@@ -220,12 +222,12 @@ const char* builtin_scripts[] = {
"('\\t%s', table.implode(cfg.prelinkcommands, \"\", \"\", \"\\n\\t\"))\nend\n_p(' endef')\n_p(' define POSTBUILDCMDS')\nif #cfg.postbuildcommands > 0 then\n_p('\\t@echo Running post-build commands')\n_p('\\t%s', table.implode(cfg.postbuildcommands, \"\", \"\", \"\\n\\t\"))\nend\n_p(' endef')\n_p('endif')\n_p('')\nend\n",
/* actions/vstudio/_vstudio.lua */
- "premake.vstudio = { }\nlocal toolsets = {\nvs2010 = \"v100\",\nvs2012 = \"v110\",\nvs2013 = \"v120\",\nvs2015 = \"v140\"\n}\npremake.vstudio.toolset = toolsets[_ACTION] or \"unknown?\"\npremake.vstudio.splashpath = ''\nlocal vstudio = premake.vstudio\nvstudio.platforms = {\nany = \"Any CPU\",\nmixed = \"Mixed Platforms\",\nNative = \"Win32\",\nx86 = \"x86\",\nx32 = \"Win32\",\nx64 = \"x64\",\nPS3 = \"PS3\",\nXbox360 = \"Xbox 360\",\nARM = \"ARM\",\nOrbis= \"Orbis\"\n}\nfunction vstudio.arch(prj)\nif (prj.language == \"C#\") then\nreturn \"Any CPU\"\nelse\nreturn \"Win32\"\nend\nend\nfunction vstudio.iswinrt()\nreturn vstudio.storeapp ~= nil and vstudio.storeapp ~= ''\nend\nfunction vstudio.buildconfigs(sln)\nlocal cfgs = { }\nlocal platforms = premake.filterplatforms(sln, vstudio.platforms, \"Native\")\nlocal hascpp = premake.hascppproject(sln)\nlocal hasdotnet = premake.hasdotnetproject(sln)\nif hasdotnet and (_ACTION > \"vs2008\" or hascpp) then\ntable.insert(platforms, 1, \"mix"
- "ed\")\nend\nif hasdotnet and (_ACTION < \"vs2010\" or not hascpp) then\ntable.insert(platforms, 1, \"any\")\nend\nif _ACTION > \"vs2008\" then\nlocal platforms2010 = { }\nfor _, platform in ipairs(platforms) do\nif vstudio.platforms[platform] == \"Win32\" then\nif hascpp then\ntable.insert(platforms2010, platform)\nend\nif hasdotnet then\ntable.insert(platforms2010, \"x86\")\nend\nelse\ntable.insert(platforms2010, platform)\nend\nend\nplatforms = platforms2010\nend\nfor _, buildcfg in ipairs(sln.configurations) do\nfor _, platform in ipairs(platforms) do\nlocal entry = { }\nentry.src_buildcfg = buildcfg\nentry.src_platform = platform\nif platform ~= \"PS3\" or _ACTION > \"vs2008\" then\nentry.buildcfg = buildcfg\nentry.platform = vstudio.platforms[platform]\nelse\nentry.buildcfg = platform .. \" \" .. buildcfg\nentry.platform = \"Win32\"\nend\nentry.name = entry.buildcfg .. \"|\" .. entry.platform\nentry.isreal = (platform ~= \"any\" and platform ~= \"mixed\")\ntable.insert(cfgs, entry)\nend\nend\nreturn cfgs"
- "\nend\nfunction vstudio.cleansolution(sln)\npremake.clean.file(sln, \"%%.sln\")\npremake.clean.file(sln, \"%%.suo\")\npremake.clean.file(sln, \"%%.ncb\")\npremake.clean.file(sln, \"%%.userprefs\")\npremake.clean.file(sln, \"%%.usertasks\")\nend\nfunction vstudio.cleanproject(prj)\nlocal fname = premake.project.getfilename(prj, \"%%\")\nos.remove(fname .. \".vcproj\")\nos.remove(fname .. \".vcproj.user\")\nos.remove(fname .. \".vcxproj\")\nos.remove(fname .. \".vcxproj.user\")\nos.remove(fname .. \".vcxproj.filters\")\nos.remove(fname .. \".csproj\")\nos.remove(fname .. \".csproj.user\")\nos.remove(fname .. \".pidb\")\nos.remove(fname .. \".sdf\")\nend\nfunction vstudio.cleantarget(name)\nos.remove(name .. \".pdb\")\nos.remove(name .. \".idb\")\nos.remove(name .. \".ilk\")\nos.remove(name .. \".vshost.exe\")\nos.remove(name .. \".exe.manifest\")\nend\nfunction vstudio.projectfile(prj)\nlocal pattern\nif prj.language == \"C#\" then\npattern = \"%%.csproj\"\nelse\npattern = iif(_ACTION > \"vs2008\", \"%%.vcxproj"
- "\", \"%%.vcproj\")\nend\nlocal fname = premake.project.getbasename(prj.name, pattern)\nfname = path.join(prj.location, fname)\nreturn fname\nend\nfunction vstudio.tool(prj)\nif (prj.language == \"C#\") then\nreturn \"FAE04EC0-301F-11D3-BF4B-00C04F79EFBC\"\nelse\nreturn \"8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942\"\nend\nend\nnewaction {\ntrigger = \"vs2008\",\nshortname = \"Visual Studio 2008\",\ndescription = \"Generate Microsoft Visual Studio 2008 project files\",\nos = \"windows\",\nvalid_kinds = { \"ConsoleApp\", \"WindowedApp\", \"StaticLib\", \"SharedLib\" },\nvalid_languages = { \"C\", \"C++\", \"C#\" },\nvalid_tools = {\ncc = { \"msc\" },\ndotnet = { \"msnet\" },\n},\nonsolution = function(sln)\npremake.generate(sln, \"%%.sln\", vstudio.sln2005.generate)\nend,\nonproject = function(prj)\nif premake.isdotnetproject(prj) then\npremake.generate(prj, \"%%.csproj\", vstudio.cs2005.generate)\npremake.generate(prj, \"%%.csproj.user\", vstudio.cs2005.generate_user)\nelse"
- "\npremake.generate(prj, \"%%.vcproj\", vstudio.vc200x.generate)\npremake.generate(prj, \"%%.vcproj.user\", vstudio.vc200x.generate_user)\nend\nend,\noncleansolution = vstudio.cleansolution,\noncleanproject = vstudio.cleanproject,\noncleantarget = vstudio.cleantarget,\nvstudio = {\nproductVersion = \"9.0.21022\",\nsolutionVersion = \"10\",\ntoolsVersion = \"3.5\",\nsupports64bitEditContinue = false,\n}\n}\nnewaction\n{\ntrigger = \"vs2010\",\nshortname = \"Visual Studio 2010\",\ndescription = \"Generate Microsoft Visual Studio 2010 project files\",\nos = \"windows\",\nvalid_kinds = { \"ConsoleApp\", \"WindowedApp\", \"StaticLib\", \"SharedLib\" },\nvalid_languages = { \"C\", \"C++\", \"C#\"},\nvalid_tools = {\ncc = { \"msc\" },\ndotnet = { \"msnet\" },\n},\nonsolution = function(sln)\npremake.generate(sln, \"%%.sln\", vstudio.sln2005.generate)\nend,\nonproject = function(prj)\nif premake.isdotnetproject(prj) then\npremake.generate(prj, \"%%.csproj\", vstudio.c"
- "s2005.generate)\npremake.generate(prj, \"%%.csproj.user\", vstudio.cs2005.generate_user)\nelse\npremake.generate(prj, \"%%.vcxproj\", premake.vs2010_vcxproj)\npremake.generate(prj, \"%%.vcxproj.user\", premake.vs2010_vcxproj_user)\npremake.generate(prj, \"%%.vcxproj.filters\", vstudio.vc2010.generate_filters)\nend\nend,\noncleansolution = premake.vstudio.cleansolution,\noncleanproject = premake.vstudio.cleanproject,\noncleantarget = premake.vstudio.cleantarget,\nvstudio = {\nproductVersion = \"8.0.30703\",\nsolutionVersion = \"11\",\ntargetFramework = \"4.0\",\ntoolsVersion = \"4.0\",\nsupports64bitEditContinue = false,\n}\n}\n",
+ "premake.vstudio = { }\nlocal toolsets = {\nvs2010 = \"v100\",\nvs2012 = \"v110\",\nvs2013 = \"v120\",\nvs2015 = \"v140\"\n}\npremake.vstudio.toolset = toolsets[_ACTION] or \"unknown?\"\npremake.vstudio.splashpath = ''\nlocal vstudio = premake.vstudio\nvstudio.platforms = {\nany = \"Any CPU\",\nmixed = \"Mixed Platforms\",\nNative = \"Win32\",\nx86 = \"x86\",\nx32 = \"Win32\",\nx64 = \"x64\",\nPS3 = \"PS3\",\nXbox360 = \"Xbox 360\",\nARM = \"ARM\",\nOrbis= \"Orbis\",\nDurango = \"Durango\",\n}\nfunction vstudio.arch(prj)\nif (prj.language == \"C#\") then\nreturn \"Any CPU\"\nelse\nreturn \"Win32\"\nend\nend\nfunction vstudio.iswinrt()\nreturn vstudio.storeapp ~= nil and vstudio.storeapp ~= ''\nend\nfunction vstudio.buildconfigs(sln)\nlocal cfgs = { }\nlocal platforms = premake.filterplatforms(sln, vstudio.platforms, \"Native\")\nlocal hascpp = premake.hascppproject(sln)\nlocal hasdotnet = premake.hasdotnetproject(sln)\nif hasdotnet and (_ACTION > \"vs2008\" or hascpp) then\ntable.i"
+ "nsert(platforms, 1, \"mixed\")\nend\nif hasdotnet and (_ACTION < \"vs2010\" or not hascpp) then\ntable.insert(platforms, 1, \"any\")\nend\nif _ACTION > \"vs2008\" then\nlocal platforms2010 = { }\nfor _, platform in ipairs(platforms) do\nif vstudio.platforms[platform] == \"Win32\" then\nif hascpp then\ntable.insert(platforms2010, platform)\nend\nif hasdotnet then\ntable.insert(platforms2010, \"x86\")\nend\nelse\ntable.insert(platforms2010, platform)\nend\nend\nplatforms = platforms2010\nend\nfor _, buildcfg in ipairs(sln.configurations) do\nfor _, platform in ipairs(platforms) do\nlocal entry = { }\nentry.src_buildcfg = buildcfg\nentry.src_platform = platform\nif platform ~= \"PS3\" or _ACTION > \"vs2008\" then\nentry.buildcfg = buildcfg\nentry.platform = vstudio.platforms[platform]\nelse\nentry.buildcfg = platform .. \" \" .. buildcfg\nentry.platform = \"Win32\"\nend\nentry.name = entry.buildcfg .. \"|\" .. entry.platform\nentry.isreal = (platform ~= \"any\" and platform ~= \"mixed\")\ntable.insert(cfgs, entry"
+ ")\nend\nend\nreturn cfgs\nend\nfunction vstudio.cleansolution(sln)\npremake.clean.file(sln, \"%%.sln\")\npremake.clean.file(sln, \"%%.suo\")\npremake.clean.file(sln, \"%%.ncb\")\npremake.clean.file(sln, \"%%.userprefs\")\npremake.clean.file(sln, \"%%.usertasks\")\nend\nfunction vstudio.cleanproject(prj)\nlocal fname = premake.project.getfilename(prj, \"%%\")\nos.remove(fname .. \".vcproj\")\nos.remove(fname .. \".vcproj.user\")\nos.remove(fname .. \".vcxproj\")\nos.remove(fname .. \".vcxproj.user\")\nos.remove(fname .. \".vcxproj.filters\")\nos.remove(fname .. \".csproj\")\nos.remove(fname .. \".csproj.user\")\nos.remove(fname .. \".pidb\")\nos.remove(fname .. \".sdf\")\nend\nfunction vstudio.cleantarget(name)\nos.remove(name .. \".pdb\")\nos.remove(name .. \".idb\")\nos.remove(name .. \".ilk\")\nos.remove(name .. \".vshost.exe\")\nos.remove(name .. \".exe.manifest\")\nend\nfunction vstudio.projectfile(prj)\nlocal pattern\nif prj.language == \"C#\" then\npattern = \"%%.csproj\"\nelse\npattern = iif(_ACTION > "
+ "\"vs2008\", \"%%.vcxproj\", \"%%.vcproj\")\nend\nlocal fname = premake.project.getbasename(prj.name, pattern)\nfname = path.join(prj.location, fname)\nreturn fname\nend\nfunction vstudio.tool(prj)\nif (prj.language == \"C#\") then\nreturn \"FAE04EC0-301F-11D3-BF4B-00C04F79EFBC\"\nelse\nreturn \"8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942\"\nend\nend\nnewaction {\ntrigger = \"vs2008\",\nshortname = \"Visual Studio 2008\",\ndescription = \"Generate Microsoft Visual Studio 2008 project files\",\nos = \"windows\",\nvalid_kinds = { \"ConsoleApp\", \"WindowedApp\", \"StaticLib\", \"SharedLib\" },\nvalid_languages = { \"C\", \"C++\", \"C#\" },\nvalid_tools = {\ncc = { \"msc\" },\ndotnet = { \"msnet\" },\n},\nonsolution = function(sln)\npremake.generate(sln, \"%%.sln\", vstudio.sln2005.generate)\nend,\nonproject = function(prj)\nif premake.isdotnetproject(prj) then\npremake.generate(prj, \"%%.csproj\", vstudio.cs2005.generate)\npremake.generate(prj, \"%%.csproj.user\", vstudio.cs2"
+ "005.generate_user)\nelse\npremake.generate(prj, \"%%.vcproj\", vstudio.vc200x.generate)\npremake.generate(prj, \"%%.vcproj.user\", vstudio.vc200x.generate_user)\nend\nend,\noncleansolution = vstudio.cleansolution,\noncleanproject = vstudio.cleanproject,\noncleantarget = vstudio.cleantarget,\nvstudio = {\nproductVersion = \"9.0.21022\",\nsolutionVersion = \"10\",\ntoolsVersion = \"3.5\",\nsupports64bitEditContinue = false,\n}\n}\nnewaction\n{\ntrigger = \"vs2010\",\nshortname = \"Visual Studio 2010\",\ndescription = \"Generate Microsoft Visual Studio 2010 project files\",\nos = \"windows\",\nvalid_kinds = { \"ConsoleApp\", \"WindowedApp\", \"StaticLib\", \"SharedLib\" },\nvalid_languages = { \"C\", \"C++\", \"C#\"},\nvalid_tools = {\ncc = { \"msc\" },\ndotnet = { \"msnet\" },\n},\nonsolution = function(sln)\npremake.generate(sln, \"%%.sln\", vstudio.sln2005.generate)\nend,\nonproject = function(prj)\nif premake.isdotnetproject(prj) then\npremake.generate(prj, "
+ "\"%%.csproj\", vstudio.cs2005.generate)\npremake.generate(prj, \"%%.csproj.user\", vstudio.cs2005.generate_user)\nelse\npremake.generate(prj, \"%%.vcxproj\", premake.vs2010_vcxproj)\npremake.generate(prj, \"%%.vcxproj.user\", premake.vs2010_vcxproj_user)\npremake.generate(prj, \"%%.vcxproj.filters\", vstudio.vc2010.generate_filters)\nend\nend,\noncleansolution = premake.vstudio.cleansolution,\noncleanproject = premake.vstudio.cleanproject,\noncleantarget = premake.vstudio.cleantarget,\nvstudio = {\nproductVersion = \"8.0.30703\",\nsolutionVersion = \"11\",\ntargetFramework = \"4.0\",\ntoolsVersion = \"4.0\",\nsupports64bitEditContinue = false,\n}\n}\n",
/* actions/vstudio/vs200x_vcproj.lua */
"premake.vstudio.vc200x = { }\nlocal vc200x = premake.vstudio.vc200x\nlocal tree = premake.tree\nlocal function bool(value)\nreturn iif(value, \"true\", \"false\")\nend\nfunction vc200x.optimization(cfg)\nlocal result = 0\nfor _, value in ipairs(cfg.flags) do\nif (value == \"Optimize\") then\nresult = 3\nelseif (value == \"OptimizeSize\") then\nresult = 1\nelseif (value == \"OptimizeSpeed\") then\nresult = 2\nend\nend\nreturn result\nend\nfunction vc200x.header(element)\nio.eol = \"\\r\\n\"\n_p('<?xml version=\"1.0\" encoding=\"Windows-1252\"?>')\n_p('<%s', element)\n_p(1,'ProjectType=\"Visual C++\"')\n_p(1,'Version=\"9.00\"')\nend\nfunction vc200x.Configuration(name, cfg)\n_p(2,'<Configuration')\n_p(3,'Name=\"%s\"', premake.esc(name))\n_p(3,'OutputDirectory=\"%s\"', premake.esc(cfg.buildtarget.directory))\n_p(3,'IntermediateDirectory=\"%s\"', premake.esc(cfg.objectsdir))\nlocal cfgtype\nif (cfg.kind == \"SharedLib\") then\ncfgtype = 2\nelseif (cfg.kind == \"StaticLib\") then\ncfgtype = 4\nelse\ncfgtype = 1\nen"
@@ -233,18 +235,18 @@ const char* builtin_scripts[] = {
"sreal then\nlocal cfg = premake.getconfig(prj, cfginfo.src_buildcfg, cfginfo.src_platform)\nlocal usePCH = (not prj.flags.NoPCH and prj.pchsource == node.cfg.name)\nlocal isSourceCode = path.iscppfile(fname)\nlocal needsCompileAs = (path.iscfile(fname) ~= premake.project.iscproject(prj))\nif usePCH or isSourceCode then\n_p(depth, '<FileConfiguration')\n_p(depth, '\\tName=\"%s\"', cfginfo.name)\nif excluded or table.icontains(cfg.excludes, fname) then\n_p(depth, '\\tExcludedFromBuild=\"true\"')\nend\n_p(depth, '\\t>')\n_p(depth, '\\t<Tool')\n_p(depth, '\\t\\tName=\"%s\"'\n, iif(cfg.system == \"Xbox360\", \"VCCLX360CompilerTool\", \"VCCLCompilerTool\")\n)\n_p(depth, '\\t\\tObjectFile=\"$(IntDir)\\\\%s.obj\"'\n, path.translate(path.trimdots(path.removeext(fname)), \"\\\\\")\n)\nif needsCompileAs then\n_p(depth, '\\t\\tCompileAs=\"%s\"', iif(path.iscfile(fname), 1, 2))\nend\nif usePCH then\nif cfg.system == \"PS3\" then\nlocal options = table.join(premake.snc.getcflags(cfg),\n premake.snc"
".getcxxflags(cfg),\n cfg.buildoptions)\noptions = table.concat(options, \" \");\noptions = options .. ' --create_pch=\"$(IntDir)/$(TargetName).pch\"'\n_p(depth, '\\t\\tAdditionalOptions=\"%s\"', premake.esc(options))\nelse\n_p(depth, '\\t\\tUsePrecompiledHeader=\"1\"')\nend\nend\n_p(depth, '\\t/>')\n_p(depth, '</FileConfiguration>')\nend\nend\nend\ndepth = depth - 1\n_p(depth, '</File>')\nend,\n}, false, 2)\nend\nfunction vc200x.Platforms(prj)\nlocal used = { }\n_p(1,'<Platforms>')\nfor _, cfg in ipairs(prj.solution.vstudio_configs) do\nif cfg.isreal and not table.contains(used, cfg.platform) then\ntable.insert(used, cfg.platform)\n_p(2,'<Platform')\n_p(3,'Name=\"%s\"', cfg.platform)\n_p(2,'/>')\nend\nend\n_p(1,'</Platforms>')\nend\nfunction vc200x.Symbols(cfg)\nif (not cfg.flags.Symbols) then\nreturn 0\nelse\nif cfg.flags.NoEditAndContinue or\n vc200x.optimization(cfg) ~= 0 or\n cfg.flags.Managed or\n cfg.platform == \"x64\" then\nreturn 3\nelse\nreturn 4\nend\nend\nend\nfuncti"
"on vc200x.VCCLCompilerTool(cfg)\n_p(3,'<Tool')\n_p(4,'Name=\"%s\"', iif(cfg.platform ~= \"Xbox360\", \"VCCLCompilerTool\", \"VCCLX360CompilerTool\"))\nif cfg.flags.UnsignedChar then\ntable.insert(cfg.buildoptions, '/J')\nend\nif #cfg.buildoptions > 0 then\n_p(4,'AdditionalOptions=\"%s /MP\"', table.concat(premake.esc(cfg.buildoptions), \" \"))\nend\n_p(4,'Optimization=\"%s\"', vc200x.optimization(cfg))\nif cfg.flags.NoFramePointer then\n_p(4,'OmitFramePointers=\"%s\"', bool(true))\nend\nif #cfg.includedirs > 0 then\n_p(4,'AdditionalIncludeDirectories=\"%s\"', premake.esc(path.translate(table.concat(cfg.includedirs, \";\"), '\\\\')))\nend\nif #cfg.defines > 0 then\n_p(4,'PreprocessorDefinitions=\"%s\"', premake.esc(table.concat(cfg.defines, \";\")))\nend\nif premake.config.isdebugbuild(cfg) and cfg.flags.EnableMinimalRebuild and not cfg.flags.Managed then\n_p(4,'MinimalRebuild=\"%s\"', bool(true))\nend\nif cfg.flags.NoExceptions then\n_p(4,'ExceptionHandling=\"0\"')\nelseif cfg.flags.SEH then\n_p(4,'ExceptionHa"
- "ndling=\"2\"')\nend\nif vc200x.optimization(cfg) == 0 and not cfg.flags.Managed then\n_p(4,'BasicRuntimeChecks=\"3\"')\nend\nif vc200x.optimization(cfg) ~= 0 then\n_p(4,'StringPooling=\"%s\"', bool(true))\nend\nlocal runtime\nif premake.config.isdebugbuild(cfg) then\nruntime = iif(cfg.flags.StaticRuntime, 1, 3)\nelse\nruntime = iif(cfg.flags.StaticRuntime, 0, 2)\nend\n_p(4,'RuntimeLibrary=\"%s\"', runtime)\n_p(4,'EnableFunctionLevelLinking=\"%s\"', bool(true))\nif cfg.platform ~= \"Xbox360\" and cfg.platform ~= \"x64\" then\nif cfg.flags.EnableSSE then\n_p(4,'EnableEnhancedInstructionSet=\"1\"')\nelseif cfg.flags.EnableSSE2 then\n_p(4,'EnableEnhancedInstructionSet=\"2\"')\nend\nend\nif cfg.flags.FloatFast then\n_p(4,'FloatingPointModel=\"2\"')\nelseif cfg.flags.FloatStrict then\n_p(4,'FloatingPointModel=\"1\"')\nend\nif cfg.flags.NoRTTI and not cfg.flags.Managed then\n_p(4,'RuntimeTypeInfo=\"%s\"', bool(false))\nend\nif cfg.flags.FastCall then\n_p(4,'CallingConvention=\"1\"')\nelseif cfg.flags.StdCall then\n_p"
- "(4,'CallingConvention=\"2\"')\nend\nif cfg.flags.NativeWChar then\n_p(4,'TreatWChar_tAsBuiltInType=\"%s\"', bool(true))\nelseif cfg.flags.NoNativeWChar then\n_p(4,'TreatWChar_tAsBuiltInType=\"%s\"', bool(false))\nend\nif not cfg.flags.NoPCH and cfg.pchheader then\n_p(4,'UsePrecompiledHeader=\"2\"')\n_p(4,'PrecompiledHeaderThrough=\"%s\"', cfg.pchheader)\nelse\n_p(4,'UsePrecompiledHeader=\"%s\"', iif(cfg.flags.NoPCH, 0, 2))\nend\n_p(4,'WarningLevel=\"%s\"', iif(cfg.flags.ExtraWarnings, 4, 3))\nif cfg.flags.FatalWarnings then\n_p(4,'WarnAsError=\"%s\"', bool(true))\nend\nif _ACTION < \"vs2008\" and not cfg.flags.Managed then\n_p(4,'Detect64BitPortabilityProblems=\"%s\"', bool(not cfg.flags.No64BitChecks))\nend\n_p(4,'ProgramDataBaseFileName=\"$(OutDir)\\\\%s.pdb\"', path.getbasename(cfg.buildtarget.name))\n_p(4,'DebugInformationFormat=\"%s\"', vc200x.Symbols(cfg))\nif cfg.language == \"C\" then\n_p(4, 'CompileAs=\"1\"')\nend\n_p(3,'/>')\nend\nfunction vc200x.VCLinkerTool(cfg)\n_p(3,'<Tool')\nif cfg.kind ~= \"Sta"
- "ticLib\" then\n_p(4,'Name=\"%s\"', iif(cfg.platform ~= \"Xbox360\", \"VCLinkerTool\", \"VCX360LinkerTool\"))\nif cfg.flags.NoImportLib then\n_p(4,'IgnoreImportLibrary=\"%s\"', bool(true))\nend\nif #cfg.linkoptions > 0 then\n_p(4,'AdditionalOptions=\"%s\"', table.concat(premake.esc(cfg.linkoptions), \" \"))\nend\nif #cfg.links > 0 then\n_p(4,'AdditionalDependencies=\"%s\"', table.concat(premake.getlinks(cfg, \"all\", \"fullpath\"), \" \"))\nend\n_p(4,'OutputFile=\"$(OutDir)\\\\%s\"', cfg.buildtarget.name)\n_p(4,'LinkIncremental=\"%s\"',\niif(premake.config.isincrementallink(cfg) , 2, 1))\n_p(4,'AdditionalLibraryDirectories=\"%s\"', table.concat(premake.esc(path.translate(cfg.libdirs, '\\\\')) , \";\"))\nlocal deffile = premake.findfile(cfg, \".def\")\nif deffile then\n_p(4,'ModuleDefinitionFile=\"%s\"', deffile)\nend\nif cfg.flags.NoManifest then\n_p(4,'GenerateManifest=\"%s\"', bool(false))\nend\n_p(4,'GenerateDebugInformation=\"%s\"', bool(vc200x.Symbols(cfg) ~= 0))\nif vc200x.Symbols(cfg) ~= 0 then\n_p(4,'Pr"
- "ogramDataBaseFileName=\"$(OutDir)\\\\%s.pdb\"', path.getbasename(cfg.buildtarget.name))\nend\n_p(4,'SubSystem=\"%s\"', iif(cfg.kind == \"ConsoleApp\", 1, 2))\nif vc200x.optimization(cfg) ~= 0 then\n_p(4,'OptimizeReferences=\"2\"')\n_p(4,'EnableCOMDATFolding=\"2\"')\nend\nif (cfg.kind == \"ConsoleApp\" or cfg.kind == \"WindowedApp\") and not cfg.flags.WinMain then\n_p(4,'EntryPointSymbol=\"mainCRTStartup\"')\nend\nif cfg.kind == \"SharedLib\" then\nlocal implibname = cfg.linktarget.fullpath\n_p(4,'ImportLibrary=\"%s\"', iif(cfg.flags.NoImportLib, cfg.objectsdir .. \"\\\\\" .. path.getname(implibname), implibname))\nend\n_p(4,'TargetMachine=\"%d\"', iif(cfg.platform == \"x64\", 17, 1))\nelse\n_p(4,'Name=\"VCLibrarianTool\"')\nif #cfg.links > 0 then\n_p(4,'AdditionalDependencies=\"%s\"', table.concat(premake.getlinks(cfg, \"all\", \"fullpath\"), \" \"))\nend\n_p(4,'OutputFile=\"$(OutDir)\\\\%s\"', cfg.buildtarget.name)\nif #cfg.libdirs > 0 then\n_p(4,'AdditionalLibraryDirectories=\"%s\"', premake.esc(path.transla"
- "te(table.concat(cfg.libdirs , \";\"))))\nend\nlocal addlOptions = {}\nif cfg.platform == \"x32\" then\ntable.insert(addlOptions, \"/MACHINE:X86\")\nelseif cfg.platform == \"x64\" then\ntable.insert(addlOptions, \"/MACHINE:X64\")\nend\naddlOptions = table.join(addlOptions, cfg.linkoptions)\nif #addlOptions > 0 then\n_p(4,'AdditionalOptions=\"%s\"', table.concat(premake.esc(addlOptions), \" \"))\nend\nend\n_p(3,'/>')\nend\nfunction vc200x.VCCLCompilerTool_PS3(cfg)\n_p(3,'<Tool')\n_p(4,'Name=\"VCCLCompilerTool\"')\nlocal buildoptions = table.join(premake.snc.getcflags(cfg), premake.snc.getcxxflags(cfg), cfg.buildoptions)\nif not cfg.flags.NoPCH and cfg.pchheader then\n_p(4,'UsePrecompiledHeader=\"2\"')\n_p(4,'PrecompiledHeaderThrough=\"%s\"', path.getname(cfg.pchheader))\ntable.insert(buildoptions, '--use_pch=\"$(IntDir)/$(TargetName).pch\"')\nelse\n_p(4,'UsePrecompiledHeader=\"%s\"', iif(cfg.flags.NoPCH, 0, 2))\nend\n_p(4,'AdditionalOptions=\"%s\"', premake.esc(table.concat(buildoptions, \" \")))\nif #cfg.includ"
- "edirs > 0 then\n_p(4,'AdditionalIncludeDirectories=\"%s\"', premake.esc(path.translate(table.concat(cfg.includedirs, \";\"), '\\\\')))\nend\nif #cfg.defines > 0 then\n_p(4,'PreprocessorDefinitions=\"%s\"', table.concat(premake.esc(cfg.defines), \";\"))\nend\n_p(4,'ProgramDataBaseFileName=\"$(OutDir)\\\\%s.pdb\"', path.getbasename(cfg.buildtarget.name))\n_p(4,'DebugInformationFormat=\"0\"')\n_p(4,'CompileAs=\"0\"')\n_p(3,'/>')\nend\nfunction vc200x.VCLinkerTool_PS3(cfg)\n_p(3,'<Tool')\nif cfg.kind ~= \"StaticLib\" then\n_p(4,'Name=\"VCLinkerTool\"')\nlocal buildoptions = table.join(premake.snc.getldflags(cfg), cfg.linkoptions)\nif #buildoptions > 0 then\n_p(4,'AdditionalOptions=\"%s\"', premake.esc(table.concat(buildoptions, \" \")))\nend\nif #cfg.links > 0 then\n_p(4,'AdditionalDependencies=\"%s\"', table.concat(premake.getlinks(cfg, \"all\", \"fullpath\"), \" \"))\nend\n_p(4,'OutputFile=\"$(OutDir)\\\\%s\"', cfg.buildtarget.name)\n_p(4,'LinkIncremental=\"0\"')\n_p(4,'AdditionalLibraryDirectories=\"%s\"', tabl"
- "e.concat(premake.esc(path.translate(cfg.libdirs, '\\\\')) , \";\"))\n_p(4,'GenerateManifest=\"%s\"', bool(false))\n_p(4,'ProgramDatabaseFile=\"\"')\n_p(4,'RandomizedBaseAddress=\"1\"')\n_p(4,'DataExecutionPrevention=\"0\"')\nelse\n_p(4,'Name=\"VCLibrarianTool\"')\nlocal buildoptions = table.join(premake.snc.getldflags(cfg), cfg.linkoptions)\nif #buildoptions > 0 then\n_p(4,'AdditionalOptions=\"%s\"', premake.esc(table.concat(buildoptions, \" \")))\nend\nif #cfg.links > 0 then\n_p(4,'AdditionalDependencies=\"%s\"', table.concat(premake.getlinks(cfg, \"all\", \"fullpath\"), \" \"))\nend\n_p(4,'OutputFile=\"$(OutDir)\\\\%s\"', cfg.buildtarget.name)\nif #cfg.libdirs > 0 then\n_p(4,'AdditionalLibraryDirectories=\"%s\"', premake.esc(path.translate(table.concat(cfg.libdirs , \";\"))))\nend\nend\n_p(3,'/>')\nend\nfunction vc200x.VCResourceCompilerTool(cfg)\n_p(3,'<Tool')\n_p(4,'Name=\"VCResourceCompilerTool\"')\nif #cfg.resoptions > 0 then\n_p(4,'AdditionalOptions=\"%s\"', table.concat(premake.esc(cfg.resoptions), \" "
- "\"))\nend\nif #cfg.defines > 0 or #cfg.resdefines > 0 then\n_p(4,'PreprocessorDefinitions=\"%s\"', table.concat(premake.esc(table.join(cfg.defines, cfg.resdefines)), \";\"))\nend\nif #cfg.includedirs > 0 or #cfg.resincludedirs > 0 then\nlocal dirs = table.join(cfg.includedirs, cfg.resincludedirs)\n_p(4,'AdditionalIncludeDirectories=\"%s\"', premake.esc(path.translate(table.concat(dirs, \";\"), '\\\\')))\nend\n_p(3,'/>')\nend\nfunction vc200x.VCManifestTool(cfg)\nlocal manifests = { }\nfor _, fname in ipairs(cfg.files) do\nif path.getextension(fname) == \".manifest\" then\ntable.insert(manifests, fname)\nend\nend\n_p(3,'<Tool')\n_p(4,'Name=\"VCManifestTool\"')\nif #manifests > 0 then\n_p(4,'AdditionalManifestFiles=\"%s\"', premake.esc(table.concat(manifests, \";\")))\nend\n_p(3,'/>')\nend\nfunction vc200x.VCMIDLTool(cfg)\n_p(3,'<Tool')\n_p(4,'Name=\"VCMIDLTool\"')\nif cfg.platform == \"x64\" then\n_p(4,'TargetEnvironment=\"3\"')\nend\n_p(3,'/>')\nend\nfunction vc200x.buildstepsblock(name, steps)\n_p(3,'<Tool')"
- "\n_p(4,'Name=\"%s\"', name)\nif #steps > 0 then\n_p(4,'CommandLine=\"%s\"', premake.esc(table.implode(steps, \"\", \"\", \"\\r\\n\")))\nend\n_p(3,'/>')\nend\nlocal blockmap =\n{\nVCCLCompilerTool = vc200x.VCCLCompilerTool,\nVCCLCompilerTool_PS3 = vc200x.VCCLCompilerTool_PS3,\nVCLinkerTool = vc200x.VCLinkerTool,\nVCLinkerTool_PS3 = vc200x.VCLinkerTool_PS3,\nVCManifestTool = vc200x.VCManifestTool,\nVCMIDLTool = vc200x.VCMIDLTool,\nVCResourceCompilerTool = vc200x.VCResourceCompilerTool,\n}\nlocal function getsections(version, platform)\nif platform == \"Xbox360\" then\nreturn {\n\"VCPreBuildEventTool\",\n\"VCCustomBuildTool\",\n\"VCXMLDataGeneratorTool\",\n\"VCWebServiceProxyGeneratorTool\",\n\"VCMIDLTool\",\n\"VCCLCompilerTool\",\n\"VCManagedResourceCompilerTool\",\n\"VCResourceCompilerTool\",\n\"VCPreLinkEventTool\",\n\"VCLinkerTool\",\n\"VCALinkTool\",\n\"VCX360ImageTool\",\n\"VCBscMakeTool\",\n\"VCX360DeploymentTool\",\n\"VCPostBuildEventTool\",\n\"DebuggerTool\",\n"
- "}\nend\nif platform == \"PS3\" then\nreturn {\n\"VCPreBuildEventTool\",\n\"VCCustomBuildTool\",\n\"VCXMLDataGeneratorTool\",\n\"VCWebServiceProxyGeneratorTool\",\n\"VCMIDLTool\",\n\"VCCLCompilerTool_PS3\",\n\"VCManagedResourceCompilerTool\",\n\"VCResourceCompilerTool\",\n\"VCPreLinkEventTool\",\n\"VCLinkerTool_PS3\",\n\"VCALinkTool\",\n\"VCManifestTool\",\n\"VCXDCMakeTool\",\n\"VCBscMakeTool\",\n\"VCFxCopTool\",\n\"VCAppVerifierTool\",\n\"VCWebDeploymentTool\",\n\"VCPostBuildEventTool\"\n}\nend\nreturn {\n\"VCPreBuildEventTool\",\n\"VCCustomBuildTool\",\n\"VCXMLDataGeneratorTool\",\n\"VCWebServiceProxyGeneratorTool\",\n\"VCMIDLTool\",\n\"VCCLCompilerTool\",\n\"VCManagedResourceCompilerTool\",\n\"VCResourceCompilerTool\",\n\"VCPreLinkEventTool\",\n\"VCLinkerTool\",\n\"VCALinkTool\",\n\"VCManifestTool\",\n\"VCXDCMakeTool\",\n\"VCBscMakeTool\",\n\"VCFxCopTool\",\n\"VCAppVerifierTool\",\n\"VCWebDeploymentTool\",\n\"VCPostBuildEventTool\"\n}\nend\nfunction vc200x.generate(prj)\nvc200x.header('VisualStudioProject')"
- "\n_p(1,'Name=\"%s\"', premake.esc(prj.name))\n_p(1,'ProjectGUID=\"{%s}\"', prj.uuid)\n_p(1,'RootNamespace=\"%s\"', prj.name)\n_p(1,'Keyword=\"%s\"', iif(prj.flags.Managed, \"ManagedCProj\", \"Win32Proj\"))\n_p(1,'>')\nvc200x.Platforms(prj)\n_p(1,'<ToolFiles>')\n_p(1,'</ToolFiles>')\n_p(1,'<Configurations>')\nfor _, cfginfo in ipairs(prj.solution.vstudio_configs) do\nif cfginfo.isreal then\nlocal cfg = premake.getconfig(prj, cfginfo.src_buildcfg, cfginfo.src_platform)\nvc200x.Configuration(cfginfo.name, cfg)\nfor _, block in ipairs(getsections(_ACTION, cfginfo.src_platform)) do\nif blockmap[block] then\nblockmap[block](cfg)\nelseif block == \"VCPreBuildEventTool\" then\nvc200x.buildstepsblock(\"VCPreBuildEventTool\", cfg.prebuildcommands)\nelseif block == \"VCPreLinkEventTool\" then\nvc200x.buildstepsblock(\"VCPreLinkEventTool\", cfg.prelinkcommands)\nelseif block == \"VCPostBuildEventTool\" then\nvc200x.buildstepsblock(\"VCPostBuildEventTool\", cfg.postbuildcommands)\nelseif block == \"VCX360DeploymentTool\" t"
- "hen\n_p(3,'<Tool')\n_p(4,'Name=\"VCX360DeploymentTool\"')\n_p(4,'DeploymentType=\"0\"')\nif #cfg.deploymentoptions > 0 then\n_p(4,'AdditionalOptions=\"%s\"', table.concat(premake.esc(cfg.deploymentoptions), \" \"))\nend\n_p(3,'/>')\nelseif block == \"VCX360ImageTool\" then\n_p(3,'<Tool')\n_p(4,'Name=\"VCX360ImageTool\"')\nif #cfg.imageoptions > 0 then\n_p(4,'AdditionalOptions=\"%s\"', table.concat(premake.esc(cfg.imageoptions), \" \"))\nend\nif cfg.imagepath ~= nil then\n_p(4,'OutputFileName=\"%s\"', premake.esc(path.translate(cfg.imagepath)))\nend\n_p(3,'/>')\nelseif block == \"DebuggerTool\" then\n_p(3,'<DebuggerTool')\n_p(3,'/>')\nelse\n_p(3,'<Tool')\n_p(4,'Name=\"%s\"', block)\n_p(3,'/>')\nend\nend\n_p(2,'</Configuration>')\nend\nend\n_p(1,'</Configurations>')\n_p(1,'<References>')\n_p(1,'</References>')\n_p(1,'<Files>')\nvc200x.Files(prj)\n_p(1,'</Files>')\n_p(1,'<Globals>')\n_p(1,'</Globals>')\n_p('</VisualStudioProject>')\nend\n",
+ "ndling=\"2\"')\nend\nif vc200x.optimization(cfg) == 0 and not cfg.flags.Managed then\n_p(4,'BasicRuntimeChecks=\"3\"')\nend\nif vc200x.optimization(cfg) ~= 0 then\n_p(4,'StringPooling=\"%s\"', bool(true))\nend\nlocal runtime\nif premake.config.isdebugbuild(cfg) then\nruntime = iif(cfg.flags.StaticRuntime, 1, 3)\nelse\nruntime = iif(cfg.flags.StaticRuntime, 0, 2)\nend\n_p(4,'RuntimeLibrary=\"%s\"', runtime)\n_p(4,'EnableFunctionLevelLinking=\"%s\"', bool(true))\nif cfg.platform ~= \"Xbox360\" and cfg.platform ~= \"x64\" and cfg.platform ~= \"Durango\" then\nif cfg.flags.EnableSSE then\n_p(4,'EnableEnhancedInstructionSet=\"1\"')\nelseif cfg.flags.EnableSSE2 then\n_p(4,'EnableEnhancedInstructionSet=\"2\"')\nend\nend\nif cfg.flags.FloatFast then\n_p(4,'FloatingPointModel=\"2\"')\nelseif cfg.flags.FloatStrict then\n_p(4,'FloatingPointModel=\"1\"')\nend\nif cfg.flags.NoRTTI and not cfg.flags.Managed then\n_p(4,'RuntimeTypeInfo=\"%s\"', bool(false))\nend\nif cfg.flags.FastCall then\n_p(4,'CallingConvention=\"1\"')\ne"
+ "lseif cfg.flags.StdCall then\n_p(4,'CallingConvention=\"2\"')\nend\nif cfg.flags.NativeWChar then\n_p(4,'TreatWChar_tAsBuiltInType=\"%s\"', bool(true))\nelseif cfg.flags.NoNativeWChar then\n_p(4,'TreatWChar_tAsBuiltInType=\"%s\"', bool(false))\nend\nif not cfg.flags.NoPCH and cfg.pchheader then\n_p(4,'UsePrecompiledHeader=\"2\"')\n_p(4,'PrecompiledHeaderThrough=\"%s\"', cfg.pchheader)\nelse\n_p(4,'UsePrecompiledHeader=\"%s\"', iif(cfg.flags.NoPCH, 0, 2))\nend\n_p(4,'WarningLevel=\"%s\"', iif(cfg.flags.ExtraWarnings, 4, 3))\nif cfg.flags.FatalWarnings then\n_p(4,'WarnAsError=\"%s\"', bool(true))\nend\nif _ACTION < \"vs2008\" and not cfg.flags.Managed then\n_p(4,'Detect64BitPortabilityProblems=\"%s\"', bool(not cfg.flags.No64BitChecks))\nend\n_p(4,'ProgramDataBaseFileName=\"$(OutDir)\\\\%s.pdb\"', path.getbasename(cfg.buildtarget.name))\n_p(4,'DebugInformationFormat=\"%s\"', vc200x.Symbols(cfg))\nif cfg.language == \"C\" then\n_p(4, 'CompileAs=\"1\"')\nend\n_p(3,'/>')\nend\nfunction vc200x.VCLinkerTool(cfg)\n_p("
+ "3,'<Tool')\nif cfg.kind ~= \"StaticLib\" then\n_p(4,'Name=\"%s\"', iif(cfg.platform ~= \"Xbox360\", \"VCLinkerTool\", \"VCX360LinkerTool\"))\nif cfg.flags.NoImportLib then\n_p(4,'IgnoreImportLibrary=\"%s\"', bool(true))\nend\nif #cfg.linkoptions > 0 then\n_p(4,'AdditionalOptions=\"%s\"', table.concat(premake.esc(cfg.linkoptions), \" \"))\nend\nif #cfg.links > 0 then\n_p(4,'AdditionalDependencies=\"%s\"', table.concat(premake.getlinks(cfg, \"all\", \"fullpath\"), \" \"))\nend\n_p(4,'OutputFile=\"$(OutDir)\\\\%s\"', cfg.buildtarget.name)\n_p(4,'LinkIncremental=\"%s\"',\niif(premake.config.isincrementallink(cfg) , 2, 1))\n_p(4,'AdditionalLibraryDirectories=\"%s\"', table.concat(premake.esc(path.translate(cfg.libdirs, '\\\\')) , \";\"))\nlocal deffile = premake.findfile(cfg, \".def\")\nif deffile then\n_p(4,'ModuleDefinitionFile=\"%s\"', deffile)\nend\nif cfg.flags.NoManifest then\n_p(4,'GenerateManifest=\"%s\"', bool(false))\nend\n_p(4,'GenerateDebugInformation=\"%s\"', bool(vc200x.Symbols(cfg) ~= 0))\nif vc200x."
+ "Symbols(cfg) ~= 0 then\n_p(4,'ProgramDataBaseFileName=\"$(OutDir)\\\\%s.pdb\"', path.getbasename(cfg.buildtarget.name))\nend\n_p(4,'SubSystem=\"%s\"', iif(cfg.kind == \"ConsoleApp\", 1, 2))\nif vc200x.optimization(cfg) ~= 0 then\n_p(4,'OptimizeReferences=\"2\"')\n_p(4,'EnableCOMDATFolding=\"2\"')\nend\nif (cfg.kind == \"ConsoleApp\" or cfg.kind == \"WindowedApp\") and not cfg.flags.WinMain then\n_p(4,'EntryPointSymbol=\"mainCRTStartup\"')\nend\nif cfg.kind == \"SharedLib\" then\nlocal implibname = cfg.linktarget.fullpath\n_p(4,'ImportLibrary=\"%s\"', iif(cfg.flags.NoImportLib, cfg.objectsdir .. \"\\\\\" .. path.getname(implibname), implibname))\nend\n_p(4,'TargetMachine=\"%d\"', iif(cfg.platform == \"x64\", 17, 1))\nelse\n_p(4,'Name=\"VCLibrarianTool\"')\nif #cfg.links > 0 then\n_p(4,'AdditionalDependencies=\"%s\"', table.concat(premake.getlinks(cfg, \"all\", \"fullpath\"), \" \"))\nend\n_p(4,'OutputFile=\"$(OutDir)\\\\%s\"', cfg.buildtarget.name)\nif #cfg.libdirs > 0 then\n_p(4,'AdditionalLibraryDirectories="
+ "\"%s\"', premake.esc(path.translate(table.concat(cfg.libdirs , \";\"))))\nend\nlocal addlOptions = {}\nif cfg.platform == \"x32\" then\ntable.insert(addlOptions, \"/MACHINE:X86\")\nelseif cfg.platform == \"x64\" then\ntable.insert(addlOptions, \"/MACHINE:X64\")\nend\naddlOptions = table.join(addlOptions, cfg.linkoptions)\nif #addlOptions > 0 then\n_p(4,'AdditionalOptions=\"%s\"', table.concat(premake.esc(addlOptions), \" \"))\nend\nend\n_p(3,'/>')\nend\nfunction vc200x.VCCLCompilerTool_PS3(cfg)\n_p(3,'<Tool')\n_p(4,'Name=\"VCCLCompilerTool\"')\nlocal buildoptions = table.join(premake.snc.getcflags(cfg), premake.snc.getcxxflags(cfg), cfg.buildoptions)\nif not cfg.flags.NoPCH and cfg.pchheader then\n_p(4,'UsePrecompiledHeader=\"2\"')\n_p(4,'PrecompiledHeaderThrough=\"%s\"', path.getname(cfg.pchheader))\ntable.insert(buildoptions, '--use_pch=\"$(IntDir)/$(TargetName).pch\"')\nelse\n_p(4,'UsePrecompiledHeader=\"%s\"', iif(cfg.flags.NoPCH, 0, 2))\nend\n_p(4,'AdditionalOptions=\"%s\"', premake.esc(table.concat(build"
+ "options, \" \")))\nif #cfg.includedirs > 0 then\n_p(4,'AdditionalIncludeDirectories=\"%s\"', premake.esc(path.translate(table.concat(cfg.includedirs, \";\"), '\\\\')))\nend\nif #cfg.defines > 0 then\n_p(4,'PreprocessorDefinitions=\"%s\"', table.concat(premake.esc(cfg.defines), \";\"))\nend\n_p(4,'ProgramDataBaseFileName=\"$(OutDir)\\\\%s.pdb\"', path.getbasename(cfg.buildtarget.name))\n_p(4,'DebugInformationFormat=\"0\"')\n_p(4,'CompileAs=\"0\"')\n_p(3,'/>')\nend\nfunction vc200x.VCLinkerTool_PS3(cfg)\n_p(3,'<Tool')\nif cfg.kind ~= \"StaticLib\" then\n_p(4,'Name=\"VCLinkerTool\"')\nlocal buildoptions = table.join(premake.snc.getldflags(cfg), cfg.linkoptions)\nif #buildoptions > 0 then\n_p(4,'AdditionalOptions=\"%s\"', premake.esc(table.concat(buildoptions, \" \")))\nend\nif #cfg.links > 0 then\n_p(4,'AdditionalDependencies=\"%s\"', table.concat(premake.getlinks(cfg, \"all\", \"fullpath\"), \" \"))\nend\n_p(4,'OutputFile=\"$(OutDir)\\\\%s\"', cfg.buildtarget.name)\n_p(4,'LinkIncremental=\"0\"')\n_p(4,'Additiona"
+ "lLibraryDirectories=\"%s\"', table.concat(premake.esc(path.translate(cfg.libdirs, '\\\\')) , \";\"))\n_p(4,'GenerateManifest=\"%s\"', bool(false))\n_p(4,'ProgramDatabaseFile=\"\"')\n_p(4,'RandomizedBaseAddress=\"1\"')\n_p(4,'DataExecutionPrevention=\"0\"')\nelse\n_p(4,'Name=\"VCLibrarianTool\"')\nlocal buildoptions = table.join(premake.snc.getldflags(cfg), cfg.linkoptions)\nif #buildoptions > 0 then\n_p(4,'AdditionalOptions=\"%s\"', premake.esc(table.concat(buildoptions, \" \")))\nend\nif #cfg.links > 0 then\n_p(4,'AdditionalDependencies=\"%s\"', table.concat(premake.getlinks(cfg, \"all\", \"fullpath\"), \" \"))\nend\n_p(4,'OutputFile=\"$(OutDir)\\\\%s\"', cfg.buildtarget.name)\nif #cfg.libdirs > 0 then\n_p(4,'AdditionalLibraryDirectories=\"%s\"', premake.esc(path.translate(table.concat(cfg.libdirs , \";\"))))\nend\nend\n_p(3,'/>')\nend\nfunction vc200x.VCResourceCompilerTool(cfg)\n_p(3,'<Tool')\n_p(4,'Name=\"VCResourceCompilerTool\"')\nif #cfg.resoptions > 0 then\n_p(4,'AdditionalOptions=\"%s\"', table.concat"
+ "(premake.esc(cfg.resoptions), \" \"))\nend\nif #cfg.defines > 0 or #cfg.resdefines > 0 then\n_p(4,'PreprocessorDefinitions=\"%s\"', table.concat(premake.esc(table.join(cfg.defines, cfg.resdefines)), \";\"))\nend\nif #cfg.includedirs > 0 or #cfg.resincludedirs > 0 then\nlocal dirs = table.join(cfg.includedirs, cfg.resincludedirs)\n_p(4,'AdditionalIncludeDirectories=\"%s\"', premake.esc(path.translate(table.concat(dirs, \";\"), '\\\\')))\nend\n_p(3,'/>')\nend\nfunction vc200x.VCManifestTool(cfg)\nlocal manifests = { }\nfor _, fname in ipairs(cfg.files) do\nif path.getextension(fname) == \".manifest\" then\ntable.insert(manifests, fname)\nend\nend\n_p(3,'<Tool')\n_p(4,'Name=\"VCManifestTool\"')\nif #manifests > 0 then\n_p(4,'AdditionalManifestFiles=\"%s\"', premake.esc(table.concat(manifests, \";\")))\nend\n_p(3,'/>')\nend\nfunction vc200x.VCMIDLTool(cfg)\n_p(3,'<Tool')\n_p(4,'Name=\"VCMIDLTool\"')\nif cfg.platform == \"x64\" then\n_p(4,'TargetEnvironment=\"3\"')\nend\n_p(3,'/>')\nend\nfunction vc200x.buildstepsb"
+ "lock(name, steps)\n_p(3,'<Tool')\n_p(4,'Name=\"%s\"', name)\nif #steps > 0 then\n_p(4,'CommandLine=\"%s\"', premake.esc(table.implode(steps, \"\", \"\", \"\\r\\n\")))\nend\n_p(3,'/>')\nend\nlocal blockmap =\n{\nVCCLCompilerTool = vc200x.VCCLCompilerTool,\nVCCLCompilerTool_PS3 = vc200x.VCCLCompilerTool_PS3,\nVCLinkerTool = vc200x.VCLinkerTool,\nVCLinkerTool_PS3 = vc200x.VCLinkerTool_PS3,\nVCManifestTool = vc200x.VCManifestTool,\nVCMIDLTool = vc200x.VCMIDLTool,\nVCResourceCompilerTool = vc200x.VCResourceCompilerTool,\n}\nlocal function getsections(version, platform)\nif platform == \"Xbox360\" then\nreturn {\n\"VCPreBuildEventTool\",\n\"VCCustomBuildTool\",\n\"VCXMLDataGeneratorTool\",\n\"VCWebServiceProxyGeneratorTool\",\n\"VCMIDLTool\",\n\"VCCLCompilerTool\",\n\"VCManagedResourceCompilerTool\",\n\"VCResourceCompilerTool\",\n\"VCPreLinkEventTool\",\n\"VCLinkerTool\",\n\"VCALinkTool\",\n\"VCX360ImageTool\",\n\"VCBscMakeTool\",\n\"VCX360DeploymentTool\",\n\"VCPostBuildE"
+ "ventTool\",\n\"DebuggerTool\",\n}\nend\nif platform == \"PS3\" then\nreturn {\n\"VCPreBuildEventTool\",\n\"VCCustomBuildTool\",\n\"VCXMLDataGeneratorTool\",\n\"VCWebServiceProxyGeneratorTool\",\n\"VCMIDLTool\",\n\"VCCLCompilerTool_PS3\",\n\"VCManagedResourceCompilerTool\",\n\"VCResourceCompilerTool\",\n\"VCPreLinkEventTool\",\n\"VCLinkerTool_PS3\",\n\"VCALinkTool\",\n\"VCManifestTool\",\n\"VCXDCMakeTool\",\n\"VCBscMakeTool\",\n\"VCFxCopTool\",\n\"VCAppVerifierTool\",\n\"VCWebDeploymentTool\",\n\"VCPostBuildEventTool\"\n}\nend\nreturn {\n\"VCPreBuildEventTool\",\n\"VCCustomBuildTool\",\n\"VCXMLDataGeneratorTool\",\n\"VCWebServiceProxyGeneratorTool\",\n\"VCMIDLTool\",\n\"VCCLCompilerTool\",\n\"VCManagedResourceCompilerTool\",\n\"VCResourceCompilerTool\",\n\"VCPreLinkEventTool\",\n\"VCLinkerTool\",\n\"VCALinkTool\",\n\"VCManifestTool\",\n\"VCXDCMakeTool\",\n\"VCBscMakeTool\",\n\"VCFxCopTool\",\n\"VCAppVerifierTool\",\n\"VCWebDeploymentTool\",\n\"VCPostBuildEventTool\"\n}\nend\nfunction vc200x.generate(prj)\nvc200"
+ "x.header('VisualStudioProject')\n_p(1,'Name=\"%s\"', premake.esc(prj.name))\n_p(1,'ProjectGUID=\"{%s}\"', prj.uuid)\n_p(1,'RootNamespace=\"%s\"', prj.name)\n_p(1,'Keyword=\"%s\"', iif(prj.flags.Managed, \"ManagedCProj\", \"Win32Proj\"))\n_p(1,'>')\nvc200x.Platforms(prj)\n_p(1,'<ToolFiles>')\n_p(1,'</ToolFiles>')\n_p(1,'<Configurations>')\nfor _, cfginfo in ipairs(prj.solution.vstudio_configs) do\nif cfginfo.isreal then\nlocal cfg = premake.getconfig(prj, cfginfo.src_buildcfg, cfginfo.src_platform)\nvc200x.Configuration(cfginfo.name, cfg)\nfor _, block in ipairs(getsections(_ACTION, cfginfo.src_platform)) do\nif blockmap[block] then\nblockmap[block](cfg)\nelseif block == \"VCPreBuildEventTool\" then\nvc200x.buildstepsblock(\"VCPreBuildEventTool\", cfg.prebuildcommands)\nelseif block == \"VCPreLinkEventTool\" then\nvc200x.buildstepsblock(\"VCPreLinkEventTool\", cfg.prelinkcommands)\nelseif block == \"VCPostBuildEventTool\" then\nvc200x.buildstepsblock(\"VCPostBuildEventTool\", cfg.postbuildcommands)\nelseif bloc"
+ "k == \"VCX360DeploymentTool\" then\n_p(3,'<Tool')\n_p(4,'Name=\"VCX360DeploymentTool\"')\n_p(4,'DeploymentType=\"0\"')\nif #cfg.deploymentoptions > 0 then\n_p(4,'AdditionalOptions=\"%s\"', table.concat(premake.esc(cfg.deploymentoptions), \" \"))\nend\n_p(3,'/>')\nelseif block == \"VCX360ImageTool\" then\n_p(3,'<Tool')\n_p(4,'Name=\"VCX360ImageTool\"')\nif #cfg.imageoptions > 0 then\n_p(4,'AdditionalOptions=\"%s\"', table.concat(premake.esc(cfg.imageoptions), \" \"))\nend\nif cfg.imagepath ~= nil then\n_p(4,'OutputFileName=\"%s\"', premake.esc(path.translate(cfg.imagepath)))\nend\n_p(3,'/>')\nelseif block == \"DebuggerTool\" then\n_p(3,'<DebuggerTool')\n_p(3,'/>')\nelse\n_p(3,'<Tool')\n_p(4,'Name=\"%s\"', block)\n_p(3,'/>')\nend\nend\n_p(2,'</Configuration>')\nend\nend\n_p(1,'</Configurations>')\n_p(1,'<References>')\n_p(1,'</References>')\n_p(1,'<Files>')\nvc200x.Files(prj)\n_p(1,'</Files>')\n_p(1,'<Globals>')\n_p(1,'</Globals>')\n_p('</VisualStudioProject>')\nend\n",
/* actions/vstudio/vs200x_vcproj_user.lua */
"local vc200x = premake.vstudio.vc200x\nfunction vc200x.generate_user(prj)\nvc200x.header('VisualStudioUserFile')\n_p(1,'ShowAllFiles=\"false\"')\n_p(1,'>')\n_p(1,'<Configurations>')\nfor _, cfginfo in ipairs(prj.solution.vstudio_configs) do\nif cfginfo.isreal then\nlocal cfg = premake.getconfig(prj, cfginfo.src_buildcfg, cfginfo.src_platform)\n_p(2,'<Configuration')\n_p(3,'Name=\"%s\"', premake.esc(cfginfo.name))\n_p(3,'>')\nvc200x.debugdir(cfg)\n_p(2,'</Configuration>')\nend\nend\n_p(1,'</Configurations>')\n_p('</VisualStudioUserFile>')\nend\nfunction vc200x.environmentargs(cfg)\nif cfg.environmentargs and #cfg.environmentargs > 0 then\n_p(4,'Environment=\"%s\"', string.gsub(table.concat(cfg.environmentargs, \"&#x0A;\"),'\"','&quot;'))\nif cfg.flags.EnvironmentArgsDontMerge then\n_p(4,'EnvironmentMerge=\"false\"')\nend\nend\nend\nfunction vc200x.debugdir(cfg)\n_p(3,'<DebugSettings')\nif cfg.debugdir then\n_p(4,'WorkingDirectory=\"%s\"', path.translate(cfg.debugdir, '\\\\'))\nend\nif #cfg.debugargs > 0 then\n_"
@@ -269,36 +271,39 @@ const char* builtin_scripts[] = {
"local cs2005 = premake.vstudio.cs2005\nfunction cs2005.generate_user(prj)\nio.eol = \"\\r\\n\"\n_p('<Project xmlns=\"http://schemas.microsoft.com/developer/msbuild/2003\">')\n_p(' <PropertyGroup>')\nlocal refpaths = table.translate(prj.libdirs, function(v) return path.getabsolute(prj.location .. \"/\" .. v) end)\n_p(' <ReferencePath>%s</ReferencePath>', path.translate(table.concat(refpaths, \";\"), \"\\\\\"))\n_p(' </PropertyGroup>')\n_p('</Project>')\nend\n",
/* actions/vstudio/vs2010_vcxproj.lua */
- "premake.vstudio.vc2010 = { }\nlocal vc2010 = premake.vstudio.vc2010\nlocal vstudio = premake.vstudio\nlocal function vs2010_config(prj)\n_p(1,'<ItemGroup Label=\"ProjectConfigurations\">')\nfor _, cfginfo in ipairs(prj.solution.vstudio_configs) do\n_p(2,'<ProjectConfiguration Include=\"%s\">', premake.esc(cfginfo.name))\n_p(3,'<Configuration>%s</Configuration>',cfginfo.buildcfg)\n_p(3,'<Platform>%s</Platform>',cfginfo.platform)\n_p(2,'</ProjectConfiguration>')\nend\n_p(1,'</ItemGroup>')\nend\nlocal function vs2010_globals(prj)\nlocal action = premake.action.current()\n_p(1,'<PropertyGroup Label=\"Globals\">')\n_p(2,'<ProjectGuid>{%s}</ProjectGuid>',prj.uuid)\n_p(2,'<RootNamespace>%s</RootNamespace>',prj.name)\nlocal windowsTargetPlatformVersion = prj.windowstargetplatformversion or action.vstudio.windowsTargetPlatformVersion\nif windowsTargetPlatformVersion ~= nil then\n_p(2,'<WindowsTargetPlatformVersion>%s</WindowsTargetPlatformVersion>',windowsTargetPlatformVersion)\nend\nif prj.flags and prj.flags.Managed "
- "then\n_p(2,'<TargetFrameworkVersion>v4.0</TargetFrameworkVersion>')\n_p(2,'<Keyword>ManagedCProj</Keyword>')\nelseif vstudio.iswinrt() then\n_p(2,'<DefaultLanguage>en-US</DefaultLanguage>')\n_p(2,'<MinimumVisualStudioVersion>12.0</MinimumVisualStudioVersion>')\n_p(2,'<AppContainerApplication>true</AppContainerApplication>')\nif vstudio.toolset == \"v120_wp81\" then\n_p(2,'<ApplicationType>Windows Phone</ApplicationType>')\nelse\n_p(2,'<ApplicationType>Windows Store</ApplicationType>')\nend\n_p(2,'<ApplicationTypeRevision>%s</ApplicationTypeRevision>', vstudio.storeapp)\nelse\n_p(2,'<Keyword>Win32Proj</Keyword>')\nend\n_p(1,'</PropertyGroup>')\nend\nfunction vc2010.config_type(config)\nlocal t =\n{\nSharedLib = \"DynamicLibrary\",\nStaticLib = \"StaticLibrary\",\nConsoleApp = \"Application\",\nWindowedApp = \"Application\"\n}\nreturn t[config.kind]\nend\nlocal function if_config_and_platform()\nreturn 'Condition=\"\\'$(Configuration)|$(Platform)\\'==\\'%s\\'\"'\nend\nlocal function optimisation(cfg)\nlocal resu"
- "lt = \"Disabled\"\nfor _, value in ipairs(cfg.flags) do\nif (value == \"Optimize\") then\nresult = \"Full\"\nelseif (value == \"OptimizeSize\") then\nresult = \"MinSpace\"\nelseif (value == \"OptimizeSpeed\") then\nresult = \"MaxSpeed\"\nend\nend\nreturn result\nend\nfunction vc2010.configurationPropertyGroup(cfg, cfginfo)\n_p(1,'<PropertyGroup '..if_config_and_platform() ..' Label=\"Configuration\">'\n, premake.esc(cfginfo.name))\n_p(2,'<ConfigurationType>%s</ConfigurationType>',vc2010.config_type(cfg))\n_p(2,'<UseDebugLibraries>%s</UseDebugLibraries>', iif(optimisation(cfg) == \"Disabled\",\"true\",\"false\"))\n_p(2,'<PlatformToolset>%s</PlatformToolset>', premake.vstudio.toolset)\nif cfg.flags.MFC then\n_p(2,'<UseOfMfc>%s</UseOfMfc>', iif(cfg.flags.StaticRuntime, \"Static\", \"Dynamic\"))\nend\nif cfg.flags.ATL or cfg.flags.StaticATL then\n_p(2,'<UseOfAtl>%s</UseOfAtl>', iif(cfg.flags.StaticATL, \"Static\", \"Dynamic\"))\nend\nif cfg.flags.Managed then\n_p(2,'<CLRSupport>true</CLRSupport>')\nend\n_p(1,'</Pr"
- "opertyGroup>')\nend\nlocal function import_props(prj)\nfor _, cfginfo in ipairs(prj.solution.vstudio_configs) do\nlocal cfg = premake.getconfig(prj, cfginfo.src_buildcfg, cfginfo.src_platform)\n_p(1,'<ImportGroup '..if_config_and_platform() ..' Label=\"PropertySheets\">'\n,premake.esc(cfginfo.name))\n_p(2,'<Import Project=\"$(UserRootDir)\\\\Microsoft.Cpp.$(Platform).user.props\" Condition=\"exists(\\'$(UserRootDir)\\\\Microsoft.Cpp.$(Platform).user.props\\')\" Label=\"LocalAppDataPlatform\" />')\n_p(1,'</ImportGroup>')\nend\nend\nlocal function add_trailing_backslash(dir)\nif dir:len() > 0 and dir:sub(-1) ~= \"\\\\\" then\nreturn dir..\"\\\\\"\nend\nreturn dir\nend\nfunction vc2010.outputProperties(prj)\nfor _, cfginfo in ipairs(prj.solution.vstudio_configs) do\nlocal cfg = premake.getconfig(prj, cfginfo.src_buildcfg, cfginfo.src_platform)\nlocal target = cfg.buildtarget\nlocal outdir = add_trailing_backslash(target.directory)\nlocal intdir = add_trailing_backslash(cfg.objectsdir)\n_p(1,'<PropertyGroup '..if_"
- "config_and_platform() ..'>', premake.esc(cfginfo.name))\n_p(2,'<OutDir>%s</OutDir>', premake.esc(outdir))\nif cfg.platform == \"Xbox360\" then\n_p(2,'<OutputFile>$(OutDir)%s</OutputFile>', premake.esc(target.name))\nend\n_p(2,'<IntDir>%s</IntDir>', premake.esc(intdir))\n_p(2,'<TargetName>%s</TargetName>', premake.esc(path.getbasename(target.name)))\n_p(2,'<TargetExt>%s</TargetExt>', premake.esc(path.getextension(target.name)))\nif cfg.kind == \"SharedLib\" then\nlocal ignore = (cfg.flags.NoImportLib ~= nil)\n _p(2,'<IgnoreImportLibrary>%s</IgnoreImportLibrary>', tostring(ignore))\nend\nif cfg.kind ~= \"StaticLib\" then\n_p(2,'<LinkIncremental>%s</LinkIncremental>', tostring(premake.config.isincrementallink(cfg)))\nend\nif cfg.flags.NoManifest then\n_p(2,'<GenerateManifest>false</GenerateManifest>')\nend\n_p(1,'</PropertyGroup>')\nend\nend\nlocal function runtime(cfg)\nlocal runtime\nlocal flags = cfg.flags\nif premake.config.isdebugbuild(cfg) then\nruntime = iif(flags.StaticRuntime and not flags.Managed, \"Mul"
- "tiThreadedDebug\", \"MultiThreadedDebugDLL\")\nelse\nruntime = iif(flags.StaticRuntime and not flags.Managed, \"MultiThreaded\", \"MultiThreadedDLL\")\nend\nreturn runtime\nend\nlocal function precompiled_header(cfg)\n if not cfg.flags.NoPCH and cfg.pchheader then\n_p(3,'<PrecompiledHeader>Use</PrecompiledHeader>')\n_p(3,'<PrecompiledHeaderFile>%s</PrecompiledHeaderFile>', cfg.pchheader)\nelse\n_p(3,'<PrecompiledHeader></PrecompiledHeader>')\nend\nend\nlocal function preprocessor(indent,cfg)\nif #cfg.defines > 0 then\n_p(indent,'<PreprocessorDefinitions>%s;%%(PreprocessorDefinitions)</PreprocessorDefinitions>'\n,premake.esc(table.concat(cfg.defines, \";\")))\nelse\n_p(indent,'<PreprocessorDefinitions></PreprocessorDefinitions>')\nend\nend\nlocal function include_dirs(indent,cfg)\nif #cfg.includedirs > 0 then\n_p(indent,'<AdditionalIncludeDirectories>%s;%%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>'\n,premake.esc(path.translate(table.concat(cfg.includedirs, \";\"), '\\\\')))\nend\nend\nlo"
- "cal function resource_compile(cfg)\n_p(2,'<ResourceCompile>')\npreprocessor(3,cfg)\ninclude_dirs(3,cfg)\n_p(2,'</ResourceCompile>')\nend\nlocal function exceptions(cfg)\nif cfg.flags.NoExceptions then\n_p(2,'<ExceptionHandling>false</ExceptionHandling>')\nelseif cfg.flags.SEH then\n_p(2,'<ExceptionHandling>Async</ExceptionHandling>')\nend\nend\nlocal function rtti(cfg)\nif cfg.flags.NoRTTI and not cfg.flags.Managed then\n_p(3,'<RuntimeTypeInfo>false</RuntimeTypeInfo>')\nend\nend\nlocal function calling_convention(cfg)\nif cfg.flags.FastCall then\n_p(3,'<CallingConvention>FastCall</CallingConvention>')\nelseif cfg.flags.StdCall then\n_p(3,'<CallingConvention>StdCall</CallingConvention>')\nend\nend\nlocal function wchar_t_buildin(cfg)\nif cfg.flags.NativeWChar then\n_p(3,'<TreatWChar_tAsBuiltInType>true</TreatWChar_tAsBuiltInType>')\nelseif cfg.flags.NoNativeWChar then\n_p(3,'<TreatWChar_tAsBuiltInType>false</TreatWChar_tAsBuiltInType>')\nend\nend\nlocal function sse(cfg)\nif cfg.flags.EnableSSE then\n_p(3,'<Ena"
- "bleEnhancedInstructionSet>StreamingSIMDExtensions</EnableEnhancedInstructionSet>')\nelseif cfg.flags.EnableSSE2 then\n_p(3,'<EnableEnhancedInstructionSet>StreamingSIMDExtensions2</EnableEnhancedInstructionSet>')\nend\nend\nlocal function floating_point(cfg)\n if cfg.flags.FloatFast then\n_p(3,'<FloatingPointModel>Fast</FloatingPointModel>')\nelseif cfg.flags.FloatStrict and not cfg.flags.Managed then\n_p(3,'<FloatingPointModel>Strict</FloatingPointModel>')\nend\nend\nlocal function debug_info(cfg)\nlocal debug_info = ''\nif cfg.flags.Symbols then\nif (action.vstudio.supports64bitEditContinue == false and cfg.platform == \"x64\")\nor cfg.flags.Managed\nor premake.config.isoptimizedbuild(cfg.flags)\nor cfg.flags.NoEditAndContinue\nthen\ndebug_info = \"ProgramDatabase\"\nelse\ndebug_info = \"EditAndContinue\"\nend\nend\n_p(3,'<DebugInformationFormat>%s</DebugInformationFormat>',debug_info)\nend\nlocal function minimal_build(cfg)\nif premake.config.isdebugbuild(cfg) and cfg.flags.EnableMinimalRebuild then\n_p("
- "3,'<MinimalRebuild>true</MinimalRebuild>')\nelse\n_p(3,'<MinimalRebuild>false</MinimalRebuild>')\nend\nend\nlocal function compile_language(cfg)\nif cfg.options.ForceCPP then\n_p(3,'<CompileAs>CompileAsCpp</CompileAs>')\nelse\nif cfg.language == \"C\" then\n_p(3,'<CompileAs>CompileAsC</CompileAs>')\nend\nend\nend\nlocal function forcedinclude_files(indent,cfg)\nif #cfg.forcedincludes > 0 then\n_p(indent,'<ForcedIncludeFiles>%s</ForcedIncludeFiles>'\n,premake.esc(path.translate(table.concat(cfg.forcedincludes, \";\"), '\\\\')))\nend\nend\nlocal function vs10_clcompile(cfg)\n_p(2,'<ClCompile>')\n_p(3,'<AdditionalOptions>%s %s%%(AdditionalOptions)</AdditionalOptions>'\n, table.concat(premake.esc(cfg.buildoptions), \" \")\n, iif(cfg.flags.UnsignedChar, \"/J \", \" \")\n)\n_p(3,'<Optimization>%s</Optimization>',optimisation(cfg))\ninclude_dirs(3,cfg)\npreprocessor(3,cfg)\nminimal_build(cfg)\nif not premake.config.isoptimizedbuild(cfg.flags) then\nif not cfg.flags.Managed then\n_p(3,'<BasicRuntimeChecks>EnableFastC"
- "hecks</BasicRuntimeChecks>')\nend\nif cfg.flags.ExtraWarnings then\nend\nelse\n_p(3,'<StringPooling>true</StringPooling>')\nend\n_p(3,'<RuntimeLibrary>%s</RuntimeLibrary>', runtime(cfg))\n_p(3,'<FunctionLevelLinking>true</FunctionLevelLinking>')\nif not cfg.flags.NoMultiProcessorCompilation and not cfg.flags.EnableMinimalRebuild then\n_p(3,'<MultiProcessorCompilation>true</MultiProcessorCompilation>')\nelse\n_p(3,'<MultiProcessorCompilation>false</MultiProcessorCompilation>')\nend\nprecompiled_header(cfg)\nif cfg.flags.ExtraWarnings then\n_p(3,'<WarningLevel>Level4</WarningLevel>')\nelse\n_p(3,'<WarningLevel>Level3</WarningLevel>')\nend\nif cfg.flags.FatalWarnings then\n_p(3,'<TreatWarningAsError>true</TreatWarningAsError>')\nend\nexceptions(cfg)\nrtti(cfg)\ncalling_convention(cfg)\nwchar_t_buildin(cfg)\nsse(cfg)\nfloating_point(cfg)\ndebug_info(cfg)\nif cfg.flags.Symbols then\n_p(3,'<ProgramDataBaseFileName>$(OutDir)%s.pdb</ProgramDataBaseFileName>'\n, path.getbasename(cfg.buildtarget.name))\nend\nif cfg.flag"
- "s.NoFramePointer then\n_p(3,'<OmitFramePointers>true</OmitFramePointers>')\nend\ncompile_language(cfg)\nforcedinclude_files(3,cfg);\n_p(2,'</ClCompile>')\nend\nlocal function event_hooks(cfg)\nif #cfg.postbuildcommands> 0 then\n _p(2,'<PostBuildEvent>')\n_p(3,'<Command>%s</Command>',premake.esc(table.implode(cfg.postbuildcommands, \"\", \"\", \"\\r\\n\")))\n_p(2,'</PostBuildEvent>')\nend\nif #cfg.prebuildcommands> 0 then\n _p(2,'<PreBuildEvent>')\n_p(3,'<Command>%s</Command>',premake.esc(table.implode(cfg.prebuildcommands, \"\", \"\", \"\\r\\n\")))\n_p(2,'</PreBuildEvent>')\nend\nif #cfg.prelinkcommands> 0 then\n _p(2,'<PreLinkEvent>')\n_p(3,'<Command>%s</Command>',premake.esc(table.implode(cfg.prelinkcommands, \"\", \"\", \"\\r\\n\")))\n_p(2,'</PreLinkEvent>')\nend\nend\nlocal function additional_options(indent,cfg)\nif #cfg.linkoptions > 0 then\n_p(indent,'<AdditionalOptions>%s %%(AdditionalOptions)</AdditionalOptions>',\ntable.concat(premake.esc(cfg.linkoptions), \" \"))\nend\nend\nlocal function l"
- "ink_target_machine(index,cfg)\nlocal platforms = {x32 = 'MachineX86', x64 = 'MachineX64'}\nif platforms[cfg.platform] then\n_p(index,'<TargetMachine>%s</TargetMachine>', platforms[cfg.platform])\nend\nend\nlocal function item_def_lib(cfg)\n -- The Xbox360 project files are stored in another place in the project file.\nif cfg.kind == 'StaticLib' and cfg.platform ~= \"Xbox360\" then\n_p(1,'<Lib>')\n_p(2,'<OutputFile>$(OutDir)%s</OutputFile>',cfg.buildtarget.name)\nadditional_options(2,cfg)\nlink_target_machine(2,cfg)\n_p(1,'</Lib>')\nend\nend\nlocal function import_lib(cfg)\nif cfg.kind == \"SharedLib\" then\nlocal implibname = cfg.linktarget.fullpath\n_p(3,'<ImportLibrary>%s</ImportLibrary>',iif(cfg.flags.NoImportLib, cfg.objectsdir .. \"\\\\\" .. path.getname(implibname), implibname))\nend\nend\nfunction vc2010.link(cfg)\n_p(2,'<Link>')\n_p(3,'<SubSystem>%s</SubSystem>', iif(cfg.kind == \"ConsoleApp\", \"Console\", \"Windows\"))\n_p(3,'<GenerateDebugInformation>%s</GenerateDebugInformation>', tostring(cf"
- "g.flags.Symbols ~= nil))\nif premake.config.isoptimizedbuild(cfg.flags) then\n_p(3,'<EnableCOMDATFolding>true</EnableCOMDATFolding>')\n_p(3,'<OptimizeReferences>true</OptimizeReferences>')\nend\nif cfg.kind ~= 'StaticLib' then\nvc2010.additionalDependencies(cfg)\n_p(3,'<OutputFile>$(OutDir)%s</OutputFile>', cfg.buildtarget.name)\nif #cfg.libdirs > 0 then\n_p(3,'<AdditionalLibraryDirectories>%s;%%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>',\npremake.esc(path.translate(table.concat(cfg.libdirs, ';'), '\\\\')))\nend\nif vc2010.config_type(cfg) == 'Application' and not cfg.flags.WinMain and not cfg.flags.Managed then\nif cfg.flags.Unicode then\n_p(3,'<EntryPointSymbol>wmainCRTStartup</EntryPointSymbol>')\nelse\n_p(3,'<EntryPointSymbol>mainCRTStartup</EntryPointSymbol>')\nend\nend\nimport_lib(cfg)\nlocal deffile = premake.findfile(cfg, \".def\")\nif deffile then\n_p(3,'<ModuleDefinitionFile>%s</ModuleDefinitionFile>', deffile)\nend\nlink_target_machine(3,cfg)\nadditional_options(3,cfg)\nend\n_p(2"
- ",'</Link>')\nend\nfunction vc2010.additionalDependencies(cfg)\nlocal links = premake.getlinks(cfg, \"system\", \"fullpath\")\nif #links > 0 then\n_p(3,'<AdditionalDependencies>%s;%%(AdditionalDependencies)</AdditionalDependencies>',\ntable.concat(links, \";\"))\nend\nend\nlocal function item_definitions(prj)\nfor _, cfginfo in ipairs(prj.solution.vstudio_configs) do\nlocal cfg = premake.getconfig(prj, cfginfo.src_buildcfg, cfginfo.src_platform)\n_p(1,'<ItemDefinitionGroup ' ..if_config_and_platform() ..'>'\n,premake.esc(cfginfo.name))\nvs10_clcompile(cfg)\nresource_compile(cfg)\nitem_def_lib(cfg)\nvc2010.link(cfg)\nevent_hooks(cfg)\n_p(1,'</ItemDefinitionGroup>')\nend\nend\nfunction vc2010.getfilegroup(prj, group)\nlocal sortedfiles = prj.vc2010sortedfiles\nif not sortedfiles then\nsortedfiles = {\nClCompile = {},\nClInclude = {},\nNone = {},\nResourceCompile = {},\nAppxManifest = {},\nImage = {}\n}\nlocal foundAppxManifest = false\nfor file in premake.project.eachfile(prj) do\nif path.iscppfile(file.name) the"
- "n\ntable.insert(sortedfiles.ClCompile, file)\nelseif path.iscppheader(file.name) then\nif not table.icontains(prj.removefiles, file) then\ntable.insert(sortedfiles.ClInclude, file)\nend\nelseif path.isresourcefile(file.name) then\ntable.insert(sortedfiles.ResourceCompile, file)\nelse\nlocal ext = path.getextension(file.name):lower()\nif ext == \".appxmanifest\" then\nfoundAppxManifest = true\ntable.insert(sortedfiles.AppxManifest, file)\nelse\ntable.insert(sortedfiles.None, file)\nend\nend\nend\nif vstudio.iswinrt() and prj.kind == \"WindowedApp\" and not foundAppxManifest then\nvstudio.needAppxManifest = true\nlocal fcfg = {}\nfcfg.name = prj.name .. \".appxmanifest\"\nfcfg.vpath = premake.project.getvpath(prj, fcfg.name)\ntable.insert(sortedfiles.AppxManifest, fcfg)\nlocal splashcfg = {}\nsplashcfg.name = premake.vstudio.splashpath\nsplashcfg.vpath = premake.vstudio.splashpath\ntable.insert(sortedfiles.Image, splashcfg)\nend\nprj.vc2010sortedfiles = sortedfiles\nend\nreturn sortedfiles[group]\nend\nfunction "
- "vc2010.files(prj)\nvc2010.simplefilesgroup(prj, \"ClInclude\")\nvc2010.compilerfilesgroup(prj)\nvc2010.simplefilesgroup(prj, \"None\")\nvc2010.customtaskgroup(prj)\nvc2010.simplefilesgroup(prj, \"ResourceCompile\")\nvc2010.simplefilesgroup(prj, \"AppxManifest\")\nvc2010.deploymentcontentgroup(prj, \"Image\")\nend\nfunction vc2010.customtaskgroup(prj)\nlocal files = { }\nfor _, custombuildtask in ipairs(prj.custombuildtask or {}) do\nfor _, buildtask in ipairs(custombuildtask or {}) do\nlocal fcfg = { }\nfcfg.name = path.getrelative(prj.location,buildtask[1])\nfcfg.vpath = path.trimdots(fcfg.name)\ntable.insert(files, fcfg)\nend\nend\nif #files > 0 then\n_p(1,'<ItemGroup>')\nlocal groupedBuildTasks = {}\nfor _, custombuildtask in ipairs(prj.custombuildtask or {}) do\nfor _, buildtask in ipairs(custombuildtask or {}) do\nif (groupedBuildTasks[buildtask[1]] == nil) then\ngroupedBuildTasks[buildtask[1]] = {}\nend\ntable.insert(groupedBuildTasks[buildtask[1]], buildtask)\nend\nend\nfor name, custombuildtask in pai"
- "rs(groupedBuildTasks or {}) do\n_p(2,'<CustomBuild Include=\\\"%s\\\">', path.translate(path.getrelative(prj.location,name), \"\\\\\"))\n_p(3,'<FileType>Text</FileType>')\nlocal cmd = \"\"\nlocal outputs = \"\"\nfor _, buildtask in ipairs(custombuildtask or {}) do\nfor _, cmdline in ipairs(buildtask[4] or {}) do\ncmd = cmd .. cmdline\nlocal num = 1\nfor _, depdata in ipairs(buildtask[3] or {}) do\ncmd = string.gsub(cmd,\"%$%(\" .. num ..\"%)\", string.format(\"%s \",path.getrelative(prj.location,depdata)))\nnum = num + 1\nend\ncmd = string.gsub(cmd, \"%$%(<%)\", string.format(\"%s \",path.getrelative(prj.location,buildtask[1])))\ncmd = string.gsub(cmd, \"%$%(@%)\", string.format(\"%s \",path.getrelative(prj.location,buildtask[2])))\ncmd = cmd .. \"\\r\\n\"\nend\noutputs = outputs .. path.getrelative(prj.location,buildtask[2]) .. \";\"\nend\n_p(3,'<Command>%s</Command>',cmd)\n_p(3,'<Outputs>%s%%(Outputs)</Outputs>',outputs)\n_p(3,'<SubType>Designer</SubType>')\n_p(3,'<Message></Message>')\n_p(2,'</CustomBuild>'"
- ")\nend\n_p(1,'</ItemGroup>')\nend\nend\nfunction vc2010.simplefilesgroup(prj, section, subtype)\nlocal files = vc2010.getfilegroup(prj, section)\nif #files > 0 then\n_p(1,'<ItemGroup>')\nfor _, file in ipairs(files) do\nif subtype then\n_p(2,'<%s Include=\\\"%s\\\">', section, path.translate(file.name, \"\\\\\"))\n_p(3,'<SubType>%s</SubType>', subtype)\n_p(2,'</%s>', section)\nelse\n_p(2,'<%s Include=\\\"%s\\\" />', section, path.translate(file.name, \"\\\\\"))\nend\nend\n_p(1,'</ItemGroup>')\nend\nend\nfunction vc2010.deploymentcontentgroup(prj, section)\nlocal files = vc2010.getfilegroup(prj, section)\nif #files > 0 then\n_p(1,'<ItemGroup>')\nfor _, file in ipairs(files) do\n_p(2,'<%s Include=\\\"%s\\\">', section, path.translate(file.name, \"\\\\\"))\n_p(3,'<DeploymentContent>true</DeploymentContent>')\n_p(2,'</%s>', section)\nend\n_p(1,'</ItemGroup>')\nend\nend\nfunction vc2010.compilerfilesgroup(prj)\nlocal configs = prj.solution.vstudio_configs\nlocal files = vc2010.getfilegroup(prj, \"ClCompile\")\nif"
- " #files > 0 then\nlocal config_mappings = {}\nfor _, cfginfo in ipairs(configs) do\nlocal cfg = premake.getconfig(prj, cfginfo.src_buildcfg, cfginfo.src_platform)\nif cfg.pchheader and cfg.pchsource and not cfg.flags.NoPCH then\nconfig_mappings[cfginfo] = path.translate(cfg.pchsource, \"\\\\\")\nend\nend\n_p(1,'<ItemGroup>')\nfor _, file in ipairs(files) do\nlocal translatedpath = path.translate(file.name, \"\\\\\")\n_p(2, '<ClCompile Include=\\\"%s\\\">', translatedpath)\n_p(3, '<ObjectFileName>$(IntDir)%s.obj</ObjectFileName>'\n, premake.esc(path.translate(path.trimdots(path.removeext(file.name))))\n)\nfor _, cfginfo in ipairs(configs) do\nif config_mappings[cfginfo] and translatedpath == config_mappings[cfginfo] then\n_p(3,'<PrecompiledHeader '.. if_config_and_platform() .. '>Create</PrecompiledHeader>', premake.esc(cfginfo.name))\nconfig_mappings[cfginfo] = nil --only one source file per pch\nend\nend\nlocal excluded = table.icontains(prj.excludes, file.name)\nfor _, vsconfig in ipairs(configs) do\nlocal"
- " cfg = premake.getconfig(prj, vsconfig.src_buildcfg, vsconfig.src_platform)\nif excluded or table.icontains(cfg.excludes, file.name) then\n_p(3, '<ExcludedFromBuild '\n.. if_config_and_platform()\n.. '>true</ExcludedFromBuild>'\n, premake.esc(vsconfig.name)\n)\nend\nend\n_p(2,'</ClCompile>')\nend\n_p(1,'</ItemGroup>')\nend\nend\nfunction vc2010.header(targets)\nio.eol = \"\\r\\n\"\n_p('<?xml version=\"1.0\" encoding=\"utf-8\"?>')\nlocal t = \"\"\nif targets then\nt = ' DefaultTargets=\"' .. targets .. '\"'\nend\n_p('<Project%s ToolsVersion=\"%s\" xmlns=\"http://schemas.microsoft.com/developer/msbuild/2003\">', t, action.vstudio.toolsVersion)\nend\nfunction premake.vs2010_vcxproj(prj)\nio.indent = \" \"\nvc2010.header(\"Build\")\nvs2010_config(prj)\nvs2010_globals(prj)\n_p(1,'<Import Project=\"$(VCTargetsPath)\\\\Microsoft.Cpp.Default.props\" />')\nfor _, cfginfo in ipairs(prj.solution.vstudio_configs) do\nlocal cfg = premake.getconfig(prj, cfginfo.src_buildcfg, cfginfo.src_platform)\nvc2010.configurationPrope"
- "rtyGroup(cfg, cfginfo)\nend\n_p(1,'<Import Project=\"$(VCTargetsPath)\\\\Microsoft.Cpp.props\" />')\n_p(1,'<ImportGroup Label=\"ExtensionSettings\">')\n_p(1,'</ImportGroup>')\nimport_props(prj)\n_p(1,'<PropertyGroup Label=\"UserMacros\" />')\nvc2010.outputProperties(prj)\nitem_definitions(prj)\nvc2010.files(prj)\nvc2010.projectReferences(prj)\n_p(1,'<Import Project=\"$(VCTargetsPath)\\\\Microsoft.Cpp.targets\" />')\n_p(1,'<ImportGroup Label=\"ExtensionTargets\">')\n_p(1,'</ImportGroup>')\n_p('</Project>')\nend\nfunction vc2010.projectReferences(prj)\nlocal deps = premake.getdependencies(prj)\nif #deps > 0 then\n_p(1,'<ItemGroup>')\nfor _, dep in ipairs(deps) do\nlocal deppath = path.getrelative(prj.location, vstudio.projectfile(dep))\n_p(2,'<ProjectReference Include=\\\"%s\\\">', path.translate(deppath, \"\\\\\"))\n_p(3,'<Project>{%s}</Project>', dep.uuid)\nif vstudio.iswinrt() then\n_p(3,'<ReferenceOutputAssembly>false</ReferenceOutputAssembly>')\nend\n_p(2,'</ProjectReference>')\nend\n_p(1,'</ItemGroup>')\ne"
- "nd\nend\nfunction vc2010.debugdir(cfg)\nif cfg.debugdir and not vstudio.iswinrt() then\n_p(' <LocalDebuggerWorkingDirectory>%s</LocalDebuggerWorkingDirectory>', path.translate(cfg.debugdir, '\\\\'))\n_p(' <DebuggerFlavor>WindowsLocalDebugger</DebuggerFlavor>')\nend\nif cfg.debugargs then\n_p(' <LocalDebuggerCommandArguments>%s</LocalDebuggerCommandArguments>', table.concat(cfg.debugargs, \" \"))\nend\nend\nfunction vc2010.debugenvs(cfg)\nif cfg.debugenvs and #cfg.debugenvs > 0 then\n_p(2,'<LocalDebuggerEnvironment>%s%s</LocalDebuggerEnvironment>',table.concat(cfg.debugenvs, \"\\n\")\n,iif(cfg.flags.DebugEnvsInherit,'\\n$(LocalDebuggerEnvironment)','')\n)\nif cfg.flags.DebugEnvsDontMerge then\n_p(2,'<LocalDebuggerMergeEnvironment>false</LocalDebuggerMergeEnvironment>')\nend\nend\nend\nfunction premake.vs2010_vcxproj_user(prj)\nio.indent = \" \"\nvc2010.header()\nfor _, cfginfo in ipairs(prj.solution.vstudio_configs) do\nlocal cfg = premake.getconfig(prj, cfginfo.src_buildcfg, cfginfo.src_platform)\n_p"
- "(' <PropertyGroup '.. if_config_and_platform() ..'>', premake.esc(cfginfo.name))\nvc2010.debugdir(cfg)\nvc2010.debugenvs(cfg)\n_p(' </PropertyGroup>')\nend\n_p('</Project>')\nend\nfunction premake.vs2010_appxmanifest(prj)\nio.indent = \" \"\nio.eol = \"\\r\\n\"\n_p('<?xml version=\"1.0\" encoding=\"utf-8\"?>')\nif vstudio.toolset == \"v120_wp81\" then\n_p('<Package xmlns=\"http://schemas.microsoft.com/appx/2010/manifest\" xmlns:m2=\"http://schemas.microsoft.com/appx/2013/manifest\" xmlns:m3=\"http://schemas.microsoft.com/appx/2014/manifest\" xmlns:mp=\"http://schemas.microsoft.com/appx/2014/phone/manifest\">')\nelseif vstudio.storeapp == \"8.1\" then\n_p('<Package xmlns=\"http://schemas.microsoft.com/appx/2010/manifest\" xmlns:m3=\"http://schemas.microsoft.com/appx/2013/manifest\">')\nelse\n_p('<Package xmlns=\"http://schemas.microsoft.com/appx/manifest/foundation/windows10\" xmlns:mp=\"http://schemas.microsoft.com/appx/2014/phone/manifest\" xmlns:m3=\"http://schemas.microsoft.com/appx/manifest/uap/windows1"
- "0\">')\nend\n_p(1,'<Identity Name=\"' .. prj.uuid .. '\"')\n_p(2,'Publisher=\"CN=Unknown\"')\n_p(2,'Version=\"1.0.0.0\" />')\nif vstudio.toolset == \"v120_wp81\" or vstudio.storeapp == \"8.2\" then\n_p(1,'<mp:PhoneIdentity PhoneProductId=\"' .. prj.uuid .. '\" PhonePublisherId=\"00000000-0000-0000-0000-000000000000\"/>')\nend\n_p(1,'<Properties>')\n_p(2,'<DisplayName>' .. prj.name .. '</DisplayName>')\n_p(2,'<PublisherDisplayName>Unknown</PublisherDisplayName>')\n_p(2,'<Logo>EmptyLogo.png</Logo>')\n_p(1,'</Properties>')\nif vstudio.storeapp == \"8.2\" then\n_p(1,'<Dependencies>')\n_p(2,'<TargetDeviceFamily Name=\"Windows.Universal\" MinVersion=\"10.0.10069.0\" MaxVersionTested=\"10.0.10069.0\" />')\n_p(1,'</Dependencies>')\nelse\n_p(1,'<Prerequisites>')\n_p(2,'<OSMinVersion>6.3.0</OSMinVersion>')\n_p(2,'<OSMaxVersionTested>6.3.0</OSMaxVersionTested>')\n_p(1,'</Prerequisites>')\nend\n_p(1,'<Resources>')\n_p(2,'<Resource Language=\"x-generate\"/>')\n_p(1,'</Resources>')\n_p(1,'<Applications>')\n_p(2,'<Applicatio"
- "n Id=\"App\"')\n_p(3,'Executable=\"$targetnametoken$.exe\"')\n_p(3,'EntryPoint=\"App\">')\n_p(3,'<m3:VisualElements')\n_p(4,'DisplayName=\"Blah\"')\n_p(4,'Square150x150Logo=\"Assets\\\\Logo.png\"')\nif vstudio.toolset == \"v120_wp81\" or vstudio.storeapp == \"8.2\" then\n_p(4,'Square44x44Logo=\"Assets\\\\SmallLogo.png\"')\nelse\n_p(4,'Square30x30Logo=\"Assets\\\\SmallLogo.png\"')\nend\n_p(4,'Description=\"Blah\"')\n_p(4,'ForegroundText=\"light\"')\n_p(4,'BackgroundColor=\"transparent\">')\n_p(4,'<m3:SplashScreen Image=\"%s\" />', path.getname(vstudio.splashpath))\n_p(3,'</m3:VisualElements>')\n_p(2,'</Application>')\n_p(1,'</Applications>')\n_p('</Package>')\nend\n",
+ "premake.vstudio.vc2010 = { }\nlocal vc2010 = premake.vstudio.vc2010\nlocal vstudio = premake.vstudio\nlocal function vs2010_config(prj)\n_p(1,'<ItemGroup Label=\"ProjectConfigurations\">')\nfor _, cfginfo in ipairs(prj.solution.vstudio_configs) do\n_p(2,'<ProjectConfiguration Include=\"%s\">', premake.esc(cfginfo.name))\n_p(3,'<Configuration>%s</Configuration>',cfginfo.buildcfg)\n_p(3,'<Platform>%s</Platform>',cfginfo.platform)\n_p(2,'</ProjectConfiguration>')\nend\n_p(1,'</ItemGroup>')\nend\nlocal function vs2010_globals(prj)\nlocal action = premake.action.current()\n_p(1,'<PropertyGroup Label=\"Globals\">')\n_p(2, '<ProjectGuid>{%s}</ProjectGuid>',prj.uuid)\n_p(2, '<RootNamespace>%s</RootNamespace>',prj.name)\nif vstudio.storeapp ~= \"durango\" then\nlocal windowsTargetPlatformVersion = prj.windowstargetplatformversion or action.vstudio.windowsTargetPlatformVersion\nif windowsTargetPlatformVersion ~= nil then\n_p(2,'<WindowsTargetPlatformVersion>%s</WindowsTargetPlatformVersion>',windowsTargetPlatformVersion"
+ ")\nif windowsTargetPlatformVersion and string.startswith(windowsTargetPlatformVersion, \"10.\") then\n_p(2,'<WindowsTargetPlatformMinVersion>%s</WindowsTargetPlatformMinVersion>', prj.windowstargetplatformminversion or \"10.0.10240.0\")\nend\nend\nend\nif prj.flags and prj.flags.Managed then\n_p(2, '<TargetFrameworkVersion>v4.0</TargetFrameworkVersion>')\n_p(2, '<Keyword>ManagedCProj</Keyword>')\nelseif vstudio.iswinrt() then\n_p(2, '<DefaultLanguage>en-US</DefaultLanguage>')\nif vstudio.storeapp == \"durango\" then\n_p(2, '<MinimumVisualStudioVersion>14.0</MinimumVisualStudioVersion>')\n_p(2, '<TargetRuntime>Native</TargetRuntime>')\nelse\n_p(2, '<AppContainerApplication>true</AppContainerApplication>')\n_p(2, '<MinimumVisualStudioVersion>12.0</MinimumVisualStudioVersion>')\nif vstudio.toolset == \"v120_wp81\" then\n_p(2, '<ApplicationType>Windows Phone</ApplicationType>')\nelse\n_p(2, '<ApplicationType>Windows Store</ApplicationType>')\nend\n_p(2, '<ApplicationTypeRevision>%s</ApplicationTypeRevision>', vstu"
+ "dio.storeapp)\nend\nelse\n_p(2, '<Keyword>Win32Proj</Keyword>')\nend\n_p(1,'</PropertyGroup>')\nend\nfunction vc2010.config_type(config)\nlocal t =\n{\nSharedLib = \"DynamicLibrary\",\nStaticLib = \"StaticLibrary\",\nConsoleApp = \"Application\",\nWindowedApp = \"Application\"\n}\nreturn t[config.kind]\nend\nlocal function if_config_and_platform()\nreturn 'Condition=\"\\'$(Configuration)|$(Platform)\\'==\\'%s\\'\"'\nend\nlocal function optimisation(cfg)\nlocal result = \"Disabled\"\nfor _, value in ipairs(cfg.flags) do\nif (value == \"Optimize\") then\nresult = \"Full\"\nelseif (value == \"OptimizeSize\") then\nresult = \"MinSpace\"\nelseif (value == \"OptimizeSpeed\") then\nresult = \"MaxSpeed\"\nend\nend\nreturn result\nend\nfunction vc2010.configurationPropertyGroup(cfg, cfginfo)\n_p(1,'<PropertyGroup '..if_config_and_platform() ..' Label=\"Configuration\">'\n, premake.esc(cfginfo.name))\n_p(2,'<ConfigurationType>%s</ConfigurationType>',vc2010.config_type(cfg))\n_p(2,'<UseDebugLibraries>%s</UseDebugLibrarie"
+ "s>', iif(optimisation(cfg) == \"Disabled\",\"true\",\"false\"))\n_p(2,'<PlatformToolset>%s</PlatformToolset>', premake.vstudio.toolset)\nif cfg.flags.MFC then\n_p(2,'<UseOfMfc>%s</UseOfMfc>', iif(cfg.flags.StaticRuntime, \"Static\", \"Dynamic\"))\nend\nif cfg.flags.ATL or cfg.flags.StaticATL then\n_p(2,'<UseOfAtl>%s</UseOfAtl>', iif(cfg.flags.StaticATL, \"Static\", \"Dynamic\"))\nend\nif cfg.flags.Managed then\n_p(2,'<CLRSupport>true</CLRSupport>')\nend\n_p(1,'</PropertyGroup>')\nend\nlocal function import_props(prj)\nfor _, cfginfo in ipairs(prj.solution.vstudio_configs) do\nlocal cfg = premake.getconfig(prj, cfginfo.src_buildcfg, cfginfo.src_platform)\n_p(1,'<ImportGroup '..if_config_and_platform() ..' Label=\"PropertySheets\">'\n,premake.esc(cfginfo.name))\n_p(2,'<Import Project=\"$(UserRootDir)\\\\Microsoft.Cpp.$(Platform).user.props\" Condition=\"exists(\\'$(UserRootDir)\\\\Microsoft.Cpp.$(Platform).user.props\\')\" Label=\"LocalAppDataPlatform\" />')\n_p(1,'</ImportGroup>')\nend\nend\nlocal function add_"
+ "trailing_backslash(dir)\nif dir:len() > 0 and dir:sub(-1) ~= \"\\\\\" then\nreturn dir..\"\\\\\"\nend\nreturn dir\nend\nfunction vc2010.outputProperties(prj)\nfor _, cfginfo in ipairs(prj.solution.vstudio_configs) do\nlocal cfg = premake.getconfig(prj, cfginfo.src_buildcfg, cfginfo.src_platform)\nlocal target = cfg.buildtarget\nlocal outdir = add_trailing_backslash(target.directory)\nlocal intdir = add_trailing_backslash(cfg.objectsdir)\n_p(1,'<PropertyGroup '..if_config_and_platform() ..'>', premake.esc(cfginfo.name))\n_p(2,'<OutDir>%s</OutDir>', premake.esc(outdir))\nif cfg.platform == \"Xbox360\" then\n_p(2,'<OutputFile>$(OutDir)%s</OutputFile>', premake.esc(target.name))\nend\n_p(2,'<IntDir>%s</IntDir>', premake.esc(intdir))\n_p(2,'<TargetName>%s</TargetName>', premake.esc(path.getbasename(target.name)))\n_p(2,'<TargetExt>%s</TargetExt>', premake.esc(path.getextension(target.name)))\nif cfg.kind == \"SharedLib\" then\nlocal ignore = (cfg.flags.NoImportLib ~= nil)\n _p(2,'<IgnoreImportLibrary>%s</IgnoreImpo"
+ "rtLibrary>', tostring(ignore))\nend\nif cfg.platform == \"Durango\" then\n_p(2, '<ReferencePath>$(Console_SdkLibPath);$(Console_SdkWindowsMetadataPath)</ReferencePath>')\n_p(2, '<LibraryPath>$(Console_SdkLibPath)</LibraryPath>')\n_p(2, '<LibraryWPath>$(Console_SdkLibPath);$(Console_SdkWindowsMetadataPath)</LibraryWPath>')\n_p(2, '<IncludePath>$(Console_SdkIncludeRoot)</IncludePath>')\n_p(2, '<ExecutablePath>$(Console_SdkRoot)bin;$(VCInstallDir)bin\\\\x86_amd64;$(VCInstallDir)bin;$(WindowsSDK_ExecutablePath_x86);$(VSInstallDir)Common7\\\\Tools\\\\bin;$(VSInstallDir)Common7\\\\tools;$(VSInstallDir)Common7\\\\ide;$(ProgramFiles)\\\\HTML Help Workshop;$(MSBuildToolsPath32);$(FxCopDir);$(PATH);</ExecutablePath>')\nend\nif cfg.kind ~= \"StaticLib\" then\n_p(2,'<LinkIncremental>%s</LinkIncremental>', tostring(premake.config.isincrementallink(cfg)))\nend\nif cfg.flags.NoManifest then\n_p(2,'<GenerateManifest>false</GenerateManifest>')\nend\n_p(1,'</PropertyGroup>')\nend\nend\nlocal function runtime(cfg)\nlocal runtime"
+ "\nlocal flags = cfg.flags\nif premake.config.isdebugbuild(cfg) then\nruntime = iif(flags.StaticRuntime and not flags.Managed, \"MultiThreadedDebug\", \"MultiThreadedDebugDLL\")\nelse\nruntime = iif(flags.StaticRuntime and not flags.Managed, \"MultiThreaded\", \"MultiThreadedDLL\")\nend\nreturn runtime\nend\nlocal function precompiled_header(cfg)\n if not cfg.flags.NoPCH and cfg.pchheader then\n_p(3,'<PrecompiledHeader>Use</PrecompiledHeader>')\n_p(3,'<PrecompiledHeaderFile>%s</PrecompiledHeaderFile>', cfg.pchheader)\nelse\n_p(3,'<PrecompiledHeader></PrecompiledHeader>')\nend\nend\nlocal function preprocessor(indent,cfg)\nif #cfg.defines > 0 then\n_p(indent,'<PreprocessorDefinitions>%s;%%(PreprocessorDefinitions)</PreprocessorDefinitions>'\n,premake.esc(table.concat(cfg.defines, \";\")))\nelse\n_p(indent,'<PreprocessorDefinitions></PreprocessorDefinitions>')\nend\nend\nlocal function include_dirs(indent,cfg)\nif #cfg.includedirs > 0 then\n_p(indent,'<AdditionalIncludeDirectories>%s;%%(AdditionalIncludeDire"
+ "ctories)</AdditionalIncludeDirectories>'\n,premake.esc(path.translate(table.concat(cfg.includedirs, \";\"), '\\\\')))\nend\nend\nlocal function resource_compile(cfg)\n_p(2,'<ResourceCompile>')\npreprocessor(3,cfg)\ninclude_dirs(3,cfg)\n_p(2,'</ResourceCompile>')\nend\nlocal function exceptions(cfg)\nif cfg.flags.NoExceptions then\n_p(3, '<ExceptionHandling>false</ExceptionHandling>')\nelseif cfg.flags.SEH then\n_p(3, '<ExceptionHandling>Async</ExceptionHandling>')\nend\nend\nlocal function rtti(cfg)\nif cfg.flags.NoRTTI and not cfg.flags.Managed then\n_p(3,'<RuntimeTypeInfo>false</RuntimeTypeInfo>')\nend\nend\nlocal function calling_convention(cfg)\nif cfg.flags.FastCall then\n_p(3,'<CallingConvention>FastCall</CallingConvention>')\nelseif cfg.flags.StdCall then\n_p(3,'<CallingConvention>StdCall</CallingConvention>')\nend\nend\nlocal function wchar_t_builtin(cfg)\nif cfg.flags.NativeWChar then\n_p(3,'<TreatWChar_tAsBuiltInType>true</TreatWChar_tAsBuiltInType>')\nelseif cfg.flags.NoNativeWChar then\n_p(3,'<Trea"
+ "tWChar_tAsBuiltInType>false</TreatWChar_tAsBuiltInType>')\nend\nend\nlocal function sse(cfg)\nif cfg.flags.EnableSSE then\n_p(3,'<EnableEnhancedInstructionSet>StreamingSIMDExtensions</EnableEnhancedInstructionSet>')\nelseif cfg.flags.EnableSSE2 then\n_p(3,'<EnableEnhancedInstructionSet>StreamingSIMDExtensions2</EnableEnhancedInstructionSet>')\nend\nend\nlocal function floating_point(cfg)\n if cfg.flags.FloatFast then\n_p(3,'<FloatingPointModel>Fast</FloatingPointModel>')\nelseif cfg.flags.FloatStrict and not cfg.flags.Managed then\n_p(3,'<FloatingPointModel>Strict</FloatingPointModel>')\nend\nend\nlocal function debug_info(cfg)\nlocal debug_info = ''\nif cfg.flags.Symbols then\nif (action.vstudio.supports64bitEditContinue == false and cfg.platform == \"x64\")\nor cfg.flags.Managed\nor premake.config.isoptimizedbuild(cfg.flags)\nor cfg.flags.NoEditAndContinue\nthen\ndebug_info = \"ProgramDatabase\"\nelse\ndebug_info = \"EditAndContinue\"\nend\nend\n_p(3,'<DebugInformationFormat>%s</DebugInformationFormat>',"
+ "debug_info)\nend\nlocal function minimal_build(cfg)\nif premake.config.isdebugbuild(cfg) and cfg.flags.EnableMinimalRebuild then\n_p(3,'<MinimalRebuild>true</MinimalRebuild>')\nelse\n_p(3,'<MinimalRebuild>false</MinimalRebuild>')\nend\nend\nlocal function compile_language(cfg)\nif cfg.options.ForceCPP then\n_p(3,'<CompileAs>CompileAsCpp</CompileAs>')\nelse\nif cfg.language == \"C\" then\n_p(3,'<CompileAs>CompileAsC</CompileAs>')\nend\nend\nend\nlocal function forcedinclude_files(indent,cfg)\nif #cfg.forcedincludes > 0 then\n_p(indent,'<ForcedIncludeFiles>%s</ForcedIncludeFiles>'\n,premake.esc(path.translate(table.concat(cfg.forcedincludes, \";\"), '\\\\')))\nend\nend\nlocal function vs10_clcompile(cfg)\n_p(2,'<ClCompile>')\n_p(3,'<AdditionalOptions>%s %s%%(AdditionalOptions)</AdditionalOptions>'\n, table.concat(premake.esc(cfg.buildoptions), \" \")\n, iif(cfg.flags.UnsignedChar, \"/J \", \" \")\n)\n_p(3,'<Optimization>%s</Optimization>',optimisation(cfg))\ninclude_dirs(3,cfg)\npreprocessor(3,cfg)\nminimal_buil"
+ "d(cfg)\nif not premake.config.isoptimizedbuild(cfg.flags) then\nif not cfg.flags.Managed then\n_p(3,'<BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>')\nend\nif cfg.flags.ExtraWarnings then\nend\nelse\n_p(3,'<StringPooling>true</StringPooling>')\nend\nif cfg.platform == \"Durango\" then\n_p(3, '<CompileAsWinRT>false</CompileAsWinRT>')\nelse\n_p(3,'<RuntimeLibrary>%s</RuntimeLibrary>', runtime(cfg))\nend\n_p(3,'<FunctionLevelLinking>true</FunctionLevelLinking>')\nif not cfg.flags.NoMultiProcessorCompilation and not cfg.flags.EnableMinimalRebuild then\n_p(3,'<MultiProcessorCompilation>true</MultiProcessorCompilation>')\nelse\n_p(3,'<MultiProcessorCompilation>false</MultiProcessorCompilation>')\nend\nprecompiled_header(cfg)\nif cfg.flags.ExtraWarnings then\n_p(3,'<WarningLevel>Level4</WarningLevel>')\nelse\n_p(3,'<WarningLevel>Level3</WarningLevel>')\nend\nif cfg.flags.FatalWarnings then\n_p(3,'<TreatWarningAsError>true</TreatWarningAsError>')\nend\nexceptions(cfg)\nrtti(cfg)\ncalling_convention(cfg)\nw"
+ "char_t_builtin(cfg)\nsse(cfg)\nfloating_point(cfg)\ndebug_info(cfg)\nif cfg.flags.Symbols then\n_p(3,'<ProgramDataBaseFileName>$(OutDir)%s.pdb</ProgramDataBaseFileName>'\n, path.getbasename(cfg.buildtarget.name))\nend\nif cfg.flags.NoFramePointer then\n_p(3,'<OmitFramePointers>true</OmitFramePointers>')\nend\ncompile_language(cfg)\nforcedinclude_files(3,cfg);\n_p(2,'</ClCompile>')\nend\nlocal function event_hooks(cfg)\nif #cfg.postbuildcommands> 0 then\n _p(2,'<PostBuildEvent>')\n_p(3,'<Command>%s</Command>',premake.esc(table.implode(cfg.postbuildcommands, \"\", \"\", \"\\r\\n\")))\n_p(2,'</PostBuildEvent>')\nend\nif #cfg.prebuildcommands> 0 then\n _p(2,'<PreBuildEvent>')\n_p(3,'<Command>%s</Command>',premake.esc(table.implode(cfg.prebuildcommands, \"\", \"\", \"\\r\\n\")))\n_p(2,'</PreBuildEvent>')\nend\nif #cfg.prelinkcommands> 0 then\n _p(2,'<PreLinkEvent>')\n_p(3,'<Command>%s</Command>',premake.esc(table.implode(cfg.prelinkcommands, \"\", \"\", \"\\r\\n\")))\n_p(2,'</PreLinkEvent>')\nend\nend\nloc"
+ "al function additional_options(indent,cfg)\nif #cfg.linkoptions > 0 then\n_p(indent,'<AdditionalOptions>%s %%(AdditionalOptions)</AdditionalOptions>',\ntable.concat(premake.esc(cfg.linkoptions), \" \"))\nend\nend\nlocal function link_target_machine(index,cfg)\nlocal platforms = {x32 = 'MachineX86', x64 = 'MachineX64'}\nif platforms[cfg.platform] then\n_p(index,'<TargetMachine>%s</TargetMachine>', platforms[cfg.platform])\nend\nend\nlocal function item_def_lib(cfg)\n -- The Xbox360 project files are stored in another place in the project file.\nif cfg.kind == 'StaticLib' and cfg.platform ~= \"Xbox360\" then\n_p(1,'<Lib>')\n_p(2,'<OutputFile>$(OutDir)%s</OutputFile>',cfg.buildtarget.name)\nadditional_options(2,cfg)\nlink_target_machine(2,cfg)\n_p(1,'</Lib>')\nend\nend\nlocal function import_lib(cfg)\nif cfg.kind == \"SharedLib\" then\nlocal implibname = cfg.linktarget.fullpath\n_p(3,'<ImportLibrary>%s</ImportLibrary>',iif(cfg.flags.NoImportLib, cfg.objectsdir .. \"\\\\\" .. path.getname(implibname), implib"
+ "name))\nend\nend\nfunction vc2010.link(cfg)\n_p(2,'<Link>')\n_p(3,'<SubSystem>%s</SubSystem>', iif(cfg.kind == \"ConsoleApp\", \"Console\", \"Windows\"))\n_p(3,'<GenerateDebugInformation>%s</GenerateDebugInformation>', tostring(cfg.flags.Symbols ~= nil))\nif premake.config.isoptimizedbuild(cfg.flags) then\n_p(3,'<EnableCOMDATFolding>true</EnableCOMDATFolding>')\n_p(3,'<OptimizeReferences>true</OptimizeReferences>')\nend\nif cfg.kind ~= 'StaticLib' then\nvc2010.additionalDependencies(cfg)\n_p(3,'<OutputFile>$(OutDir)%s</OutputFile>', cfg.buildtarget.name)\nif #cfg.libdirs > 0 then\n_p(3,'<AdditionalLibraryDirectories>%s;%%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>'\n, premake.esc(path.translate(table.concat(cfg.libdirs, ';'), '\\\\'))\n)\nend\nif vc2010.config_type(cfg) == 'Application' and not cfg.flags.WinMain and not cfg.flags.Managed then\nif cfg.flags.Unicode then\n_p(3,'<EntryPointSymbol>wmainCRTStartup</EntryPointSymbol>')\nelse\n_p(3,'<EntryPointSymbol>mainCRTStartup</EntryPointSymbol"
+ ">')\nend\nend\nimport_lib(cfg)\nlocal deffile = premake.findfile(cfg, \".def\")\nif deffile then\n_p(3,'<ModuleDefinitionFile>%s</ModuleDefinitionFile>', deffile)\nend\nlink_target_machine(3,cfg)\nadditional_options(3,cfg)\nend\n_p(2,'</Link>')\nend\nfunction vc2010.additionalDependencies(cfg)\nlocal links = premake.getlinks(cfg, \"system\", \"fullpath\")\nif #links > 0 then\n_p(3,'<AdditionalDependencies>%s;%s</AdditionalDependencies>'\n, table.concat(links, \";\")\n, iif(cfg.platform == \"Durango\"\n, '$(XboxExtensionsDependencies)'\n, '%(AdditionalDependencies)'\n)\n)\nend\nend\nlocal function item_definitions(prj)\nfor _, cfginfo in ipairs(prj.solution.vstudio_configs) do\nlocal cfg = premake.getconfig(prj, cfginfo.src_buildcfg, cfginfo.src_platform)\n_p(1,'<ItemDefinitionGroup ' ..if_config_and_platform() ..'>'\n,premake.esc(cfginfo.name))\nvs10_clcompile(cfg)\nresource_compile(cfg)\nitem_def_lib(cfg)\nvc2010.link(cfg)\nevent_hooks(cfg)\n_p(1,'</ItemDefinitionGroup>')\nend\nend\nfunction vc2010.getfilegro"
+ "up(prj, group)\nlocal sortedfiles = prj.vc2010sortedfiles\nif not sortedfiles then\nsortedfiles = {\nClCompile = {},\nClInclude = {},\nNone = {},\nResourceCompile = {},\nAppxManifest = {},\nImage = {},\nDeploymentContent = {}\n}\nlocal foundAppxManifest = false\nfor file in premake.project.eachfile(prj) do\nif path.iscppfile(file.name) then\ntable.insert(sortedfiles.ClCompile, file)\nelseif path.iscppheader(file.name) then\nif not table.icontains(prj.removefiles, file) then\ntable.insert(sortedfiles.ClInclude, file)\nend\nelseif path.isresourcefile(file.name) then\ntable.insert(sortedfiles.ResourceCompile, file)\nelseif path.isappxmanifest(file.name) then\nfoundAppxManifest = true\ntable.insert(sortedfiles.AppxManifest, file)\nelseif file.flags and table.icontains(file.flags, \"DeploymentContent\") then\ntable.insert(sortedfiles.DeploymentContent, file)\nelse\ntable.insert(sortedfiles.None, file)\nend\nend\nif vstudio.iswinrt() and prj.kind == \"WindowedApp\" and not foundAppxManifest then\nvstudio.needAppxMan"
+ "ifest = true\nlocal fcfg = {}\nfcfg.name = prj.name .. \".appxmanifest\"\nfcfg.vpath = premake.project.getvpath(prj, fcfg.name)\ntable.insert(sortedfiles.AppxManifest, fcfg)\nlocal splashcfg = {}\nsplashcfg.name = premake.vstudio.splashpath\nsplashcfg.vpath = premake.vstudio.splashpath\ntable.insert(sortedfiles.Image, splashcfg)\nend\nprj.vc2010sortedfiles = sortedfiles\nend\nreturn sortedfiles[group]\nend\nfunction vc2010.files(prj)\nvc2010.simplefilesgroup(prj, \"ClInclude\")\nvc2010.compilerfilesgroup(prj)\nvc2010.simplefilesgroup(prj, \"None\")\nvc2010.customtaskgroup(prj)\nvc2010.simplefilesgroup(prj, \"ResourceCompile\")\nvc2010.simplefilesgroup(prj, \"AppxManifest\")\nvc2010.deploymentcontentgroup(prj, \"Image\")\nvc2010.deploymentcontentgroup(prj, \"DeploymentContent\", \"None\")\nend\nfunction vc2010.customtaskgroup(prj)\nlocal files = { }\nfor _, custombuildtask in ipairs(prj.custombuildtask or {}) do\nfor _, buildtask in ipairs(custombuildtask or {}) do\nlocal fcfg = { }\nfcfg.name = path.getrelativ"
+ "e(prj.location,buildtask[1])\nfcfg.vpath = path.trimdots(fcfg.name)\ntable.insert(files, fcfg)\nend\nend\nif #files > 0 then\n_p(1,'<ItemGroup>')\nlocal groupedBuildTasks = {}\nfor _, custombuildtask in ipairs(prj.custombuildtask or {}) do\nfor _, buildtask in ipairs(custombuildtask or {}) do\nif (groupedBuildTasks[buildtask[1]] == nil) then\ngroupedBuildTasks[buildtask[1]] = {}\nend\ntable.insert(groupedBuildTasks[buildtask[1]], buildtask)\nend\nend\nfor name, custombuildtask in pairs(groupedBuildTasks or {}) do\n_p(2,'<CustomBuild Include=\\\"%s\\\">', path.translate(path.getrelative(prj.location,name), \"\\\\\"))\n_p(3,'<FileType>Text</FileType>')\nlocal cmd = \"\"\nlocal outputs = \"\"\nfor _, buildtask in ipairs(custombuildtask or {}) do\nfor _, cmdline in ipairs(buildtask[4] or {}) do\ncmd = cmd .. cmdline\nlocal num = 1\nfor _, depdata in ipairs(buildtask[3] or {}) do\ncmd = string.gsub(cmd,\"%$%(\" .. num ..\"%)\", string.format(\"%s \",path.getrelative(prj.location,depdata)))\nnum = num + 1\nend\ncmd"
+ " = string.gsub(cmd, \"%$%(<%)\", string.format(\"%s \",path.getrelative(prj.location,buildtask[1])))\ncmd = string.gsub(cmd, \"%$%(@%)\", string.format(\"%s \",path.getrelative(prj.location,buildtask[2])))\ncmd = cmd .. \"\\r\\n\"\nend\noutputs = outputs .. path.getrelative(prj.location,buildtask[2]) .. \";\"\nend\n_p(3,'<Command>%s</Command>',cmd)\n_p(3,'<Outputs>%s%%(Outputs)</Outputs>',outputs)\n_p(3,'<SubType>Designer</SubType>')\n_p(3,'<Message></Message>')\n_p(2,'</CustomBuild>')\nend\n_p(1,'</ItemGroup>')\nend\nend\nfunction vc2010.simplefilesgroup(prj, section, subtype)\nlocal files = vc2010.getfilegroup(prj, section)\nif #files > 0 then\n_p(1,'<ItemGroup>')\nfor _, file in ipairs(files) do\nif subtype then\n_p(2,'<%s Include=\\\"%s\\\">', section, path.translate(file.name, \"\\\\\"))\n_p(3,'<SubType>%s</SubType>', subtype)\n_p(2,'</%s>', section)\nelse\n_p(2,'<%s Include=\\\"%s\\\" />', section, path.translate(file.name, \"\\\\\"))\nend\nend\n_p(1,'</ItemGroup>')\nend\nend\nfunction vc2010.deployment"
+ "contentgroup(prj, section, filetype)\nif filetype == nil then\nfiletype = section\nend\nlocal files = vc2010.getfilegroup(prj, section)\nif #files > 0 then\n_p(1,'<ItemGroup>')\nfor _, file in ipairs(files) do\n_p(2,'<%s Include=\\\"%s\\\">', filetype, path.translate(file.name, \"\\\\\"))\n_p(3,'<DeploymentContent>true</DeploymentContent>')\n_p(3,'<Link>%s</Link>', path.translate(file.vpath, \"\\\\\"))\n_p(2,'</%s>', filetype)\nend\n_p(1,'</ItemGroup>')\nend\nend\nfunction vc2010.compilerfilesgroup(prj)\nlocal configs = prj.solution.vstudio_configs\nlocal files = vc2010.getfilegroup(prj, \"ClCompile\")\nif #files > 0 then\nlocal config_mappings = {}\nfor _, cfginfo in ipairs(configs) do\nlocal cfg = premake.getconfig(prj, cfginfo.src_buildcfg, cfginfo.src_platform)\nif cfg.pchheader and cfg.pchsource and not cfg.flags.NoPCH then\nconfig_mappings[cfginfo] = path.translate(cfg.pchsource, \"\\\\\")\nend\nend\n_p(1,'<ItemGroup>')\nfor _, file in ipairs(files) do\nlocal translatedpath = path.translate(file.name, "
+ "\"\\\\\")\n_p(2, '<ClCompile Include=\\\"%s\\\">', translatedpath)\n_p(3, '<ObjectFileName>$(IntDir)%s.obj</ObjectFileName>'\n, premake.esc(path.translate(path.trimdots(path.removeext(file.name))))\n)\nif vstudio.iswinrt() and string.len(file.name) > 2 and string.sub(file.name, -2) == \".c\" then\n_p(3,'<CompileAsWinRT>FALSE</CompileAsWinRT>')\nend\nfor _, cfginfo in ipairs(configs) do\nif config_mappings[cfginfo] and translatedpath == config_mappings[cfginfo] then\n_p(3,'<PrecompiledHeader '.. if_config_and_platform() .. '>Create</PrecompiledHeader>', premake.esc(cfginfo.name))\nconfig_mappings[cfginfo] = nil --only one source file per pch\nend\nend\nlocal excluded = table.icontains(prj.excludes, file.name)\nfor _, vsconfig in ipairs(configs) do\nlocal cfg = premake.getconfig(prj, vsconfig.src_buildcfg, vsconfig.src_platform)\nif excluded or table.icontains(cfg.excludes, file.name) then\n_p(3, '<ExcludedFromBuild '\n.. if_config_and_platform()\n.. '>true</ExcludedFromBuild>'\n, premake.esc(vsconfig.name)\n)"
+ "\nend\nend\n_p(2,'</ClCompile>')\nend\n_p(1,'</ItemGroup>')\nend\nend\nfunction vc2010.header(targets)\nio.eol = \"\\r\\n\"\n_p('<?xml version=\"1.0\" encoding=\"utf-8\"?>')\nlocal t = \"\"\nif targets then\nt = ' DefaultTargets=\"' .. targets .. '\"'\nend\n_p('<Project%s ToolsVersion=\"%s\" xmlns=\"http://schemas.microsoft.com/developer/msbuild/2003\">', t, action.vstudio.toolsVersion)\nend\nfunction premake.vs2010_vcxproj(prj)\nio.indent = \" \"\nvc2010.header(\"Build\")\nvs2010_config(prj)\nvs2010_globals(prj)\n_p(1,'<Import Project=\"$(VCTargetsPath)\\\\Microsoft.Cpp.Default.props\" />')\nfor _, cfginfo in ipairs(prj.solution.vstudio_configs) do\nlocal cfg = premake.getconfig(prj, cfginfo.src_buildcfg, cfginfo.src_platform)\nvc2010.configurationPropertyGroup(cfg, cfginfo)\nend\n_p(1,'<Import Project=\"$(VCTargetsPath)\\\\Microsoft.Cpp.props\" />')\n_p(1,'<ImportGroup Label=\"ExtensionSettings\">')\n_p(1,'</ImportGroup>')\nimport_props(prj)\n_p(1,'<PropertyGroup Label=\"UserMacros\" />')\nvc2010.outputProp"
+ "erties(prj)\nitem_definitions(prj)\nvc2010.files(prj)\nvc2010.projectReferences(prj)\n_p(1,'<Import Project=\"$(VCTargetsPath)\\\\Microsoft.Cpp.targets\" />')\n_p(1,'<ImportGroup Label=\"ExtensionTargets\">')\n_p(1,'</ImportGroup>')\n_p('</Project>')\nend\nfunction vc2010.projectReferences(prj)\nlocal deps = premake.getdependencies(prj)\nif #deps > 0 then\n_p(1,'<ItemGroup>')\nfor _, dep in ipairs(deps) do\nlocal deppath = path.getrelative(prj.location, vstudio.projectfile(dep))\n_p(2,'<ProjectReference Include=\\\"%s\\\">', path.translate(deppath, \"\\\\\"))\n_p(3,'<Project>{%s}</Project>', dep.uuid)\nif vstudio.iswinrt() then\n_p(3,'<ReferenceOutputAssembly>false</ReferenceOutputAssembly>')\nend\n_p(2,'</ProjectReference>')\nend\n_p(1,'</ItemGroup>')\nend\nend\nfunction vc2010.debugdir(cfg)\nif cfg.debugdir and not vstudio.iswinrt() then\n_p(' <LocalDebuggerWorkingDirectory>%s</LocalDebuggerWorkingDirectory>', path.translate(cfg.debugdir, '\\\\'))\n_p(' <DebuggerFlavor>WindowsLocalDebugger</DebuggerFla"
+ "vor>')\nend\nif cfg.debugargs then\n_p(' <LocalDebuggerCommandArguments>%s</LocalDebuggerCommandArguments>', table.concat(cfg.debugargs, \" \"))\nend\nend\nfunction vc2010.debugenvs(cfg)\nif cfg.debugenvs and #cfg.debugenvs > 0 then\n_p(2,'<LocalDebuggerEnvironment>%s%s</LocalDebuggerEnvironment>',table.concat(cfg.debugenvs, \"\\n\")\n,iif(cfg.flags.DebugEnvsInherit,'\\n$(LocalDebuggerEnvironment)','')\n)\nif cfg.flags.DebugEnvsDontMerge then\n_p(2,'<LocalDebuggerMergeEnvironment>false</LocalDebuggerMergeEnvironment>')\nend\nend\nend\nfunction premake.vs2010_vcxproj_user(prj)\nio.indent = \" \"\nvc2010.header()\nfor _, cfginfo in ipairs(prj.solution.vstudio_configs) do\nlocal cfg = premake.getconfig(prj, cfginfo.src_buildcfg, cfginfo.src_platform)\n_p(' <PropertyGroup '.. if_config_and_platform() ..'>', premake.esc(cfginfo.name))\nvc2010.debugdir(cfg)\nvc2010.debugenvs(cfg)\n_p(' </PropertyGroup>')\nend\n_p('</Project>')\nend\nfunction premake.vs2010_appxmanifest(prj)\nio.indent = \" \"\nio.eol = \"\\r"
+ "\\n\"\n_p('<?xml version=\"1.0\" encoding=\"utf-8\"?>')\nif vstudio.toolset == \"v120_wp81\" then\n_p('<Package xmlns=\"http://schemas.microsoft.com/appx/2010/manifest\" xmlns:m2=\"http://schemas.microsoft.com/appx/2013/manifest\" xmlns:m3=\"http://schemas.microsoft.com/appx/2014/manifest\" xmlns:mp=\"http://schemas.microsoft.com/appx/2014/phone/manifest\">')\nelseif vstudio.storeapp == \"8.1\" then\n_p('<Package xmlns=\"http://schemas.microsoft.com/appx/2010/manifest\" xmlns:m3=\"http://schemas.microsoft.com/appx/2013/manifest\">')\nelseif vstudio.storeapp == \"durango\" then\n_p('<Package xmlns=\"http://schemas.microsoft.com/appx/2010/manifest\" xmlns:mx=\"http://schemas.microsoft.com/appx/2013/xbox/manifest\" IgnorableNamespaces=\"mx\">')\nelse\n_p('<Package xmlns=\"http://schemas.microsoft.com/appx/manifest/foundation/windows10\" xmlns:mp=\"http://schemas.microsoft.com/appx/2014/phone/manifest\" xmlns:m3=\"http://schemas.microsoft.com/appx/manifest/uap/windows10\">')\nend\n_p(1,'<Identity Name=\"' .. prj.u"
+ "uid .. '\"')\n_p(2,'Publisher=\"CN=Unknown\"')\n_p(2,'Version=\"1.0.0.0\" />')\nif vstudio.toolset == \"v120_wp81\" or vstudio.storeapp == \"8.2\" then\n_p(1,'<mp:PhoneIdentity PhoneProductId=\"' .. prj.uuid .. '\" PhonePublisherId=\"00000000-0000-0000-0000-000000000000\"/>')\nend\n_p(1,'<Properties>')\n_p(2,'<DisplayName>' .. prj.name .. '</DisplayName>')\n_p(2,'<PublisherDisplayName>Unknown</PublisherDisplayName>')\n_p(2,'<Logo>EmptyLogo.png</Logo>')\n_p(1,'</Properties>')\nif vstudio.storeapp == \"8.2\" then\n_p(1, '<Dependencies>')\n_p(2, '<TargetDeviceFamily Name=\"Windows.Universal\" MinVersion=\"10.0.10069.0\" MaxVersionTested=\"10.0.10069.0\" />')\n_p(1, '</Dependencies>')\nelseif vstudio.storeapp == \"durango\" then\n_p(1, '<Prerequisites>')\n_p(2, '<OSMinVersion>6.2</OSMinVersion>')\n_p(2, '<OSMaxVersionTested>6.2</OSMaxVersionTested>')\n_p(1, '</Prerequisites>')\nelse\n_p(1, '<Prerequisites>')\n_p(2, '<OSMinVersion>6.3.0</OSMinVersion>')\n_p(2, '<OSMaxVersionTested>6.3.0</OSMaxVersionTested>')\n_p(1"
+ ", '</Prerequisites>')\nend\n_p(1,'<Resources>')\n_p(2,'<Resource Language=\"x-generate\"/>')\n_p(1,'</Resources>')\n_p(1,'<Applications>')\n_p(2,'<Application Id=\"App\"')\n_p(3,'Executable=\"$targetnametoken$.exe\"')\n_p(3,'EntryPoint=\"App\">')\nif vstudio.storeapp == \"durango\" then\n_p(3, '<VisualElements')\n_p(4, 'DisplayName=\"GENie\"')\n_p(4, 'Logo=\"Assets\\\\Logo.png\"')\n_p(4, 'SmallLogo=\"Assets\\\\SmallLogo.png\"')\n_p(4, 'Description=\"GENie\"')\n_p(4, 'ForegroundText=\"light\"')\n_p(4, 'BackgroundColor=\"transparent\">')\n_p(5, '<SplashScreen Image=\"Assets\\\\SplashScreen.png\" />')\n_p(3, '</VisualElements>')\n_p(3, '<Extensions>')\n_p(4, '<mx:Extension Category=\"xbox.system.resources\">')\n_p(4, '<mx:XboxSystemResources />')\n_p(4, '</mx:Extension>')\n_p(3, '</Extensions>')\nelse\n_p(3, '<m3:VisualElements')\n_p(4, 'DisplayName=\"GENie\"')\n_p(4, 'Square150x150Logo=\"Assets\\\\Logo.png\"')\nif vstudio.toolset == \"v120_wp81\" or vstudio.storeapp == \"8.2\" then\n_p(4, 'Square44x44Logo=\"Asse"
+ "ts\\\\SmallLogo.png\"')\nelse\n_p(4, 'Square30x30Logo=\"Assets\\\\SmallLogo.png\"')\nend\n_p(4, 'Description=\"GENie\"')\n_p(4, 'ForegroundText=\"light\"')\n_p(4, 'BackgroundColor=\"transparent\">')\n_p(4, '<m3:SplashScreen Image=\"%s\" />', path.getname(vstudio.splashpath))\n_p(3, '</m3:VisualElements>')\nend\n_p(2,'</Application>')\n_p(1,'</Applications>')\n_p('</Package>')\nend\n",
/* actions/vstudio/vs2010_vcxproj_filters.lua */
"local vc2010 = premake.vstudio.vc2010\nlocal project = premake.project\nfunction vc2010.filteridgroup(prj)\nlocal filters = { }\nlocal filterfound = false\nfor file in project.eachfile(prj) do\nlocal folders = string.explode(file.vpath, \"/\", true)\nlocal path = \"\"\nfor i = 1, #folders - 1 do\nif not filterfound then\nfilterfound = true\n_p(1,'<ItemGroup>')\nend\npath = path .. folders[i]\nif not filters[path] then\nfilters[path] = true\n_p(2, '<Filter Include=\"%s\">', path)\n_p(3, '<UniqueIdentifier>{%s}</UniqueIdentifier>', os.uuid(path))\n_p(2, '</Filter>')\nend\npath = path .. \"\\\\\"\nend\nend\nfor _, custombuildtask in ipairs(prj.custombuildtask or {}) do\nfor _, buildtask in ipairs(custombuildtask or {}) do\nlocal folders = string.explode(path.trimdots(path.getrelative(prj.location,buildtask[1])), \"/\", true)\nlocal path = \"\"\nfor i = 1, #folders - 1 do\nif not filterfound then\nfilterfound = true\n_p(1,'<ItemGroup>')\nend\npath = path .. folders[i]\nif not filters[path] then\nfilters[path] = tr"
- "ue\n_p(2, '<Filter Include=\"%s\">', path)\n_p(3, '<UniqueIdentifier>{%s}</UniqueIdentifier>', os.uuid(path))\n_p(2, '</Filter>')\nend\npath = path .. \"\\\\\"\nend\nend\nend\nif filterfound then\n_p(1,'</ItemGroup>')\nend\nend\nfunction vc2010.filefiltergroup(prj, section)\nlocal files = vc2010.getfilegroup(prj, section) or {}\nif (section == \"CustomBuild\") then\nfor _, custombuildtask in ipairs(prj.custombuildtask or {}) do\nfor _, buildtask in ipairs(custombuildtask or {}) do\nlocal fcfg = { }\nfcfg.name = path.getrelative(prj.location,buildtask[1])\nfcfg.vpath = path.trimdots(fcfg.name)\ntable.insert(files, fcfg)\nend\nend\nend\nif #files > 0 then\n_p(1,'<ItemGroup>')\nfor _, file in ipairs(files) do\nlocal filter\nif file.name ~= file.vpath then\nfilter = path.getdirectory(file.vpath)\nelse\nfilter = path.getdirectory(file.name)\nend\nif filter ~= \".\" then\n_p(2,'<%s Include=\\\"%s\\\">', section, path.translate(file.name, \"\\\\\"))\n_p(3,'<Filter>%s</Filter>', path.translate(filter, \"\\\\\"))\n_p(2"
- ",'</%s>', section)\nelse\n_p(2,'<%s Include=\\\"%s\\\" />', section, path.translate(file.name, \"\\\\\"))\nend\nend\n_p(1,'</ItemGroup>')\nend\nend\nfunction vc2010.generate_filters(prj)\nio.indent = \" \"\nvc2010.header()\nvc2010.filteridgroup(prj)\nvc2010.filefiltergroup(prj, \"None\")\nvc2010.filefiltergroup(prj, \"ClInclude\")\nvc2010.filefiltergroup(prj, \"ClCompile\")\nvc2010.filefiltergroup(prj, \"ResourceCompile\")\nvc2010.filefiltergroup(prj, \"CustomBuild\")\n_p('</Project>')\nend\n",
+ "ue\n_p(2, '<Filter Include=\"%s\">', path)\n_p(3, '<UniqueIdentifier>{%s}</UniqueIdentifier>', os.uuid(path))\n_p(2, '</Filter>')\nend\npath = path .. \"\\\\\"\nend\nend\nend\nif filterfound then\n_p(1,'</ItemGroup>')\nend\nend\nfunction vc2010.filefiltergroup(prj, section, kind)\nlocal files = vc2010.getfilegroup(prj, section) or {}\nif kind == nill then\nkind = section\nend\nif (section == \"CustomBuild\") then\nfor _, custombuildtask in ipairs(prj.custombuildtask or {}) do\nfor _, buildtask in ipairs(custombuildtask or {}) do\nlocal fcfg = { }\nfcfg.name = path.getrelative(prj.location,buildtask[1])\nfcfg.vpath = path.trimdots(fcfg.name)\ntable.insert(files, fcfg)\nend\nend\nend\nif #files > 0 then\n_p(1,'<ItemGroup>')\nfor _, file in ipairs(files) do\nlocal filter\nif file.name ~= file.vpath then\nfilter = path.getdirectory(file.vpath)\nelse\nfilter = path.getdirectory(file.name)\nend\nif filter ~= \".\" then\n_p(2,'<%s Include=\\\"%s\\\">', kind, path.translate(file.name, \"\\\\\"))\n_p(3,'<Filter>%s</Fil"
+ "ter>', path.translate(filter, \"\\\\\"))\n_p(2,'</%s>', kind)\nelse\n_p(2,'<%s Include=\\\"%s\\\" />', kind, path.translate(file.name, \"\\\\\"))\nend\nend\n_p(1,'</ItemGroup>')\nend\nend\nfunction vc2010.generate_filters(prj)\nio.indent = \" \"\nvc2010.header()\nvc2010.filteridgroup(prj)\nvc2010.filefiltergroup(prj, \"None\")\nvc2010.filefiltergroup(prj, \"ClInclude\")\nvc2010.filefiltergroup(prj, \"ClCompile\")\nvc2010.filefiltergroup(prj, \"ResourceCompile\")\nvc2010.filefiltergroup(prj, \"CustomBuild\")\nvc2010.filefiltergroup(prj, \"AppxManifest\")\nvc2010.filefiltergroup(prj, \"Image\")\nvc2010.filefiltergroup(prj, \"DeploymentContent\", \"None\")\n_p('</Project>')\nend\n",
/* actions/vstudio/vs2012.lua */
"premake.vstudio.vc2012 = {}\nlocal vc2012 = premake.vstudio.vc2012\nlocal vstudio = premake.vstudio\nnewaction\n{\ntrigger = \"vs2012\",\nshortname = \"Visual Studio 2012\",\ndescription = \"Generate Microsoft Visual Studio 2012 project files\",\nos = \"windows\",\nvalid_kinds = { \"ConsoleApp\", \"WindowedApp\", \"StaticLib\", \"SharedLib\" },\nvalid_languages = { \"C\", \"C++\", \"C#\"},\nvalid_tools = {\ncc = { \"msc\" },\ndotnet = { \"msnet\" },\n},\nonsolution = function(sln)\npremake.generate(sln, \"%%.sln\", vstudio.sln2005.generate)\nend,\nonproject = function(prj)\nif premake.isdotnetproject(prj) then\npremake.generate(prj, \"%%.csproj\", vstudio.cs2005.generate)\npremake.generate(prj, \"%%.csproj.user\", vstudio.cs2005.generate_user)\nelse\npremake.generate(prj, \"%%.vcxproj\", premake.vs2010_vcxproj)\npremake.generate(prj, \"%%.vcxproj.user\", premake.vs2010_vcxproj_user)\npremake.generate(prj, \"%%.vcxproj.filters\", vstudio.vc2010.generate_filters)\nend"
diff --git a/3rdparty/genie/src/tools/gcc.lua b/3rdparty/genie/src/tools/gcc.lua
index 46afa976ac8..d5cca887cc6 100644
--- a/3rdparty/genie/src/tools/gcc.lua
+++ b/3rdparty/genie/src/tools/gcc.lua
@@ -193,7 +193,35 @@
return result
end
+--
+-- Given a path, return true if it's considered a real path
+-- to a library file, false otherwise.
+-- p: path
+--
+ function premake.gcc.islibfile(p)
+ if path.getextension(p) == ".a" then
+ return true
+ end
+ return false
+ end
+--
+-- Returns a list of project-relative paths to external library files.
+-- This function examines the linker flags and returns any that seem to be
+-- a real path to a library file (e.g. "path/to/a/library.a", but not "GL").
+-- Useful for adding to targets to trigger a relink when an external static
+-- library gets updated.
+-- cfg: configuration
+--
+ function premake.gcc.getlibfiles(cfg)
+ local result = {}
+ for _, value in ipairs(premake.getlinks(cfg, "system", "fullpath")) do
+ if premake.gcc.islibfile(value) then
+ table.insert(result, _MAKE.esc(value))
+ end
+ end
+ return result
+ end
--
-- This is poorly named: returns a list of linker flags for external
@@ -203,18 +231,18 @@
function premake.gcc.getlinkflags(cfg)
local result = {}
- for _, value in ipairs(premake.getlinks(cfg, "system", "name")) do
- if path.getextension(value) == ".framework" then
+ for _, value in ipairs(premake.getlinks(cfg, "system", "fullpath")) do
+ if premake.gcc.islibfile(value) then
+ table.insert(result, _MAKE.esc(value))
+ elseif path.getextension(value) == ".framework" then
table.insert(result, '-framework ' .. _MAKE.esc(path.getbasename(value)))
else
- table.insert(result, '-l' .. _MAKE.esc(value))
+ table.insert(result, '-l' .. _MAKE.esc(path.getname(value)))
end
end
return result
end
-
-
--
-- Get flags for passing to AR before the target is appended to the commandline
-- prj: project
diff --git a/3rdparty/genie/src/tools/ghs.lua b/3rdparty/genie/src/tools/ghs.lua
index 9f31fd4b129..d640a4865fd 100644
--- a/3rdparty/genie/src/tools/ghs.lua
+++ b/3rdparty/genie/src/tools/ghs.lua
@@ -118,7 +118,17 @@
return result
end
-
+-- Returns a list of project-relative paths to external library files.
+-- This function should examine the linker flags and return any that seem to be
+-- a real path to a library file (e.g. "path/to/a/library.a", but not "GL").
+-- Useful for adding to targets to trigger a relink when an external static
+-- library gets updated.
+-- Not currently supported on this toolchain.
+--
+ function premake.ghs.getlibfiles(cfg)
+ local result = {}
+ return result
+ end
--
-- This is poorly named: returns a list of linker flags for external
diff --git a/3rdparty/genie/src/tools/ow.lua b/3rdparty/genie/src/tools/ow.lua
index 7be8f2643cb..2eaf73a6b57 100644
--- a/3rdparty/genie/src/tools/ow.lua
+++ b/3rdparty/genie/src/tools/ow.lua
@@ -93,6 +93,19 @@
--
+-- Returns a list of project-relative paths to external library files.
+-- This function should examine the linker flags and return any that seem to be
+-- a real path to a library file (e.g. "path/to/a/library.a", but not "GL").
+-- Useful for adding to targets to trigger a relink when an external static
+-- library gets updated.
+-- Not currently supported on this toolchain.
+--
+ function premake.ow.getlibfiles(cfg)
+ local result = {}
+ return result
+ end
+
+--
-- Returns a list of linker flags for library search directories and
-- library names.
--
diff --git a/3rdparty/genie/src/tools/snc.lua b/3rdparty/genie/src/tools/snc.lua
index e829d68c704..1731115fda0 100644
--- a/3rdparty/genie/src/tools/snc.lua
+++ b/3rdparty/genie/src/tools/snc.lua
@@ -122,6 +122,18 @@
end
+--
+-- Returns a list of project-relative paths to external library files.
+-- This function should examine the linker flags and return any that seem to be
+-- a real path to a library file (e.g. "path/to/a/library.a", but not "GL").
+-- Useful for adding to targets to trigger a relink when an external static
+-- library gets updated.
+-- Not currently supported on this toolchain.
+--
+ function premake.snc.getlibfiles(cfg)
+ local result = {}
+ return result
+ end
--
-- This is poorly named: returns a list of linker flags for external
diff --git a/src/mame/drivers/pacman.cpp b/src/mame/drivers/pacman.cpp
index f206e19fa90..b8aaeb34746 100644
--- a/src/mame/drivers/pacman.cpp
+++ b/src/mame/drivers/pacman.cpp
@@ -1082,6 +1082,51 @@ static ADDRESS_MAP_START( woodpek_map, AS_PROGRAM, 8, pacman_state )
ADDRESS_MAP_END
+/*
+executes the following, which seems to be incorrect
+
+353B: call $9BD7
+9BD7: sbc a,c
+9BD8: ld (hl),$C3
+9BDA: db $ed,$13 < illegal op
+9BDC: rst $38
+
+*/
+
+static ADDRESS_MAP_START( numcrash_map, AS_PROGRAM, 8, pacman_state )
+ AM_RANGE(0x0000, 0x1fff) AM_ROM
+ AM_RANGE(0x2000, 0x27ff) AM_ROM
+ /* 0x2800 - 0x2fff unmapped? */
+ AM_RANGE(0x3000, 0x37ff) AM_ROM
+ /* 0x3800 - 0x3fff unmapped? */
+ AM_RANGE(0x8000, 0x9fff) AM_ROM
+
+ AM_RANGE(0x4000, 0x43ff) AM_RAM_WRITE(pacman_videoram_w) AM_SHARE("videoram")
+ AM_RANGE(0x4400, 0x47ff) AM_RAM_WRITE(pacman_colorram_w) AM_SHARE("colorram")
+
+
+
+ AM_RANGE(0x4c00, 0x4fef) AM_RAM
+ AM_RANGE(0x4ff0, 0x4fff) AM_RAM AM_SHARE("spriteram")
+ AM_RANGE(0x5000, 0x5000) AM_WRITE(irq_mask_w)
+ AM_RANGE(0x5001, 0x5001) AM_DEVWRITE("namco", namco_device, pacman_sound_enable_w)
+// AM_RANGE(0x5002, 0x5002) AM_WRITENOP
+// AM_RANGE(0x5003, 0x5003) AM_WRITE(pacman_flipscreen_w)
+// AM_RANGE(0x5004, 0x5005) AM_WRITENOP // AM_WRITE(pacman_leds_w)
+// AM_RANGE(0x5006, 0x5006) AM_WRITENOP // AM_WRITE(pacman_coin_lockout_global_w)
+// AM_RANGE(0x5007, 0x5007) AM_WRITE(pacman_coin_counter_w)
+ AM_RANGE(0x5040, 0x505f) AM_DEVWRITE("namco", namco_device, pacman_sound_w)
+ AM_RANGE(0x5060, 0x506f) AM_WRITEONLY AM_SHARE("spriteram2")
+// AM_RANGE(0x5070, 0x507f) AM_WRITENOP
+// AM_RANGE(0x5080, 0x5080) AM_WRITENOP
+ AM_RANGE(0x50c0, 0x50c0) AM_WRITE(watchdog_reset_w)
+ AM_RANGE(0x5000, 0x5000) AM_READ_PORT("IN0")
+ AM_RANGE(0x5040, 0x5040) AM_READ_PORT("IN1")
+ AM_RANGE(0x5080, 0x5080) AM_READ_PORT("DSW1")
+ AM_RANGE(0x50c0, 0x50c0) AM_READ_PORT("DSW2")
+ADDRESS_MAP_END
+
+
static ADDRESS_MAP_START( alibaba_map, AS_PROGRAM, 8, pacman_state )
AM_RANGE(0x0000, 0x3fff) AM_ROM
AM_RANGE(0x4000, 0x43ff) AM_MIRROR(0xa000) AM_RAM_WRITE(pacman_videoram_w) AM_SHARE("videoram")
@@ -2934,23 +2979,109 @@ static INPUT_PORTS_START( woodpek )
INPUT_PORTS_END
static INPUT_PORTS_START( numcrash )
- PORT_INCLUDE( woodpek )
- PORT_MODIFY("IN0")
- PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_BUTTON2 )
- PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_BUTTON3 )
- PORT_MODIFY("IN1")
- PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_COIN1 )
- PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_START1 )
+ PORT_START("IN0")
+ PORT_DIPNAME( 0x01, 0x01, DEF_STR( Unknown ) )
+ PORT_DIPSETTING( 0x01, DEF_STR( Off ) )
+ PORT_DIPSETTING( 0x00, DEF_STR( On ) )
+ PORT_DIPNAME( 0x02, 0x02, DEF_STR( Unknown ) )
+ PORT_DIPSETTING( 0x02, DEF_STR( Off ) )
+ PORT_DIPSETTING( 0x00, DEF_STR( On ) )
+ PORT_DIPNAME( 0x04, 0x04, DEF_STR( Unknown ) )
+ PORT_DIPSETTING( 0x04, DEF_STR( Off ) )
+ PORT_DIPSETTING( 0x00, DEF_STR( On ) )
+ PORT_DIPNAME( 0x08, 0x08, DEF_STR( Unknown ) )
+ PORT_DIPSETTING( 0x08, DEF_STR( Off ) )
+ PORT_DIPSETTING( 0x00, DEF_STR( On ) )
+ PORT_DIPNAME( 0x10, 0x10, DEF_STR( Unknown ) )
+ PORT_DIPSETTING( 0x10, DEF_STR( Off ) )
+ PORT_DIPSETTING( 0x00, DEF_STR( On ) )
+ PORT_DIPNAME( 0x20, 0x20, DEF_STR( Unknown ) )
+ PORT_DIPSETTING( 0x20, DEF_STR( Off ) )
+ PORT_DIPSETTING( 0x00, DEF_STR( On ) )
+ PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_SPECIAL ) // or it won't boot "I CAN NOT RUN"
+ PORT_DIPNAME( 0x80, 0x80, DEF_STR( Unknown ) )
+ PORT_DIPSETTING( 0x80, DEF_STR( Off ) )
+ PORT_DIPSETTING( 0x00, DEF_STR( On ) )
- PORT_MODIFY("DSW1")
- PORT_DIPNAME( 0x03, 0x00, DEF_STR( Coinage ) )
- PORT_DIPSETTING( 0x03, DEF_STR( 4C_1C ) )
- PORT_DIPSETTING( 0x02, DEF_STR( 3C_1C ) )
- PORT_DIPSETTING( 0x01, DEF_STR( 2C_1C ) )
- PORT_DIPSETTING( 0x00, DEF_STR( 1C_1C ) )
+ PORT_START("IN1")
+ PORT_DIPNAME( 0x01, 0x01, DEF_STR( Unknown ) )
+ PORT_DIPSETTING( 0x01, DEF_STR( Off ) )
+ PORT_DIPSETTING( 0x00, DEF_STR( On ) )
+ PORT_DIPNAME( 0x02, 0x02, DEF_STR( Unknown ) )
+ PORT_DIPSETTING( 0x02, DEF_STR( Off ) )
+ PORT_DIPSETTING( 0x00, DEF_STR( On ) )
+ PORT_DIPNAME( 0x04, 0x04, DEF_STR( Unknown ) )
+ PORT_DIPSETTING( 0x04, DEF_STR( Off ) )
+ PORT_DIPSETTING( 0x00, DEF_STR( On ) )
+ PORT_DIPNAME( 0x08, 0x08, DEF_STR( Unknown ) )
+ PORT_DIPSETTING( 0x08, DEF_STR( Off ) )
+ PORT_DIPSETTING( 0x00, DEF_STR( On ) )
+ PORT_DIPNAME( 0x10, 0x10, DEF_STR( Unknown ) )
+ PORT_DIPSETTING( 0x10, DEF_STR( Off ) )
+ PORT_DIPSETTING( 0x00, DEF_STR( On ) )
+ PORT_DIPNAME( 0x20, 0x20, DEF_STR( Unknown ) )
+ PORT_DIPSETTING( 0x20, DEF_STR( Off ) )
+ PORT_DIPSETTING( 0x00, DEF_STR( On ) )
+ PORT_DIPNAME( 0x40, 0x40, DEF_STR( Unknown ) )
+ PORT_DIPSETTING( 0x40, DEF_STR( Off ) )
+ PORT_DIPSETTING( 0x00, DEF_STR( On ) )
+ PORT_DIPNAME( 0x80, 0x80, DEF_STR( Unknown ) )
+ PORT_DIPSETTING( 0x80, DEF_STR( Off ) )
+ PORT_DIPSETTING( 0x00, DEF_STR( On ) )
+ PORT_START("DSW1")
+ PORT_DIPNAME( 0x01, 0x01, DEF_STR( Unknown ) )
+ PORT_DIPSETTING( 0x01, DEF_STR( Off ) )
+ PORT_DIPSETTING( 0x00, DEF_STR( On ) )
+ PORT_DIPNAME( 0x02, 0x02, DEF_STR( Unknown ) )
+ PORT_DIPSETTING( 0x02, DEF_STR( Off ) )
+ PORT_DIPSETTING( 0x00, DEF_STR( On ) )
+ PORT_DIPNAME( 0x04, 0x04, DEF_STR( Unknown ) )
+ PORT_DIPSETTING( 0x04, DEF_STR( Off ) )
+ PORT_DIPSETTING( 0x00, DEF_STR( On ) )
+ PORT_DIPNAME( 0x08, 0x08, DEF_STR( Unknown ) )
+ PORT_DIPSETTING( 0x08, DEF_STR( Off ) )
+ PORT_DIPSETTING( 0x00, DEF_STR( On ) )
+ PORT_DIPNAME( 0x10, 0x10, DEF_STR( Unknown ) )
+ PORT_DIPSETTING( 0x10, DEF_STR( Off ) )
+ PORT_DIPSETTING( 0x00, DEF_STR( On ) )
+ PORT_DIPNAME( 0x20, 0x20, DEF_STR( Unknown ) )
+ PORT_DIPSETTING( 0x20, DEF_STR( Off ) )
+ PORT_DIPSETTING( 0x00, DEF_STR( On ) )
+ PORT_DIPNAME( 0x40, 0x40, DEF_STR( Unknown ) )
+ PORT_DIPSETTING( 0x40, DEF_STR( Off ) )
+ PORT_DIPSETTING( 0x00, DEF_STR( On ) )
+ PORT_DIPNAME( 0x80, 0x80, DEF_STR( Unknown ) )
+ PORT_DIPSETTING( 0x80, DEF_STR( Off ) )
+ PORT_DIPSETTING( 0x00, DEF_STR( On ) )
+
+ PORT_START("DSW2")
+ PORT_DIPNAME( 0x01, 0x01, DEF_STR( Unknown ) )
+ PORT_DIPSETTING( 0x01, DEF_STR( Off ) )
+ PORT_DIPSETTING( 0x00, DEF_STR( On ) )
+ PORT_DIPNAME( 0x02, 0x02, DEF_STR( Unknown ) )
+ PORT_DIPSETTING( 0x02, DEF_STR( Off ) )
+ PORT_DIPSETTING( 0x00, DEF_STR( On ) )
+ PORT_DIPNAME( 0x04, 0x04, DEF_STR( Unknown ) )
+ PORT_DIPSETTING( 0x04, DEF_STR( Off ) )
+ PORT_DIPSETTING( 0x00, DEF_STR( On ) )
+ PORT_DIPNAME( 0x08, 0x08, DEF_STR( Unknown ) )
+ PORT_DIPSETTING( 0x08, DEF_STR( Off ) )
+ PORT_DIPSETTING( 0x00, DEF_STR( On ) )
+ PORT_DIPNAME( 0x10, 0x10, DEF_STR( Unknown ) )
+ PORT_DIPSETTING( 0x10, DEF_STR( Off ) )
+ PORT_DIPSETTING( 0x00, DEF_STR( On ) )
+ PORT_DIPNAME( 0x20, 0x20, DEF_STR( Unknown ) )
+ PORT_DIPSETTING( 0x20, DEF_STR( Off ) )
+ PORT_DIPSETTING( 0x00, DEF_STR( On ) )
+ PORT_DIPNAME( 0x40, 0x40, DEF_STR( Unknown ) )
+ PORT_DIPSETTING( 0x40, DEF_STR( Off ) )
+ PORT_DIPSETTING( 0x00, DEF_STR( On ) )
+ PORT_DIPNAME( 0x80, 0x80, DEF_STR( Unknown ) )
+ PORT_DIPSETTING( 0x80, DEF_STR( Off ) )
+ PORT_DIPSETTING( 0x00, DEF_STR( On ) )
INPUT_PORTS_END
static INPUT_PORTS_START( bigbucks )
@@ -3524,6 +3655,12 @@ static MACHINE_CONFIG_DERIVED( woodpek, pacman )
MCFG_CPU_PROGRAM_MAP(woodpek_map)
MACHINE_CONFIG_END
+static MACHINE_CONFIG_DERIVED( numcrash, pacman )
+
+ /* basic machine hardware */
+ MCFG_CPU_MODIFY("maincpu")
+ MCFG_CPU_PROGRAM_MAP(numcrash_map)
+MACHINE_CONFIG_END
static MACHINE_CONFIG_DERIVED( alibaba, pacman )
@@ -6257,18 +6394,19 @@ ROM_START( numcrash )
ROM_LOAD( "nc-1.6e", 0x0000, 0x0800, CRC(c85a79ba) SHA1(938b6b2920b14a4f0fbcd09fe25873bfd8ddc245) )
ROM_LOAD( "nc-5.6k", 0x0800, 0x0800, CRC(20e6c64d) SHA1(ff61ede279a46ea2bec534dd82ec89e41a3ec77b) )
ROM_LOAD( "nc-2.6f", 0x1000, 0x0800, CRC(954a4630) SHA1(09bc3d8d1d4e79a805c5fb436739bc618faf7825) )
- ROM_RELOAD( 0x8000, 0x0800 )
ROM_LOAD( "nc-6.6m", 0x1800, 0x0800, CRC(7b8de692) SHA1(7d5fe625ee9acf3cced2d98df99f5dee6c8122b1) )
ROM_LOAD( "nc-3.6h", 0x2000, 0x0800, CRC(e47f7cf3) SHA1(47e513cf4fe80617547093210ca6582646a9b256) )
- ROM_RELOAD( 0x8800, 0x0800 )
- ROM_LOAD( "nc-7.6n", 0x2800, 0x0800, CRC(c6f5bd41) SHA1(854002c6c45f6993ada98b42ed6b814afac0c1f7) )
+ /* 0x2800 - 0x2fff unpopulated? would usually be 6n */
ROM_LOAD( "nc-4.6j", 0x3000, 0x0800, CRC(c67450d2) SHA1(b940093c979795d0de4b203200c3f824d5d9ac7f) )
+ /* 0x3800 - 0x3fff unpopulated? would usually be 6p */
+
+ ROM_LOAD( "nc-7.6n", 0x8000, 0x1000, CRC(440c67e4) SHA1(a29385b4263e61bc8d48e531d0f7b161f8d66f7a) )
ROM_LOAD( "nc-8.6p", 0x9000, 0x1000, CRC(7dabb3e5) SHA1(29dd5f6b7acc3abd292c903be6fef9fc4a135287) )
ROM_REGION( 0x2000, "gfx1", 0 )
ROM_LOAD( "nc-9.5e", 0x0000, 0x0800, CRC(6a30b507) SHA1(e5760844cd051504e61774c57549c2697d473591) )
- ROM_LOAD( "nc-10.5f", 0x0800, 0x0800, CRC(bdd352db) SHA1(c4dd0bd009098a82dd5603046fa929f7395dd903) )
- ROM_LOAD( "nc-11.5h", 0x1000, 0x0800, CRC(5f54d8e6) SHA1(3a20df62f484846e5610b88c04db56f9b5b3029c) )
+ ROM_LOAD( "nc-11.5h", 0x0800, 0x0800, CRC(5f54d8e6) SHA1(3a20df62f484846e5610b88c04db56f9b5b3029c) )
+ ROM_LOAD( "nc-10.5f", 0x1000, 0x0800, CRC(bdd352db) SHA1(c4dd0bd009098a82dd5603046fa929f7395dd903) )
ROM_LOAD( "nc-12.5j", 0x1800, 0x0800, CRC(b104a8a9) SHA1(ac7f9b0041a9be1d0ffa58d2f65a0d294e986357) )
ROM_REGION( 0x0120, "proms", 0 )
@@ -7019,7 +7157,7 @@ GAME( 1986, rocktrv2, 0, rocktrv2, rocktrv2, pacman_state, rocktrv2, ROT
GAME( 1986, bigbucks, 0, bigbucks, bigbucks, driver_device, 0, ROT90, "Dynasoft Inc.", "Big Bucks", MACHINE_SUPPORTS_SAVE )
-GAME( 1983, numcrash, 0, woodpek, numcrash, driver_device, 0, ROT90, "Hanshin Goraku", "Number Crash", MACHINE_NOT_WORKING | MACHINE_SUPPORTS_SAVE )
+GAME( 1983, numcrash, 0, numcrash, numcrash, driver_device, 0, ROT90, "Hanshin Goraku", "Number Crash", MACHINE_NOT_WORKING | MACHINE_SUPPORTS_SAVE ) // "Peni soft" related?
GAME( 1985, cannonbp, 0, pacman, cannonbp, pacman_state, cannonbp, ROT90, "Novomatic", "Cannon Ball (Pac-Man Hardware)", MACHINE_WRONG_COLORS | MACHINE_SUPPORTS_SAVE )
diff --git a/src/mame/drivers/symbolics.cpp b/src/mame/drivers/symbolics.cpp
index 26e2c78f043..2a3dae59000 100644
--- a/src/mame/drivers/symbolics.cpp
+++ b/src/mame/drivers/symbolics.cpp
@@ -1,12 +1,12 @@
// license:BSD-3-Clause
// copyright-holders:Jonathan Gevaryahu
-// thanks to: Ian F./trinitr0n
+// thanks-to:Ian F./trinitr0n
/******************************************************************************
Symbolics 36x0 (really in this case, 3670; the original 3600 is considerably rarer, 3670 is backwards compatible for the most part)
TODO: add credits, backstory, history, etc here
Layout of all the Lisp machine models symbolics made, roughly in chronological order:
- LM-2 - basically a CADR (i.e. a clone of the MIT CADR machine, but doesn't require an umbilical to a PDP-10 like CADR did? this needs more research)
+ LM-2 - basically a CADR (i.e. a clone of the MIT CADR machine. this needs more research, as there may be differences.)
3600 - precursor to the L-machine, 98% of the actual L machines- an extended and polished CADR. uses the pre-PE console
3670 / 3640 {large, small} L-machines, same architecture but the large cabinet has more slots for boards and can take larger disks like EAGLEs
3675 / 3645 - Faster L-machines; same core board set but they come with the later released FPA and instruction prefetch units; ~ 1.5x faster; this is the fastest pre-Ivory machine, faster than all the 36xx machines below
diff --git a/src/mame/drivers/tispeak.cpp b/src/mame/drivers/tispeak.cpp
index f6bd51bca24..384d2c04016 100644
--- a/src/mame/drivers/tispeak.cpp
+++ b/src/mame/drivers/tispeak.cpp
@@ -1,5 +1,6 @@
// license:BSD-3-Clause
// copyright-holders:hap, Jonathan Gevaryahu, Sean Riddle
+// thanks-to:David Viens
/***************************************************************************
** subclass of hh_tms1k_state (includes/hh_tms1k.h, drivers/hh_tms1k.cpp) **
diff --git a/src/osd/modules/render/d3d/d3dhlsl.cpp b/src/osd/modules/render/d3d/d3dhlsl.cpp
index 3706b68042d..6981a490ac7 100644
--- a/src/osd/modules/render/d3d/d3dhlsl.cpp
+++ b/src/osd/modules/render/d3d/d3dhlsl.cpp
@@ -60,8 +60,8 @@ static direct3dx9_loadeffect_ptr g_load_effect = nullptr;
//============================================================
shaders::shaders() :
- d3dintf(nullptr), machine(nullptr), d3d(nullptr), num_screens(0), curr_screen(0), curr_frame(0),
- vecbuf_type(), vecbuf_index(0), vecbuf_count(0), avi_output_file(nullptr), avi_frame(0), avi_copy_surface(nullptr), avi_copy_texture(nullptr), avi_final_target(nullptr), avi_final_texture(nullptr),
+ d3dintf(nullptr), machine(nullptr), d3d(nullptr), num_screens(0), curr_screen(0),
+ avi_output_file(nullptr), avi_frame(0), avi_copy_surface(nullptr), avi_copy_texture(nullptr), avi_final_target(nullptr), avi_final_texture(nullptr),
black_surface(nullptr), black_texture(nullptr), render_snap(false), snap_rendered(false), snap_copy_target(nullptr), snap_copy_texture(nullptr), snap_target(nullptr), snap_texture(nullptr),
snap_width(0), snap_height(0), lines_pending(false), backbuffer(nullptr), curr_effect(nullptr), default_effect(nullptr), prescale_effect(nullptr), post_effect(nullptr), distortion_effect(nullptr),
focus_effect(nullptr), phosphor_effect(nullptr), deconverge_effect(nullptr), color_effect(nullptr), ntsc_effect(nullptr), bloom_effect(nullptr),
diff --git a/src/osd/modules/render/d3d/d3dhlsl.h b/src/osd/modules/render/d3d/d3dhlsl.h
index 74dd433a406..29a7766affe 100644
--- a/src/osd/modules/render/d3d/d3dhlsl.h
+++ b/src/osd/modules/render/d3d/d3dhlsl.h
@@ -387,14 +387,10 @@ private:
bool paused; // whether or not rendering is currently paused
int num_screens; // number of emulated physical screens
int curr_screen; // current screen for render target operations
- int curr_frame; // current frame (0/1) of a screen for render target operations
int lastidx; // index of the last-encountered target
bitmap_argb32 shadow_bitmap; // shadow mask bitmap for post-processing shader
texture_info * shadow_texture; // shadow mask texture for post-processing shader
hlsl_options * options; // current options
- D3DPRIMITIVETYPE vecbuf_type;
- UINT32 vecbuf_index;
- UINT32 vecbuf_count;
avi_file::ptr avi_output_file; // AVI file
bitmap_rgb32 avi_snap; // AVI snapshot