Skip to content

Commit 3bd46eb

Browse files
committed
winxp
1 parent e8886dc commit 3bd46eb

8 files changed

Lines changed: 18 additions & 56 deletions

File tree

.github/workflows/build-winxp.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ on:
66
ref:
77
description: "Git ref to build (tag/branch/commit)"
88
required: false
9-
default: "main"
9+
default: "winxp"
1010

1111
push:
1212
tags:

src/CMakeLists.txt

Lines changed: 16 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
21
set(root_src
32
lodepng.cpp
43
main.cpp
@@ -139,7 +138,8 @@ set ( coopmod_src
139138
CoopMod/connectionTCP.cpp
140139
CoopMod/CoopMenu.cpp
141140
CoopMod/CoopState.cpp
142-
CoopMod/CrashHandler.cpp
141+
# CrashHandler removed for WinXP compatibility
142+
# CoopMod/CrashHandler.cpp
143143
CoopMod/OptionsMultiplayer.cpp
144144
CoopMod/Profile.cpp
145145
)
@@ -444,14 +444,13 @@ set ( rapidyaml_src
444444
../libs/rapidyaml/c4/yml/tag.cpp
445445
../libs/rapidyaml/c4/yml/tree.cpp
446446
../libs/rapidyaml/c4/yml/version.cpp
447-
448447
)
449448

450449
set ( cxx_src
451450
${root_src}
452451
${basescape_src}
453452
${battlescape_src}
454-
${coopmod_src}
453+
${coopmod_src}
455454
${engine_src}
456455
${geoscape_src}
457456
${interface_src}
@@ -474,12 +473,9 @@ if ( "${CMAKE_CXX_COMPILER_ID}" STREQUAL "GNU" AND "${CMAKE_BUILD_TYPE}" STREQUA
474473
set_property ( SOURCE OpenXcom.rc APPEND PROPERTY COMPILE_DEFINITIONS _DEBUG )
475474
endif ()
476475
if ( "${CMAKE_CXX_COMPILER_ID}" STREQUAL "GNU" )
477-
# attempt to limit the executable size
478476
set_property ( SOURCE ${cxx_src} APPEND_STRING PROPERTY COMPILE_FLAGS -femit-struct-debug-reduced\ )
479477
endif ()
480478
if ( "${CMAKE_CXX_COMPILER_ID}" STREQUAL "GNU" OR CMAKE_CXX_COMPILER_ID MATCHES "Clang" )
481-
# C++ - only warnings
482-
# C and C++ warnings
483479
set_property ( SOURCE ${cxx_src} ${c_src} APPEND_STRING PROPERTY COMPILE_FLAGS -Wall\ )
484480
set_property ( SOURCE ${cxx_src} ${c_src} APPEND_STRING PROPERTY COMPILE_FLAGS -Wextra\ )
485481
set_property ( SOURCE ${cxx_src} ${c_src} APPEND_STRING PROPERTY COMPILE_FLAGS -Winit-self\ )
@@ -495,14 +491,10 @@ if ( "${CMAKE_CXX_COMPILER_ID}" STREQUAL "GNU" OR CMAKE_CXX_COMPILER_ID MATCHES
495491
set_property ( SOURCE ${cxx_src} ${c_src} APPEND_STRING PROPERTY COMPILE_FLAGS -Wno-unused-parameter\ )
496492
set_property ( SOURCE ${cxx_src} ${c_src} APPEND_STRING PROPERTY COMPILE_FLAGS -Wno-inline\ )
497493
if ( "${CMAKE_CXX_COMPILER_ID}" STREQUAL "GNU" )
498-
# apple clang 11.0 goes crazy with -Wshadow on the yaml-cpp source code
499494
set_property ( SOURCE ${cxx_src} ${c_src} APPEND_STRING PROPERTY COMPILE_FLAGS -Wshadow\ )
500-
# add warning flags recognized by g++ but not by clang
501495
set_property ( SOURCE ${cxx_src} APPEND_STRING PROPERTY COMPILE_FLAGS -Wsuggest-override\ )
502496
set_property ( SOURCE ${cxx_src} ${c_src} APPEND_STRING PROPERTY COMPILE_FLAGS -Wclobbered\ )
503497
set_property ( SOURCE ${cxx_src} ${c_src} APPEND_STRING PROPERTY COMPILE_FLAGS -Wlogical-op\ )
504-
elseif ( CMAKE_CXX_COMPILER_ID MATCHES "Clang" )
505-
# add warning flags recognized by clang but not by g++
506498
endif ()
507499
if ( FATAL_WARNING )
508500
set_property ( SOURCE ${cxx_src} ${c_src} APPEND_STRING PROPERTY COMPILE_FLAGS -Werror\ )
@@ -518,7 +510,6 @@ if ( CMAKE_CXX_COMPILER_ID MATCHES "Clang" )
518510
endif ()
519511

520512
if ( MSVC )
521-
# Set warning levels for Debug and Release with debug info
522513
set ( CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} /W${MSVC_WARNING_LEVEL}" )
523514
set ( CMAKE_CXX_FLAGS_RELWITHDEBINFO "${CMAKE_CXX_FLAGS_RELWITHDEBINFO} /W${MSVC_WARNING_LEVEL}" )
524515
if ( FATAL_WARNING )
@@ -614,7 +605,7 @@ endif ()
614605

615606
install ( TARGETS openxcom ${install_dest} DESTINATION ${CMAKE_INSTALL_BINDIR} )
616607

617-
# --- Windows / MinGW / MXE link setup (safe for Linux/macOS) ------------------
608+
# --- Windows / MinGW / MXE link setup ---------------------------------------
618609

619610
# jsoncpp: on MinGW/MXE force picking it from the toolchain prefix if available
620611
if ( MINGW )
@@ -627,61 +618,51 @@ else ()
627618
set ( JSONCPP_LINK jsoncpp )
628619
endif ()
629620

630-
# Win32 system libs + tools
621+
# Extra Win32 libs we explicitly need (keep minimal for XP)
631622
set(WIN32_SYSTEM_LIBS "")
632-
set(WIN32_TOOLS_LIBS "")
633-
634623
if ( WIN32 )
635624
set(WIN32_SYSTEM_LIBS advapi32 shell32 shlwapi wininet urlmon)
636-
set(WIN32_TOOLS_LIBS imagehlp dbghelp)
637-
638625
# keep export-all-symbols behavior
639626
set ( CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -Wl,--export-all-symbols" )
640-
641627
if ( MINGW )
642628
# subsystem/static flags as link options (not as "libraries")
643629
target_link_options(openxcom PRIVATE -mwindows -static)
644-
645-
# SDL WinMain glue (WinXP/MinGW)
646-
# (SDL itself comes from PKG_DEPS_LDFLAGS)
630+
# SDL WinMain glue
647631
list(APPEND WIN32_SYSTEM_LIBS mingw32 SDLmain)
648632
endif ()
649633
endif ()
650634

651-
# IMPORTANT: order matters with static linking!
652-
# Put libraries that *depend on others* first, and their dependencies later.
635+
# IMPORTANT: order matters for static linking!
653636
target_link_libraries(openxcom PRIVATE
654637
${PKG_DEPS_LDFLAGS}
655638
${JSONCPP_LINK}
656639

657-
# These use vorbis/ogg → dependencies AFTER
640+
# Vorbis stack
658641
vorbisfile
659642
vorbis
660643
ogg
661644

662-
# SDL_net uses ws2_32/iphlpapi → dependencies AFTER SDL_net
645+
# SDL_net stack (dependencies after)
663646
SDL_net
664647
ws2_32
665648
iphlpapi
666649

667-
# Common Windows multimedia / GUID deps used by SDL_* stacks
650+
# Common Win libs used by SDL stacks
668651
winmm
669652
dxguid
670653

671-
# SDL_image/SDL_mixer optional codec deps (only if your MXE build enables them)
654+
# SDL_image / SDL_mixer codecs (only if enabled in MXE build)
672655
jpeg
673656
png
674657
webp
675658
smpeg
676659
modplug
677660

678661
${WIN32_SYSTEM_LIBS}
679-
${WIN32_TOOLS_LIBS}
680662
)
681663

682664
# ---------------------------------------------------------------------------
683665

684-
# Pack libraries into bundle and link executable appropriately
685666
if ( APPLE AND CREATE_BUNDLE )
686667
include ( PostprocessBundle )
687668
postprocess_bundle ( openxcom ${bundle_path} )
@@ -694,18 +675,18 @@ if ( NOT EMBED_ASSETS )
694675
add_custom_command ( TARGET openxcom
695676
POST_BUILD
696677
COMMAND ${CMAKE_COMMAND} -E copy_directory ${CMAKE_SOURCE_DIR}/bin/${binpath} ${bundle_path}/Contents/Resources/${binpath}
697-
VERBATIM )
678+
VERBATIM )
698679
else ()
699680
add_custom_command ( TARGET openxcom
700681
POST_BUILD
701682
COMMAND ${CMAKE_COMMAND} -E copy_directory ${CMAKE_SOURCE_DIR}/bin/${binpath} ${EXECUTABLE_OUTPUT_PATH}/${binpath}
702-
VERBATIM )
683+
VERBATIM )
703684
install ( DIRECTORY ${CMAKE_SOURCE_DIR}/bin/${binpath} DESTINATION ${data_install_dir} )
704685
endif ()
705686
endforeach ()
706687
endif ()
707688

708-
# Copy Windows DLLs to bin folder
689+
# Copy Windows DLLs to bin folder (noop for static MXE, but kept for compatibility)
709690
if ( WIN32 )
710691
if ( CMAKE_CL_64 )
711692
file ( GLOB Windows_dll "${DEPS_DIR}/lib/x64/*.dll" )
@@ -716,12 +697,11 @@ if ( WIN32 )
716697
add_custom_command ( TARGET openxcom
717698
POST_BUILD
718699
COMMAND ${CMAKE_COMMAND} -E copy ${dll} ${EXECUTABLE_OUTPUT_PATH}
719-
VERBATIM )
700+
VERBATIM )
720701
install ( FILES ${dll} DESTINATION bin)
721702
endforeach()
722703
endif ()
723704

724-
#Setup source groups for IDE
725705
if ( MSVC OR "${CMAKE_GENERATOR}" STREQUAL "Xcode" )
726706
source_group ( "Basescape" FILES ${basescape_src} )
727707
source_group ( "Battlescape" FILES ${battlescape_src} )
@@ -736,4 +716,4 @@ if ( MSVC OR "${CMAKE_GENERATOR}" STREQUAL "Xcode" )
736716
if ( APPLE )
737717
source_group ( "SDL" FILES ${sdl_src} )
738718
endif ()
739-
endif ()
719+
endif ()

src/CoopMod/connectionTCP.h

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -44,9 +44,6 @@
4444
#include "../Savegame/Ufo.h"
4545
#include "../Mod/RuleInventory.h"
4646

47-
#include "CrashHandler.h" // coop
48-
49-
5047
#include <algorithm> // clamp, minmax
5148
#include <cmath> // round
5249
#include <optional>
@@ -63,11 +60,6 @@ inline void DebugLog(const std::string& msg)
6360
std::fprintf(stderr, "%s\n", msg.c_str());
6461
#endif
6562

66-
if (OpenXcom::Options::logInfoToFile && OpenXcom::Options::debugMode)
67-
{
68-
CrashHandler::log(msg);
69-
}
70-
7163
}
7264

7365
inline void DebugLog(const char* msg)

src/Engine/Options.cpp

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -578,10 +578,6 @@ void createAdvancedOptionsOTHER()
578578
_info.push_back(OptionInfo(OPTION_OTHER, "EnableOtherPlayerFootsteps", &EnableOtherPlayerFootsteps, true,"Enable Other Player Footstep Sounds", "STR_BATTLESCAPE"));
579579
_info.push_back(OptionInfo(OPTION_OTHER, "EnableXcomEquipmentAliensPVP", &EnableXcomEquipmentAliensPVP, true, "Enable XCOM Equipment for Aliens in PVP", "STR_BATTLESCAPE"));
580580
_info.push_back(OptionInfo(OPTION_OTHER, "resetTimeUnitsOnTurnChangePVP", &resetTimeUnitsOnTurnChangePVP, true, "Reset Time Units when PVP turn changes", "STR_BATTLESCAPE"));
581-
_info.push_back(OptionInfo(OPTION_OTHER, "debugMode", &debugMode, true, "Enable Debug Mode (requires restart)", "STR_AI"));
582-
_info.push_back(OptionInfo(OPTION_OTHER, "logInfoToFile", &logInfoToFile, false, "Write INFO messages to log file", "STR_AI"));
583-
_info.push_back(OptionInfo(OPTION_OTHER, "debugCoopMenu", &debugCoopMenu, false, "Enable COOP Menu Debug Mode", "STR_AI"));
584-
_info.push_back(OptionInfo(OPTION_OTHER, "logPacketMessages", &logPacketMessages, false, "Write packet messages to log files (heavy logging)", "STR_AI"));
585581

586582
}
587583

src/Menu/MainMenuState.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -244,7 +244,7 @@ MainMenuState::MainMenuState(bool updateCheck)
244244
// coop version
245245
_textCoopVersion->setAlign(ALIGN_CENTER);
246246
_textCoopVersion->setSmall();
247-
_textCoopVersion->setText("Coop Mod 1.5.0 [v2026-02-28]");
247+
_textCoopVersion->setText("Coop Mod (Windows XP) 1.5.0 [v2026-02-28]");
248248

249249
}
250250

src/OpenXcom.2010.vcxproj

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -343,7 +343,6 @@
343343
<ClCompile Include="CoopMod\connectionTCP.cpp" />
344344
<ClCompile Include="CoopMod\CoopMenu.cpp" />
345345
<ClCompile Include="CoopMod\CoopState.cpp" />
346-
<ClCompile Include="CoopMod\CrashHandler.cpp" />
347346
<ClCompile Include="CoopMod\OptionsMultiplayer.cpp" />
348347
<ClCompile Include="CoopMod\Profile.cpp" />
349348
<ClCompile Include="..\libs\miniz\miniz.c" />
@@ -762,7 +761,6 @@
762761
<ClInclude Include="CoopMod\connectionTCP.h" />
763762
<ClInclude Include="CoopMod\CoopMenu.h" />
764763
<ClInclude Include="CoopMod\CoopState.h" />
765-
<ClInclude Include="CoopMod\CrashHandler.h" />
766764
<ClInclude Include="CoopMod\OptionsMultiplayer.h" />
767765
<ClInclude Include="CoopMod\Profile.h" />
768766
<ClInclude Include="..\libs\miniz\miniz.h" />

src/OpenXcom.2010.vcxproj.filters

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1235,7 +1235,6 @@
12351235
<ClCompile Include="CoopMod\Profile.cpp">
12361236
<Filter>CoopMod</Filter>
12371237
</ClCompile>
1238-
<ClCompile Include="CoopMod\CrashHandler.cpp" />
12391238
</ItemGroup>
12401239
<ItemGroup>
12411240
<ClInclude Include="resource.h" />
@@ -2727,7 +2726,6 @@
27272726
<ClInclude Include="CoopMod\Profile.h">
27282727
<Filter>CoopMod</Filter>
27292728
</ClInclude>
2730-
<ClInclude Include="CoopMod\CrashHandler.h" />
27312729
</ItemGroup>
27322730
<ItemGroup>
27332731
<Filter Include="Geoscape">

src/main.cpp

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,6 @@
2727
#include <cassert>
2828
#include <exception>
2929
#include <sstream>
30-
#include "CoopMod/CrashHandler.h" // coop
3130

3231
/** @mainpage
3332
* @author OpenXcom Developers
@@ -98,7 +97,6 @@ Game* game = 0;
9897
// programming license revoked...
9998
int main(int argc, char* argv[])
10099
{
101-
CrashHandler::install(); // coop
102100
#ifndef DUMP_CORE
103101
#ifdef _MSC_VER
104102
// Uncomment to check memory leaks in VS

0 commit comments

Comments
 (0)