Skip to content

Commit

Permalink
Test XP
Browse files Browse the repository at this point in the history
  • Loading branch information
UnrealKaraulov committed Dec 25, 2024
1 parent 553a507 commit 6f027ea
Show file tree
Hide file tree
Showing 10 changed files with 707 additions and 49 deletions.
74 changes: 30 additions & 44 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -69,49 +69,6 @@ jobs:
with:
fetch-depth: 0
submodules: true
- uses: microsoft/setup-msbuild@v2
- name: Install Windows XP Support for Visual Studio
run: |
Set-Location "C:\Program Files (x86)\Microsoft Visual Studio\Installer\"
$InstallPath = "C:\Program Files\Microsoft Visual Studio\2022\Enterprise"
$componentsToAdd = @(
"Microsoft.VisualStudio.Component.WinXP"
)
[string]$workloadArgs = $componentsToAdd | ForEach-Object {" --add " + $_}
$Arguments = ('/c', "vs_installer.exe", 'modify', '--installPath', "`"$InstallPath`"",$workloadArgs, '--quiet', '--norestart', '--nocache')
$process = Start-Process -FilePath cmd.exe -ArgumentList $Arguments -Wait -PassThru -WindowStyle Hidden
if ($process.ExitCode -eq 0)
{
Write-Host "components have been successfully added"
Get-ChildItem C:\ProgramData\Microsoft\VisualStudio\Packages\Microsoft.Windows.XPSupport.*
}
else
{
Write-Host "components were not installed"
exit 1
}
- name: Set up Visual Studio shell
uses: egor-tensin/vs-shell@v2
with:
arch: Win32
- name: Build XP
run: |
msbuild ${{ env.solution }} -m /p:Configuration=ReleaseXPx86 /p:Platform=Win32
- name: Create Windows release WinXP archive
run: >
mkdir -p build\win32_release
cp vs-project\Release\bspguy.exe build\win32_release\
xcopy /I /E /Y "resources\*" "build\win32_release\"
Compress-Archive -Path "build\win32_release\*" -DestinationPath "build\newbspguy_winxp_x86_release.zip"
- name: Publish nightly release binaries for windows XP 32bit
uses: softprops/action-gh-release@v1
with:
tag_name: ${{ needs.get_time_build.outputs.release_tag }}
files: |
build/newbspguy_winxp_x86_release.zip
- name: Set up Visual Studio shell
uses: egor-tensin/vs-shell@v2
- name: Build release
Expand Down Expand Up @@ -209,4 +166,33 @@ jobs:
with:
tag_name: ${{ needs.get_time_build.outputs.release_tag }}
files: |
build/newbspguy_win7_x64_gcc_release.zip
build/newbspguy_win7_x64_gcc_release.zip
window_xp_build:
name: Windows XP
needs: get_time_build
runs-on: windows-2019
env:
solution: vs-project/bspguy.sln
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
steps:
- name: Checkout
uses: actions/checkout@v2
with:
fetch-depth: 0
submodules: true
- name: Set up Visual Studio shell
uses: egor-tensin/vs-shell@v2
with:
arch: Win32
- name: Build XP
run: |
msbuild ${{ env.solution }} -m /p:Configuration=ReleaseXP_git /p:Platform=Win32
- name: Create Windows release WinXP archive
run: >
mkdir -p build\win32_release
cp vs-project\Release\bspguy.exe build\win32_release\
xcopy /I /E /Y "resources\*" "build\win32_release\"
Compress-Archive -Path "build\win32_release\*" -DestinationPath "build\newbspguy_winxp_x86_release.zip"
154 changes: 154 additions & 0 deletions ascript/angelscript/projects/msvc2022/angelscript.vcxproj

Large diffs are not rendered by default.

4 changes: 3 additions & 1 deletion src/bsp/Bsp.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -7952,7 +7952,9 @@ bool Bsp::import_textures_to_wad(const std::string& wadpath, const std::string&

std::vector<std::string> files{};

for (auto& dir_entry : std::filesystem::directory_iterator(texpath))
std::error_code err{};

for (auto& dir_entry : std::filesystem::directory_iterator(texpath,err))
{
if (!dir_entry.is_directory() && ends_with(toLowerCase(dir_entry.path().string()), ".png"))
{
Expand Down
3 changes: 2 additions & 1 deletion src/editor/Gui.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -9039,8 +9039,9 @@ void Gui::loadFonts()
FlushConsoleLog(true);
return;
}
std::error_code err{};

for (const auto& entry : fs::directory_iterator(fontPath)) {
for (const auto& entry : fs::directory_iterator(fontPath,err)) {
if (entry.is_regular_file()) {
auto extension = entry.path().extension().string();
extension = toLowerCase(extension);
Expand Down
8 changes: 5 additions & 3 deletions src/util/util.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3077,7 +3077,8 @@ int GetEntsAdded(LumpState& oldLump, LumpState& newLump, const std::string& bsp_

void findFilesWithExtension(const fs::path& rootPath, const std::string& extension, std::vector<std::string>& fileList, bool relative)
{
for (const auto& entry : fs::recursive_directory_iterator(rootPath))
std::error_code err{};
for (const auto& entry : fs::recursive_directory_iterator(rootPath,err))
{
if (entry.is_regular_file() && entry.path().extension() == extension)
{
Expand All @@ -3088,11 +3089,12 @@ void findFilesWithExtension(const fs::path& rootPath, const std::string& extensi

void findDirsWithHasFileExtension(const fs::path& rootPath, const std::string& extension, std::vector<std::string>& dirList, bool relative)
{
for (const auto& entry : fs::recursive_directory_iterator(rootPath))
std::error_code err{};
for (const auto& entry : fs::recursive_directory_iterator(rootPath,err))
{
if (entry.is_directory())
{
for (const auto& subEntry : fs::directory_iterator(entry))
for (const auto& subEntry : fs::directory_iterator(entry,err))
{
if (subEntry.is_regular_file() && subEntry.path().extension() == extension)
{
Expand Down
18 changes: 18 additions & 0 deletions vs-project/bspguy.sln
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,8 @@ Global
Release|x64 = Release|x64
ReleaseXPx86|Win32 = ReleaseXPx86|Win32
ReleaseXPx86|x64 = ReleaseXPx86|x64
ReleasXP_git|Win32 = ReleasXP_git|Win32
ReleasXP_git|x64 = ReleasXP_git|x64
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{B66A4AE9-1BB7-3A0F-89E2-535DB5F7A262}.Debug|Win32.ActiveCfg = Debug|Win32
Expand All @@ -44,6 +46,10 @@ Global
{B66A4AE9-1BB7-3A0F-89E2-535DB5F7A262}.ReleaseXPx86|Win32.Build.0 = ReleaseXPx86|Win32
{B66A4AE9-1BB7-3A0F-89E2-535DB5F7A262}.ReleaseXPx86|x64.ActiveCfg = ReleaseXPx86|x64
{B66A4AE9-1BB7-3A0F-89E2-535DB5F7A262}.ReleaseXPx86|x64.Build.0 = ReleaseXPx86|x64
{B66A4AE9-1BB7-3A0F-89E2-535DB5F7A262}.ReleasXP_git|Win32.ActiveCfg = ReleasXP_git|Win32
{B66A4AE9-1BB7-3A0F-89E2-535DB5F7A262}.ReleasXP_git|Win32.Build.0 = ReleasXP_git|Win32
{B66A4AE9-1BB7-3A0F-89E2-535DB5F7A262}.ReleasXP_git|x64.ActiveCfg = ReleasXP_git|x64
{B66A4AE9-1BB7-3A0F-89E2-535DB5F7A262}.ReleasXP_git|x64.Build.0 = ReleasXP_git|x64
{94C10DCA-6ED7-3AC5-87DF-14B22017E799}.Debug|Win32.ActiveCfg = Debug|Win32
{94C10DCA-6ED7-3AC5-87DF-14B22017E799}.Debug|Win32.Build.0 = Debug|Win32
{94C10DCA-6ED7-3AC5-87DF-14B22017E799}.Debug|x64.ActiveCfg = Debug|x64
Expand All @@ -60,6 +66,10 @@ Global
{94C10DCA-6ED7-3AC5-87DF-14B22017E799}.ReleaseXPx86|Win32.Build.0 = ReleaseXPx86|Win32
{94C10DCA-6ED7-3AC5-87DF-14B22017E799}.ReleaseXPx86|x64.ActiveCfg = ReleaseXPx86|x64
{94C10DCA-6ED7-3AC5-87DF-14B22017E799}.ReleaseXPx86|x64.Build.0 = ReleaseXPx86|x64
{94C10DCA-6ED7-3AC5-87DF-14B22017E799}.ReleasXP_git|Win32.ActiveCfg = ReleasXP_git|Win32
{94C10DCA-6ED7-3AC5-87DF-14B22017E799}.ReleasXP_git|Win32.Build.0 = ReleasXP_git|Win32
{94C10DCA-6ED7-3AC5-87DF-14B22017E799}.ReleasXP_git|x64.ActiveCfg = ReleasXP_git|x64
{94C10DCA-6ED7-3AC5-87DF-14B22017E799}.ReleasXP_git|x64.Build.0 = ReleasXP_git|x64
{FD691EA2-CABA-3BE3-8AD8-8BD2CBE64BCF}.Debug|Win32.ActiveCfg = Debug|Win32
{FD691EA2-CABA-3BE3-8AD8-8BD2CBE64BCF}.Debug|Win32.Build.0 = Debug|Win32
{FD691EA2-CABA-3BE3-8AD8-8BD2CBE64BCF}.Debug|x64.ActiveCfg = Debug|x64
Expand All @@ -76,6 +86,10 @@ Global
{FD691EA2-CABA-3BE3-8AD8-8BD2CBE64BCF}.ReleaseXPx86|Win32.Build.0 = ReleaseXPx86|Win32
{FD691EA2-CABA-3BE3-8AD8-8BD2CBE64BCF}.ReleaseXPx86|x64.ActiveCfg = ReleaseXPx86|x64
{FD691EA2-CABA-3BE3-8AD8-8BD2CBE64BCF}.ReleaseXPx86|x64.Build.0 = ReleaseXPx86|x64
{FD691EA2-CABA-3BE3-8AD8-8BD2CBE64BCF}.ReleasXP_git|Win32.ActiveCfg = ReleasXP_git|Win32
{FD691EA2-CABA-3BE3-8AD8-8BD2CBE64BCF}.ReleasXP_git|Win32.Build.0 = ReleasXP_git|Win32
{FD691EA2-CABA-3BE3-8AD8-8BD2CBE64BCF}.ReleasXP_git|x64.ActiveCfg = ReleasXP_git|x64
{FD691EA2-CABA-3BE3-8AD8-8BD2CBE64BCF}.ReleasXP_git|x64.Build.0 = ReleasXP_git|x64
{39E6AF97-6BA3-4A72-8C61-BCEBF214EBFD}.Debug|Win32.ActiveCfg = Debug|Win32
{39E6AF97-6BA3-4A72-8C61-BCEBF214EBFD}.Debug|Win32.Build.0 = Debug|Win32
{39E6AF97-6BA3-4A72-8C61-BCEBF214EBFD}.Debug|x64.ActiveCfg = Debug|x64
Expand All @@ -92,6 +106,10 @@ Global
{39E6AF97-6BA3-4A72-8C61-BCEBF214EBFD}.ReleaseXPx86|Win32.Build.0 = ReleaseXPx86|Win32
{39E6AF97-6BA3-4A72-8C61-BCEBF214EBFD}.ReleaseXPx86|x64.ActiveCfg = ReleaseXPx86|x64
{39E6AF97-6BA3-4A72-8C61-BCEBF214EBFD}.ReleaseXPx86|x64.Build.0 = ReleaseXPx86|x64
{39E6AF97-6BA3-4A72-8C61-BCEBF214EBFD}.ReleasXP_git|Win32.ActiveCfg = ReleasXP_git|ARM
{39E6AF97-6BA3-4A72-8C61-BCEBF214EBFD}.ReleasXP_git|Win32.Build.0 = ReleasXP_git|ARM
{39E6AF97-6BA3-4A72-8C61-BCEBF214EBFD}.ReleasXP_git|x64.ActiveCfg = ReleasXP_git|x64
{39E6AF97-6BA3-4A72-8C61-BCEBF214EBFD}.ReleasXP_git|x64.Build.0 = ReleasXP_git|x64
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
Expand Down
Loading

0 comments on commit 6f027ea

Please sign in to comment.