mirror of
https://github.com/ZoiteChat/zoitechat.git
synced 2026-03-10 07:50:19 +00:00
Switched hardcoded DLL names to wildcard patterns (ex: atk-1.0-0.dll → *atk-1.0-0.dll, iconv.dll → *iconv*.dll, etc.) so it correctly picks up lib* prefixed builds. Made Enchant provider copying resilient by copying lib\enchant\*.dll instead of a single hardcoded libenchant_myspell.dll. Added optional copy support for LuaJIT DLLs (luajit*.dll) alongside lua51.dll. win32/installer/zoitechat.iss.tt Updated DLL Source: entries to match real-world names from dependency bundles using wildcards (*glib-2*.dll, *gtk-3*.dll, etc.). Added optional LuaJIT inclusion (skip if missing) and wildcarded girepository. win32/zoitechat.props Added env overrides so CI (and humans) can actually control paths: ZOITECHAT_DEPS_PATH ZOITECHAT_PYTHON3_PATH already supported ISCC_EXE and now it actually matters. Fixed glib-genmarshal handling to prefer glib-genmarshal.exe if present (and only use Python script path if needed). Added library-name auto-detection for MSVC import libs (gtk-3.lib vs gtk-3.0.lib vs libgtk-3.lib, etc.) so linking doesn’t die just because the bundle names differ. Ensured InstallerEnabled gets re-evaluated after IsccPath is resolved (GTK3 had the order wrong, so installer builds could be silently disabled). .github/workflows/windows-build.yml Made artifact collection and plugin validation tolerate win32 vs Win32 output directory naming, instead of assuming humans are consistent (they aren’t).
167 lines
12 KiB
XML
167 lines
12 KiB
XML
<?xml version="1.0" encoding="utf-8"?>
|
|
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
|
<PropertyGroup Label="UserMacros">
|
|
|
|
<!-- SPECIFY YOUR DEPENDENCY DIRECTORIES HERE -->
|
|
|
|
<YourDepsPath Condition="'$(YourDepsPath)'=='' and '$(ZOITECHAT_DEPS_PATH)'!=''">$(ZOITECHAT_DEPS_PATH)</YourDepsPath>
|
|
<YourDepsPath Condition="'$(YourDepsPath)'==''">c:\gtk-build\gtk</YourDepsPath>
|
|
<YourGendefPath Condition="'$(YourGendefPath)'==''">c:\gtk-build\gendef</YourGendefPath>
|
|
<YourPerlPath Condition="'$(YourPerlPath)'==''">c:\gtk-build\perl-5.20</YourPerlPath>
|
|
<YourPython3Path Condition="'$(YourPython3Path)'=='' and '$(ZOITECHAT_PYTHON3_PATH)'!=''">$(ZOITECHAT_PYTHON3_PATH)</YourPython3Path>
|
|
<YourPython3Path Condition="'$(YourPython3Path)'==''">c:\gtk-build\python-3.14</YourPython3Path>
|
|
<YourWinSparklePath Condition="'$(YourWinSparklePath)'==''">c:\gtk-build\WinSparkle</YourWinSparklePath>
|
|
|
|
<!-- YOU SHOULDN'T TOUCH ANYTHING BELOW -->
|
|
|
|
<!-- G_DISABLE_DEPRECATED is unfeasible due to g_completion_* -->
|
|
<!-- must be buildable with GSEAL_ENABLE in the future, xtext, setup, and chanview-tabs stand in the way -->
|
|
<OwnFlags>GTK_DISABLE_DEPRECATED;GDK_PIXBUF_DISABLE_DEPRECATED;G_DISABLE_SINGLE_INCLUDES;GDK_PIXBUF_DISABLE_SINGLE_INCLUDES;GTK_DISABLE_SINGLE_INCLUDES;HAVE_X509_GET_SIGNATURE_NID;HAVE_SSL_CTX_GET_SSL_METHOD;DEFAULT_CERT_FILE="cert.pem";HAVE_STRTOULL;strtoull=_strtoui64;strcasecmp=stricmp;strncasecmp=strnicmp;__inline__=__inline;$(GtkDefines)</OwnFlags>
|
|
<!-- FIXME: Add ability to use debug builds -->
|
|
<DepsRoot>$(YourDepsPath)\$(PlatformName)\release</DepsRoot>
|
|
<GendefPath>$(YourGendefPath)</GendefPath>
|
|
<WinSparklePath>$(YourWinSparklePath)\$(PlatformName)</WinSparklePath>
|
|
<PerlPath>$(YourPerlPath)\$(PlatformName)</PerlPath>
|
|
<PerlLib>perl520</PerlLib>
|
|
<Python3Path>$(YourPython3Path)\$(PlatformName)</Python3Path>
|
|
<Python3Lib>python314</Python3Lib>
|
|
<Python3Output>hcpython3</Python3Output>
|
|
<Python3Enabled Condition="Exists('$(Python3Path)\\python.exe') and Exists('$(Python3Path)\\libs\\$(Python3Lib).lib') and Exists('$(Python3Path)\\Lib\\site-packages\\cffi')">true</Python3Enabled>
|
|
<Python3Enabled Condition="'$(Python3Enabled)'==''">false</Python3Enabled>
|
|
<PerlEnabled Condition="Exists('$(PerlPath)\\bin\\perl.exe') and Exists('$(PerlPath)\\bin\\$(PerlLib).dll') and Exists('$(GendefPath)\\gendef.exe')">true</PerlEnabled>
|
|
<PerlEnabled Condition="'$(PerlEnabled)'==''">false</PerlEnabled>
|
|
<InstallerEnabled Condition="Exists('$(IsccPath)')">true</InstallerEnabled>
|
|
<InstallerEnabled Condition="'$(InstallerEnabled)'==''">false</InstallerEnabled>
|
|
<LuaInclude Condition="Exists('$(DepsRoot)\include\luajit-2.1\lua.h')">$(DepsRoot)\include\luajit-2.1</LuaInclude>
|
|
<LuaInclude Condition="'$(LuaInclude)'=='' and Exists('$(DepsRoot)\include\luajit\lua.h')">$(DepsRoot)\include\luajit</LuaInclude>
|
|
<LuaInclude Condition="'$(LuaInclude)'=='' and Exists('$(DepsRoot)\include\lua5.1\lua.h')">$(DepsRoot)\include\lua5.1</LuaInclude>
|
|
<LuaInclude Condition="'$(LuaInclude)'=='' and Exists('$(DepsRoot)\include\lua51\lua.h')">$(DepsRoot)\include\lua51</LuaInclude>
|
|
<LuaOutput>hclua</LuaOutput>
|
|
<LuaLib Condition="Exists('$(DepsRoot)\lib\lua51.lib')">lua51</LuaLib>
|
|
<LuaLib Condition="'$(LuaLib)'=='' and Exists('$(DepsRoot)\lib\luajit-5.1.lib')">luajit-5.1</LuaLib>
|
|
<LuaLib Condition="'$(LuaLib)'=='' and Exists('$(DepsRoot)\lib\luajit.lib')">luajit</LuaLib>
|
|
<LuaEnabled Condition="'$(LuaInclude)'!='' and '$(LuaLib)'!=''">true</LuaEnabled>
|
|
<LuaEnabled Condition="'$(LuaEnabled)'==''">false</LuaEnabled>
|
|
<GlibGenMarshal Condition="Exists('$(DepsRoot)\bin\glib-genmarshal.exe')">"$(DepsRoot)\bin\glib-genmarshal.exe"</GlibGenMarshal>
|
|
<GlibGenMarshal Condition="'$(GlibGenMarshal)'=='' and Exists('$(DepsRoot)\bin\glib-genmarshal') and Exists('$(Python3Path)\python.exe')">"$(Python3Path)\python.exe" "$(DepsRoot)\bin\glib-genmarshal"</GlibGenMarshal>
|
|
<Glib>$(DepsRoot)\include\glib-2.0;$(DepsRoot)\lib\glib-2.0\include;$(DepsRoot)\include\libxml2</Glib>
|
|
<UsingGtk3 Condition="Exists('$(DepsRoot)\\include\\gtk-3.0\\gtk\\gtk.h')">true</UsingGtk3>
|
|
<GtkDefines>HAVE_GTK3</GtkDefines>
|
|
<Gtk3>$(DepsRoot)\include\gtk-3.0;$(DepsRoot)\lib\gtk-3.0\include</Gtk3>
|
|
<GtkCommon>$(DepsRoot)\include\atk-1.0;$(DepsRoot)\include\cairo;$(DepsRoot)\include\pango-1.0;$(DepsRoot)\include\gdk-pixbuf-2.0;$(DepsRoot)\include\harfbuzz</GtkCommon>
|
|
<Gtk>$(Gtk3);$(GtkCommon)</Gtk>
|
|
<SslLegacyLib Condition="Exists('$(DepsRoot)\\lib\\ssleay32.lib')">ssleay32.lib</SslLegacyLib>
|
|
<CryptoLegacyLib Condition="Exists('$(DepsRoot)\\lib\\libeay32.lib')">libeay32.lib</CryptoLegacyLib>
|
|
<SslModernLib Condition="Exists('$(DepsRoot)\\lib\\libssl.lib')">libssl.lib</SslModernLib>
|
|
<CryptoModernLib Condition="Exists('$(DepsRoot)\\lib\\libcrypto.lib')">libcrypto.lib</CryptoModernLib>
|
|
<OpenSslLibs Condition="'$(SslModernLib)' != '' and '$(CryptoModernLib)' != ''">$(SslModernLib);$(CryptoModernLib)</OpenSslLibs>
|
|
<OpenSslLibs Condition="'$(OpenSslLibs)' == '' and '$(SslLegacyLib)' != '' and '$(CryptoLegacyLib)' != ''">$(SslLegacyLib);$(CryptoLegacyLib)</OpenSslLibs>
|
|
<OpenSslInclude Condition="Exists('$(DepsRoot)\\include\\openssl\\ssl.h')">$(DepsRoot)\include</OpenSslInclude>
|
|
<!-- Resolve library names across dependency bundles -->
|
|
<Gtk3Lib Condition="Exists('$(DepsRoot)\lib\gtk-3.lib')">gtk-3.lib</Gtk3Lib>
|
|
<Gtk3Lib Condition="'$(Gtk3Lib)'=='' and Exists('$(DepsRoot)\lib\gtk-3.0.lib')">gtk-3.0.lib</Gtk3Lib>
|
|
<Gtk3Lib Condition="'$(Gtk3Lib)'=='' and Exists('$(DepsRoot)\lib\libgtk-3.lib')">libgtk-3.lib</Gtk3Lib>
|
|
<Gtk3Lib Condition="'$(Gtk3Lib)'=='' and Exists('$(DepsRoot)\lib\libgtk-3.0.lib')">libgtk-3.0.lib</Gtk3Lib>
|
|
<Gdk3Lib Condition="Exists('$(DepsRoot)\lib\gdk-3.lib')">gdk-3.lib</Gdk3Lib>
|
|
<Gdk3Lib Condition="'$(Gdk3Lib)'=='' and Exists('$(DepsRoot)\lib\gdk-3.0.lib')">gdk-3.0.lib</Gdk3Lib>
|
|
<Gdk3Lib Condition="'$(Gdk3Lib)'=='' and Exists('$(DepsRoot)\lib\libgdk-3.lib')">libgdk-3.lib</Gdk3Lib>
|
|
<Gdk3Lib Condition="'$(Gdk3Lib)'=='' and Exists('$(DepsRoot)\lib\libgdk-3.0.lib')">libgdk-3.0.lib</Gdk3Lib>
|
|
<IntlLib Condition="Exists('$(DepsRoot)\lib\intl.lib')">intl.lib</IntlLib>
|
|
<IntlLib Condition="'$(IntlLib)'=='' and Exists('$(DepsRoot)\lib\libintl.lib')">libintl.lib</IntlLib>
|
|
<IconvLib Condition="Exists('$(DepsRoot)\lib\iconv.lib')">iconv.lib</IconvLib>
|
|
<IconvLib Condition="'$(IconvLib)'=='' and Exists('$(DepsRoot)\lib\libiconv.lib')">libiconv.lib</IconvLib>
|
|
<ZlibLib Condition="Exists('$(DepsRoot)\lib\zlib1.lib')">zlib1.lib</ZlibLib>
|
|
<ZlibLib Condition="'$(ZlibLib)'=='' and Exists('$(DepsRoot)\lib\zlib.lib')">zlib.lib</ZlibLib>
|
|
<Xml2Lib Condition="Exists('$(DepsRoot)\lib\libxml2.lib')">libxml2.lib</Xml2Lib>
|
|
<Xml2Lib Condition="'$(Xml2Lib)'=='' and Exists('$(DepsRoot)\lib\xml2.lib')">xml2.lib</Xml2Lib>
|
|
<Xml2Lib Condition="'$(Xml2Lib)'=='' and Exists('$(DepsRoot)\lib\libxml2-2.lib')">libxml2-2.lib</Xml2Lib>
|
|
<JpegLib Condition="Exists('$(DepsRoot)\lib\jpeg.lib')">jpeg.lib</JpegLib>
|
|
<JpegLib Condition="'$(JpegLib)'=='' and Exists('$(DepsRoot)\lib\libjpeg.lib')">libjpeg.lib</JpegLib>
|
|
<JpegLib Condition="'$(JpegLib)'=='' and Exists('$(DepsRoot)\lib\libjpeg-8.lib')">libjpeg-8.lib</JpegLib>
|
|
<JpegLib Condition="'$(JpegLib)'=='' and Exists('$(DepsRoot)\lib\libjpeg-9.lib')">libjpeg-9.lib</JpegLib>
|
|
<PngLib Condition="Exists('$(DepsRoot)\lib\libpng16.lib')">libpng16.lib</PngLib>
|
|
<PngLib Condition="'$(PngLib)'=='' and Exists('$(DepsRoot)\lib\libpng16_static.lib')">libpng16_static.lib</PngLib>
|
|
<PngLib Condition="'$(PngLib)'=='' and Exists('$(DepsRoot)\lib\libpng.lib')">libpng.lib</PngLib>
|
|
<DepLibs>$(Gtk3Lib);$(Gdk3Lib);wininet.lib;winmm.lib;ws2_32.lib;atk-1.0.lib;gio-2.0.lib;gdk_pixbuf-2.0.lib;pangowin32-1.0.lib;pangocairo-1.0.lib;pango-1.0.lib;cairo.lib;gobject-2.0.lib;gmodule-2.0.lib;glib-2.0.lib;$(IntlLib);$(IconvLib);$(ZlibLib);$(Xml2Lib);$(JpegLib);$(PngLib);$(OpenSslLibs)</DepLibs>
|
|
<DataDir>$(SolutionDir)..\data\\</DataDir>
|
|
<ZoiteChatBuild>$(SolutionDir)..\..\zoitechat-build</ZoiteChatBuild>
|
|
<ZoiteChatBin>$(ZoiteChatBuild)\$(PlatformName)\bin\</ZoiteChatBin>
|
|
<ZoiteChatObj>$(ZoiteChatBuild)\$(PlatformName)\obj\</ZoiteChatObj>
|
|
<ZoiteChatLib>$(ZoiteChatBuild)\$(PlatformName)\lib\</ZoiteChatLib>
|
|
<ZoiteChatPdb>$(ZoiteChatBuild)\$(PlatformName)\pdb\</ZoiteChatPdb>
|
|
<ZoiteChatRel>$(ZoiteChatBuild)\$(PlatformName)\rel\</ZoiteChatRel>
|
|
<IsccPath Condition="'$(IsccPath)'=='' and '$(ISCC_EXE)'!=''">$(ISCC_EXE)</IsccPath>
|
|
<IsccPath Condition="'$(IsccPath)'=='' and '$(ProgramFiles(x86))'!='' and Exists('$(ProgramFiles(x86))\Inno Setup 5\iscc.exe')">$(ProgramFiles(x86))\Inno Setup 5\iscc.exe</IsccPath>
|
|
<IsccPath Condition="'$(IsccPath)'=='' and '$(ProgramFiles(x86))'!='' and Exists('$(ProgramFiles(x86))\Inno Setup 6\iscc.exe')">$(ProgramFiles(x86))\Inno Setup 6\iscc.exe</IsccPath>
|
|
<IsccPath Condition="'$(IsccPath)'=='' and '$(ProgramFiles)'!='' and Exists('$(ProgramFiles)\Inno Setup 5\iscc.exe')">$(ProgramFiles)\Inno Setup 5\iscc.exe</IsccPath>
|
|
<IsccPath Condition="'$(IsccPath)'=='' and '$(ProgramFiles)'!='' and Exists('$(ProgramFiles)\Inno Setup 6\iscc.exe')">$(ProgramFiles)\Inno Setup 6\iscc.exe</IsccPath>
|
|
<InstallerEnabled Condition="Exists('$(IsccPath)')">true</InstallerEnabled>
|
|
</PropertyGroup>
|
|
|
|
<PropertyGroup>
|
|
<LinkIncremental>false</LinkIncremental>
|
|
<IntDir>$(ZoiteChatObj)$(ProjectName)\</IntDir>
|
|
<UseDebugLibraries>false</UseDebugLibraries>
|
|
<WholeProgramOptimization>true</WholeProgramOptimization>
|
|
<CharacterSet>MultiByte</CharacterSet>
|
|
</PropertyGroup>
|
|
|
|
<ItemDefinitionGroup>
|
|
<ClCompile>
|
|
<WarningLevel>Level3</WarningLevel>
|
|
<PrecompiledHeader>NotUsing</PrecompiledHeader>
|
|
<DisableSpecificWarnings>4996</DisableSpecificWarnings>
|
|
<AdditionalOptions>/d2Zi+ %(AdditionalOptions)</AdditionalOptions>
|
|
<WholeProgramOptimization>true</WholeProgramOptimization>
|
|
<!-- UNCOMMENT ONLY ONE -->
|
|
<!--Optimization>Disabled</Optimization-->
|
|
<Optimization>MaxSpeed</Optimization>
|
|
<!--Optimization>MinSpace</Optimization-->
|
|
<!--Optimization>Full</Optimization-->
|
|
<FunctionLevelLinking>true</FunctionLevelLinking>
|
|
<IntrinsicFunctions>true</IntrinsicFunctions>
|
|
<MultiProcessorCompilation>true</MultiProcessorCompilation>
|
|
<PreProcessorDefinitions>NTDDI_VERSION=NTDDI_WIN8;_WIN32_WINNT=_WIN32_WINNT_WIN8;%(PreProcessorDefinitions)</PreProcessorDefinitions>
|
|
</ClCompile>
|
|
<Lib>
|
|
<LinkTimeCodeGeneration>true</LinkTimeCodeGeneration>
|
|
</Lib>
|
|
<Link>
|
|
<ImportLibrary>$(ZoiteChatLib)$(TargetName).lib</ImportLibrary>
|
|
<ProgramDatabaseFile>$(ZoiteChatPdb)$(TargetName).pdb</ProgramDatabaseFile>
|
|
<SubSystem>Windows</SubSystem>
|
|
<GenerateDebugInformation>Debug</GenerateDebugInformation>
|
|
<EnableCOMDATFolding>true</EnableCOMDATFolding>
|
|
<OptimizeReferences>true</OptimizeReferences>
|
|
<LinkTimeCodeGeneration>UseLinkTimeCodeGeneration</LinkTimeCodeGeneration>
|
|
</Link>
|
|
</ItemDefinitionGroup>
|
|
|
|
<ItemGroup />
|
|
|
|
<Target Name="ValidateWindowsBuildEnvironment" BeforeTargets="PrepareForBuild">
|
|
<Error Condition="!Exists('$(DepsRoot)\include\glib-2.0\glib.h')" Text="Missing GTK/GLib headers under $(DepsRoot). Set YourDepsPath in win32\zoitechat.props or set ZOITECHAT_DEPS_PATH before launching Visual Studio." />
|
|
<Error Condition="!Exists('$(DepsRoot)\lib\glib-2.0\include\glibconfig.h')" Text="Missing glibconfig.h under $(DepsRoot). Ensure prebuilt dependencies are unpacked for $(PlatformName)." />
|
|
<Error Condition="!Exists('$(DepsRoot)\include\gtk-3.0\gtk\gtk.h')" Text="Missing GTK headers under $(DepsRoot). Install GTK runtime/devel files and verify YourDepsPath/ZOITECHAT_DEPS_PATH." />
|
|
<Error Condition="'$(Gtk3Lib)'==''" Text="Missing GTK import library (gtk-3*.lib) under $(DepsRoot)\lib. Ensure your dependency bundle includes MSVC .lib files (not just .dll)." />
|
|
<Error Condition="'$(Gdk3Lib)'==''" Text="Missing GDK import library (gdk-3*.lib) under $(DepsRoot)\lib. Ensure your dependency bundle includes MSVC .lib files." />
|
|
<Error Condition="!Exists('$(DepsRoot)\include\openssl\ssl.h') and !Exists('$(DepsRoot)\include\openssl3\openssl\ssl.h') and !Exists('$(DepsRoot)\include\openssl-3\openssl\ssl.h')" Text="Missing OpenSSL headers under $(DepsRoot). Install OpenSSL development files for your target architecture." />
|
|
<Error Condition="!Exists('$(Python3Path)\python.exe')" Text="Missing Python at $(Python3Path). Set YourPython3Path in win32\zoitechat.props or set ZOITECHAT_PYTHON3_PATH." />
|
|
</Target>
|
|
|
|
</Project>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|