mirror of
https://github.com/ZoiteChat/zoitechat.git
synced 2026-07-17 00:49:25 +00:00
Compare commits
30 Commits
91e9bf0207
...
fix-issue-
| Author | SHA1 | Date | |
|---|---|---|---|
| c752b06374 | |||
| e0b159c069 | |||
|
|
cfb19820fa | ||
|
|
e05ca13608 | ||
|
|
15cf96c01f | ||
| 2caec91a0f | |||
| 9465a1e0a8 | |||
| 251272c708 | |||
| f068a0e0fa | |||
| d0034cd112 | |||
| ae6d5ebeef | |||
|
|
8466e70424 | ||
| c3d8f27f48 | |||
| b85229f1a1 | |||
|
|
d03298a048 | ||
|
|
798e0b487e | ||
| 49444d72b4 | |||
|
|
c0e0fe4dcb | ||
|
|
9a189848ea | ||
| 96b09bfc1d | |||
| 9a6c913d89 | |||
| 42010594be | |||
| 5469c30b75 | |||
| fe9a2ee202 | |||
|
|
5e27dc7e9f | ||
|
|
69d083e3c0 | ||
| 2b95f9724e | |||
| 4066a07892 | |||
|
|
443ab58f65 | ||
| e0116acbe4 |
57
.github/ISSUE_TEMPLATE/feature_request.md
vendored
Normal file
57
.github/ISSUE_TEMPLATE/feature_request.md
vendored
Normal file
@@ -0,0 +1,57 @@
|
||||
---
|
||||
name: Feature request
|
||||
about: Suggest an improvement for ZoiteChat
|
||||
title: "[Feature]: "
|
||||
labels: enhancement
|
||||
assignees: ""
|
||||
---
|
||||
|
||||
## Summary
|
||||
|
||||
```text
|
||||
Describe the feature or enhancement clearly and briefly.
|
||||
```
|
||||
|
||||
## Problem
|
||||
|
||||
```text
|
||||
What problem would this solve?
|
||||
```
|
||||
|
||||
## Proposed Solution
|
||||
|
||||
```text
|
||||
How should ZoiteChat behave?
|
||||
```
|
||||
|
||||
## Alternatives Considered
|
||||
|
||||
```text
|
||||
Other approaches or workarounds you considered.
|
||||
```
|
||||
|
||||
## Use Case
|
||||
|
||||
```text
|
||||
Who benefits from this, and when would they use it?
|
||||
```
|
||||
|
||||
## Platform Details
|
||||
|
||||
```text
|
||||
OS:
|
||||
ZoiteChat version:
|
||||
Build/source: GitHub release / Fedora package / source build / Windows installer / other
|
||||
```
|
||||
|
||||
## Checklist
|
||||
|
||||
* [ ] I searched existing issues first.
|
||||
* [ ] I checked whether this already exists in the latest ZoiteChat version available to me.
|
||||
* [ ] I explained the problem this would solve.
|
||||
|
||||
## Extra Notes
|
||||
|
||||
```text
|
||||
Anything else that might help.
|
||||
```
|
||||
79
.github/workflows/manjaro-package-build.yml
vendored
79
.github/workflows/manjaro-package-build.yml
vendored
@@ -1,79 +0,0 @@
|
||||
name: Manjaro Package Build
|
||||
|
||||
on:
|
||||
push:
|
||||
branches: [master, main]
|
||||
pull_request:
|
||||
branches: [master, main]
|
||||
workflow_dispatch:
|
||||
|
||||
permissions:
|
||||
contents: read
|
||||
|
||||
jobs:
|
||||
manjaro-package:
|
||||
runs-on: ubuntu-latest
|
||||
container:
|
||||
image: manjarolinux/base:latest
|
||||
|
||||
steps:
|
||||
- name: Install packaging toolchain
|
||||
run: |
|
||||
set -euxo pipefail
|
||||
pacman -Syu --noconfirm
|
||||
pacman -S --noconfirm --needed \
|
||||
base-devel \
|
||||
git \
|
||||
namcap \
|
||||
meson \
|
||||
ninja \
|
||||
pkgconf \
|
||||
glib2 \
|
||||
glib2-devel \
|
||||
gtk3 \
|
||||
openssl \
|
||||
libcanberra \
|
||||
libayatana-appindicator \
|
||||
iso-codes \
|
||||
lua \
|
||||
perl \
|
||||
python \
|
||||
python-cffi \
|
||||
pciutils
|
||||
|
||||
- name: Checkout repository
|
||||
uses: actions/checkout@v5
|
||||
with:
|
||||
fetch-depth: 0
|
||||
submodules: true
|
||||
|
||||
- name: Build package and generate .SRCINFO (non-root)
|
||||
run: |
|
||||
set -euxo pipefail
|
||||
id -u builder >/dev/null 2>&1 || useradd -m builder
|
||||
chown -R builder:builder "$GITHUB_WORKSPACE"
|
||||
su builder -c "cd '$GITHUB_WORKSPACE/packaging/manjaro' && makepkg --noconfirm --syncdeps --cleanbuild"
|
||||
su builder -c "cd '$GITHUB_WORKSPACE/packaging/manjaro' && makepkg --printsrcinfo > .SRCINFO"
|
||||
|
||||
- name: Lint PKGBUILD and package with namcap
|
||||
run: |
|
||||
set -euxo pipefail
|
||||
cd "$GITHUB_WORKSPACE/packaging/manjaro"
|
||||
namcap PKGBUILD
|
||||
pkg_file="$(find . -maxdepth 1 -type f -name '*.pkg.tar.*' | head -n1)"
|
||||
namcap "$pkg_file"
|
||||
|
||||
- name: Collect artifacts
|
||||
run: |
|
||||
set -euxo pipefail
|
||||
mkdir -p artifacts
|
||||
cp -v "$GITHUB_WORKSPACE"/packaging/manjaro/*.pkg.tar.* artifacts/
|
||||
cp -v "$GITHUB_WORKSPACE"/packaging/manjaro/PKGBUILD artifacts/
|
||||
cp -v "$GITHUB_WORKSPACE"/packaging/manjaro/.SRCINFO artifacts/
|
||||
|
||||
- name: Upload package artifacts
|
||||
uses: actions/upload-artifact@v6
|
||||
with:
|
||||
name: zoitechat-manjaro-package
|
||||
path: artifacts/*
|
||||
if-no-files-found: error
|
||||
41
.github/workflows/windows-build.yml
vendored
41
.github/workflows/windows-build.yml
vendored
@@ -113,6 +113,26 @@ jobs:
|
||||
New-Item -Path $pyDir -Name "${{ matrix.platform }}" -ItemType Junction -Value $pyRoot | Out-Null
|
||||
}
|
||||
|
||||
- uses: actions/setup-python@v6
|
||||
with:
|
||||
python-version: '3.8.10'
|
||||
architecture: ${{ matrix.arch }}
|
||||
|
||||
- name: Prepare Python 3.8
|
||||
run: |
|
||||
python -m pip install --upgrade pip
|
||||
python -m pip install cffi
|
||||
|
||||
$pyRoot = $env:pythonLocation
|
||||
if (-not $pyRoot) { $pyRoot = & python -c "import sys; print(sys.prefix)" }
|
||||
|
||||
foreach ($pyDir in @("C:\gtk-build\python-3.8.10", "C:\gtk-build\python-3.8")) {
|
||||
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
|
||||
}
|
||||
|
||||
- name: Build
|
||||
run: |
|
||||
call "C:\Program Files\Microsoft Visual Studio\2022\Enterprise\Common7\Tools\VsDevCmd.bat"
|
||||
@@ -124,12 +144,33 @@ jobs:
|
||||
exit /b 1
|
||||
)
|
||||
|
||||
set "PYTHON38_DIR=C:\gtk-build\python-3.8\${{ matrix.platform }}"
|
||||
if not exist "%PYTHON38_DIR%\libs\python38.lib" (
|
||||
echo Missing %PYTHON38_DIR%\libs\python38.lib
|
||||
dir "%PYTHON38_DIR%\libs"
|
||||
exit /b 1
|
||||
)
|
||||
if not exist "%PYTHON38_DIR%\Lib\site-packages\_cffi_backend.cp38*.pyd" (
|
||||
echo Missing %PYTHON38_DIR%\Lib\site-packages\_cffi_backend.cp38*.pyd
|
||||
exit /b 1
|
||||
)
|
||||
|
||||
set "LIB=%PYTHON_DIR%\libs;%LIB%"
|
||||
set "INCLUDE=%PYTHON_DIR%\include;%INCLUDE%"
|
||||
|
||||
powershell -NoProfile -ExecutionPolicy Bypass -Command "$archiveLib='C:\gtk-build\gtk\x64\release\lib\libarchive.lib'; if (-not (Test-Path $archiveLib)) { $archiveDll = Get-ChildItem 'C:\gtk-build\gtk\x64\release\bin\libarchive*.dll' | Select-Object -First 1; if ($archiveDll) { Push-Location 'C:\gtk-build\gtk\x64\release\lib'; & 'C:\gtk-build\gendef\gendef.exe' $archiveDll.FullName | Out-Null; $archiveDef = Get-ChildItem 'libarchive*.def' | Select-Object -First 1; if ($archiveDef) { & lib /def:$archiveDef.Name /machine:${{ matrix.platform }} /out:libarchive.lib | Out-Null }; Pop-Location } }"
|
||||
|
||||
msbuild win32\zoitechat.sln /m /verbosity:minimal /p:Configuration=Release /p:Platform=${{ matrix.platform }}
|
||||
if errorlevel 1 exit /b 1
|
||||
|
||||
if not exist "..\zoitechat-build\${{ matrix.platform }}\rel\plugins\hcpython38.dll" (
|
||||
echo hcpython38.dll was not built
|
||||
exit /b 1
|
||||
)
|
||||
if not exist "..\zoitechat-build\${{ matrix.platform }}\rel\_cffi_backend.cp38*.pyd" (
|
||||
echo _cffi_backend for Python 3.8 was not staged for the installer
|
||||
exit /b 1
|
||||
)
|
||||
shell: cmd
|
||||
|
||||
- name: Preparing Artifacts
|
||||
|
||||
46
COPYING
46
COPYING
@@ -1,12 +1,12 @@
|
||||
GNU GENERAL PUBLIC LICENSE
|
||||
Version 2, June 1991
|
||||
GNU GENERAL PUBLIC LICENSE
|
||||
Version 2, June 1991
|
||||
|
||||
Copyright (C) 1989, 1991 Free Software Foundation, Inc.
|
||||
51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
|
||||
Copyright (C) 1989, 1991 Free Software Foundation, Inc.,
|
||||
<https://fsf.org/>
|
||||
Everyone is permitted to copy and distribute verbatim copies
|
||||
of this license document, but changing it is not allowed.
|
||||
|
||||
Preamble
|
||||
Preamble
|
||||
|
||||
The licenses for most software are designed to take away your
|
||||
freedom to share and change it. By contrast, the GNU General Public
|
||||
@@ -15,7 +15,7 @@ software--to make sure the software is free for all its users. This
|
||||
General Public License applies to most of the Free Software
|
||||
Foundation's software and to any other program whose authors commit to
|
||||
using it. (Some other Free Software Foundation software is covered by
|
||||
the GNU Library General Public License instead.) You can apply it to
|
||||
the GNU Lesser General Public License instead.) You can apply it to
|
||||
your programs, too.
|
||||
|
||||
When we speak of free software, we are referring to freedom, not
|
||||
@@ -55,8 +55,8 @@ patent must be licensed for everyone's free use or not licensed at all.
|
||||
|
||||
The precise terms and conditions for copying, distribution and
|
||||
modification follow.
|
||||
|
||||
GNU GENERAL PUBLIC LICENSE
|
||||
|
||||
GNU GENERAL PUBLIC LICENSE
|
||||
TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
|
||||
|
||||
0. This License applies to any program or other work which contains
|
||||
@@ -110,7 +110,7 @@ above, provided that you also meet all of these conditions:
|
||||
License. (Exception: if the Program itself is interactive but
|
||||
does not normally print such an announcement, your work based on
|
||||
the Program is not required to print an announcement.)
|
||||
|
||||
|
||||
These requirements apply to the modified work as a whole. If
|
||||
identifiable sections of that work are not derived from the Program,
|
||||
and can be reasonably considered independent and separate works in
|
||||
@@ -168,7 +168,7 @@ access to copy from a designated place, then offering equivalent
|
||||
access to copy the source code from the same place counts as
|
||||
distribution of the source code, even though third parties are not
|
||||
compelled to copy the source along with the object code.
|
||||
|
||||
|
||||
4. You may not copy, modify, sublicense, or distribute the Program
|
||||
except as expressly provided under this License. Any attempt
|
||||
otherwise to copy, modify, sublicense or distribute the Program is
|
||||
@@ -225,7 +225,7 @@ impose that choice.
|
||||
|
||||
This section is intended to make thoroughly clear what is believed to
|
||||
be a consequence of the rest of this License.
|
||||
|
||||
|
||||
8. If the distribution and/or use of the Program is restricted in
|
||||
certain countries either by patents or by copyrighted interfaces, the
|
||||
original copyright holder who places the Program under this License
|
||||
@@ -255,7 +255,7 @@ make exceptions for this. Our decision will be guided by the two goals
|
||||
of preserving the free status of all derivatives of our free software and
|
||||
of promoting the sharing and reuse of software generally.
|
||||
|
||||
NO WARRANTY
|
||||
NO WARRANTY
|
||||
|
||||
11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
|
||||
FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN
|
||||
@@ -277,9 +277,9 @@ YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER
|
||||
PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
|
||||
POSSIBILITY OF SUCH DAMAGES.
|
||||
|
||||
END OF TERMS AND CONDITIONS
|
||||
|
||||
How to Apply These Terms to Your New Programs
|
||||
END OF TERMS AND CONDITIONS
|
||||
|
||||
How to Apply These Terms to Your New Programs
|
||||
|
||||
If you develop a new program, and you want it to be of the greatest
|
||||
possible use to the public, the best way to achieve this is to make it
|
||||
@@ -291,7 +291,7 @@ convey the exclusion of warranty; and each file should have at least
|
||||
the "copyright" line and a pointer to where the full notice is found.
|
||||
|
||||
<one line to give the program's name and a brief idea of what it does.>
|
||||
Copyright (C) 19yy <name of author>
|
||||
Copyright (C) <year> <name of author>
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
@@ -303,17 +303,15 @@ the "copyright" line and a pointer to where the full notice is found.
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program; if not, write to the Free Software
|
||||
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
|
||||
You should have received a copy of the GNU General Public License along
|
||||
with this program; if not, see <https://www.gnu.org/licenses/>.
|
||||
|
||||
Also add information on how to contact you by electronic and paper mail.
|
||||
|
||||
If the program is interactive, make it output a short notice like this
|
||||
when it starts in an interactive mode:
|
||||
|
||||
Gnomovision version 69, Copyright (C) 19yy name of author
|
||||
Gnomovision version 69, Copyright (C) year name of author
|
||||
Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
|
||||
This is free software, and you are welcome to redistribute it
|
||||
under certain conditions; type `show c' for details.
|
||||
@@ -330,11 +328,11 @@ necessary. Here is a sample; alter the names:
|
||||
Yoyodyne, Inc., hereby disclaims all copyright interest in the program
|
||||
`Gnomovision' (which makes passes at compilers) written by James Hacker.
|
||||
|
||||
<signature of Ty Coon>, 1 April 1989
|
||||
Ty Coon, President of Vice
|
||||
<signature of Moe Ghoul>, 1 April 1989
|
||||
Moe Ghoul, President of Vice
|
||||
|
||||
This General Public License does not permit incorporating your program into
|
||||
proprietary programs. If your program is a subroutine library, you may
|
||||
consider it more useful to permit linking proprietary applications with the
|
||||
library. If this is what you want to do, use the GNU Library General
|
||||
library. If this is what you want to do, use the GNU Lesser General
|
||||
Public License instead of this License.
|
||||
|
||||
@@ -1,6 +1,17 @@
|
||||
ZoiteChat ChangeLog
|
||||
=================
|
||||
|
||||
2.18.3 (2026-06-29)
|
||||
-------------------
|
||||
|
||||
- Added IRCv3 support for message tags, echo-message, typing notifications, and replies.
|
||||
- Restored the accept-invalid-cert TLS bypass behavior.
|
||||
- Replaced legacy IPv4 APIs and added support for OpenSSL 4 APIs.
|
||||
- Snapshot Python hooks during plugin unload for safer plugin shutdown.
|
||||
- Fixed Windows GtkStatusIcon tray menu popup behavior.
|
||||
- Fixed self-echoed private messages routing to the target tab.
|
||||
- Fixed the lag ping timeout window.
|
||||
|
||||
2.18.2 (2026-06-20)
|
||||
-------------------
|
||||
|
||||
|
||||
@@ -29,6 +29,19 @@
|
||||
<id>zoitechat.desktop</id>
|
||||
</provides>
|
||||
<releases>
|
||||
<release date="2026-06-29" version="2.18.3">
|
||||
<description>
|
||||
<ul>
|
||||
<li>Added IRCv3 support for message tags, echo-message, typing notifications, and replies.</li>
|
||||
<li>Restored the accept-invalid-cert TLS bypass behavior.</li>
|
||||
<li>Replaced legacy IPv4 APIs and added support for OpenSSL 4 APIs.</li>
|
||||
<li>Snapshot Python hooks during plugin unload for safer plugin shutdown.</li>
|
||||
<li>Fixed Windows GtkStatusIcon tray menu popup behavior.</li>
|
||||
<li>Fixed self-echoed private messages routing to the target tab.</li>
|
||||
<li>Fixed the lag ping timeout window.</li>
|
||||
</ul>
|
||||
</description>
|
||||
</release>
|
||||
<release date="2026-06-20" version="2.18.2">
|
||||
<description>
|
||||
<p>Security and connections:</p>
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
project('zoitechat', 'c',
|
||||
version: '2.18.2',
|
||||
version: '2.18.3',
|
||||
meson_version: '>= 0.55.0',
|
||||
default_options: [
|
||||
'c_std=c17',
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
Name: zoitechat
|
||||
Version: 2.18.2
|
||||
Version: 2.18.3
|
||||
Release: %autorelease
|
||||
Summary: HexChat-based IRC client
|
||||
License: GPL-2.0-or-later WITH cryptsetup-OpenSSL-exception
|
||||
|
||||
@@ -1,69 +0,0 @@
|
||||
# Maintainer: ZoiteChat Maintainers <zoitechat@users.noreply.github.com>
|
||||
|
||||
pkgname=zoitechat-git
|
||||
pkgver=0
|
||||
pkgrel=1
|
||||
pkgdesc='IRC client for GNOME (ZoiteChat development snapshot)'
|
||||
arch=('x86_64')
|
||||
url='https://github.com/zoitechat/zoitechat'
|
||||
license=('GPL-2.0-or-later')
|
||||
depends=(
|
||||
'glib2'
|
||||
'gtk3'
|
||||
'iso-codes'
|
||||
'libayatana-appindicator'
|
||||
'libcanberra'
|
||||
'lua'
|
||||
'openssl'
|
||||
'perl'
|
||||
'python-cffi'
|
||||
)
|
||||
makedepends=(
|
||||
'git'
|
||||
'meson'
|
||||
'ninja'
|
||||
'pkgconf'
|
||||
'python'
|
||||
)
|
||||
optdepends=(
|
||||
'pciutils: sysinfo plugin hardware detection details'
|
||||
)
|
||||
provides=('zoitechat')
|
||||
conflicts=('zoitechat')
|
||||
|
||||
_repo_root="$(cd "$(dirname "${BASH_SOURCE[0]}")/../.." && pwd)"
|
||||
source=("zoitechat::git+file://${_repo_root}")
|
||||
sha256sums=('SKIP')
|
||||
|
||||
pkgver() {
|
||||
cd "$srcdir/zoitechat"
|
||||
|
||||
if git describe --long --tags --abbrev=7 >/dev/null 2>&1; then
|
||||
git describe --long --tags --abbrev=7 \
|
||||
| sed 's/^v//' \
|
||||
| sed -E 's/([^-]+)-([0-9]+)-g/\1.r\2.g/' \
|
||||
| sed 's/-/./g'
|
||||
else
|
||||
printf '0.r%s.%s\n' \
|
||||
"$(git rev-list --count HEAD)" \
|
||||
"$(git rev-parse --short=7 HEAD)"
|
||||
fi
|
||||
}
|
||||
|
||||
build() {
|
||||
arch-meson zoitechat build \
|
||||
-Dtext-frontend=false \
|
||||
-Dwith-checksum=true \
|
||||
-Dwith-fishlim=true \
|
||||
-Dwith-lua=lua \
|
||||
-Dwith-perl=perl \
|
||||
-Dwith-python=python3 \
|
||||
-Dwith-sysinfo=true \
|
||||
-Dinstall-plugin-metainfo=true
|
||||
|
||||
meson compile -C build
|
||||
}
|
||||
|
||||
package() {
|
||||
meson install -C build --destdir "$pkgdir"
|
||||
}
|
||||
@@ -53,6 +53,16 @@ builder.set_source('_zoitechat_embedded', '''
|
||||
#include "config.h"
|
||||
#include "zoitechat-plugin.h"
|
||||
|
||||
#ifdef _WIN32
|
||||
#ifndef WIN32_LEAN_AND_MEAN
|
||||
#define WIN32_LEAN_AND_MEAN
|
||||
#endif
|
||||
#ifndef NOMINMAX
|
||||
#define NOMINMAX
|
||||
#endif
|
||||
#include <windows.h>
|
||||
#endif
|
||||
|
||||
static zoitechat_plugin *ph;
|
||||
CFFI_DLLEXPORT int _on_plugin_init(char **, char **, char **, char *, char *);
|
||||
CFFI_DLLEXPORT int _on_plugin_deinit(void);
|
||||
@@ -61,6 +71,20 @@ int zoitechat_plugin_init(zoitechat_plugin *plugin_handle,
|
||||
char **name_out, char **description_out,
|
||||
char **version_out, char *arg)
|
||||
{
|
||||
#ifdef _WIN32
|
||||
/* CPython cannot be removed from a process once Py_Initialize has run.
|
||||
If the embedded interpreter fails to start (e.g. _cffi_backend is
|
||||
missing), the host responds to our 0 return by g_module_close()ing
|
||||
this plugin, which would also drop the last reference to pythonXY.dll
|
||||
and unload it mid-flight; the leftover process-global state then
|
||||
crashes the process later, e.g. when a server connection spawns the
|
||||
next thread. Pin this module so FreeLibrary can never unload it. */
|
||||
HMODULE self_handle;
|
||||
GetModuleHandleExW (GET_MODULE_HANDLE_EX_FLAG_PIN |
|
||||
GET_MODULE_HANDLE_EX_FLAG_FROM_ADDRESS,
|
||||
(LPCWSTR)&zoitechat_plugin_init, &self_handle);
|
||||
#endif
|
||||
|
||||
if (ph != NULL)
|
||||
{
|
||||
puts ("Python plugin already loaded\\n");
|
||||
|
||||
@@ -19,7 +19,7 @@ else:
|
||||
if not hasattr(sys, 'argv'):
|
||||
sys.argv = ['<zoitechat>']
|
||||
|
||||
VERSION = b'2.18.2'
|
||||
VERSION = b'2.18.3'
|
||||
PLUGIN_NAME = ffi.new('char[]', b'Python')
|
||||
PLUGIN_DESC = ffi.new('char[]', b'Python %d.%d scripting interface' % (sys.version_info[0], sys.version_info[1]))
|
||||
PLUGIN_VERSION = ffi.new('char[]', VERSION)
|
||||
@@ -173,7 +173,7 @@ class Plugin:
|
||||
|
||||
def __del__(self):
|
||||
log('unloading', self.filename)
|
||||
for hook in self.hooks:
|
||||
for hook in list(self.hooks):
|
||||
if hook.is_unload is True:
|
||||
try:
|
||||
hook.callback(hook.userdata)
|
||||
|
||||
64
plugins/python/python38.vcxproj
Normal file
64
plugins/python/python38.vcxproj
Normal file
@@ -0,0 +1,64 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project DefaultTargets="Build" ToolsVersion="12.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<PropertyGroup Label="Configuration">
|
||||
<PlatformToolset>v142</PlatformToolset>
|
||||
<ConfigurationType>DynamicLibrary</ConfigurationType>
|
||||
</PropertyGroup>
|
||||
<ItemGroup Label="ProjectConfigurations">
|
||||
<ProjectConfiguration Include="Release|Win32">
|
||||
<Configuration>Release</Configuration>
|
||||
<Platform>Win32</Platform>
|
||||
</ProjectConfiguration>
|
||||
<ProjectConfiguration Include="Release|x64">
|
||||
<Configuration>Release</Configuration>
|
||||
<Platform>x64</Platform>
|
||||
</ProjectConfiguration>
|
||||
</ItemGroup>
|
||||
<PropertyGroup Label="Globals">
|
||||
<ProjectGuid>{D58924D2-1492-4AC3-B058-7A214424EEDC}</ProjectGuid>
|
||||
<Keyword>Win32Proj</Keyword>
|
||||
<RootNamespace>python38</RootNamespace>
|
||||
</PropertyGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
|
||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||
<Import Project="..\..\win32\zoitechat.props" />
|
||||
<PropertyGroup>
|
||||
<TargetName>$(Python38Output)</TargetName>
|
||||
<OutDir>$(ZoiteChatRel)plugins\</OutDir>
|
||||
</PropertyGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
|
||||
<ClCompile>
|
||||
<PreprocessorDefinitions>WIN32;_WIN64;_AMD64_;NDEBUG;_WINDOWS;_USRDLL;PYTHON_EXPORTS;Py_NO_LINK_LIB;$(OwnFlags);%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<UndefinePreprocessorDefinitions>_DEBUG;Py_DEBUG;Py_REF_DEBUG;Py_TRACE_REFS;%(UndefinePreprocessorDefinitions)</UndefinePreprocessorDefinitions>
|
||||
<AdditionalOptions>/U_DEBUG /UPy_DEBUG /UPy_REF_DEBUG /UPy_TRACE_REFS %(AdditionalOptions)</AdditionalOptions>
|
||||
<RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
|
||||
<AdditionalIncludeDirectories>$(Glib);$(Python38Path)\include;..\..\src\common;$(ZoiteChatLib);%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<ModuleDefinitionFile>python.def</ModuleDefinitionFile>
|
||||
<AdditionalDependencies>"$(Python38Lib).lib";$(DepLibs);%(AdditionalDependencies)</AdditionalDependencies>
|
||||
<AdditionalLibraryDirectories>$(DepsRoot)\lib;$(Python38Path)\libs;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
|
||||
</Link>
|
||||
<PreBuildEvent>
|
||||
<Command>"$(Python38Path)\python.exe" generate_plugin.py ..\..\src\common\zoitechat-plugin.h python.py "$(IntDir)python.c"</Command>
|
||||
</PreBuildEvent>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemGroup>
|
||||
<None Include="generate_plugin.py" />
|
||||
<None Include="zoitechat.py" />
|
||||
<None Include="python.def" />
|
||||
<None Include="python.py" />
|
||||
<None Include="xchat.py" />
|
||||
<None Include="hexchat.py" />
|
||||
<None Include="_zoitechat.py" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClCompile Include="$(IntDir)python.c" />
|
||||
</ItemGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
|
||||
</Project>
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -1815,14 +1815,14 @@ inbound_login_end (session *sess, char *text, const message_tags_data *tags_data
|
||||
return;
|
||||
|
||||
/* send nickserv password */
|
||||
if (net && net->pass && inbound_nickserv_login (serv))
|
||||
if (net && serv->password[0] && inbound_nickserv_login (serv))
|
||||
{
|
||||
serv->p_ns_identify (serv, net->pass);
|
||||
serv->p_ns_identify (serv, serv->password);
|
||||
}
|
||||
|
||||
/* wait for join if command or nickserv set */
|
||||
if (net && prefs.hex_irc_join_delay
|
||||
&& ((net->pass && inbound_nickserv_login (serv))
|
||||
&& ((serv->password[0] && inbound_nickserv_login (serv))
|
||||
|| net->commandlist))
|
||||
{
|
||||
serv->joindelay_tag = fe_timeout_add_seconds (prefs.hex_irc_join_delay, check_autojoin_channels, serv);
|
||||
|
||||
@@ -4868,9 +4868,9 @@ command_insert_vars (session *sess, char *cmd)
|
||||
break;
|
||||
|
||||
case 'p':
|
||||
if (mynet->pass)
|
||||
if (sess->server->password[0])
|
||||
{
|
||||
g_string_append (expanded, mynet->pass);
|
||||
g_string_append (expanded, sess->server->password);
|
||||
}
|
||||
cmd++;
|
||||
break;
|
||||
|
||||
@@ -25,6 +25,7 @@
|
||||
|
||||
#ifdef WIN32
|
||||
#include <io.h>
|
||||
#include <windows.h>
|
||||
#else
|
||||
#include <unistd.h>
|
||||
#endif
|
||||
@@ -56,6 +57,36 @@ typedef struct session zoitechat_context;
|
||||
#endif
|
||||
|
||||
#define DEBUG(x) {x;}
|
||||
#ifdef WIN32
|
||||
|
||||
/* Python >= 3.9 dropped support for Windows versions before 10, so those
|
||||
* systems get a Python 3.8 build of the plugin instead. RtlGetVersion is
|
||||
* used because GetVersionEx reports a version capped by the compatibility
|
||||
* manifest rather than the real one. */
|
||||
static gboolean
|
||||
plugin_windows_needs_python38 (void)
|
||||
{
|
||||
typedef LONG (WINAPI *rtl_get_version_func) (PRTL_OSVERSIONINFOW);
|
||||
rtl_get_version_func rtl_get_version;
|
||||
RTL_OSVERSIONINFOW version;
|
||||
HMODULE ntdll;
|
||||
|
||||
ntdll = GetModuleHandleW (L"ntdll.dll");
|
||||
if (ntdll == NULL)
|
||||
return FALSE;
|
||||
|
||||
rtl_get_version = (rtl_get_version_func) GetProcAddress (ntdll, "RtlGetVersion");
|
||||
if (rtl_get_version == NULL)
|
||||
return FALSE;
|
||||
|
||||
memset (&version, 0, sizeof (version));
|
||||
version.dwOSVersionInfoSize = sizeof (version);
|
||||
if (rtl_get_version (&version) != 0)
|
||||
return FALSE;
|
||||
|
||||
return version.dwMajorVersion < 10;
|
||||
}
|
||||
#endif
|
||||
|
||||
/* crafted to be an even 32 bytes */
|
||||
struct _zoitechat_hook
|
||||
@@ -491,7 +522,10 @@ plugin_auto_load (session *sess)
|
||||
for_files (lib_dir, "hcfishlim.dll", plugin_auto_load_cb);
|
||||
for_files(lib_dir, "hclua.dll", plugin_auto_load_cb);
|
||||
for_files (lib_dir, "hcperl.dll", plugin_auto_load_cb);
|
||||
for_files (lib_dir, "hcpython3.dll", plugin_auto_load_cb);
|
||||
if (plugin_windows_needs_python38 ())
|
||||
for_files (lib_dir, "hcpython38.dll", plugin_auto_load_cb);
|
||||
else
|
||||
for_files (lib_dir, "hcpython3.dll", plugin_auto_load_cb);
|
||||
for_files (lib_dir, "hcupd.dll", plugin_auto_load_cb);
|
||||
for_files (lib_dir, "hcsysinfo.dll", plugin_auto_load_cb);
|
||||
#else
|
||||
|
||||
@@ -154,7 +154,7 @@ int
|
||||
_SSL_get_cert_info (struct cert_info *cert_info, SSL * ssl)
|
||||
{
|
||||
X509 *peer_cert;
|
||||
X509_PUBKEY *key;
|
||||
const X509_PUBKEY *key;
|
||||
X509_ALGOR *algor = NULL;
|
||||
EVP_PKEY *peer_pkey;
|
||||
char notBefore[64];
|
||||
@@ -350,7 +350,7 @@ _SSL_close (SSL * ssl)
|
||||
{
|
||||
SSL_set_shutdown (ssl, SSL_SENT_SHUTDOWN | SSL_RECEIVED_SHUTDOWN);
|
||||
SSL_free (ssl);
|
||||
#if OPENSSL_VERSION_NUMBER < 0x10100000L
|
||||
#if !defined(OPENSSL_VERSION_MAJOR) && OPENSSL_VERSION_NUMBER < 0x10100000L
|
||||
#ifdef HAVE_ERR_REMOVE_THREAD_STATE
|
||||
ERR_remove_thread_state (NULL);
|
||||
#else
|
||||
@@ -507,9 +507,12 @@ _SSL_check_subject_altname (X509 *cert, const char *host)
|
||||
static int
|
||||
_SSL_check_common_name (X509 *cert, const char *host)
|
||||
{
|
||||
X509_NAME *name;
|
||||
char *common_name = NULL;
|
||||
const X509_NAME *name;
|
||||
const X509_NAME_ENTRY *entry;
|
||||
const ASN1_STRING *common_name_asn1;
|
||||
const unsigned char *common_name;
|
||||
int common_name_len;
|
||||
int common_name_index;
|
||||
int rv = -1;
|
||||
GInetAddress *addr;
|
||||
|
||||
@@ -517,16 +520,27 @@ _SSL_check_common_name (X509 *cert, const char *host)
|
||||
if (name == NULL)
|
||||
return -1;
|
||||
|
||||
common_name_len = X509_NAME_get_text_by_NID (name, NID_commonName, NULL, 0);
|
||||
if (common_name_len < 0)
|
||||
common_name_index = X509_NAME_get_index_by_NID (name, NID_commonName, -1);
|
||||
if (common_name_index < 0)
|
||||
return -1;
|
||||
|
||||
common_name = g_malloc0 (common_name_len + 1);
|
||||
entry = X509_NAME_get_entry (name, common_name_index);
|
||||
if (entry == NULL)
|
||||
return -1;
|
||||
|
||||
X509_NAME_get_text_by_NID (name, NID_commonName, common_name, common_name_len + 1);
|
||||
common_name_asn1 = X509_NAME_ENTRY_get_data (entry);
|
||||
if (common_name_asn1 == NULL)
|
||||
return -1;
|
||||
|
||||
#ifdef HAVE_ASN1_STRING_GET0_DATA
|
||||
common_name = ASN1_STRING_get0_data (common_name_asn1);
|
||||
#else
|
||||
common_name = ASN1_STRING_data (common_name_asn1);
|
||||
#endif
|
||||
common_name_len = ASN1_STRING_length (common_name_asn1);
|
||||
|
||||
/* NUL bytes in CN? */
|
||||
if (common_name_len != (int)strlen(common_name))
|
||||
if (common_name_len != (int)strlen((const char *)common_name))
|
||||
{
|
||||
g_warning ("NUL byte in Common Name field, probably a malicious certificate.\n");
|
||||
rv = -2;
|
||||
@@ -539,18 +553,17 @@ _SSL_check_common_name (X509 *cert, const char *host)
|
||||
* We don't want to attempt wildcard matching against IP
|
||||
* addresses, so perform a simple comparison here.
|
||||
*/
|
||||
if (g_strcmp0 (common_name, host) == 0)
|
||||
if (g_strcmp0 ((const char *)common_name, host) == 0)
|
||||
rv = 0;
|
||||
else
|
||||
rv = -1;
|
||||
|
||||
g_object_unref (addr);
|
||||
}
|
||||
else if (_SSL_match_hostname (common_name, host) == 0)
|
||||
else if (_SSL_match_hostname ((const char *)common_name, host) == 0)
|
||||
rv = 0;
|
||||
|
||||
out:
|
||||
g_free(common_name);
|
||||
return rv;
|
||||
}
|
||||
|
||||
|
||||
@@ -1695,6 +1695,97 @@ pevent_load (char *filename)
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
static gboolean
|
||||
text_event_uses_color (const char *text, int color)
|
||||
{
|
||||
const char *p;
|
||||
|
||||
if (!text || color < 0 || color > 31)
|
||||
return FALSE;
|
||||
|
||||
for (p = text; *p; p++)
|
||||
{
|
||||
int value;
|
||||
int digits;
|
||||
|
||||
if ((unsigned char) *p == 3)
|
||||
p++;
|
||||
else if (*p == '%' && p[1] == 'C')
|
||||
p += 2;
|
||||
else
|
||||
continue;
|
||||
|
||||
if (!g_ascii_isdigit (*p))
|
||||
{
|
||||
p--;
|
||||
continue;
|
||||
}
|
||||
|
||||
value = *p - '0';
|
||||
digits = 1;
|
||||
if (g_ascii_isdigit (p[1]))
|
||||
{
|
||||
value = value * 10 + p[1] - '0';
|
||||
digits = 2;
|
||||
}
|
||||
|
||||
if (value == color)
|
||||
return TRUE;
|
||||
|
||||
p += digits - 1;
|
||||
if (*p == ',' && g_ascii_isdigit (p[1]))
|
||||
{
|
||||
p++;
|
||||
value = *p - '0';
|
||||
if (g_ascii_isdigit (p[1]))
|
||||
{
|
||||
value = value * 10 + p[1] - '0';
|
||||
p++;
|
||||
}
|
||||
if (value == color)
|
||||
return TRUE;
|
||||
}
|
||||
}
|
||||
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
char **
|
||||
text_color_event_names (int color, int *count)
|
||||
{
|
||||
GPtrArray *names;
|
||||
int found = 0;
|
||||
int i;
|
||||
|
||||
if (count)
|
||||
*count = 0;
|
||||
|
||||
names = g_ptr_array_new ();
|
||||
|
||||
for (i = 0; i < NUM_XP; i++)
|
||||
{
|
||||
const char *text = pntevts_text[i] ? pntevts_text[i] : te[i].def;
|
||||
|
||||
if (!text_event_uses_color (text, color))
|
||||
continue;
|
||||
|
||||
g_ptr_array_add (names, g_strdup (_(te[i].name)));
|
||||
found++;
|
||||
}
|
||||
|
||||
if (!found)
|
||||
{
|
||||
g_ptr_array_free (names, TRUE);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
g_ptr_array_add (names, NULL);
|
||||
if (count)
|
||||
*count = found;
|
||||
return (char **) g_ptr_array_free (names, FALSE);
|
||||
}
|
||||
|
||||
static void
|
||||
pevent_check_all_loaded (void)
|
||||
{
|
||||
|
||||
@@ -53,6 +53,7 @@ int pevt_build_string (const char *input, char **output, int *max_arg);
|
||||
int pevent_load (char *filename);
|
||||
void pevent_make_pntevts (void);
|
||||
int text_color_of (char *name);
|
||||
char **text_color_event_names (int color, int *count);
|
||||
void text_emit (int index, session *sess, char *a, char *b, char *c, char *d,
|
||||
time_t timestamp);
|
||||
int text_emit_by_name (char *name, session *sess, time_t timestamp,
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -380,6 +380,7 @@ lag_check (void)
|
||||
time_t now = time (0);
|
||||
time_t lag;
|
||||
time_t ping_age;
|
||||
unsigned long ping_timeout;
|
||||
|
||||
tim = make_ping_time ();
|
||||
|
||||
@@ -389,8 +390,11 @@ lag_check (void)
|
||||
if (serv->connected && serv->end_of_motd)
|
||||
{
|
||||
lag = now - serv->ping_recv;
|
||||
if (serv->lag_sent && prefs.hex_net_ping_timeout != 0 && lag > prefs.hex_net_ping_timeout && lag > 0)
|
||||
ping_timeout = (unsigned long) prefs.hex_net_ping_timeout * 1000;
|
||||
if (serv->lag_sent && prefs.hex_net_ping_timeout != 0
|
||||
&& tim - serv->lag_sent > ping_timeout)
|
||||
{
|
||||
lag = (tim - serv->lag_sent) / 1000;
|
||||
sprintf (tbuf, "%" G_GINT64_FORMAT, (gint64) lag);
|
||||
EMIT_SIGNAL (XP_TE_PINGTIMEOUT, serv->server_session, tbuf, NULL,
|
||||
NULL, NULL, 0);
|
||||
|
||||
@@ -79,6 +79,8 @@ struct _chanview
|
||||
guint theme_listener_id;
|
||||
};
|
||||
|
||||
static void chanview_set_font_desc (chanview *cv, const PangoFontDescription *font_desc);
|
||||
|
||||
struct _chan
|
||||
{
|
||||
chanview *cv; /* our owner */
|
||||
@@ -169,6 +171,7 @@ chanview_apply_theme (chanview *cv)
|
||||
w = GTK_WIDGET (tv->tree);
|
||||
if (input_style)
|
||||
font = input_style->font_desc;
|
||||
chanview_set_font_desc (cv, font);
|
||||
|
||||
theme_manager_apply_channel_tree_style (w,
|
||||
theme_manager_get_channel_tree_palette_behavior (font));
|
||||
@@ -313,6 +316,14 @@ chanview_free_ch (chanview *cv, GtkTreeIter *iter)
|
||||
g_free (ch);
|
||||
}
|
||||
|
||||
static void
|
||||
chanview_set_font_desc (chanview *cv, const PangoFontDescription *font_desc)
|
||||
{
|
||||
if (cv->font_desc)
|
||||
pango_font_description_free (cv->font_desc);
|
||||
cv->font_desc = font_desc ? pango_font_description_copy (font_desc) : NULL;
|
||||
}
|
||||
|
||||
static void
|
||||
chanview_destroy_store (chanview *cv) /* free every (chan *) in the store */
|
||||
{
|
||||
@@ -335,6 +346,9 @@ chanview_destroy (chanview *cv)
|
||||
if (cv->box)
|
||||
gtk_widget_destroy (cv->box);
|
||||
|
||||
if (cv->font_desc)
|
||||
pango_font_description_free (cv->font_desc);
|
||||
|
||||
chanview_destroy_store (cv);
|
||||
g_free (cv);
|
||||
}
|
||||
@@ -356,7 +370,7 @@ chanview_new (int type, int trunc_len, gboolean sort, gboolean use_icons,
|
||||
cv = g_new0 (chanview, 1);
|
||||
cv->store = gtk_tree_store_new (5, G_TYPE_STRING, G_TYPE_POINTER,
|
||||
PANGO_TYPE_ATTR_LIST, GDK_TYPE_PIXBUF, G_TYPE_INT);
|
||||
cv->font_desc = font_desc;
|
||||
cv->font_desc = font_desc ? pango_font_description_copy (font_desc) : NULL;
|
||||
cv->box = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 0);
|
||||
cv->trunc_len = trunc_len;
|
||||
cv->sorted = sort;
|
||||
|
||||
@@ -1357,17 +1357,19 @@ fe_open_url_inner (const char *url)
|
||||
gboolean opened = FALSE;
|
||||
|
||||
#ifdef WIN32
|
||||
opened = g_app_info_launch_default_for_uri (escaped_url, NULL, &error);
|
||||
gunichar2 *url_utf16 = g_utf8_to_utf16 (escaped_url, -1, NULL, NULL, NULL);
|
||||
|
||||
if (url_utf16 != NULL)
|
||||
{
|
||||
opened = ((INT_PTR) ShellExecuteW (0, L"open", url_utf16, NULL, NULL, SW_SHOWNORMAL)) > 32;
|
||||
g_free (url_utf16);
|
||||
}
|
||||
|
||||
if (!opened)
|
||||
{
|
||||
g_clear_error (&error);
|
||||
gunichar2 *url_utf16 = g_utf8_to_utf16 (escaped_url, -1, NULL, NULL, NULL);
|
||||
|
||||
if (url_utf16 != NULL)
|
||||
{
|
||||
opened = ((INT_PTR) ShellExecuteW (0, L"open", url_utf16, NULL, NULL, SW_SHOWNORMAL)) > 32;
|
||||
g_free (url_utf16);
|
||||
}
|
||||
opened = g_app_info_launch_default_for_uri (escaped_url, NULL, &error);
|
||||
if (!opened)
|
||||
g_clear_error (&error);
|
||||
}
|
||||
#else
|
||||
{
|
||||
|
||||
@@ -67,6 +67,34 @@
|
||||
#include <shellapi.h>
|
||||
#include <gdk/gdkwin32.h>
|
||||
|
||||
/* The shell only minimizes a window from its taskbar button when the
|
||||
* window style carries WS_MINIMIZEBOX; without it the click merely
|
||||
* deactivates the window (issue #65). GTK3 older than 3.24.50 can drop
|
||||
* the bit from top-level windows (https://gitlab.gnome.org/GNOME/gtk/-/issues/7494),
|
||||
* so guarantee it ourselves for session windows. */
|
||||
static void
|
||||
mg_win32_ensure_minimizable (GdkWindow *gdk_window)
|
||||
{
|
||||
HWND hwnd;
|
||||
LONG_PTR window_style;
|
||||
|
||||
if (!gdk_window)
|
||||
return;
|
||||
|
||||
hwnd = gdk_win32_window_get_handle (gdk_window);
|
||||
if (!hwnd)
|
||||
return;
|
||||
|
||||
window_style = GetWindowLongPtr (hwnd, GWL_STYLE);
|
||||
if (!window_style || (window_style & WS_MINIMIZEBOX))
|
||||
return;
|
||||
|
||||
SetWindowLongPtr (hwnd, GWL_STYLE, window_style | WS_MINIMIZEBOX);
|
||||
SetWindowPos (hwnd, NULL, 0, 0, 0, 0,
|
||||
SWP_FRAMECHANGED | SWP_NOMOVE | SWP_NOSIZE |
|
||||
SWP_NOZORDER | SWP_NOACTIVATE | SWP_NOOWNERZORDER);
|
||||
}
|
||||
|
||||
static void
|
||||
mg_win32_allow_autohide_taskbar (GtkWindow *window, GdkEventWindowState *event)
|
||||
{
|
||||
@@ -3388,10 +3416,19 @@ mg_topicbar_update_height (GtkWidget *topic)
|
||||
|
||||
if (parent && GTK_IS_SCROLLED_WINDOW (parent))
|
||||
{
|
||||
gtk_scrolled_window_set_max_content_height (GTK_SCROLLED_WINDOW (parent), -1);
|
||||
gtk_scrolled_window_set_min_content_height (GTK_SCROLLED_WINDOW (parent), -1);
|
||||
gtk_scrolled_window_set_max_content_height (GTK_SCROLLED_WINDOW (parent), target_height);
|
||||
gtk_scrolled_window_set_min_content_height (GTK_SCROLLED_WINDOW (parent), target_height);
|
||||
GtkScrolledWindow *scrolled = GTK_SCROLLED_WINDOW (parent);
|
||||
int max_height = gtk_scrolled_window_get_max_content_height (scrolled);
|
||||
|
||||
if (max_height != -1 && target_height > max_height)
|
||||
{
|
||||
gtk_scrolled_window_set_max_content_height (scrolled, target_height);
|
||||
gtk_scrolled_window_set_min_content_height (scrolled, target_height);
|
||||
}
|
||||
else
|
||||
{
|
||||
gtk_scrolled_window_set_min_content_height (scrolled, target_height);
|
||||
gtk_scrolled_window_set_max_content_height (scrolled, target_height);
|
||||
}
|
||||
gtk_widget_set_size_request (parent, -1, target_height);
|
||||
}
|
||||
}
|
||||
@@ -4976,6 +5013,7 @@ mg_create_topwindow (session *sess)
|
||||
#ifdef G_OS_WIN32
|
||||
parent_win = gtk_widget_get_window (win);
|
||||
gdk_window_add_filter (parent_win, mg_win32_filter, NULL);
|
||||
mg_win32_ensure_minimizable (parent_win);
|
||||
#endif
|
||||
}
|
||||
|
||||
@@ -5012,6 +5050,18 @@ mg_win32_filter (GdkXEvent *xevent, GdkEvent *event, gpointer data)
|
||||
if (!msg)
|
||||
return GDK_FILTER_CONTINUE;
|
||||
|
||||
if (msg->message == WM_STYLECHANGING && msg->wParam == (WPARAM)GWL_STYLE)
|
||||
{
|
||||
STYLESTRUCT *style = (STYLESTRUCT *)msg->lParam;
|
||||
|
||||
/* Keep the window minimizable from its taskbar button; see
|
||||
* mg_win32_ensure_minimizable (). */
|
||||
if (style)
|
||||
style->styleNew |= WS_MINIMIZEBOX;
|
||||
|
||||
return GDK_FILTER_CONTINUE;
|
||||
}
|
||||
|
||||
if (msg->message == WM_TIMECHANGE)
|
||||
{
|
||||
_tzset();
|
||||
@@ -5161,6 +5211,7 @@ mg_create_tabwindow (session *sess)
|
||||
#ifdef G_OS_WIN32
|
||||
parent_win = gtk_widget_get_window (win);
|
||||
gdk_window_add_filter (parent_win, mg_win32_filter, NULL);
|
||||
mg_win32_ensure_minimizable (parent_win);
|
||||
#endif
|
||||
}
|
||||
|
||||
|
||||
@@ -50,7 +50,7 @@ zoitechat_gtk_deps = [
|
||||
|
||||
gtk_dep = dependency('gtk+-3.0', version: '>= 3.22')
|
||||
|
||||
zoitechat_theme_deps = [gtk_dep]
|
||||
zoitechat_theme_deps = [gtk_dep, zoitechat_common_dep]
|
||||
|
||||
if host_machine.system() != 'windows'
|
||||
appindicator_opt = get_option('appindicator')
|
||||
|
||||
@@ -71,7 +71,7 @@ typedef enum
|
||||
WS_HIDDEN
|
||||
} WinStatus;
|
||||
|
||||
#if !defined(WIN32) && (defined(HAVE_AYATANA_APPINDICATOR) || defined(HAVE_APPINDICATOR))
|
||||
#if !defined(WIN32) && (defined(HAVE_AYATANA_APPINDICATOR) || defined(HAVE_APPINDICATOR)) && !defined(GDK_WINDOWING_X11)
|
||||
#define HAVE_APPINDICATOR_BACKEND 1
|
||||
#else
|
||||
#define HAVE_APPINDICATOR_BACKEND 0
|
||||
|
||||
@@ -70,6 +70,15 @@ load_text_events (void)
|
||||
{
|
||||
}
|
||||
|
||||
char **
|
||||
text_color_event_names (int color, int *count)
|
||||
{
|
||||
(void)color;
|
||||
if (count)
|
||||
*count = 0;
|
||||
return NULL;
|
||||
}
|
||||
|
||||
gboolean
|
||||
theme_get_color (ThemeSemanticToken token, GdkRGBA *color)
|
||||
{
|
||||
|
||||
@@ -52,14 +52,13 @@ static const guint8 theme_default_99_mirc_colors[THEME_XTEXT_MIRC_COLS][3] = {
|
||||
};
|
||||
|
||||
static void
|
||||
theme_access_apply_default_99_palette (XTextColor *palette, size_t palette_len, gboolean apply_base)
|
||||
theme_access_apply_default_99_palette (XTextColor *palette, size_t palette_len)
|
||||
{
|
||||
size_t i;
|
||||
size_t start = apply_base ? 0 : 32;
|
||||
|
||||
if (palette_len == 0)
|
||||
return;
|
||||
for (i = start; i < THEME_XTEXT_MIRC_COLS && i < palette_len; i++)
|
||||
for (i = 32; i < THEME_XTEXT_MIRC_COLS && i < palette_len; i++)
|
||||
{
|
||||
palette[i].red = theme_default_99_mirc_colors[i][0] / 255.0;
|
||||
palette[i].green = theme_default_99_mirc_colors[i][1] / 255.0;
|
||||
@@ -148,11 +147,10 @@ gboolean
|
||||
theme_get_mirc_color (unsigned int mirc_index, GdkRGBA *out_rgba)
|
||||
{
|
||||
ThemeSemanticToken token = (ThemeSemanticToken) (THEME_TOKEN_MIRC_0 + (int) mirc_index);
|
||||
gboolean has_user_colors = theme_runtime_mode_has_user_colors (theme_runtime_is_dark_active ());
|
||||
|
||||
if (mirc_index >= THEME_XTEXT_MIRC_COLS)
|
||||
return FALSE;
|
||||
if (!has_user_colors || mirc_index >= 32)
|
||||
if (mirc_index >= 32)
|
||||
{
|
||||
out_rgba->red = theme_default_99_mirc_colors[mirc_index][0] / 255.0;
|
||||
out_rgba->green = theme_default_99_mirc_colors[mirc_index][1] / 255.0;
|
||||
@@ -173,11 +171,10 @@ gboolean
|
||||
theme_get_mirc_color_rgb16 (unsigned int mirc_index, guint16 *red, guint16 *green, guint16 *blue)
|
||||
{
|
||||
ThemeSemanticToken token = (ThemeSemanticToken) (THEME_TOKEN_MIRC_0 + (int) mirc_index);
|
||||
gboolean has_user_colors = theme_runtime_mode_has_user_colors (theme_runtime_is_dark_active ());
|
||||
|
||||
if (mirc_index >= THEME_XTEXT_MIRC_COLS)
|
||||
return FALSE;
|
||||
if (!has_user_colors || mirc_index >= 32)
|
||||
if (mirc_index >= 32)
|
||||
{
|
||||
*red = (guint16) (theme_default_99_mirc_colors[mirc_index][0] * 257);
|
||||
*green = (guint16) (theme_default_99_mirc_colors[mirc_index][1] * 257);
|
||||
@@ -227,7 +224,6 @@ void
|
||||
theme_get_xtext_colors_for_widget (GtkWidget *widget, XTextColor *palette, size_t palette_len)
|
||||
{
|
||||
ThemeWidgetStyleValues style_values;
|
||||
gboolean has_user_colors;
|
||||
GdkRGBA marker_color;
|
||||
|
||||
if (!palette)
|
||||
@@ -235,9 +231,8 @@ theme_get_xtext_colors_for_widget (GtkWidget *widget, XTextColor *palette, size_
|
||||
|
||||
theme_get_widget_style_values_for_widget (widget, &style_values);
|
||||
theme_runtime_get_xtext_colors (palette, palette_len);
|
||||
has_user_colors = theme_runtime_mode_has_user_colors (theme_runtime_is_dark_active ());
|
||||
if (palette_len >= THEME_XTEXT_MIRC_COLS)
|
||||
theme_access_apply_default_99_palette (palette, palette_len, !has_user_colors);
|
||||
theme_access_apply_default_99_palette (palette, palette_len);
|
||||
if (palette_len > THEME_XTEXT_MARK_FG_INDEX)
|
||||
{
|
||||
palette[THEME_XTEXT_MARK_FG_INDEX].red = style_values.selection_foreground.red;
|
||||
|
||||
@@ -38,6 +38,7 @@
|
||||
#include "theme-runtime.h"
|
||||
|
||||
extern void load_text_events (void);
|
||||
extern char **text_color_event_names (int color, int *count);
|
||||
|
||||
typedef struct
|
||||
{
|
||||
@@ -243,6 +244,9 @@ theme_preferences_stage_discard (void)
|
||||
static void
|
||||
theme_preferences_show_import_error (GtkWidget *button, const char *message);
|
||||
|
||||
static void
|
||||
theme_preferences_color_set_tooltip (GtkWidget *widget, ThemeSemanticToken token);
|
||||
|
||||
static void
|
||||
theme_preferences_manager_row_free (gpointer data)
|
||||
{
|
||||
@@ -481,6 +485,7 @@ theme_preferences_color_response_cb (GtkDialog *dialog, gint response_id, gpoint
|
||||
data->color_change_flag,
|
||||
TRUE);
|
||||
theme_preferences_color_button_apply (data->button, &rgba);
|
||||
theme_preferences_color_set_tooltip (data->button, data->token);
|
||||
theme_preferences_manager_update_preview ((theme_color_manager_ui *) data->manager_ui);
|
||||
}
|
||||
|
||||
@@ -559,6 +564,113 @@ theme_preferences_token_display_name (ThemeSemanticToken token)
|
||||
}
|
||||
}
|
||||
|
||||
static char *
|
||||
theme_preferences_color_tooltip_markup (ThemeSemanticToken token)
|
||||
{
|
||||
GString *tip;
|
||||
GdkRGBA rgba;
|
||||
char *display;
|
||||
char *hex;
|
||||
char *escaped;
|
||||
char **names;
|
||||
int count = 0;
|
||||
|
||||
if (token < THEME_TOKEN_MIRC_0 || token > THEME_TOKEN_MIRC_31)
|
||||
return NULL;
|
||||
|
||||
if (!theme_preferences_staged_get_color (token, &rgba))
|
||||
return NULL;
|
||||
|
||||
tip = g_string_new (NULL);
|
||||
|
||||
display = theme_preferences_token_display_name (token);
|
||||
hex = theme_preferences_format_hex (&rgba);
|
||||
escaped = g_markup_escape_text (display, -1);
|
||||
g_string_append_printf (tip,
|
||||
"<span background='%s'>\xe2\x80\x83\xe2\x80\x83</span> <b>%s</b> <tt><small>%s</small></tt>",
|
||||
hex, escaped, hex);
|
||||
g_free (escaped);
|
||||
g_free (display);
|
||||
|
||||
names = text_color_event_names (token - THEME_TOKEN_MIRC_0, &count);
|
||||
if (names)
|
||||
{
|
||||
int line_target;
|
||||
int line_len = 0;
|
||||
int i;
|
||||
|
||||
display = g_strdup_printf (ngettext ("Used by %d text event",
|
||||
"Used by %d text events", count), count);
|
||||
escaped = g_markup_escape_text (display, -1);
|
||||
g_string_append_printf (tip,
|
||||
"\n<small><span alpha='60%%'>%s</span></small>\n\n<small>",
|
||||
escaped);
|
||||
g_free (escaped);
|
||||
g_free (display);
|
||||
|
||||
/* Explicit line breaks keep the tooltip geometry stable;
|
||||
* heavily-used colors get wider lines so the full list
|
||||
* stays on screen. */
|
||||
if (count <= 12)
|
||||
line_target = 44;
|
||||
else if (count <= 40)
|
||||
line_target = 60;
|
||||
else
|
||||
line_target = 76;
|
||||
|
||||
for (i = 0; i < count; i++)
|
||||
{
|
||||
int name_len = (int) g_utf8_strlen (names[i], -1);
|
||||
|
||||
if (i)
|
||||
{
|
||||
if (line_len + name_len + 5 > line_target)
|
||||
{
|
||||
g_string_append_c (tip, '\n');
|
||||
line_len = 0;
|
||||
}
|
||||
else
|
||||
{
|
||||
g_string_append (tip, " \xc2\xb7 ");
|
||||
line_len += 5;
|
||||
}
|
||||
}
|
||||
escaped = g_markup_escape_text (names[i], -1);
|
||||
g_string_append (tip, escaped);
|
||||
line_len += name_len;
|
||||
g_free (escaped);
|
||||
}
|
||||
g_string_append (tip, "</small>");
|
||||
g_strfreev (names);
|
||||
}
|
||||
else
|
||||
{
|
||||
escaped = g_markup_escape_text (_("Not used by any text events"), -1);
|
||||
g_string_append_printf (tip,
|
||||
"\n<small><span alpha='60%%'><i>%s</i></span></small>",
|
||||
escaped);
|
||||
g_free (escaped);
|
||||
}
|
||||
|
||||
g_free (hex);
|
||||
return g_string_free (tip, FALSE);
|
||||
}
|
||||
|
||||
/* Static markup tooltips only: building tooltip widgets from a
|
||||
* query-tooltip handler makes GtkTooltip flicker on some setups, so the
|
||||
* markup is set once and refreshed whenever the color changes. */
|
||||
static void
|
||||
theme_preferences_color_set_tooltip (GtkWidget *widget, ThemeSemanticToken token)
|
||||
{
|
||||
char *markup = theme_preferences_color_tooltip_markup (token);
|
||||
|
||||
if (!markup)
|
||||
return;
|
||||
|
||||
gtk_widget_set_tooltip_markup (widget, markup);
|
||||
g_free (markup);
|
||||
}
|
||||
|
||||
static void
|
||||
theme_preferences_manager_row_apply (theme_color_manager_row *row, const GdkRGBA *rgba)
|
||||
{
|
||||
@@ -569,6 +681,7 @@ theme_preferences_manager_row_apply (theme_color_manager_row *row, const GdkRGBA
|
||||
hex = theme_preferences_format_hex (rgba);
|
||||
gtk_entry_set_text (GTK_ENTRY (row->entry), hex);
|
||||
g_free (hex);
|
||||
theme_preferences_color_set_tooltip (row->row, row->token);
|
||||
}
|
||||
|
||||
static void
|
||||
@@ -884,6 +997,8 @@ theme_preferences_create_color_manager_dialog (GtkWindow *parent, gboolean *colo
|
||||
if (theme_preferences_staged_get_color (token, &rgba))
|
||||
theme_preferences_manager_row_apply (row, &rgba);
|
||||
|
||||
theme_preferences_color_set_tooltip (list_row, token);
|
||||
|
||||
g_signal_connect (G_OBJECT (button), "clicked",
|
||||
G_CALLBACK (theme_preferences_manager_pick_cb), row);
|
||||
g_object_set_data (G_OBJECT (button), "zoitechat-theme-color-manager-ui", ui);
|
||||
@@ -1198,6 +1313,7 @@ theme_preferences_create_color_button (GtkWidget *table,
|
||||
g_object_set_data (G_OBJECT (but), "zoitechat-color-box", box);
|
||||
g_object_set_data (G_OBJECT (but), "zoitechat-theme-token", GINT_TO_POINTER (token));
|
||||
g_object_set_data (G_OBJECT (but), "zoitechat-theme-color-change", color_change_flag);
|
||||
theme_preferences_color_set_tooltip (but, token);
|
||||
gtk_grid_attach (GTK_GRID (table), but, col, row, 1, 1);
|
||||
g_signal_connect (G_OBJECT (but), "clicked", G_CALLBACK (theme_preferences_color_cb), parent);
|
||||
if (theme_preferences_staged_get_color (token, &color))
|
||||
|
||||
@@ -286,10 +286,12 @@ xtext_adj_get_page_increment (GtkAdjustment *adj)
|
||||
static void
|
||||
xtext_adjustment_apply (GtkAdjustment *adj, gdouble lower, gdouble upper, gdouble value, gdouble page_size)
|
||||
{
|
||||
gtk_adjustment_set_lower (adj, lower);
|
||||
gtk_adjustment_set_upper (adj, upper);
|
||||
gtk_adjustment_set_page_size (adj, page_size);
|
||||
gtk_adjustment_set_value (adj, value);
|
||||
gdouble step_increment = page_size * prefs.hex_gui_mouse_scroll_speed / 100.0;
|
||||
|
||||
if (step_increment < 1)
|
||||
step_increment = 1;
|
||||
|
||||
gtk_adjustment_configure (adj, value, lower, upper, step_increment, page_size, page_size);
|
||||
}
|
||||
|
||||
static inline void
|
||||
|
||||
@@ -66,6 +66,7 @@
|
||||
<None Include="$(DepsRoot)\bin\*zlib*.dll" />
|
||||
<None Include="$(DepsRoot)\bin\*girepository*.dll" Condition="'$(LuaEnabled)'=='true' and '$(LuaLibDir)'!=''" />
|
||||
<None Include="$(Python3Path)\Lib\site-packages\_cffi_backend.*.pyd" Condition="'$(Python3Enabled)'=='true'" />
|
||||
<None Include="$(Python38Path)\Lib\site-packages\_cffi_backend.*.pyd" Condition="'$(Python38Enabled)'=='true'" />
|
||||
|
||||
<LuaLib Include="$(LuaLibDir)\**\*.dll" Condition="'$(LuaEnabled)'=='true' and '$(LuaLibDir)'!=''" />
|
||||
<LuaShare Include="$(LuaShareDir)\*.lua" Condition="'$(LuaEnabled)'=='true' and '$(LuaShareDir)'!=''" />
|
||||
@@ -105,10 +106,10 @@
|
||||
<Copy SourceFiles="@(LuaShare)" DestinationFiles="@(LuaShare->'$(ZoiteChatRel)\share\lua\%(RecursiveDir)%(Filename)%(Extension)')" />
|
||||
<Copy SourceFiles="@(LuaLib)" DestinationFiles="@(LuaLib->'$(ZoiteChatRel)\lib\lua\%(RecursiveDir)%(Filename)%(Extension)')" />
|
||||
<Copy SourceFiles="@(Typelib)" DestinationFiles="@(Typelib->'$(ZoiteChatRel)\lib\girepository-1.0\%(Filename)%(Extension)')" />
|
||||
<Copy SourceFiles="..\..\plugins\python\xchat.py" DestinationFolder="$(ZoiteChatRel)\python" Condition="'$(Python3Enabled)'=='true'" />
|
||||
<Copy SourceFiles="..\..\plugins\python\hexchat.py" DestinationFolder="$(ZoiteChatRel)\python" Condition="'$(Python3Enabled)'=='true'" />
|
||||
<Copy SourceFiles="..\..\plugins\python\zoitechat.py" DestinationFolder="$(ZoiteChatRel)\python" Condition="'$(Python3Enabled)'=='true'" />
|
||||
<Copy SourceFiles="..\..\plugins\python\_zoitechat.py" DestinationFolder="$(ZoiteChatRel)\python" Condition="'$(Python3Enabled)'=='true'" />
|
||||
<Copy SourceFiles="..\..\plugins\python\xchat.py" DestinationFolder="$(ZoiteChatRel)\python" Condition="'$(Python3Enabled)'=='true' or '$(Python38Enabled)'=='true'" />
|
||||
<Copy SourceFiles="..\..\plugins\python\hexchat.py" DestinationFolder="$(ZoiteChatRel)\python" Condition="'$(Python3Enabled)'=='true' or '$(Python38Enabled)'=='true'" />
|
||||
<Copy SourceFiles="..\..\plugins\python\zoitechat.py" DestinationFolder="$(ZoiteChatRel)\python" Condition="'$(Python3Enabled)'=='true' or '$(Python38Enabled)'=='true'" />
|
||||
<Copy SourceFiles="..\..\plugins\python\_zoitechat.py" DestinationFolder="$(ZoiteChatRel)\python" Condition="'$(Python3Enabled)'=='true' or '$(Python38Enabled)'=='true'" />
|
||||
|
||||
<WriteLinesToFile File="$(ZoiteChatRel)portable-mode" Lines="2" Overwrite="true" />
|
||||
|
||||
|
||||
@@ -16,7 +16,7 @@ AppUpdatesURL=http://zoitechat.org/downloads.html
|
||||
LicenseFile=share\doc\zoitechat\COPYING
|
||||
UninstallDisplayIcon={app}\zoitechat.exe
|
||||
UninstallDisplayName=ZoiteChat
|
||||
DefaultDirName={pf64}\ZoiteChat
|
||||
DefaultDirName={commonpf64}\ZoiteChat
|
||||
DisableDirPage=no
|
||||
DefaultGroupName=ZoiteChat
|
||||
AllowNoIcons=yes
|
||||
@@ -28,11 +28,11 @@ OutputBaseFilename={#APPNAM}-{#APPVER}_x64
|
||||
FlatComponentsList=no
|
||||
PrivilegesRequired=none
|
||||
ShowComponentSizes=no
|
||||
CreateUninstallRegKey=not IsTaskSelected('portable')
|
||||
Uninstallable=not IsTaskSelected('portable')
|
||||
CreateUninstallRegKey=not WizardIsTaskSelected('portable')
|
||||
Uninstallable=not WizardIsTaskSelected('portable')
|
||||
ArchitecturesAllowed=x64compatible
|
||||
ArchitecturesInstallIn64BitMode=x64compatible
|
||||
MinVersion=6.1
|
||||
MinVersion=6.1sp1
|
||||
WizardImageFile={#PROJECTDIR}wizardimage.bmp
|
||||
WizardSmallImageFile={#PROJECTDIR}wizardsmallimage.bmp
|
||||
SetupIconFile={#PROJECTDIR}..\..\data\icons\zoitechat.ico
|
||||
@@ -59,7 +59,7 @@ Name: "plugins\upd"; Description: "Update Checker"; Types: normal custom; Flags:
|
||||
Name: "langs"; Description: "Language Interfaces"; Types: custom; Flags: disablenouninstallwarning
|
||||
Name: "langs\lua"; Description: "Lua (LuaJIT 2.1)"; Types: normal custom; Flags: disablenouninstallwarning
|
||||
Name: "langs\perl"; Description: "Perl (Strawberry Perl 5.42.0.1)"; Types: custom; Flags: disablenouninstallwarning
|
||||
Name: "langs\python"; Description: "Python (Python 3.14.3)"; Types: custom; Flags: disablenouninstallwarning
|
||||
Name: "langs\python"; Description: "Python (Python 3.14.3, or 3.8.10 before Windows 10)"; Types: custom; Flags: disablenouninstallwarning
|
||||
Name: "themes"; Description: "GTK3 Themes"; Types: normal minimal custom; Flags: disablenouninstallwarning
|
||||
Name: "themes\windows10"; Description: "Windows 10"; Types: normal minimal custom; Flags: disablenouninstallwarning
|
||||
Name: "themes\windows10dark"; Description: "Windows 10 Dark"; Types: normal minimal custom; Flags: disablenouninstallwarning
|
||||
@@ -181,7 +181,8 @@ Source: "plugins\hcperl.dll"; DestDir: "{app}\plugins"; Flags: ignoreversion; Co
|
||||
|
||||
Source: "python\*.py"; DestDir: "{app}\python"; Flags: ignoreversion; Components: langs\python
|
||||
|
||||
Source: "plugins\hcpython3.dll"; DestDir: "{app}\plugins"; Flags: ignoreversion; Components: langs\python
|
||||
Source: "plugins\hcpython3.dll"; DestDir: "{app}\plugins"; Flags: ignoreversion; Components: langs\python; Check: not NeedsLegacyPython
|
||||
Source: "plugins\hcpython38.dll"; DestDir: "{app}\plugins"; Flags: ignoreversion skipifsourcedoesntexist; Components: langs\python; Check: NeedsLegacyPython
|
||||
Source: "_cffi_backend.cp3*.pyd"; DestDir: "{app}"; Flags: ignoreversion; Components: langs\python
|
||||
|
||||
Source: "zoitechat.exe"; DestDir: "{app}"; Flags: ignoreversion; Components: libs
|
||||
@@ -328,6 +329,32 @@ begin
|
||||
Result := DirExists(ExpandConstant('{localappdata}') + '\enchant\myspell');
|
||||
end;
|
||||
|
||||
// Python >= 3.9 dropped support for Windows versions before 10;
|
||||
// those systems get Python 3.8 and the matching plugin instead.
|
||||
function NeedsLegacyPython(): Boolean;
|
||||
var
|
||||
Version: TWindowsVersion;
|
||||
begin
|
||||
GetWindowsVersionEx(Version);
|
||||
Result := Version.NTPlatform and (Version.Major < 10);
|
||||
end;
|
||||
|
||||
function PythonURL(): String;
|
||||
begin
|
||||
if NeedsLegacyPython() then
|
||||
Result := 'https://www.python.org/ftp/python/3.8.10/python-3.8.10-amd64.exe'
|
||||
else
|
||||
Result := 'https://www.python.org/ftp/python/3.14.3/python-3.14.3-amd64.exe';
|
||||
end;
|
||||
|
||||
function PythonDLL(): String;
|
||||
begin
|
||||
if NeedsLegacyPython() then
|
||||
Result := 'python38.dll'
|
||||
else
|
||||
Result := 'python314.dll';
|
||||
end;
|
||||
|
||||
/////////////////////////////////////////////////////////////////////
|
||||
// Sets up the automatic downloads
|
||||
/////////////////////////////////////////////////////////////////////
|
||||
@@ -345,34 +372,34 @@ begin
|
||||
begin
|
||||
idpClearFiles;
|
||||
|
||||
if IsComponentSelected('themes\windows10') then
|
||||
if WizardIsComponentSelected('themes\windows10') then
|
||||
idpAddFile('https://dl.zoitechat.zoite.net/themes/GTK3Themes/Windows-10-3.2.1.zip', ExpandConstant('{tmp}\Windows-10-3.2.1.zip'));
|
||||
|
||||
if IsComponentSelected('themes\windows10dark') then
|
||||
if WizardIsComponentSelected('themes\windows10dark') then
|
||||
idpAddFile('https://dl.zoitechat.zoite.net/themes/GTK3Themes/Windows-10-Dark-3.2.1-dark.zip', ExpandConstant('{tmp}\Windows-10-Dark-3.2.1-dark.zip'));
|
||||
|
||||
if not IsTaskSelected('portable') then
|
||||
if not WizardIsTaskSelected('portable') then
|
||||
begin
|
||||
|
||||
REDIST := 'https://aka.ms/vs/17/release/vc_redist.x64.exe';
|
||||
PERL := 'https://github.com/StrawberryPerl/Perl-Dist-Strawberry/releases/download/SP_54201_64bit/strawberry-perl-5.42.0.1-64bit.msi';
|
||||
PY3 := 'https://www.python.org/ftp/python/3.14.3/python-3.14.3-amd64.exe';
|
||||
SPELL := 'https://github.com/zoitechat/gvsbuild/releases/download/zoitechat-2.16.2/ZoiteChat.Spelling.Dictionaries.r2.exe';
|
||||
PY3 := PythonURL();
|
||||
SPELL := 'https://github.com/hexchat/gvsbuild/releases/download/hexchat-2.16.2/HexChat.Spelling.Dictionaries.r2.exe';
|
||||
|
||||
if IsComponentSelected('deps\vcredist2015') and not CheckVCInstall() then
|
||||
if WizardIsComponentSelected('deps\vcredist2015') and not CheckVCInstall() then
|
||||
idpAddFile(REDIST, ExpandConstant('{tmp}\vcredist.exe'));
|
||||
|
||||
if IsComponentSelected('spell') and not CheckSpellInstall() then
|
||||
if WizardIsComponentSelected('spell') and not CheckSpellInstall() then
|
||||
idpAddFile(SPELL, ExpandConstant('{tmp}\spelling-dicts.exe'));
|
||||
|
||||
if not WizardSilent() then
|
||||
begin
|
||||
if IsComponentSelected('langs\perl') and not CheckDLL('perl542.dll') then
|
||||
if WizardIsComponentSelected('langs\perl') and not CheckDLL('perl542.dll') then
|
||||
begin
|
||||
idpAddFile(PERL, ExpandConstant('{tmp}\perl.msi'))
|
||||
end;
|
||||
|
||||
if IsComponentSelected('langs\python') and not CheckDLL('python314.dll') then
|
||||
if WizardIsComponentSelected('langs\python') and not CheckDLL(PythonDLL()) then
|
||||
idpAddFile(PY3, ExpandConstant('{tmp}\python.exe'));
|
||||
end;
|
||||
end;
|
||||
@@ -397,7 +424,7 @@ begin
|
||||
|
||||
if (CurPageID = wpSelectTasks) then
|
||||
if (WizardForm.TasksList.Checked[1] = True) then
|
||||
if (WizardDirValue() = ExpandConstant('{pf64}\ZoiteChat')) then
|
||||
if (WizardDirValue() = ExpandConstant('{commonpf64}\ZoiteChat')) then
|
||||
begin
|
||||
WizardForm.TasksList.Checked[1] := False
|
||||
MsgBox('Portable mode is only intended for use on portable drives and has been disabled.', mbInformation, MB_OK)
|
||||
@@ -405,21 +432,21 @@ begin
|
||||
|
||||
if CurPageID = wpReady then
|
||||
begin
|
||||
if IsComponentSelected('themes\windows10') and not FileExists(ExpandConstant('{tmp}\Windows-10-3.2.1.zip')) then
|
||||
if WizardIsComponentSelected('themes\windows10') and not FileExists(ExpandConstant('{tmp}\Windows-10-3.2.1.zip')) then
|
||||
begin
|
||||
MsgBox('Windows 10 GTK3 theme could not be downloaded. Please retry setup and rerun setup.', mbError, MB_OK);
|
||||
Result := False;
|
||||
Exit;
|
||||
end;
|
||||
|
||||
if IsComponentSelected('themes\windows10dark') and not FileExists(ExpandConstant('{tmp}\Windows-10-Dark-3.2.1-dark.zip')) then
|
||||
if WizardIsComponentSelected('themes\windows10dark') and not FileExists(ExpandConstant('{tmp}\Windows-10-Dark-3.2.1-dark.zip')) then
|
||||
begin
|
||||
MsgBox('Windows 10 Dark GTK3 theme could not be downloaded. Please retry setup and rerun setup.', mbError, MB_OK);
|
||||
Result := False;
|
||||
Exit;
|
||||
end;
|
||||
|
||||
if IsComponentSelected('deps\vcredist2015') and not CheckVCInstall() and not FileExists(ExpandConstant('{tmp}\vcredist.exe')) then
|
||||
if WizardIsComponentSelected('deps\vcredist2015') and not CheckVCInstall() and not FileExists(ExpandConstant('{tmp}\vcredist.exe')) then
|
||||
begin
|
||||
MsgBox('Visual C++ Redistributable could not be downloaded. Please retry setup or install it manually and rerun setup.', mbError, MB_OK);
|
||||
Result := False;
|
||||
@@ -486,7 +513,7 @@ end;
|
||||
/////////////////////////////////////////////////////////////////////
|
||||
procedure CurStepChanged(CurStep: TSetupStep);
|
||||
begin
|
||||
if not (IsTaskSelected('portable')) then
|
||||
if not (WizardIsTaskSelected('portable')) then
|
||||
begin
|
||||
if (CurStep=ssInstall) then
|
||||
begin
|
||||
|
||||
@@ -1 +1 @@
|
||||
2.18.2
|
||||
2.18.3
|
||||
|
||||
@@ -8,6 +8,7 @@
|
||||
<YourGendefPath>c:\gtk-build\gendef</YourGendefPath>
|
||||
<YourPerlPath>c:\gtk-build\perl-5.42.0.1</YourPerlPath>
|
||||
<YourPython3Path>c:\gtk-build\python-3.14</YourPython3Path>
|
||||
<YourPython38Path>c:\gtk-build\python-3.8</YourPython38Path>
|
||||
<YourWinSparklePath>c:\gtk-build\WinSparkle</YourWinSparklePath>
|
||||
|
||||
<!-- YOU SHOULDN'T TOUCH ANYTHING BELOW -->
|
||||
@@ -32,6 +33,12 @@
|
||||
<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>
|
||||
|
||||
<Python38Path>$(YourPython38Path)\$(ZoiteChatPlatform)</Python38Path>
|
||||
<Python38Lib>python38</Python38Lib>
|
||||
<Python38Output>hcpython38</Python38Output>
|
||||
<Python38Enabled Condition="Exists('$(Python38Path)\\python.exe') and Exists('$(Python38Path)\\libs\\$(Python38Lib).lib') and Exists('$(Python38Path)\\Lib\\site-packages\\cffi')">true</Python38Enabled>
|
||||
<Python38Enabled Condition="'$(Python38Enabled)'==''">false</Python38Enabled>
|
||||
|
||||
<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>
|
||||
|
||||
|
||||
@@ -60,6 +60,7 @@ EndProject
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "installer", "installer\installer.vcxproj", "{5A0F4962-E670-4DA2-9E45-52CC47F26E2F}"
|
||||
ProjectSection(ProjectDependencies) = postProject
|
||||
{C2321A03-0BA7-45B3-8740-ABD82B36B0BF} = {C2321A03-0BA7-45B3-8740-ABD82B36B0BF}
|
||||
{D58924D2-1492-4AC3-B058-7A214424EEDC} = {D58924D2-1492-4AC3-B058-7A214424EEDC}
|
||||
{BF0EBC16-68AD-4CD1-864C-5B56836EBE2A} = {BF0EBC16-68AD-4CD1-864C-5B56836EBE2A}
|
||||
{17E4BE39-76F7-4A06-AD21-EFD0C5091F76} = {17E4BE39-76F7-4A06-AD21-EFD0C5091F76}
|
||||
{4C0F3940-2EEE-4646-82F7-6CE75B9A72F4} = {4C0F3940-2EEE-4646-82F7-6CE75B9A72F4}
|
||||
@@ -80,6 +81,11 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "perl", "..\plugins\perl\per
|
||||
{87554B59-006C-4D94-9714-897B27067BA3} = {87554B59-006C-4D94-9714-897B27067BA3}
|
||||
EndProjectSection
|
||||
EndProject
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "python38", "..\plugins\python\python38.vcxproj", "{D58924D2-1492-4AC3-B058-7A214424EEDC}"
|
||||
ProjectSection(ProjectDependencies) = postProject
|
||||
{87554B59-006C-4D94-9714-897B27067BA3} = {87554B59-006C-4D94-9714-897B27067BA3}
|
||||
EndProjectSection
|
||||
EndProject
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "python3", "..\plugins\python\python3.vcxproj", "{C2321A03-0BA7-45B3-8740-ABD82B36B0BF}"
|
||||
ProjectSection(ProjectDependencies) = postProject
|
||||
{87554B59-006C-4D94-9714-897B27067BA3} = {87554B59-006C-4D94-9714-897B27067BA3}
|
||||
@@ -127,6 +133,8 @@ Global
|
||||
{D90BC3E3-1341-4849-9354-5F40489D39D1}.Release|x64.Build.0 = Release|x64
|
||||
{C2321A03-0BA7-45B3-8740-ABD82B36B0BF}.Release|x64.ActiveCfg = Release|x64
|
||||
{C2321A03-0BA7-45B3-8740-ABD82B36B0BF}.Release|x64.Build.0 = Release|x64
|
||||
{D58924D2-1492-4AC3-B058-7A214424EEDC}.Release|x64.ActiveCfg = Release|x64
|
||||
{D58924D2-1492-4AC3-B058-7A214424EEDC}.Release|x64.Build.0 = Release|x64
|
||||
{C53145CC-D021-40C9-B97C-0249AB9A43C9}.Release|x64.ActiveCfg = Release|x64
|
||||
{C53145CC-D021-40C9-B97C-0249AB9A43C9}.Release|x64.Build.0 = Release|x64
|
||||
{BF0EBC16-68AD-4CD1-864C-5B56836EBE2A}.Release|x64.ActiveCfg = Release|x64
|
||||
@@ -151,6 +159,7 @@ Global
|
||||
{5A0F4962-E670-4DA2-9E45-52CC47F26E2F} = {0FD996A7-464F-4981-8380-3DCA3A244A13}
|
||||
{D90BC3E3-1341-4849-9354-5F40489D39D1} = {D237DA6B-BD5F-46C0-8BEA-50E9A1340240}
|
||||
{C2321A03-0BA7-45B3-8740-ABD82B36B0BF} = {D237DA6B-BD5F-46C0-8BEA-50E9A1340240}
|
||||
{D58924D2-1492-4AC3-B058-7A214424EEDC} = {D237DA6B-BD5F-46C0-8BEA-50E9A1340240}
|
||||
{C53145CC-D021-40C9-B97C-0249AB9A43C9} = {561126F4-FA18-45FC-A2BF-8F858F161D6D}
|
||||
{BF0EBC16-68AD-4CD1-864C-5B56836EBE2A} = {021EC1D0-FF67-4700-9AB2-EAABF1159C09}
|
||||
{4C0F3940-2EEE-4646-82F7-6CE75B9A72F4} = {D237DA6B-BD5F-46C0-8BEA-50E9A1340240}
|
||||
|
||||
Reference in New Issue
Block a user