From a86dc5ae854f7018eeebf2ec72da4f644d55e01a Mon Sep 17 00:00:00 2001 From: deepend Date: Fri, 13 Feb 2026 20:14:39 -0700 Subject: [PATCH] Added build capability switches in the shared Windows props file so optional components are only enabled when their prerequisites exist: Python3Enabled (python executable + import lib + cffi) PerlEnabled (perl executable + perl runtime DLL + gendef.exe) InstallerEnabled (Inno Setup iscc.exe). Updated the Python plugin project to compile only when Python3Enabled is true, and otherwise emit a clear skip message instead of failing prebuild/import steps. Updated the Perl plugin project similarly to gate build steps on PerlEnabled and print a skip message when prerequisites are missing. Updated the installer project so it only uses C++ targets when InstallerEnabled is true, with a fallback skip message when Inno Setup is unavailable. --- plugins/perl/perl.vcxproj | 13 ++++++++----- plugins/python/python3.vcxproj | 13 ++++++++----- win32/installer/installer.vcxproj | 7 +++++-- win32/zoitechat.props | 6 ++++++ 4 files changed, 27 insertions(+), 12 deletions(-) diff --git a/plugins/perl/perl.vcxproj b/plugins/perl/perl.vcxproj index d4f53245..b29143e4 100644 --- a/plugins/perl/perl.vcxproj +++ b/plugins/perl/perl.vcxproj @@ -1,4 +1,4 @@ - + v142 @@ -27,7 +27,7 @@ hcperl $(ZoiteChatRel)plugins\ - + WIN32;NDEBUG;_WINDOWS;_USRDLL;PERL520_EXPORTS;HAS_BOOL;$(OwnFlags);%(PreprocessorDefinitions) $(IntDir);..\..\src\common;$(ZoiteChatLib);$(PerlPath)\lib\CORE;$(Glib);%(AdditionalIncludeDirectories) @@ -47,7 +47,7 @@ move irc.pm.h "$(IntDir)" move zoitechat.pm.h "$(IntDir)" - + WIN32;_WIN64;_AMD64_;NDEBUG;_WINDOWS;_USRDLL;PERL520_EXPORTS;HAS_BOOL;$(OwnFlags);%(PreprocessorDefinitions) $(IntDir);..\..\src\common;$(ZoiteChatLib);$(PerlPath)\lib\CORE;$(Glib);%(AdditionalIncludeDirectories) @@ -70,8 +70,11 @@ move zoitechat.pm.h "$(IntDir)" - + - + + + + diff --git a/plugins/python/python3.vcxproj b/plugins/python/python3.vcxproj index d43e15c9..4bf954f8 100644 --- a/plugins/python/python3.vcxproj +++ b/plugins/python/python3.vcxproj @@ -1,4 +1,4 @@ - + v142 @@ -27,7 +27,7 @@ $(Python3Output) $(ZoiteChatRel)plugins\ - + WIN32;NDEBUG;_WINDOWS;_USRDLL;PYTHON_EXPORTS;$(OwnFlags);%(PreprocessorDefinitions) $(Glib);$(Python3Path)\include;..\..\src\common;$(ZoiteChatLib);%(AdditionalIncludeDirectories) @@ -41,7 +41,7 @@ "$(Python3Path)\python.exe" generate_plugin.py ..\..\src\common\zoitechat-plugin.h python.py "$(IntDir)python.c" - + WIN32;_WIN64;_AMD64_;NDEBUG;_WINDOWS;_USRDLL;PYTHON_EXPORTS;$(OwnFlags);%(PreprocessorDefinitions) $(Glib);$(Python3Path)\include;..\..\src\common;$(ZoiteChatLib);%(AdditionalIncludeDirectories) @@ -63,8 +63,11 @@ - + - + + + + \ No newline at end of file diff --git a/win32/installer/installer.vcxproj b/win32/installer/installer.vcxproj index 571a2690..9e253363 100644 --- a/win32/installer/installer.vcxproj +++ b/win32/installer/installer.vcxproj @@ -1,4 +1,4 @@ - + v142 @@ -49,5 +49,8 @@ $(IsccPath) /dPROJECTDIR="$(ProjectDir)" /dAPPARCH="$(Platform)" "$(ZoiteChatBin - + + + + diff --git a/win32/zoitechat.props b/win32/zoitechat.props index d4d24807..e05bbcb1 100644 --- a/win32/zoitechat.props +++ b/win32/zoitechat.props @@ -29,6 +29,12 @@ $(YourPython3Path)\$(PlatformName) python314 hcpython3 + true + false + true + false + true + false $(DepsRoot)\include\luajit-2.1;$(DepsRoot)\include\lua;$(DepsRoot)\include\lua5.1;$(DepsRoot)\include\lua54;$(DepsRoot)\include\lua5.4;$(DepsRoot)\include\lua-5.4;$(SolutionDir)..\plugins\lua\luajit\src;$(SolutionDir)..\plugins\lua\luajit\src\jit hclua true