From 928b09af0938ecaf0431b967a23200c9aee5f662 Mon Sep 17 00:00:00 2001 From: andy halstead Date: Sun, 24 Mar 2024 16:54:11 -0700 Subject: [PATCH 01/10] MSVC solution with vcpkg to install dependencies --- .gitignore | 6 + Avara.msvc/Avara.sln | 25 + Avara.msvc/Avara.vcxproj | 531 ++++++++++++++ Avara.msvc/Avara.vcxproj.filters | 1136 ++++++++++++++++++++++++++++++ src/Avara.cpp | 15 +- src/assets/AssetManager.cpp | 6 +- src/assets/AssetManager.h | 6 +- src/bsp/CBSPPart.h | 3 + src/compat/Resource.cpp | 5 +- src/net/AvaraTCP.cpp | 2 + src/render/OpenGLShader.h | 3 + src/render/OpenGLVertices.cpp | 3 + vcpkg.json | 9 + vendor/nanogui/common.cpp | 2 + vendor/nanogui/layout.cpp | 4 +- vendor/nanogui/nanogui/opengl.h | 4 +- 16 files changed, 1742 insertions(+), 18 deletions(-) create mode 100644 Avara.msvc/Avara.sln create mode 100644 Avara.msvc/Avara.vcxproj create mode 100644 Avara.msvc/Avara.vcxproj.filters create mode 100644 vcpkg.json diff --git a/.gitignore b/.gitignore index ca56b6711..93d9bec05 100644 --- a/.gitignore +++ b/.gitignore @@ -14,3 +14,9 @@ __pycache__ src/util/GitVersion.h /*.alf levels/*/log.txt +vcpkg-configuration.json +vcpkg_installed +.vs +Avara.msvc/x64/ +Avara.msvc/Avara/ +*.vcxproj.user \ No newline at end of file diff --git a/Avara.msvc/Avara.sln b/Avara.msvc/Avara.sln new file mode 100644 index 000000000..5524109d9 --- /dev/null +++ b/Avara.msvc/Avara.sln @@ -0,0 +1,25 @@ + +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio Version 17 +VisualStudioVersion = 17.9.34714.143 +MinimumVisualStudioVersion = 10.0.40219.1 +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Avara", "Avara.vcxproj", "{0B8140FC-9E2D-416A-991D-129C52CCE3AC}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|x64 = Debug|x64 + Release|x64 = Release|x64 + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {0B8140FC-9E2D-416A-991D-129C52CCE3AC}.Debug|x64.ActiveCfg = Debug|x64 + {0B8140FC-9E2D-416A-991D-129C52CCE3AC}.Debug|x64.Build.0 = Debug|x64 + {0B8140FC-9E2D-416A-991D-129C52CCE3AC}.Release|x64.ActiveCfg = Release|x64 + {0B8140FC-9E2D-416A-991D-129C52CCE3AC}.Release|x64.Build.0 = Release|x64 + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection + GlobalSection(ExtensibilityGlobals) = postSolution + SolutionGuid = {7B15B9BF-351E-43C0-9B32-C61CEDBD4BDC} + EndGlobalSection +EndGlobal diff --git a/Avara.msvc/Avara.vcxproj b/Avara.msvc/Avara.vcxproj new file mode 100644 index 000000000..7be5ef20e --- /dev/null +++ b/Avara.msvc/Avara.vcxproj @@ -0,0 +1,531 @@ + + + + + Debug + Win32 + + + Release + Win32 + + + Debug + x64 + + + Release + x64 + + + + 17.0 + Win32Proj + {0b8140fc-9e2d-416a-991d-129c52cce3ac} + Avara + 10.0 + Avara + + + + Application + true + v143 + Unicode + + + Application + false + v143 + true + Unicode + + + Application + true + v143 + Unicode + + + Application + false + v143 + true + Unicode + + + + + + + + + + + + + + + + + + + + + $(VC_LibraryPath_x64);$(WindowsSDK_LibraryPath_x64);$(VCPKG_ROOT)\installed\x64-windows\debug\lib\manual-link + + + $(VC_LibraryPath_x64);$(WindowsSDK_LibraryPath_x64);$(VCPKG_ROOT)\installed\x64-windows\lib\manual-link + + + true + + + + Level3 + true + WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions) + true + + + Console + true + + + + + Level3 + true + true + true + WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions) + true + + + Console + true + true + true + + + + + Level2 + true + _WINSOCK_DEPRECATED_NO_WARNINGS;NOMINMAX;WIN32_LEAN_AND_MEAN;_CRT_SECURE_NO_WARNINGS;_DEBUG;NANOGUI_GLAD;%(PreprocessorDefinitions) + true + stdcpp17 + ..\src\audio;..\src\assets;..\src\base;..\src\bsp;..\src\compat;..\src\game;..\src\gui;..\src\level;..\src\net;..\src\render;..\src\tui;..\src\util;..\src\util\huffman;..\vendor\;..\vendor\nanogui;..\vendor\nanovg;..\vendor\pugixml;..\vendor\utf8;%(AdditionalIncludeDirectories) + false + + + Windows + true + SDL2maind.lib;shell32.lib;$(CoreLibraryDependencies);%(AdditionalDependencies) + + + + + + + xcopy /E /Y "$(SolutionDir)..\rsrc\" "$(TargetDir)rsrc\" && xcopy /E /Y "$(SolutionDir)..\levels\" "$(TargetDir)levels\" + + + + + Level3 + true + true + true + NDEBUG;_CONSOLE;%(PreprocessorDefinitions) + true + + + Console + true + true + true + SDL2main.lib;$(CoreLibraryDependencies);%(AdditionalDependencies) + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/Avara.msvc/Avara.vcxproj.filters b/Avara.msvc/Avara.vcxproj.filters new file mode 100644 index 000000000..c3eb32ca1 --- /dev/null +++ b/Avara.msvc/Avara.vcxproj.filters @@ -0,0 +1,1136 @@ + + + + + {4FC737F1-C7A5-4376-A066-2A32D752A2FF} + cpp;c;cc;cxx;c++;cppm;ixx;def;odl;idl;hpj;bat;asm;asmx + + + {93995380-89BD-4b04-88EB-625FBE52EBFB} + h;hh;hpp;hxx;h++;hm;inl;inc;ipp;xsd + + + {67DA6AB6-F800-4c08-8B7A-83BB121AAD01} + rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms + + + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + + + Resource Files + + + Resource Files + + + \ No newline at end of file diff --git a/src/Avara.cpp b/src/Avara.cpp index 0ef24b45d..5a8333b47 100644 --- a/src/Avara.cpp +++ b/src/Avara.cpp @@ -15,14 +15,9 @@ #include "FastMat.h" #include "Preferences.h" -#include -#include -#include - -using namespace nanogui; - #ifdef _WIN32 - +#include +#include typedef enum PROCESS_DPI_AWARENESS { PROCESS_DPI_UNAWARE = 0, PROCESS_SYSTEM_DPI_AWARE = 1, @@ -41,6 +36,12 @@ void SetHiDPI() { #endif } +#include +#include +#include + +using namespace nanogui; + void NullLogger(void *userdata, int category, SDL_LogPriority priority, const char *message) {} int main(int argc, char *argv[]) { diff --git a/src/assets/AssetManager.cpp b/src/assets/AssetManager.cpp index 811165bcc..8019f5312 100644 --- a/src/assets/AssetManager.cpp +++ b/src/assets/AssetManager.cpp @@ -547,7 +547,7 @@ void AssetManager::BuildDependencyList(std::string currentPackage, std::vector -void AssetManager::ReviewPriorities(AssetCache &cache) +static void AssetManager::ReviewPriorities(AssetCache &cache) { std::vector needsRemoval = {}; for (auto const &[id, asset] : cache) { @@ -577,7 +577,7 @@ void AssetManager::ReviewPriorities(AssetCache &cache) }; template <> -void AssetManager::ReviewPriorities(AssetCache &cache) +static void AssetManager::ReviewPriorities(AssetCache &cache) { std::vector needsRemoval = {}; for (auto const &[id, asset] : cache) { @@ -618,7 +618,7 @@ void AssetManager::ReviewPriorities(AssetCache &cache) } template <> -void AssetManager::ReviewPriorities(AssetCache &cache) +static void AssetManager::ReviewPriorities(AssetCache &cache) { std::vector needsRemoval = {}; for (auto const &[id, asset] : cache) { diff --git a/src/assets/AssetManager.h b/src/assets/AssetManager.h index 09e022753..1b3346a7d 100644 --- a/src/assets/AssetManager.h +++ b/src/assets/AssetManager.h @@ -331,13 +331,13 @@ class AssetManager { /** @copydoc */ template <> - void ReviewPriorities(AssetCache &cache); + static void ReviewPriorities(AssetCache &cache); /** @copydoc */ template <> - void ReviewPriorities(AssetCache &cache); + static void ReviewPriorities(AssetCache &cache); /** @copydoc */ template <> - void ReviewPriorities(AssetCache &cache); + static void ReviewPriorities(AssetCache &cache); }; diff --git a/src/bsp/CBSPPart.h b/src/bsp/CBSPPart.h index 6d7c94693..15530c0f4 100644 --- a/src/bsp/CBSPPart.h +++ b/src/bsp/CBSPPart.h @@ -16,6 +16,9 @@ #include +#ifdef _WIN32 +#include +#endif #include #include #include diff --git a/src/compat/Resource.cpp b/src/compat/Resource.cpp index de45d930c..826b03c26 100644 --- a/src/compat/Resource.cpp +++ b/src/compat/Resource.cpp @@ -89,11 +89,12 @@ Handle FindResource(SDL_RWops *file, OSType theType, short theID, std::string na // Only read the resource name if we're looking up by name. uint32_t rsrcNameOffset = mapOffset + nameListOffset + nameOffset; SDL_RWseek(file, rsrcNameOffset, 0); - uint8_t nameLen = SDL_ReadU8(file); - char cName[nameLen]; + const uint8_t nameLen = SDL_ReadU8(file); + char* cName = new char[nameLen]; SDL_RWread(file, cName, nameLen, 1); std::string rsrcName(cName, nameLen); nameMatch = IsEquals(rsrcName, name); + delete[] cName; } if (rsrcType == theType && ((rsrcId == theID) || nameMatch)) { diff --git a/src/net/AvaraTCP.cpp b/src/net/AvaraTCP.cpp index 022c41072..65805328c 100755 --- a/src/net/AvaraTCP.cpp +++ b/src/net/AvaraTCP.cpp @@ -30,8 +30,10 @@ typedef signed long long int ssize_t; #include +#ifndef _WIN32 #include #include +#endif #define PUNCHTIME 5000 diff --git a/src/render/OpenGLShader.h b/src/render/OpenGLShader.h index 526334eec..31088e13f 100644 --- a/src/render/OpenGLShader.h +++ b/src/render/OpenGLShader.h @@ -1,5 +1,8 @@ #pragma once +#ifdef _WIN32 +#include +#endif #include #include diff --git a/src/render/OpenGLVertices.cpp b/src/render/OpenGLVertices.cpp index 192eab216..2af134a11 100644 --- a/src/render/OpenGLVertices.cpp +++ b/src/render/OpenGLVertices.cpp @@ -1,5 +1,8 @@ #include "OpenGLVertices.h" +#ifdef _WIN32 +#include +#endif #include OpenGLVertices::OpenGLVertices() diff --git a/vcpkg.json b/vcpkg.json new file mode 100644 index 000000000..509888b8b --- /dev/null +++ b/vcpkg.json @@ -0,0 +1,9 @@ +{ + "name": "avara", + "version-date": "2024-03-19", + "dependencies": [ + "sdl2", + "glad", + "gtest" + ] +} diff --git a/vendor/nanogui/common.cpp b/vendor/nanogui/common.cpp index a4f0e347a..a28d85870 100755 --- a/vendor/nanogui/common.cpp +++ b/vendor/nanogui/common.cpp @@ -13,6 +13,8 @@ #if defined(_WIN32) # include +# include +# include #endif #include diff --git a/vendor/nanogui/layout.cpp b/vendor/nanogui/layout.cpp index e90b5c39d..7ff7526c9 100755 --- a/vendor/nanogui/layout.cpp +++ b/vendor/nanogui/layout.cpp @@ -179,7 +179,7 @@ void FlowLayout::performLayout(NVGcontext *ctx, Widget *widget) const { Vector2i pos(mMargin, yOffset + mMargin); int axis2max = 0, idx = 0, column = 0; - Span span[widget->childCount()]; + Span *span = new Span[widget->childCount()]; for (auto w : widget->children()) { if (!w->visible()) @@ -206,7 +206,7 @@ void FlowLayout::performLayout(NVGcontext *ctx, Widget *widget) const { if (span[i].column == column - 1) { // If this widget intersects the widget in the previous column on axis1, move it over. if (pos[axis1] <= span[i].axis1max && (pos[axis1] + targetSize[axis1]) >= span[i].axis1min) { - axis2pos = std::max(axis2pos, span[i].axis2max); + axis2pos = std::max(axis2pos, span[i].axis2max); } } } diff --git a/vendor/nanogui/nanogui/opengl.h b/vendor/nanogui/nanogui/opengl.h index b0ff87683..d7dc3ffaf 100644 --- a/vendor/nanogui/nanogui/opengl.h +++ b/vendor/nanogui/nanogui/opengl.h @@ -21,7 +21,9 @@ #if defined(NANOGUI_SHARED) && !defined(GLAD_GLAPI_EXPORT) #define GLAD_GLAPI_EXPORT #endif - + #ifdef _WIN32 + #include + #endif #include #endif #endif // DOXYGEN_SHOULD_SKIP_THIS From 3dc5a92033d777098e32bd0b57a38b521abf415e Mon Sep 17 00:00:00 2001 From: andy halstead Date: Sun, 24 Mar 2024 17:54:48 -0700 Subject: [PATCH 02/10] move everything to a giant static library so we can also build tests --- .gitignore | 3 +- Avara.msvc/Avara.sln | 32 ++ Avara.msvc/Avara.vcxproj | 383 +------------ Avara.msvc/AvaraCore.vcxproj | 526 ++++++++++++++++++ ...proj.filters => AvaraCore.vcxproj.filters} | 14 - Avara.msvc/Tests.vcxproj | 163 ++++++ 6 files changed, 734 insertions(+), 387 deletions(-) create mode 100644 Avara.msvc/AvaraCore.vcxproj rename Avara.msvc/{Avara.vcxproj.filters => AvaraCore.vcxproj.filters} (98%) create mode 100644 Avara.msvc/Tests.vcxproj diff --git a/.gitignore b/.gitignore index 93d9bec05..6f781de75 100644 --- a/.gitignore +++ b/.gitignore @@ -18,5 +18,6 @@ vcpkg-configuration.json vcpkg_installed .vs Avara.msvc/x64/ -Avara.msvc/Avara/ +Avara.msvc/Avara*/ +Avara.msvc/Tests/ *.vcxproj.user \ No newline at end of file diff --git a/Avara.msvc/Avara.sln b/Avara.msvc/Avara.sln index 5524109d9..290d5d810 100644 --- a/Avara.msvc/Avara.sln +++ b/Avara.msvc/Avara.sln @@ -4,17 +4,49 @@ Microsoft Visual Studio Solution File, Format Version 12.00 VisualStudioVersion = 17.9.34714.143 MinimumVisualStudioVersion = 10.0.40219.1 Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Avara", "Avara.vcxproj", "{0B8140FC-9E2D-416A-991D-129C52CCE3AC}" + ProjectSection(ProjectDependencies) = postProject + {E5E15B6D-B9DC-4552-A6D3-577BD71FB4D7} = {E5E15B6D-B9DC-4552-A6D3-577BD71FB4D7} + EndProjectSection +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Tests", "Tests.vcxproj", "{50665FB6-D5CD-4A7E-9D51-EC421437F463}" + ProjectSection(ProjectDependencies) = postProject + {E5E15B6D-B9DC-4552-A6D3-577BD71FB4D7} = {E5E15B6D-B9DC-4552-A6D3-577BD71FB4D7} + EndProjectSection +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "AvaraCore", "AvaraCore.vcxproj", "{E5E15B6D-B9DC-4552-A6D3-577BD71FB4D7}" EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|x64 = Debug|x64 + Debug|x86 = Debug|x86 Release|x64 = Release|x64 + Release|x86 = Release|x86 EndGlobalSection GlobalSection(ProjectConfigurationPlatforms) = postSolution {0B8140FC-9E2D-416A-991D-129C52CCE3AC}.Debug|x64.ActiveCfg = Debug|x64 {0B8140FC-9E2D-416A-991D-129C52CCE3AC}.Debug|x64.Build.0 = Debug|x64 + {0B8140FC-9E2D-416A-991D-129C52CCE3AC}.Debug|x86.ActiveCfg = Debug|Win32 + {0B8140FC-9E2D-416A-991D-129C52CCE3AC}.Debug|x86.Build.0 = Debug|Win32 {0B8140FC-9E2D-416A-991D-129C52CCE3AC}.Release|x64.ActiveCfg = Release|x64 {0B8140FC-9E2D-416A-991D-129C52CCE3AC}.Release|x64.Build.0 = Release|x64 + {0B8140FC-9E2D-416A-991D-129C52CCE3AC}.Release|x86.ActiveCfg = Release|Win32 + {0B8140FC-9E2D-416A-991D-129C52CCE3AC}.Release|x86.Build.0 = Release|Win32 + {50665FB6-D5CD-4A7E-9D51-EC421437F463}.Debug|x64.ActiveCfg = Debug|x64 + {50665FB6-D5CD-4A7E-9D51-EC421437F463}.Debug|x64.Build.0 = Debug|x64 + {50665FB6-D5CD-4A7E-9D51-EC421437F463}.Debug|x86.ActiveCfg = Debug|Win32 + {50665FB6-D5CD-4A7E-9D51-EC421437F463}.Debug|x86.Build.0 = Debug|Win32 + {50665FB6-D5CD-4A7E-9D51-EC421437F463}.Release|x64.ActiveCfg = Release|x64 + {50665FB6-D5CD-4A7E-9D51-EC421437F463}.Release|x64.Build.0 = Release|x64 + {50665FB6-D5CD-4A7E-9D51-EC421437F463}.Release|x86.ActiveCfg = Release|Win32 + {50665FB6-D5CD-4A7E-9D51-EC421437F463}.Release|x86.Build.0 = Release|Win32 + {E5E15B6D-B9DC-4552-A6D3-577BD71FB4D7}.Debug|x64.ActiveCfg = Debug|x64 + {E5E15B6D-B9DC-4552-A6D3-577BD71FB4D7}.Debug|x64.Build.0 = Debug|x64 + {E5E15B6D-B9DC-4552-A6D3-577BD71FB4D7}.Debug|x86.ActiveCfg = Debug|Win32 + {E5E15B6D-B9DC-4552-A6D3-577BD71FB4D7}.Debug|x86.Build.0 = Debug|Win32 + {E5E15B6D-B9DC-4552-A6D3-577BD71FB4D7}.Release|x64.ActiveCfg = Release|x64 + {E5E15B6D-B9DC-4552-A6D3-577BD71FB4D7}.Release|x64.Build.0 = Release|x64 + {E5E15B6D-B9DC-4552-A6D3-577BD71FB4D7}.Release|x86.ActiveCfg = Release|Win32 + {E5E15B6D-B9DC-4552-A6D3-577BD71FB4D7}.Release|x86.Build.0 = Release|Win32 EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE diff --git a/Avara.msvc/Avara.vcxproj b/Avara.msvc/Avara.vcxproj index 7be5ef20e..e7e5bc72d 100644 --- a/Avara.msvc/Avara.vcxproj +++ b/Avara.msvc/Avara.vcxproj @@ -21,7 +21,7 @@ 17.0 Win32Proj - {0b8140fc-9e2d-416a-991d-129c52cce3ac} + {0B8140FC-9E2D-416A-991D-129C52CCE3AC} Avara 10.0 Avara @@ -84,7 +84,7 @@ Level3 true - WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions) + WIN32;_DEBUG;%(PreprocessorDefinitions) true @@ -98,7 +98,7 @@ true true true - WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions) + WIN32;NDEBUG;%(PreprocessorDefinitions) true @@ -117,6 +117,7 @@ stdcpp17 ..\src\audio;..\src\assets;..\src\base;..\src\bsp;..\src\compat;..\src\game;..\src\gui;..\src\level;..\src\net;..\src\render;..\src\tui;..\src\util;..\src\util\huffman;..\vendor\;..\vendor\nanogui;..\vendor\nanovg;..\vendor\pugixml;..\vendor\utf8;%(AdditionalIncludeDirectories) false + true Windows @@ -149,382 +150,20 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + {e5e15b6d-b9dc-4552-a6d3-577bd71fb4d7} + + + + diff --git a/Avara.msvc/AvaraCore.vcxproj b/Avara.msvc/AvaraCore.vcxproj new file mode 100644 index 000000000..d3007c59b --- /dev/null +++ b/Avara.msvc/AvaraCore.vcxproj @@ -0,0 +1,526 @@ + + + + + Debug + Win32 + + + Release + Win32 + + + Debug + x64 + + + Release + x64 + + + + 17.0 + Win32Proj + {E5E15B6D-B9DC-4552-A6D3-577BD71FB4D7} + AvaraCore + 10.0 + AvaraCore + + + + Application + true + v143 + Unicode + + + Application + false + v143 + true + Unicode + + + StaticLibrary + true + v143 + Unicode + + + Application + false + v143 + true + Unicode + + + + + + + + + + + + + + + + + + + + + $(VC_LibraryPath_x64);$(WindowsSDK_LibraryPath_x64);$(VCPKG_ROOT)\installed\x64-windows\debug\lib\manual-link + + + $(VC_LibraryPath_x64);$(WindowsSDK_LibraryPath_x64);$(VCPKG_ROOT)\installed\x64-windows\lib\manual-link + + + true + + + + Level3 + true + WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions) + true + + + Console + true + + + + + Level3 + true + true + true + WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions) + true + + + Console + true + true + true + + + + + Level2 + true + _WINSOCK_DEPRECATED_NO_WARNINGS;NOMINMAX;WIN32_LEAN_AND_MEAN;_CRT_SECURE_NO_WARNINGS;_DEBUG;NANOGUI_GLAD;%(PreprocessorDefinitions) + true + stdcpp17 + ..\src\audio;..\src\assets;..\src\base;..\src\bsp;..\src\compat;..\src\game;..\src\gui;..\src\level;..\src\net;..\src\render;..\src\tui;..\src\util;..\src\util\huffman;..\vendor\;..\vendor\nanogui;..\vendor\nanovg;..\vendor\pugixml;..\vendor\utf8;%(AdditionalIncludeDirectories) + false + true + + + Windows + true + shell32.lib;$(CoreLibraryDependencies);%(AdditionalDependencies) + + + + + + + xcopy /E /Y "$(SolutionDir)..\rsrc\" "$(TargetDir)rsrc\" && xcopy /E /Y "$(SolutionDir)..\levels\" "$(TargetDir)levels\" + + + + + Level3 + true + true + true + NDEBUG;_CONSOLE;%(PreprocessorDefinitions) + true + + + Console + true + true + true + SDL2main.lib;$(CoreLibraryDependencies);%(AdditionalDependencies) + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/Avara.msvc/Avara.vcxproj.filters b/Avara.msvc/AvaraCore.vcxproj.filters similarity index 98% rename from Avara.msvc/Avara.vcxproj.filters rename to Avara.msvc/AvaraCore.vcxproj.filters index c3eb32ca1..4da9feb95 100644 --- a/Avara.msvc/Avara.vcxproj.filters +++ b/Avara.msvc/AvaraCore.vcxproj.filters @@ -638,9 +638,6 @@ - - Source Files - Source Files @@ -1121,16 +1118,5 @@ Source Files - - Source Files - - - - - Resource Files - - - Resource Files - \ No newline at end of file diff --git a/Avara.msvc/Tests.vcxproj b/Avara.msvc/Tests.vcxproj new file mode 100644 index 000000000..28dc018b0 --- /dev/null +++ b/Avara.msvc/Tests.vcxproj @@ -0,0 +1,163 @@ + + + + + Debug + Win32 + + + Release + Win32 + + + Debug + x64 + + + Release + x64 + + + + 17.0 + Win32Proj + {50665FB6-D5CD-4A7E-9D51-EC421437F463} + Tests + 10.0 + Tests + + + + Application + true + v143 + Unicode + + + Application + false + v143 + true + Unicode + + + Application + true + v143 + Unicode + + + Application + false + v143 + true + Unicode + + + + + + + + + + + + + + + + + + + + + $(VC_LibraryPath_x64);$(WindowsSDK_LibraryPath_x64);$(VCPKG_ROOT)\installed\x64-windows\debug\lib\manual-link + + + $(VC_LibraryPath_x64);$(WindowsSDK_LibraryPath_x64);$(VCPKG_ROOT)\installed\x64-windows\lib\manual-link + + + true + + + + Level3 + true + WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions) + true + + + Console + true + + + + + Level3 + true + true + true + WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions) + true + + + Console + true + true + true + + + + + Level2 + true + _WINSOCK_DEPRECATED_NO_WARNINGS;NOMINMAX;WIN32_LEAN_AND_MEAN;_CRT_SECURE_NO_WARNINGS;_DEBUG;NANOGUI_GLAD;%(PreprocessorDefinitions) + true + stdcpp17 + ..\src\audio;..\src\assets;..\src\base;..\src\bsp;..\src\compat;..\src\game;..\src\gui;..\src\level;..\src\net;..\src\render;..\src\tui;..\src\util;..\src\util\huffman;..\vendor\;..\vendor\nanogui;..\vendor\nanovg;..\vendor\pugixml;..\vendor\utf8;%(AdditionalIncludeDirectories) + false + true + + + Console + true + SDL2maind.lib;shell32.lib;Ws2_32.lib;$(CoreLibraryDependencies);%(AdditionalDependencies) + + + + + + + xcopy /E /Y "$(SolutionDir)..\rsrc\" "$(TargetDir)rsrc\" && xcopy /E /Y "$(SolutionDir)..\levels\" "$(TargetDir)levels\" + + + + + Level3 + true + true + true + NDEBUG;_CONSOLE;%(PreprocessorDefinitions) + true + + + Console + true + true + true + SDL2main.lib;$(CoreLibraryDependencies);%(AdditionalDependencies) + + + + + + + + {e5e15b6d-b9dc-4552-a6d3-577bd71fb4d7} + + + + + + \ No newline at end of file From 20c5bc8117002efcee9422e4d4afae38069bb4ea Mon Sep 17 00:00:00 2001 From: andy halstead Date: Sun, 24 Mar 2024 19:29:42 -0700 Subject: [PATCH 03/10] fix release configurations, add CI that builds release x64 and slams it into the nightly download spot --- .github/workflows/avara-ci.yml | 32 +++++++++++++++++++++----------- Avara.msvc/Avara.vcxproj | 12 ++++++++++-- Avara.msvc/AvaraCore.vcxproj | 10 +++++++--- Avara.msvc/Tests.vcxproj | 15 +++++++++++---- platform/windows/version.rc | 2 +- 5 files changed, 50 insertions(+), 21 deletions(-) diff --git a/.github/workflows/avara-ci.yml b/.github/workflows/avara-ci.yml index 7c0544716..d749d8117 100644 --- a/.github/workflows/avara-ci.yml +++ b/.github/workflows/avara-ci.yml @@ -16,7 +16,7 @@ jobs: sudo add-apt-repository -y "deb http://archive.ubuntu.com/ubuntu `lsb_release -sc` main universe restricted multiverse" sudo apt-get update -y -qq sudo apt-get install libsdl2-dev libsdl2-image-dev libsdl2-mixer-dev libsdl2-ttf-dev libegl1-mesa-dev libgles2-mesa-dev libdirectfb-dev libgtest-dev - - uses: actions/checkout@v2 + - uses: actions/checkout@v4 - name: make run: make -j2 - name: Run headless test @@ -27,16 +27,26 @@ jobs: name: Windows runs-on: windows-latest steps: - - name: Setup MSYS2 - uses: msys2/setup-msys2@v2 - with: - install: rsync git zip mingw-w64-x86_64-SDL2 mingw-w64-x86_64-clang mingw-w64-x86_64-glbinding mingw-w64-x86_64-glew make - - uses: actions/checkout@v2 - - name: make - shell: msys2 {0} + - uses: actions/checkout@v4 + - name: Add MSBuild to PATH + uses: microsoft/setup-msbuild@v2 + - name: Setup vcpkg + uses: lukka/run-vcpkg@v11 + - name: Build + run: msbuild /m /p:Platform=x64 /p:Configuration=Release .\Avara.msvc\Avara.sln + shell: pwsh + - name: Run headless test + run: .\Avara.msvc\x64\Release\Tests.exe + shell: pwsh + - name: WinAvara archive run: | - make clean - make -j2 windist + mkdir WinAvara + cp .\Avara.msvc\x64\Release\*.exe WinAvara + cp .\Avara.msvc\x64\Release\*.dll WinAvara + cp -r .\levels WinAvara + cp -r .\rsrc WinAvara + Compress-Archive -Path .\WinAvara -DestinationPath .\WinAvara.zip + shell: pwsh - name: deploy main nightly if: startsWith(github.repository_owner, 'avaraline') && endsWith(github.ref, 'main') uses: WebFreak001/deploy-nightly@v1.0.1 @@ -58,7 +68,7 @@ jobs: wget -q "https://github.com/libsdl-org/SDL/releases/download/release-2.26.2/SDL2-2.26.2.dmg" hdiutil attach SDL2-2.26.2.dmg sudo cp -R /Volumes/SDL2/SDL2.framework /Library/Frameworks/ - - uses: actions/checkout@v2 + - uses: actions/checkout@v4 - name: make run: make clean macdist - name: deploy main nightly diff --git a/Avara.msvc/Avara.vcxproj b/Avara.msvc/Avara.vcxproj index e7e5bc72d..65cd22e91 100644 --- a/Avara.msvc/Avara.vcxproj +++ b/Avara.msvc/Avara.vcxproj @@ -112,12 +112,13 @@ Level2 true - _WINSOCK_DEPRECATED_NO_WARNINGS;NOMINMAX;WIN32_LEAN_AND_MEAN;_CRT_SECURE_NO_WARNINGS;_DEBUG;NANOGUI_GLAD;%(PreprocessorDefinitions) + _WINSOCK_DEPRECATED_NO_WARNINGS;NOMINMAX;WIN32_LEAN_AND_MEAN;_CRT_SECURE_NO_WARNINGS;NANOGUI_GLAD;%(PreprocessorDefinitions) true stdcpp17 ..\src\audio;..\src\assets;..\src\base;..\src\bsp;..\src\compat;..\src\game;..\src\gui;..\src\level;..\src\net;..\src\render;..\src\tui;..\src\util;..\src\util\huffman;..\vendor\;..\vendor\nanogui;..\vendor\nanovg;..\vendor\pugixml;..\vendor\utf8;%(AdditionalIncludeDirectories) false true + stdc17 Windows @@ -138,8 +139,12 @@ true true true - NDEBUG;_CONSOLE;%(PreprocessorDefinitions) + NDEBUG;_WINSOCK_DEPRECATED_NO_WARNINGS;NOMINMAX;WIN32_LEAN_AND_MEAN;_CRT_SECURE_NO_WARNINGS;NANOGUI_GLAD;%(PreprocessorDefinitions) true + ..\src\audio;..\src\assets;..\src\base;..\src\bsp;..\src\compat;..\src\game;..\src\gui;..\src\level;..\src\net;..\src\render;..\src\tui;..\src\util;..\src\util\huffman;..\vendor\;..\vendor\nanogui;..\vendor\nanovg;..\vendor\pugixml;..\vendor\utf8; + true + stdcpp17 + stdc17 Console @@ -148,6 +153,9 @@ true SDL2main.lib;$(CoreLibraryDependencies);%(AdditionalDependencies) + + xcopy /E /Y "$(SolutionDir)..\rsrc\" "$(TargetDir)rsrc\" && xcopy /E /Y "$(SolutionDir)..\levels\" "$(TargetDir)levels\" + diff --git a/Avara.msvc/AvaraCore.vcxproj b/Avara.msvc/AvaraCore.vcxproj index d3007c59b..9eb2f754b 100644 --- a/Avara.msvc/AvaraCore.vcxproj +++ b/Avara.msvc/AvaraCore.vcxproj @@ -47,7 +47,7 @@ Unicode - Application + StaticLibrary false v143 true @@ -138,15 +138,19 @@ true true true - NDEBUG;_CONSOLE;%(PreprocessorDefinitions) + _WINSOCK_DEPRECATED_NO_WARNINGS;NOMINMAX;WIN32_LEAN_AND_MEAN;_CRT_SECURE_NO_WARNINGS;NDEBUG;NANOGUI_GLAD;%(PreprocessorDefinitions) true + ..\src\audio;..\src\assets;..\src\base;..\src\bsp;..\src\compat;..\src\game;..\src\gui;..\src\level;..\src\net;..\src\render;..\src\tui;..\src\util;..\src\util\huffman;..\vendor\;..\vendor\nanogui;..\vendor\nanovg;..\vendor\pugixml;..\vendor\utf8;%(AdditionalIncludeDirectories) + stdcpp17 + stdc17 + true Console true true true - SDL2main.lib;$(CoreLibraryDependencies);%(AdditionalDependencies) + $(CoreLibraryDependencies);%(AdditionalDependencies) diff --git a/Avara.msvc/Tests.vcxproj b/Avara.msvc/Tests.vcxproj index 28dc018b0..5bdbfac0b 100644 --- a/Avara.msvc/Tests.vcxproj +++ b/Avara.msvc/Tests.vcxproj @@ -122,7 +122,7 @@ Console true - SDL2maind.lib;shell32.lib;Ws2_32.lib;$(CoreLibraryDependencies);%(AdditionalDependencies) + SDL2maind.lib;Ws2_32.lib;$(CoreLibraryDependencies);%(AdditionalDependencies) @@ -138,16 +138,23 @@ true true true - NDEBUG;_CONSOLE;%(PreprocessorDefinitions) + _WINSOCK_DEPRECATED_NO_WARNINGS;NOMINMAX;WIN32_LEAN_AND_MEAN;_CRT_SECURE_NO_WARNINGS;NDEBUG;NANOGUI_GLAD;%(PreprocessorDefinitions) true + ..\src\audio;..\src\assets;..\src\base;..\src\bsp;..\src\compat;..\src\game;..\src\gui;..\src\level;..\src\net;..\src\render;..\src\tui;..\src\util;..\src\util\huffman;..\vendor\;..\vendor\nanogui;..\vendor\nanovg;..\vendor\pugixml;..\vendor\utf8;%(AdditionalIncludeDirectories) + true + stdcpp17 + stdc17 Console true true - true - SDL2main.lib;$(CoreLibraryDependencies);%(AdditionalDependencies) + DebugFastLink + SDL2main.lib;Ws2_32.lib;$(CoreLibraryDependencies);%(AdditionalDependencies) + + xcopy /E /Y "$(SolutionDir)..\rsrc\" "$(TargetDir)rsrc\" && xcopy /E /Y "$(SolutionDir)..\levels\" "$(TargetDir)levels\" + diff --git a/platform/windows/version.rc b/platform/windows/version.rc index f612af38c..acc0f8aa0 100644 --- a/platform/windows/version.rc +++ b/platform/windows/version.rc @@ -7,7 +7,7 @@ BEGIN BLOCK "040904E4" BEGIN VALUE "CompanyName", "Avaraline" - VALUE "FileDescription", "A retro 90s action-arcade shooter with networked multiplayer" + VALUE "FileDescription", "Avara" VALUE "FileVersion", "0.7.2" VALUE "InternalName", "Avara" VALUE "LegalCopyright", "Avaraline" From a2b27116034f67746be7c87ceb928d4e5878bd0d Mon Sep 17 00:00:00 2001 From: andy halstead Date: Sun, 24 Mar 2024 19:41:49 -0700 Subject: [PATCH 04/10] make sure we can still build with mingw --- src/assets/AssetManager.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/assets/AssetManager.cpp b/src/assets/AssetManager.cpp index 8019f5312..811165bcc 100644 --- a/src/assets/AssetManager.cpp +++ b/src/assets/AssetManager.cpp @@ -547,7 +547,7 @@ void AssetManager::BuildDependencyList(std::string currentPackage, std::vector -static void AssetManager::ReviewPriorities(AssetCache &cache) +void AssetManager::ReviewPriorities(AssetCache &cache) { std::vector needsRemoval = {}; for (auto const &[id, asset] : cache) { @@ -577,7 +577,7 @@ static void AssetManager::ReviewPriorities(AssetCache &cache) }; template <> -static void AssetManager::ReviewPriorities(AssetCache &cache) +void AssetManager::ReviewPriorities(AssetCache &cache) { std::vector needsRemoval = {}; for (auto const &[id, asset] : cache) { @@ -618,7 +618,7 @@ static void AssetManager::ReviewPriorities(AssetCache &cache) } template <> -static void AssetManager::ReviewPriorities(AssetCache &cache) +void AssetManager::ReviewPriorities(AssetCache &cache) { std::vector needsRemoval = {}; for (auto const &[id, asset] : cache) { From c716331d2f79859a4863c22d99e2c8e2ba2c4290 Mon Sep 17 00:00:00 2001 From: andy halstead Date: Sun, 24 Mar 2024 20:38:43 -0700 Subject: [PATCH 05/10] move winavara.zip task into a ps1, add a ps1 for creating GitVersion.h --- .github/workflows/avara-ci.yml | 12 ++++-------- bin/git_version.ps1 | 1 + bin/winavarazip.ps1 | 6 ++++++ 3 files changed, 11 insertions(+), 8 deletions(-) create mode 100644 bin/git_version.ps1 create mode 100644 bin/winavarazip.ps1 diff --git a/.github/workflows/avara-ci.yml b/.github/workflows/avara-ci.yml index d749d8117..8b233e5cf 100644 --- a/.github/workflows/avara-ci.yml +++ b/.github/workflows/avara-ci.yml @@ -33,19 +33,15 @@ jobs: - name: Setup vcpkg uses: lukka/run-vcpkg@v11 - name: Build - run: msbuild /m /p:Platform=x64 /p:Configuration=Release .\Avara.msvc\Avara.sln + run: | + .\bin\git_version.ps1 + msbuild /m /p:Platform=x64 /p:Configuration=Release .\Avara.msvc\Avara.sln shell: pwsh - name: Run headless test run: .\Avara.msvc\x64\Release\Tests.exe shell: pwsh - name: WinAvara archive - run: | - mkdir WinAvara - cp .\Avara.msvc\x64\Release\*.exe WinAvara - cp .\Avara.msvc\x64\Release\*.dll WinAvara - cp -r .\levels WinAvara - cp -r .\rsrc WinAvara - Compress-Archive -Path .\WinAvara -DestinationPath .\WinAvara.zip + run: .\bin\winavarazip.ps1 shell: pwsh - name: deploy main nightly if: startsWith(github.repository_owner, 'avaraline') && endsWith(github.ref, 'main') diff --git a/bin/git_version.ps1 b/bin/git_version.ps1 new file mode 100644 index 000000000..63f5bce51 --- /dev/null +++ b/bin/git_version.ps1 @@ -0,0 +1 @@ +'#define GIT_VERSION "{0}"' -f (git describe --always --dirty) | Out-File -FilePath .\src\util\GitVersion.h \ No newline at end of file diff --git a/bin/winavarazip.ps1 b/bin/winavarazip.ps1 new file mode 100644 index 000000000..b582d5b27 --- /dev/null +++ b/bin/winavarazip.ps1 @@ -0,0 +1,6 @@ +mkdir WinAvara +cp .\Avara.msvc\x64\Release\*.exe WinAvara +cp .\Avara.msvc\x64\Release\*.dll WinAvara +cp -r .\levels WinAvara +cp -r .\rsrc WinAvara +Compress-Archive -Path .\WinAvara -DestinationPath .\WinAvara.zip \ No newline at end of file From 1c59f7a34211a10a7faeca35f78d2af450ad66f8 Mon Sep 17 00:00:00 2001 From: andy halstead Date: Sun, 24 Mar 2024 20:56:18 -0700 Subject: [PATCH 06/10] add baseline to vcpkg.json --- vcpkg.json | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/vcpkg.json b/vcpkg.json index 509888b8b..cdc7ad384 100644 --- a/vcpkg.json +++ b/vcpkg.json @@ -5,5 +5,6 @@ "sdl2", "glad", "gtest" - ] + ], + "builtin-baseline":"000d1bda1ffa95a73e0b40334fa4103d6f4d3d48" } From 9e78d6917f412066d7c334e70191b745f5d87879 Mon Sep 17 00:00:00 2001 From: andy halstead Date: Sun, 24 Mar 2024 21:01:21 -0700 Subject: [PATCH 07/10] missed vcpkg integrate/install step --- .github/workflows/avara-ci.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/avara-ci.yml b/.github/workflows/avara-ci.yml index 8b233e5cf..681b061a4 100644 --- a/.github/workflows/avara-ci.yml +++ b/.github/workflows/avara-ci.yml @@ -34,6 +34,7 @@ jobs: uses: lukka/run-vcpkg@v11 - name: Build run: | + vcpkg integrate install .\bin\git_version.ps1 msbuild /m /p:Platform=x64 /p:Configuration=Release .\Avara.msvc\Avara.sln shell: pwsh From a0288d8dbb9d9e4b1462449665d6dc380a62956f Mon Sep 17 00:00:00 2001 From: andy halstead Date: Tue, 2 Apr 2024 14:33:35 -0700 Subject: [PATCH 08/10] ensure tests are run in CI for all platforms --- .github/workflows/avara-ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/avara-ci.yml b/.github/workflows/avara-ci.yml index 681b061a4..ba58bb48c 100644 --- a/.github/workflows/avara-ci.yml +++ b/.github/workflows/avara-ci.yml @@ -67,7 +67,7 @@ jobs: sudo cp -R /Volumes/SDL2/SDL2.framework /Library/Frameworks/ - uses: actions/checkout@v4 - name: make - run: make clean macdist + run: make clean tests macdist - name: deploy main nightly if: startsWith(github.repository_owner, 'avaraline') && endsWith(github.ref, 'main') uses: WebFreak001/deploy-nightly@v1.0.1 From f1281ffc96b02df604dbe29e8f33592c359584ac Mon Sep 17 00:00:00 2001 From: andy halstead Date: Tue, 2 Apr 2024 15:19:22 -0700 Subject: [PATCH 09/10] install googletest with homebrew on mac CI --- .github/workflows/avara-ci.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/avara-ci.yml b/.github/workflows/avara-ci.yml index ba58bb48c..e37a2ebed 100644 --- a/.github/workflows/avara-ci.yml +++ b/.github/workflows/avara-ci.yml @@ -65,6 +65,7 @@ jobs: wget -q "https://github.com/libsdl-org/SDL/releases/download/release-2.26.2/SDL2-2.26.2.dmg" hdiutil attach SDL2-2.26.2.dmg sudo cp -R /Volumes/SDL2/SDL2.framework /Library/Frameworks/ + brew install googletest - uses: actions/checkout@v4 - name: make run: make clean tests macdist From 13487dcd9576f605c941c137590d6a983afa372e Mon Sep 17 00:00:00 2001 From: Tom Anderson Date: Tue, 2 Apr 2024 17:08:05 -0600 Subject: [PATCH 10/10] fixed compile warnings --- src/assets/AssetManager.cpp | 3 --- src/assets/AssetManager.h | 3 --- 2 files changed, 6 deletions(-) diff --git a/src/assets/AssetManager.cpp b/src/assets/AssetManager.cpp index 811165bcc..11867f131 100644 --- a/src/assets/AssetManager.cpp +++ b/src/assets/AssetManager.cpp @@ -546,7 +546,6 @@ void AssetManager::BuildDependencyList(std::string currentPackage, std::vector void AssetManager::ReviewPriorities(AssetCache &cache) { std::vector needsRemoval = {}; @@ -576,7 +575,6 @@ void AssetManager::ReviewPriorities(AssetCache &cache) } }; -template <> void AssetManager::ReviewPriorities(AssetCache &cache) { std::vector needsRemoval = {}; @@ -617,7 +615,6 @@ void AssetManager::ReviewPriorities(AssetCache &cache) } } -template <> void AssetManager::ReviewPriorities(AssetCache &cache) { std::vector needsRemoval = {}; diff --git a/src/assets/AssetManager.h b/src/assets/AssetManager.h index 1281bca6b..54c8169af 100644 --- a/src/assets/AssetManager.h +++ b/src/assets/AssetManager.h @@ -330,14 +330,11 @@ class AssetManager { static void ReviewPriorities(AssetCache &cache); /** @copydoc AssetManager::ReviewPriorities */ - template <> static void ReviewPriorities(AssetCache &cache); /** @copydoc AssetManager::ReviewPriorities */ - template <> static void ReviewPriorities(AssetCache &cache); /** @copydoc AssetManager::ReviewPriorities */ - template <> static void ReviewPriorities(AssetCache &cache); };