mirror of
https://github.com/ZoiteChat/zoitechat.git
synced 2026-03-21 05:00:19 +00:00
27
.github/workflows/windows-build.yml
vendored
27
.github/workflows/windows-build.yml
vendored
@@ -27,7 +27,7 @@ jobs:
|
|||||||
|
|
||||||
- uses: actions/setup-python@v5
|
- uses: actions/setup-python@v5
|
||||||
with:
|
with:
|
||||||
python-version: '3.8'
|
python-version: '3.14.2'
|
||||||
architecture: ${{ matrix.arch }}
|
architecture: ${{ matrix.arch }}
|
||||||
|
|
||||||
- name: Install Dependencies
|
- name: Install Dependencies
|
||||||
@@ -52,29 +52,28 @@ jobs:
|
|||||||
Invoke-WebRequest https://github.com/zoitechat/gvsbuild/releases/download/zoitechat-2.17.0/perl-5.20.0-${{ matrix.arch }}.7z -OutFile deps\perl-${{ matrix.arch }}.7z
|
Invoke-WebRequest https://github.com/zoitechat/gvsbuild/releases/download/zoitechat-2.17.0/perl-5.20.0-${{ matrix.arch }}.7z -OutFile deps\perl-${{ matrix.arch }}.7z
|
||||||
& 7z.exe x deps\perl-${{ matrix.arch }}.7z -oC:\gtk-build\perl-5.20\${{ matrix.platform }}
|
& 7z.exe x deps\perl-${{ matrix.arch }}.7z -oC:\gtk-build\perl-5.20\${{ matrix.platform }}
|
||||||
|
|
||||||
New-Item -Path "C:\gtk-build\python-3.8" -ItemType Directory -Force | Out-Null
|
# Resolve python root from setup-python
|
||||||
|
|
||||||
$pyRoot = $env:pythonLocation
|
$pyRoot = $env:pythonLocation
|
||||||
if (-not $pyRoot) {
|
if (-not $pyRoot) { $pyRoot = & python -c "import sys; print(sys.prefix)" }
|
||||||
$pyRoot = & python -c "import sys; print(sys.prefix)"
|
|
||||||
|
# Create BOTH paths because the .vcxproj hard-codes python-3.14\...
|
||||||
|
foreach ($pyDir in @("C:\gtk-build\python-3.14.2", "C:\gtk-build\python-3.14")) {
|
||||||
|
New-Item -Path $pyDir -ItemType Directory -Force | Out-Null
|
||||||
|
$target = Join-Path $pyDir "${{ matrix.platform }}"
|
||||||
|
if (Test-Path $target) { Remove-Item $target -Recurse -Force }
|
||||||
|
New-Item -Path $pyDir -Name "${{ matrix.platform }}" -ItemType Junction -Value $pyRoot | Out-Null
|
||||||
}
|
}
|
||||||
|
|
||||||
$target = "C:\gtk-build\python-3.8\${{ matrix.platform }}"
|
|
||||||
if (Test-Path $target) { Remove-Item $target -Recurse -Force }
|
|
||||||
|
|
||||||
New-Item -Path "C:\gtk-build\python-3.8" -Name "${{ matrix.platform }}" -ItemType Junction -Value $pyRoot | Out-Null
|
|
||||||
|
|
||||||
python -m pip install --upgrade pip
|
python -m pip install --upgrade pip
|
||||||
python -m pip install cffi
|
python -m pip install cffi
|
||||||
|
|
||||||
|
|
||||||
- name: Build
|
- name: Build
|
||||||
run: |
|
run: |
|
||||||
call "C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\Common7\Tools\VsDevCmd.bat"
|
call "C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\Common7\Tools\VsDevCmd.bat"
|
||||||
|
|
||||||
set "PYTHON_DIR=C:\gtk-build\python-3.8\${{ matrix.platform }}"
|
set "PYTHON_DIR=C:\gtk-build\python-3.14.2\${{ matrix.platform }}"
|
||||||
if not exist "%PYTHON_DIR%\libs\python38.lib" (
|
if not exist "%PYTHON_DIR%\libs\python314.lib" (
|
||||||
echo Missing %PYTHON_DIR%\libs\python38.lib
|
echo Missing %PYTHON_DIR%\libs\python314.lib
|
||||||
dir "%PYTHON_DIR%\libs"
|
dir "%PYTHON_DIR%\libs"
|
||||||
exit /b 1
|
exit /b 1
|
||||||
)
|
)
|
||||||
|
|||||||
@@ -9,8 +9,8 @@
|
|||||||
|
|
||||||
ZoiteChat is an HexChat based IRC client for Windows and UNIX-like operating systems.
|
ZoiteChat is an HexChat based IRC client for Windows and UNIX-like operating systems.
|
||||||
See [IRCHelp.org](http://irchelp.org) for information about IRC in general.
|
See [IRCHelp.org](http://irchelp.org) for information about IRC in general.
|
||||||
For more information on ZoiteChat please read our [documentation](https://zoitechat.zoite.net/docs/en/latest/index.html):
|
For more information on ZoiteChat please read our [documentation](https://zoitechat.zoite.net/docs/):
|
||||||
- [Downloads](http://zoitechat.zoite.net/downloads)
|
- [Downloads](https://zoitechat.zoite.net/download)
|
||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
|
|||||||
@@ -64,6 +64,40 @@
|
|||||||
#ifdef USE_OPENSSL
|
#ifdef USE_OPENSSL
|
||||||
/* local variables */
|
/* local variables */
|
||||||
static struct session *g_sess = NULL;
|
static struct session *g_sess = NULL;
|
||||||
|
|
||||||
|
static gboolean
|
||||||
|
ssl_sni_hostname_is_valid (const char *hostname)
|
||||||
|
{
|
||||||
|
const unsigned char *current;
|
||||||
|
char *ip_literal = NULL;
|
||||||
|
size_t hostname_len;
|
||||||
|
|
||||||
|
if (!hostname || !hostname[0])
|
||||||
|
return FALSE;
|
||||||
|
|
||||||
|
for (current = (const unsigned char *)hostname; *current; current++)
|
||||||
|
{
|
||||||
|
if (*current > 0x7f)
|
||||||
|
return FALSE;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (g_hostname_is_ip_address (hostname))
|
||||||
|
return FALSE;
|
||||||
|
|
||||||
|
hostname_len = strlen (hostname);
|
||||||
|
if (hostname[0] == '[' && hostname_len > 2 && hostname[hostname_len - 1] == ']')
|
||||||
|
{
|
||||||
|
ip_literal = g_strndup (hostname + 1, hostname_len - 2);
|
||||||
|
if (g_hostname_is_ip_address (ip_literal))
|
||||||
|
{
|
||||||
|
g_free (ip_literal);
|
||||||
|
return FALSE;
|
||||||
|
}
|
||||||
|
g_free (ip_literal);
|
||||||
|
}
|
||||||
|
|
||||||
|
return TRUE;
|
||||||
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
static GSList *away_list = NULL;
|
static GSList *away_list = NULL;
|
||||||
@@ -519,7 +553,16 @@ ssl_do_connect (server * serv)
|
|||||||
g_sess = serv->server_session;
|
g_sess = serv->server_session;
|
||||||
|
|
||||||
/* Set SNI hostname before connect */
|
/* Set SNI hostname before connect */
|
||||||
SSL_set_tlsext_host_name(serv->ssl, serv->hostname);
|
if (ssl_sni_hostname_is_valid (serv->hostname))
|
||||||
|
{
|
||||||
|
SSL_set_tlsext_host_name (serv->ssl, serv->hostname);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
g_snprintf (buf, sizeof (buf), "* Skipping invalid SNI hostname: %s",
|
||||||
|
serv->hostname);
|
||||||
|
EMIT_SIGNAL (XP_TE_SSLMESSAGE, serv->server_session, buf, NULL, NULL, NULL, 0);
|
||||||
|
}
|
||||||
|
|
||||||
if (SSL_connect (serv->ssl) <= 0)
|
if (SSL_connect (serv->ssl) <= 0)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -990,11 +990,10 @@ servlist_load (void)
|
|||||||
|
|
||||||
while (fgets (buf, sizeof (buf) - 2, fp))
|
while (fgets (buf, sizeof (buf) - 2, fp))
|
||||||
{
|
{
|
||||||
|
g_strchomp (buf);
|
||||||
len = strlen (buf);
|
len = strlen (buf);
|
||||||
if (!len)
|
if (!len)
|
||||||
continue;
|
continue;
|
||||||
buf[len] = 0;
|
|
||||||
buf[len-1] = 0; /* remove the trailing \n */
|
|
||||||
if (net)
|
if (net)
|
||||||
{
|
{
|
||||||
switch (buf[0])
|
switch (buf[0])
|
||||||
|
|||||||
@@ -88,7 +88,7 @@ Name: "langs\lua"; Description: "Lua"; Types: normal custom; Flags: disablenouni
|
|||||||
|
|
||||||
; These are kept for consistency, but hidden on ARM64 unless you later ship ARM64 installers for them.
|
; These are kept for consistency, but hidden on ARM64 unless you later ship ARM64 installers for them.
|
||||||
Name: "langs\perl"; Description: "Perl (requires Perl 5.20)"; Types: custom; Flags: disablenouninstallwarning; Check: not IsArm64
|
Name: "langs\perl"; Description: "Perl (requires Perl 5.20)"; Types: custom; Flags: disablenouninstallwarning; Check: not IsArm64
|
||||||
Name: "langs\python"; Description: "Python (requires Python 3.8)"; Types: custom; Flags: disablenouninstallwarning; Check: not IsArm64
|
Name: "langs\python"; Description: "Python (requires Python 3.14.2)"; Types: custom; Flags: disablenouninstallwarning; Check: not IsArm64
|
||||||
|
|
||||||
[Tasks]
|
[Tasks]
|
||||||
Name: portable; Description: "Yes"; GroupDescription: "Portable Mode: Stores configuration files within install directory for portable drives."; Flags: unchecked
|
Name: portable; Description: "Yes"; GroupDescription: "Portable Mode: Stores configuration files within install directory for portable drives."; Flags: unchecked
|
||||||
|
|||||||
@@ -75,7 +75,7 @@ Name: "plugins\winamp"; Description: "Winamp"; Types: custom; Flags: disablenoun
|
|||||||
Name: "langs"; Description: "Language Interfaces"; Types: custom; Flags: disablenouninstallwarning
|
Name: "langs"; Description: "Language Interfaces"; Types: custom; Flags: disablenouninstallwarning
|
||||||
Name: "langs\lua"; Description: "Lua"; Types: normal custom; Flags: disablenouninstallwarning
|
Name: "langs\lua"; Description: "Lua"; Types: normal custom; Flags: disablenouninstallwarning
|
||||||
Name: "langs\perl"; Description: "Perl (requires Perl 5.20)"; Types: custom; Flags: disablenouninstallwarning
|
Name: "langs\perl"; Description: "Perl (requires Perl 5.20)"; Types: custom; Flags: disablenouninstallwarning
|
||||||
Name: "langs\python"; Description: "Python (requires Python 3.8)"; Types: custom; Flags: disablenouninstallwarning
|
Name: "langs\python"; Description: "Python (requires Python 3.14.2)"; Types: custom; Flags: disablenouninstallwarning
|
||||||
|
|
||||||
[Tasks]
|
[Tasks]
|
||||||
Name: portable; Description: "Yes"; GroupDescription: "Portable Mode: Stores configuration files within install directory for portable drives."; Flags: unchecked
|
Name: portable; Description: "Yes"; GroupDescription: "Portable Mode: Stores configuration files within install directory for portable drives."; Flags: unchecked
|
||||||
@@ -298,12 +298,12 @@ begin
|
|||||||
REDIST := 'https://github.com/zoitechat/gvsbuild/releases/download/zoitechat-2.16.2/vcredist_2015_x64.exe';
|
REDIST := 'https://github.com/zoitechat/gvsbuild/releases/download/zoitechat-2.16.2/vcredist_2015_x64.exe';
|
||||||
REDIST_2013 := 'https://github.com/zoitechat/gvsbuild/releases/download/zoitechat-2.16.2/vcredist_2013_x64.exe';
|
REDIST_2013 := 'https://github.com/zoitechat/gvsbuild/releases/download/zoitechat-2.16.2/vcredist_2013_x64.exe';
|
||||||
PERL := 'https://github.com/zoitechat/gvsbuild/releases/download/zoitechat-2.16.2/Perl.5.20.0.x64.msi';
|
PERL := 'https://github.com/zoitechat/gvsbuild/releases/download/zoitechat-2.16.2/Perl.5.20.0.x64.msi';
|
||||||
PY3 := 'https://www.python.org/ftp/python/3.8.10/python-3.8.10-amd64.exe';
|
PY3 := 'https://www.python.org/ftp/python/3.14.2/python-3.14.2-amd64.exe';
|
||||||
#else
|
#else
|
||||||
REDIST := 'https://github.com/zoitechat/gvsbuild/releases/download/zoitechat-2.16.2/vcredist_2015_x86.exe';
|
REDIST := 'https://github.com/zoitechat/gvsbuild/releases/download/zoitechat-2.16.2/vcredist_2015_x86.exe';
|
||||||
REDIST_2013 := 'https://github.com/zoitechat/gvsbuild/releases/download/zoitechat-2.16.2/vcredist_2013_x86.exe';
|
REDIST_2013 := 'https://github.com/zoitechat/gvsbuild/releases/download/zoitechat-2.16.2/vcredist_2013_x86.exe';
|
||||||
PERL := 'https://github.com/zoitechat/gvsbuild/releases/download/zoitechat-2.16.2/Perl.5.20.0.x86.msi';
|
PERL := 'https://github.com/zoitechat/gvsbuild/releases/download/zoitechat-2.16.2/Perl.5.20.0.x86.msi';
|
||||||
PY3 := 'https://www.python.org/ftp/python/3.8.10/python-3.8.10.exe';
|
PY3 := 'https://www.python.org/ftp/python/3.14.2/python-3.14.2.exe';
|
||||||
#endif
|
#endif
|
||||||
DOTNET := 'https://github.com/zoitechat/gvsbuild/releases/download/zoitechat-2.16.2/dotnet_40.exe';
|
DOTNET := 'https://github.com/zoitechat/gvsbuild/releases/download/zoitechat-2.16.2/dotnet_40.exe';
|
||||||
SPELL := 'https://github.com/zoitechat/gvsbuild/releases/download/zoitechat-2.16.2/ZoiteChat.Spelling.Dictionaries.r2.exe';
|
SPELL := 'https://github.com/zoitechat/gvsbuild/releases/download/zoitechat-2.16.2/ZoiteChat.Spelling.Dictionaries.r2.exe';
|
||||||
@@ -327,7 +327,7 @@ begin
|
|||||||
idpAddFile(PERL, ExpandConstant('{tmp}\perl.msi'))
|
idpAddFile(PERL, ExpandConstant('{tmp}\perl.msi'))
|
||||||
end;
|
end;
|
||||||
|
|
||||||
if IsComponentSelected('langs\python\python3') and not CheckDLL('python38.dll') then
|
if IsComponentSelected('langs\python\python3') and not CheckDLL('python314.dll') then
|
||||||
idpAddFile(PY3, ExpandConstant('{tmp}\python.exe'));
|
idpAddFile(PY3, ExpandConstant('{tmp}\python.exe'));
|
||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
|
|||||||
@@ -7,7 +7,7 @@
|
|||||||
<YourDepsPath>c:\gtk-build\gtk</YourDepsPath>
|
<YourDepsPath>c:\gtk-build\gtk</YourDepsPath>
|
||||||
<YourGendefPath>c:\gtk-build\gendef</YourGendefPath>
|
<YourGendefPath>c:\gtk-build\gendef</YourGendefPath>
|
||||||
<YourPerlPath>c:\gtk-build\perl-5.20</YourPerlPath>
|
<YourPerlPath>c:\gtk-build\perl-5.20</YourPerlPath>
|
||||||
<YourPython3Path>c:\gtk-build\python-3.8</YourPython3Path>
|
<YourPython3Path>c:\gtk-build\python-3.14</YourPython3Path>
|
||||||
<YourWinSparklePath>c:\gtk-build\WinSparkle</YourWinSparklePath>
|
<YourWinSparklePath>c:\gtk-build\WinSparkle</YourWinSparklePath>
|
||||||
|
|
||||||
<!-- YOU SHOULDN'T TOUCH ANYTHING BELOW -->
|
<!-- YOU SHOULDN'T TOUCH ANYTHING BELOW -->
|
||||||
@@ -22,7 +22,7 @@
|
|||||||
<PerlPath>$(YourPerlPath)\$(PlatformName)</PerlPath>
|
<PerlPath>$(YourPerlPath)\$(PlatformName)</PerlPath>
|
||||||
<PerlLib>perl520</PerlLib>
|
<PerlLib>perl520</PerlLib>
|
||||||
<Python3Path>$(YourPython3Path)\$(PlatformName)</Python3Path>
|
<Python3Path>$(YourPython3Path)\$(PlatformName)</Python3Path>
|
||||||
<Python3Lib>python38</Python3Lib>
|
<Python3Lib>python314</Python3Lib>
|
||||||
<Python3Output>hcpython3</Python3Output>
|
<Python3Output>hcpython3</Python3Output>
|
||||||
<LuaInclude>$(DepsRoot)\include\luajit-2.1</LuaInclude>
|
<LuaInclude>$(DepsRoot)\include\luajit-2.1</LuaInclude>
|
||||||
<LuaOutput>hclua</LuaOutput>
|
<LuaOutput>hclua</LuaOutput>
|
||||||
|
|||||||
Reference in New Issue
Block a user