diff --git a/.github/workflows/avara-ci.yml b/.github/workflows/avara-ci.yml index 7c0544716..e37a2ebed 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,23 @@ 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: | - make clean - make -j2 windist + vcpkg integrate install + .\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: .\bin\winavarazip.ps1 + shell: pwsh - name: deploy main nightly if: startsWith(github.repository_owner, 'avaraline') && endsWith(github.ref, 'main') uses: WebFreak001/deploy-nightly@v1.0.1 @@ -58,9 +65,10 @@ 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 + brew install googletest + - 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 diff --git a/.gitignore b/.gitignore index ca56b6711..6f781de75 100644 --- a/.gitignore +++ b/.gitignore @@ -14,3 +14,10 @@ __pycache__ src/util/GitVersion.h /*.alf levels/*/log.txt +vcpkg-configuration.json +vcpkg_installed +.vs +Avara.msvc/x64/ +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 new file mode 100644 index 000000000..290d5d810 --- /dev/null +++ b/Avara.msvc/Avara.sln @@ -0,0 +1,57 @@ + +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}" + 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 + 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..65cd22e91 --- /dev/null +++ b/Avara.msvc/Avara.vcxproj @@ -0,0 +1,178 @@ + + + + + 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;%(PreprocessorDefinitions) + true + + + Console + true + + + + + Level3 + true + true + true + WIN32;NDEBUG;%(PreprocessorDefinitions) + true + + + Console + true + true + true + + + + + Level2 + true + _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 + 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;_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 + true + true + true + SDL2main.lib;$(CoreLibraryDependencies);%(AdditionalDependencies) + + + xcopy /E /Y "$(SolutionDir)..\rsrc\" "$(TargetDir)rsrc\" && xcopy /E /Y "$(SolutionDir)..\levels\" "$(TargetDir)levels\" + + + + + + + + {e5e15b6d-b9dc-4552-a6d3-577bd71fb4d7} + + + + + + + + + + + + + \ No newline at end of file diff --git a/Avara.msvc/AvaraCore.vcxproj b/Avara.msvc/AvaraCore.vcxproj new file mode 100644 index 000000000..9eb2f754b --- /dev/null +++ b/Avara.msvc/AvaraCore.vcxproj @@ -0,0 +1,530 @@ + + + + + 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 + + + StaticLibrary + 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 + _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 + $(CoreLibraryDependencies);%(AdditionalDependencies) + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/Avara.msvc/AvaraCore.vcxproj.filters b/Avara.msvc/AvaraCore.vcxproj.filters new file mode 100644 index 000000000..4da9feb95 --- /dev/null +++ b/Avara.msvc/AvaraCore.vcxproj.filters @@ -0,0 +1,1122 @@ + + + + + {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 + + + \ No newline at end of file diff --git a/Avara.msvc/Tests.vcxproj b/Avara.msvc/Tests.vcxproj new file mode 100644 index 000000000..5bdbfac0b --- /dev/null +++ b/Avara.msvc/Tests.vcxproj @@ -0,0 +1,170 @@ + + + + + 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;Ws2_32.lib;$(CoreLibraryDependencies);%(AdditionalDependencies) + + + + + + + xcopy /E /Y "$(SolutionDir)..\rsrc\" "$(TargetDir)rsrc\" && xcopy /E /Y "$(SolutionDir)..\levels\" "$(TargetDir)levels\" + + + + + Level3 + true + true + true + _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 + DebugFastLink + SDL2main.lib;Ws2_32.lib;$(CoreLibraryDependencies);%(AdditionalDependencies) + + + xcopy /E /Y "$(SolutionDir)..\rsrc\" "$(TargetDir)rsrc\" && xcopy /E /Y "$(SolutionDir)..\levels\" "$(TargetDir)levels\" + + + + + + + + {e5e15b6d-b9dc-4552-a6d3-577bd71fb4d7} + + + + + + \ No newline at end of file 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 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" 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..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 ae4b693d6..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 <> - void ReviewPriorities(AssetCache &cache); + static void ReviewPriorities(AssetCache &cache); /** @copydoc AssetManager::ReviewPriorities */ - template <> - void ReviewPriorities(AssetCache &cache); + static void ReviewPriorities(AssetCache &cache); /** @copydoc AssetManager::ReviewPriorities */ - template <> - void ReviewPriorities(AssetCache &cache); + static void ReviewPriorities(AssetCache &cache); }; diff --git a/src/bsp/CBSPPart.h b/src/bsp/CBSPPart.h index 6d4af0f63..6dc37db9f 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 f0a316ed0..92f0ca99e 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 a0160ee96..a6505f604 100644 --- a/src/render/OpenGLVertices.cpp +++ b/src/render/OpenGLVertices.cpp @@ -1,5 +1,8 @@ #include "OpenGLVertices.h" +#ifdef _WIN32 +#include +#endif #include #include diff --git a/vcpkg.json b/vcpkg.json new file mode 100644 index 000000000..cdc7ad384 --- /dev/null +++ b/vcpkg.json @@ -0,0 +1,10 @@ +{ + "name": "avara", + "version-date": "2024-03-19", + "dependencies": [ + "sdl2", + "glad", + "gtest" + ], + "builtin-baseline":"000d1bda1ffa95a73e0b40334fa4103d6f4d3d48" +} 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