diff --git a/premake5.lua b/premake5.lua index b1869b28..c6c85bd0 100644 --- a/premake5.lua +++ b/premake5.lua @@ -97,7 +97,7 @@ include "src/ZoneWriting.lua" group "Components" Crypto:project() Utils:project() - --ZoneCodeGenerator:project() + ZoneCodeGenerator:project() ZoneCommon:project() ZoneLoading:project() ZoneWriting:project() @@ -117,6 +117,6 @@ include "test/ZoneCommonTests.lua" -- Tests group: Unit test and other tests projects group "Tests" - --ZoneCodeGeneratorTests:project() + ZoneCodeGeneratorTests:project() ZoneCommonTests:project() group "" \ No newline at end of file diff --git a/src/Crypto.lua b/src/Crypto.lua index c1b136dd..b4985876 100644 --- a/src/Crypto.lua +++ b/src/Crypto.lua @@ -20,7 +20,7 @@ function Crypto:project() project "Crypto" targetdir(TargetDirectoryLib) - location "%{wks.location}/src" + location "%{wks.location}/src/%{prj.name}" kind "StaticLib" language "C++" diff --git a/src/Linker.lua b/src/Linker.lua index 1fb813af..2c65c05b 100644 --- a/src/Linker.lua +++ b/src/Linker.lua @@ -15,7 +15,7 @@ function Linker:project() project "Linker" targetdir(TargetDirectoryBin) - location "%{wks.location}/src" + location "%{wks.location}/src/%{prj.name}" kind "ConsoleApp" language "C++" diff --git a/src/Unlinker.lua b/src/Unlinker.lua index 1b33b746..6ad77144 100644 --- a/src/Unlinker.lua +++ b/src/Unlinker.lua @@ -15,7 +15,7 @@ function Unlinker:project() project "Unlinker" targetdir(TargetDirectoryBin) - location "%{wks.location}/src" + location "%{wks.location}/src/%{prj.name}" kind "ConsoleApp" language "C++" diff --git a/src/Utils.lua b/src/Utils.lua index c20af075..3965f0a9 100644 --- a/src/Utils.lua +++ b/src/Utils.lua @@ -17,7 +17,7 @@ function Utils:project() project "Utils" targetdir(TargetDirectoryLib) - location "%{wks.location}/src" + location "%{wks.location}/src/%{prj.name}" kind "StaticLib" language "C++" diff --git a/src/ZoneCodeGenerator.lua b/src/ZoneCodeGenerator.lua index e69de29b..88378514 100644 --- a/src/ZoneCodeGenerator.lua +++ b/src/ZoneCodeGenerator.lua @@ -0,0 +1,41 @@ +ZoneCodeGenerator = {} + +function ZoneCodeGenerator:include() + +end + +function ZoneCodeGenerator:link() + links { + "ZoneCodeGenerator" + } +end + +function ZoneCodeGenerator:project() + local folder = ProjectFolder(); + + project "ZoneCodeGenerator" + targetdir(TargetDirectoryBin) + location "%{wks.location}/src/%{prj.name}" + kind "ConsoleApp" + language "C#" + namespace "ZoneCodeGenerator" + + files { + path.join(folder, "ZoneCodeGenerator/**.cs") + } + + vpaths { ["*"] = "src/ZoneCodeGenerator" } + + nuget { + "Antlr3.Runtime:3.5.1", + "StringTemplate4:4.0.8" + } + + links { + "System", + "System.Core", + "System.Data", + "StringTemplate4", + "Antlr3.Runtime" + } +end diff --git a/src/ZoneCodeGenerator/App.config b/src/ZoneCodeGenerator/App.config deleted file mode 100644 index 8d234373..00000000 --- a/src/ZoneCodeGenerator/App.config +++ /dev/null @@ -1,6 +0,0 @@ - - - - - - diff --git a/src/ZoneCodeGenerator/ZoneCodeGenerator.csproj b/src/ZoneCodeGenerator/ZoneCodeGenerator.csproj deleted file mode 100644 index 882fed23..00000000 --- a/src/ZoneCodeGenerator/ZoneCodeGenerator.csproj +++ /dev/null @@ -1,179 +0,0 @@ - - - - - Debug - AnyCPU - {D1C20C32-9CB8-44B8-9DF7-F0CF8FB304D3} - Exe - ZoneCodeGenerator - ZoneCodeGenerator - v4.6.2 - 512 - true - true - - - - AnyCPU - true - full - false - bin\Debug\ - DEBUG;TRACE - prompt - 4 - - - AnyCPU - pdbonly - true - bin\Release\ - TRACE - prompt - 4 - - - - ..\..\packages\Antlr3.Runtime.3.5.1\lib\net40-client\Antlr3.Runtime.dll - - - ..\..\packages\StringTemplate4.4.0.8\lib\net35-client\Antlr4.StringTemplate.dll - - - ..\..\packages\Newtonsoft.Json.12.0.2\lib\net45\Newtonsoft.Json.dll - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/src/ZoneCodeGenerator/packages.config b/src/ZoneCodeGenerator/packages.config deleted file mode 100644 index 9dcd9366..00000000 --- a/src/ZoneCodeGenerator/packages.config +++ /dev/null @@ -1,6 +0,0 @@ - - - - - - \ No newline at end of file diff --git a/src/ZoneCommon.lua b/src/ZoneCommon.lua index 9782059c..9d9350c5 100644 --- a/src/ZoneCommon.lua +++ b/src/ZoneCommon.lua @@ -17,7 +17,7 @@ function ZoneCommon:project() project "ZoneCommon" targetdir(TargetDirectoryLib) - location "%{wks.location}/src" + location "%{wks.location}/src/%{prj.name}" kind "StaticLib" language "C++" diff --git a/src/ZoneLoading.lua b/src/ZoneLoading.lua index 7118ca28..6e92281f 100644 --- a/src/ZoneLoading.lua +++ b/src/ZoneLoading.lua @@ -22,7 +22,7 @@ function ZoneLoading:project() project "ZoneLoading" targetdir(TargetDirectoryLib) - location "%{wks.location}/src" + location "%{wks.location}/src/%{prj.name}" kind "StaticLib" language "C++" diff --git a/src/ZoneWriting.lua b/src/ZoneWriting.lua index 40edfaa2..bd266ccb 100644 --- a/src/ZoneWriting.lua +++ b/src/ZoneWriting.lua @@ -22,7 +22,7 @@ function ZoneWriting:project() project "ZoneWriting" targetdir(TargetDirectoryLib) - location "%{wks.location}/src" + location "%{wks.location}/src/%{prj.name}" kind "StaticLib" language "C++" diff --git a/test/ZoneCodeGeneratorTests.lua b/test/ZoneCodeGeneratorTests.lua index a24ec535..bd2496ef 100644 --- a/test/ZoneCodeGeneratorTests.lua +++ b/test/ZoneCodeGeneratorTests.lua @@ -13,26 +13,29 @@ function ZoneCodeGeneratorTests:project() project "ZoneCodeGeneratorTests" targetdir(TargetDirectoryTest) - location "%{wks.location}/test" + location "%{wks.location}/test/%{prj.name}" kind "SharedLib" language "C#" files { - path.join(folder, "Zone/src/**.h"), - path.join(folder, "libtomcrypt/src/**.c") + path.join(folder, "ZoneCodeGeneratorTests/**.cs") } - - defines { - "_CRT_SECURE_NO_WARNINGS", - "_CRT_NONSTDC_NO_DEPRECATE", - "LTC_SOURCE", - "LTC_NO_TEST", - "LTC_NO_PROTOTYPES" - } - - self:include() - libtommath:include() - -- Disable warnings. They do not have any value to us since it is not our code. - warnings "off" + vpaths { ["*"] = "test/ZoneCodeGeneratorTests" } + + nuget { + "Moq:4.13.1", + "MSTest.TestFramework:2.0.0", + "MSTest.TestAdapter:2.0.0" + } + + links { + "System", + "System.Core", + "System.Data", + "Moq", + "MSTest.TestFramework" + } + + ZoneCodeGenerator:link() end diff --git a/test/ZoneCodeGeneratorTests/ZoneCodeGeneratorTests.csproj b/test/ZoneCodeGeneratorTests/ZoneCodeGeneratorTests.csproj deleted file mode 100644 index 526686e9..00000000 --- a/test/ZoneCodeGeneratorTests/ZoneCodeGeneratorTests.csproj +++ /dev/null @@ -1,110 +0,0 @@ - - - - - - Debug - AnyCPU - {C29242DB-84D0-4A37-AD3F-19B72B23C7E0} - Library - Properties - ZoneCodeGeneratorTests - ZoneCodeGeneratorTests - v4.6.2 - 512 - {3AC096D0-A1C2-E12C-1390-A8335801FDAB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC} - 15.0 - $(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion) - $(ProgramFiles)\Common Files\microsoft shared\VSTT\$(VisualStudioVersion)\UITestExtensionPackages - False - UnitTest - - - - - - true - full - false - bin\Debug\ - DEBUG;TRACE - prompt - 4 - - - pdbonly - true - bin\Release\ - TRACE - prompt - 4 - - - - ..\..\packages\Castle.Core.4.4.0\lib\net45\Castle.Core.dll - - - ..\..\packages\MSTest.TestFramework.2.0.0\lib\net45\Microsoft.VisualStudio.TestPlatform.TestFramework.dll - - - ..\..\packages\MSTest.TestFramework.2.0.0\lib\net45\Microsoft.VisualStudio.TestPlatform.TestFramework.Extensions.dll - - - ..\..\packages\Moq.4.13.0\lib\net45\Moq.dll - - - - - - ..\..\packages\System.Runtime.CompilerServices.Unsafe.4.5.2\lib\netstandard2.0\System.Runtime.CompilerServices.Unsafe.dll - - - ..\..\packages\System.Threading.Tasks.Extensions.4.5.3\lib\netstandard2.0\System.Threading.Tasks.Extensions.dll - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - {d1c20c32-9cb8-44b8-9df7-f0cf8fb304d3} - ZoneCodeGenerator - - - - - - - This project references NuGet package(s) that are missing on this computer. Use NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}. - - - - - - \ No newline at end of file diff --git a/test/ZoneCodeGeneratorTests/app.config b/test/ZoneCodeGeneratorTests/app.config deleted file mode 100644 index dbc7795c..00000000 --- a/test/ZoneCodeGeneratorTests/app.config +++ /dev/null @@ -1,11 +0,0 @@ - - - - - - - - - - - diff --git a/test/ZoneCodeGeneratorTests/packages.config b/test/ZoneCodeGeneratorTests/packages.config deleted file mode 100644 index fbe2f8bc..00000000 --- a/test/ZoneCodeGeneratorTests/packages.config +++ /dev/null @@ -1,9 +0,0 @@ - - - - - - - - - \ No newline at end of file diff --git a/test/ZoneCommonTests.lua b/test/ZoneCommonTests.lua index 0f94b5e9..5610d318 100644 --- a/test/ZoneCommonTests.lua +++ b/test/ZoneCommonTests.lua @@ -13,7 +13,7 @@ function ZoneCommonTests:project() project "ZoneCommonTests" targetdir(TargetDirectoryTest) - location "%{wks.location}/test" + location "%{wks.location}/test/%{prj.name}" kind "SharedLib" language "C++" @@ -26,7 +26,4 @@ function ZoneCommonTests:project() ZoneCommon:include() ZoneCommon:link() - - -- Disable warnings. They do not have any value to us since it is not our code. - warnings "off" end diff --git a/thirdparty/libtomcrypt.lua b/thirdparty/libtomcrypt.lua index 2fe9be02..0bba8232 100644 --- a/thirdparty/libtomcrypt.lua +++ b/thirdparty/libtomcrypt.lua @@ -21,7 +21,7 @@ function libtomcrypt:project() project "libtomcrypt" targetdir(TargetDirectoryLib) - location "%{wks.location}/thirdparty" + location "%{wks.location}/thirdparty/%{prj.name}" kind "StaticLib" language "C" diff --git a/thirdparty/libtommath.lua b/thirdparty/libtommath.lua index 16d73440..f8cdfaa0 100644 --- a/thirdparty/libtommath.lua +++ b/thirdparty/libtommath.lua @@ -17,7 +17,7 @@ function libtommath:project() project "libtommath" targetdir(TargetDirectoryLib) - location "%{wks.location}/thirdparty" + location "%{wks.location}/thirdparty/%{prj.name}" kind "StaticLib" language "C" diff --git a/thirdparty/salsa20.lua b/thirdparty/salsa20.lua index 5474b2db..e29563ea 100644 --- a/thirdparty/salsa20.lua +++ b/thirdparty/salsa20.lua @@ -17,7 +17,7 @@ function salsa20:project() project "salsa20" targetdir(TargetDirectoryLib) - location "%{wks.location}/thirdparty" + location "%{wks.location}/thirdparty/%{prj.name}" kind "StaticLib" language "C" diff --git a/thirdparty/zlib.lua b/thirdparty/zlib.lua index cc25b0ef..7a749a84 100644 --- a/thirdparty/zlib.lua +++ b/thirdparty/zlib.lua @@ -22,7 +22,7 @@ function zlib:project() project "zlib" targetdir(TargetDirectoryLib) - location "%{wks.location}/thirdparty" + location "%{wks.location}/thirdparty/%{prj.name}" kind "StaticLib" language "C"