mirror of
https://github.com/ZoiteChat/zoitechat.git
synced 2026-06-13 10:20:18 +00:00
Compare commits
3 Commits
offline-do
...
upnp-dcc-s
| Author | SHA1 | Date | |
|---|---|---|---|
| 64833d7af8 | |||
| a98c30a679 | |||
| 92fe064e26 |
6
.github/workflows/appimage-build.yml
vendored
6
.github/workflows/appimage-build.yml
vendored
@@ -29,6 +29,7 @@ jobs:
|
||||
build-essential pkg-config meson ninja-build cmake \
|
||||
gettext \
|
||||
libcanberra-dev libglib2.0-dev \
|
||||
libminiupnpc-dev \
|
||||
libarchive-dev \
|
||||
libgtk-3-dev \
|
||||
libwayland-client0 libwayland-cursor0 libwayland-egl1 \
|
||||
@@ -62,11 +63,6 @@ jobs:
|
||||
rm -rf AppDir
|
||||
DESTDIR="${PWD}/AppDir" ninja -C build install
|
||||
|
||||
- name: Verify offline docs install
|
||||
run: |
|
||||
set -eux
|
||||
test -f AppDir/usr/share/doc/zoitechat/html/index.html
|
||||
|
||||
- name: Bundle scripting runtimes in AppDir
|
||||
run: |
|
||||
set -eux
|
||||
|
||||
6
.github/workflows/flatpak-build.yml
vendored
6
.github/workflows/flatpak-build.yml
vendored
@@ -37,12 +37,6 @@ jobs:
|
||||
cache: false
|
||||
restore-cache: false
|
||||
|
||||
- name: Verify offline docs install
|
||||
run: |
|
||||
flatpak --user install -y zoitechat.flatpak
|
||||
app_dir="$(flatpak info --user --show-location net.zoite.Zoitechat)"
|
||||
test -f "$app_dir/files/share/zoitechat/offline-docs/index.html"
|
||||
|
||||
- name: Upload Flatpak Bundle
|
||||
id: upload_flatpak
|
||||
uses: actions/upload-artifact@v6
|
||||
|
||||
1
.github/workflows/manjaro-package-build.yml
vendored
1
.github/workflows/manjaro-package-build.yml
vendored
@@ -33,6 +33,7 @@ jobs:
|
||||
gtk3 \
|
||||
openssl \
|
||||
libcanberra \
|
||||
miniupnpc \
|
||||
libayatana-appindicator \
|
||||
iso-codes \
|
||||
lua \
|
||||
|
||||
10
.github/workflows/windows-build.yml
vendored
10
.github/workflows/windows-build.yml
vendored
@@ -132,16 +132,6 @@ jobs:
|
||||
msbuild win32\zoitechat.sln /m /verbosity:minimal /p:Configuration=Release /p:Platform=${{ matrix.platform }}
|
||||
shell: cmd
|
||||
|
||||
- name: Verify offline docs install
|
||||
run: |
|
||||
if not exist "..\zoitechat-build\${{ matrix.platform }}\rel\offline-docs\index.html" exit /b 1
|
||||
findstr /C:"Name:" "..\zoitechat-build\${{ matrix.platform }}\bin\zoitechat.iss" | findstr /C:"docs"
|
||||
findstr /C:"OFFLINEDOCSURL" "..\zoitechat-build\${{ matrix.platform }}\bin\zoitechat.iss"
|
||||
findstr /C:"Source:" "..\zoitechat-build\${{ matrix.platform }}\bin\zoitechat.iss" | findstr /C:"offline-docs"
|
||||
findstr /C:"offline-docs.tar.gz" "..\zoitechat-build\${{ matrix.platform }}\bin\zoitechat.iss"
|
||||
findstr /C:"InstallOfflineDocs" "..\zoitechat-build\${{ matrix.platform }}\bin\zoitechat.iss"
|
||||
shell: cmd
|
||||
|
||||
- name: Preparing Artifacts
|
||||
run: |
|
||||
move ..\zoitechat-build\${{ matrix.platform }}\ZoiteChat-*.exe .\
|
||||
|
||||
@@ -7,15 +7,3 @@ if get_option('gtk-frontend')
|
||||
subdir('misc')
|
||||
subdir('man')
|
||||
endif
|
||||
|
||||
offline_docs_url = get_option('offline-docs-url')
|
||||
offline_docs = custom_target('offline-docs',
|
||||
output: 'offline-docs.stamp',
|
||||
command: [find_program('python3'), files('misc/fetch_offline_docs.py'), offline_docs_url, '@OUTDIR@', meson.source_root()],
|
||||
build_by_default: true,
|
||||
)
|
||||
meson.add_install_script(
|
||||
files('misc/install_offline_docs.py'),
|
||||
join_paths(meson.current_build_dir(), 'offline-docs'),
|
||||
offline_docs_dir,
|
||||
)
|
||||
|
||||
@@ -1,89 +0,0 @@
|
||||
#!/usr/bin/env python3
|
||||
|
||||
import html
|
||||
import io
|
||||
import pathlib
|
||||
import shutil
|
||||
import sys
|
||||
import tarfile
|
||||
import tempfile
|
||||
import urllib.error
|
||||
import urllib.request
|
||||
|
||||
|
||||
url = sys.argv[1]
|
||||
out_dir = pathlib.Path(sys.argv[2])
|
||||
source_dir = pathlib.Path(sys.argv[3]) if len(sys.argv) > 3 else pathlib.Path.cwd()
|
||||
docs_dir = out_dir / "offline-docs"
|
||||
|
||||
if docs_dir.exists():
|
||||
shutil.rmtree(docs_dir)
|
||||
docs_dir.mkdir(parents=True, exist_ok=True)
|
||||
|
||||
|
||||
def write_source_docs() -> None:
|
||||
parts = [
|
||||
'<!doctype html><html><head><meta charset="utf-8">'
|
||||
"<title>ZoiteChat Documentation</title></head><body>"
|
||||
"<h1>ZoiteChat Documentation</h1>"
|
||||
]
|
||||
|
||||
for name in ("readme.md", "troubleshooting.md", "changelog.rst"):
|
||||
path = source_dir / name
|
||||
if path.exists():
|
||||
parts.append(
|
||||
f"<h2>{html.escape(name)}</h2>"
|
||||
f"<pre>{html.escape(path.read_text(encoding='utf-8', errors='replace'))}</pre>"
|
||||
)
|
||||
|
||||
parts.append("</body></html>")
|
||||
(docs_dir / "index.html").write_text("\n".join(parts), encoding="utf-8")
|
||||
|
||||
|
||||
def safe_extract(tar: tarfile.TarFile, target: pathlib.Path) -> None:
|
||||
target = target.resolve()
|
||||
|
||||
for member in tar.getmembers():
|
||||
member_path = (target / member.name).resolve()
|
||||
if not str(member_path).startswith(str(target) + "/"):
|
||||
raise tarfile.TarError(f"unsafe archive path: {member.name}")
|
||||
|
||||
tar.extractall(target)
|
||||
|
||||
|
||||
def copy_index_tree(extracted_dir: pathlib.Path) -> bool:
|
||||
indexes = sorted(extracted_dir.rglob("index.html"))
|
||||
if not indexes:
|
||||
return False
|
||||
|
||||
root = indexes[0].parent
|
||||
for item in root.iterdir():
|
||||
dest = docs_dir / item.name
|
||||
if item.is_dir():
|
||||
shutil.copytree(item, dest, dirs_exist_ok=True)
|
||||
else:
|
||||
shutil.copy2(item, dest)
|
||||
|
||||
return (docs_dir / "index.html").exists()
|
||||
|
||||
|
||||
if url:
|
||||
try:
|
||||
with urllib.request.urlopen(url, timeout=30) as response:
|
||||
data = response.read()
|
||||
|
||||
with tempfile.TemporaryDirectory() as tmp:
|
||||
extract_dir = pathlib.Path(tmp)
|
||||
with tarfile.open(fileobj=io.BytesIO(data), mode="r:gz") as tar:
|
||||
safe_extract(tar, extract_dir)
|
||||
|
||||
if not copy_index_tree(extract_dir):
|
||||
write_source_docs()
|
||||
|
||||
except (OSError, tarfile.TarError, urllib.error.URLError) as error:
|
||||
print(f"offline docs download failed: {error}", file=sys.stderr)
|
||||
write_source_docs()
|
||||
else:
|
||||
write_source_docs()
|
||||
|
||||
(out_dir / "offline-docs.stamp").write_text("ok", encoding="utf-8")
|
||||
@@ -1,13 +0,0 @@
|
||||
#!/usr/bin/env python3
|
||||
import os
|
||||
import pathlib
|
||||
import shutil
|
||||
import sys
|
||||
|
||||
src = pathlib.Path(sys.argv[1])
|
||||
dest = pathlib.Path(os.environ['MESON_INSTALL_DESTDIR_PREFIX']) / sys.argv[2]
|
||||
if not (src / 'index.html').exists():
|
||||
sys.exit(0)
|
||||
if dest.exists():
|
||||
shutil.rmtree(dest)
|
||||
shutil.copytree(src, dest)
|
||||
@@ -56,9 +56,7 @@
|
||||
"-Ddbus-service-use-appid=true",
|
||||
"-Dwith-perl=perl",
|
||||
"-Dwith-python=python3",
|
||||
"-Dwith-lua=lua",
|
||||
"-Doffline-docs-package=net.zoite.Zoitechat",
|
||||
"-Doffline-docs-dir=share/zoitechat/offline-docs"
|
||||
"-Dwith-lua=lua"
|
||||
],
|
||||
"build-options": {
|
||||
"cflags": "-Wno-error=missing-include-dirs"
|
||||
|
||||
14
meson.build
14
meson.build
@@ -18,6 +18,8 @@ libgmodule_dep = dependency('gmodule-2.0')
|
||||
|
||||
libcanberra_dep = dependency('libcanberra', version: '>= 0.22',
|
||||
required: get_option('libcanberra'))
|
||||
miniupnpc_dep = dependency('miniupnpc', version: '>= 2.0.0',
|
||||
required: get_option('miniupnpc'))
|
||||
dbus_dep = dependency('gio-2.0', required: get_option('dbus'))
|
||||
|
||||
global_deps = []
|
||||
@@ -32,24 +34,15 @@ config_h = configuration_data()
|
||||
config_h.set_quoted('PACKAGE_VERSION', meson.project_version())
|
||||
config_h.set_quoted('PACKAGE_NAME', meson.project_name())
|
||||
config_h.set_quoted('GETTEXT_PACKAGE', 'zoitechat')
|
||||
offline_docs_package = get_option('offline-docs-package')
|
||||
if offline_docs_package == ''
|
||||
offline_docs_package = meson.project_name()
|
||||
endif
|
||||
offline_docs_dir = get_option('offline-docs-dir')
|
||||
if offline_docs_dir == ''
|
||||
offline_docs_dir = join_paths(get_option('datadir'), 'doc', offline_docs_package, 'html')
|
||||
endif
|
||||
config_h.set_quoted('LOCALEDIR', join_paths(get_option('prefix'),
|
||||
get_option('datadir'), 'locale'))
|
||||
config_h.set_quoted('ZOITECHATDOCDIR', join_paths(get_option('prefix'),
|
||||
offline_docs_dir))
|
||||
config_h.set10('ENABLE_NLS', true)
|
||||
|
||||
# Optional features
|
||||
config_h.set('USE_OPENSSL', libssl_dep.found())
|
||||
config_h.set('USE_LIBCANBERRA', libcanberra_dep.found())
|
||||
config_h.set('USE_DBUS', dbus_dep.found())
|
||||
config_h.set('USE_MINIUPNPC', miniupnpc_dep.found())
|
||||
config_h.set('USE_PLUGIN', get_option('plugin'))
|
||||
config_h.set('USE_GTK_FRONTEND', get_option('gtk-frontend'))
|
||||
|
||||
@@ -193,6 +186,7 @@ if meson.version().version_compare('>= 0.55.0')
|
||||
'Plugin Support': get_option('plugin'),
|
||||
'DBus Support': dbus_dep.found(),
|
||||
'libcanberra': libcanberra_dep.found(),
|
||||
'miniupnpc': miniupnpc_dep.found(),
|
||||
}, section: 'Features')
|
||||
|
||||
summary({
|
||||
|
||||
@@ -19,6 +19,9 @@ option('dbus', type: 'feature', value: 'auto',
|
||||
option('libcanberra', type: 'feature', value: 'auto',
|
||||
description: 'Support for sound alerts, Unix only'
|
||||
)
|
||||
option('miniupnpc', type: 'feature', value: 'auto',
|
||||
description: 'Support for DCC Universal Plug & Play, Unix only'
|
||||
)
|
||||
option('appindicator', type: 'feature', value: 'auto',
|
||||
description: 'Use Ayatana/AppIndicator-based tray backend for GTK frontend (non-Windows only)'
|
||||
)
|
||||
@@ -62,13 +65,3 @@ option('with-upd', type: 'boolean',
|
||||
option('with-perl-legacy-api', type: 'boolean', value: false,
|
||||
description: 'Enables the legacy IRC perl module for compatibility with old scripts'
|
||||
)
|
||||
|
||||
option('offline-docs-url', type: 'string', value: 'https://dl.zoitechat.org/offlinedocs/zoitechat-docs-html-2.18.1.tar.gz',
|
||||
description: 'URL for offline documentation archive (tar.gz)'
|
||||
)
|
||||
option('offline-docs-package', type: 'string', value: '',
|
||||
description: 'Package or app id to use under the installed documentation directory'
|
||||
)
|
||||
option('offline-docs-dir', type: 'string', value: '',
|
||||
description: 'Installed offline documentation directory relative to prefix'
|
||||
)
|
||||
|
||||
@@ -13,6 +13,7 @@ depends=(
|
||||
'iso-codes'
|
||||
'libayatana-appindicator'
|
||||
'libcanberra'
|
||||
'miniupnpc'
|
||||
'lua'
|
||||
'openssl'
|
||||
'perl'
|
||||
@@ -66,5 +67,4 @@ build() {
|
||||
|
||||
package() {
|
||||
meson install -C build --destdir "$pkgdir"
|
||||
test -f "$pkgdir/usr/share/doc/zoitechat/html/index.html"
|
||||
}
|
||||
|
||||
@@ -562,6 +562,7 @@ const struct prefs vars[] =
|
||||
{"net_proxy_user", P_OFFSET (hex_net_proxy_user), TYPE_STR},
|
||||
{"net_reconnect_delay", P_OFFINT (hex_net_reconnect_delay), TYPE_INT},
|
||||
{"net_throttle", P_OFFINT (hex_net_throttle), TYPE_BOOL},
|
||||
{"net_upnp", P_OFFINT (hex_net_upnp), TYPE_BOOL},
|
||||
|
||||
{"notify_timeout", P_OFFINT (hex_notify_timeout), TYPE_INT},
|
||||
{"notify_whois_online", P_OFFINT (hex_notify_whois_online), TYPE_BOOL},
|
||||
@@ -811,6 +812,7 @@ load_default_config(void)
|
||||
prefs.hex_irc_whois_front = 1;
|
||||
prefs.hex_net_auto_reconnect = 1;
|
||||
prefs.hex_net_throttle = 1;
|
||||
prefs.hex_net_upnp = 1;
|
||||
prefs.hex_stamp_log = 1;
|
||||
prefs.hex_stamp_text = 1;
|
||||
prefs.hex_text_autocopy_text = 1;
|
||||
|
||||
@@ -74,6 +74,7 @@
|
||||
<ClCompile Include="sysinfo\win32\backend.c" />
|
||||
<ClCompile Include="text.c" />
|
||||
<ClCompile Include="tree.c" />
|
||||
<ClCompile Include="upnp.c" />
|
||||
<ClCompile Include="url.c" />
|
||||
<ClCompile Include="userlist.c" />
|
||||
<ClCompile Include="util.c" />
|
||||
|
||||
@@ -190,6 +190,9 @@
|
||||
<ClCompile Include="tree.c">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="upnp.c">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="url.c">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
|
||||
@@ -57,6 +57,7 @@
|
||||
#include "text.h"
|
||||
#include "url.h"
|
||||
#include "zoitechatc.h"
|
||||
#include "upnp.h"
|
||||
|
||||
/* Setting _FILE_OFFSET_BITS to 64 doesn't change lseek to use off64_t on Windows, so override lseek to the version that does */
|
||||
#if defined(WIN32) && (!defined(__MINGW32__) && !defined(__MINGW64__))
|
||||
@@ -371,6 +372,12 @@ dcc_connect_sok (struct DCC *dcc)
|
||||
static void
|
||||
dcc_close (struct DCC *dcc, enum dcc_state dccstat, int destroy)
|
||||
{
|
||||
if (dcc->port > 0)
|
||||
{
|
||||
if (prefs.hex_net_upnp)
|
||||
upnp_rem_redir(dcc->port);
|
||||
}
|
||||
|
||||
if (dcc->wiotag)
|
||||
{
|
||||
fe_input_remove (dcc->wiotag);
|
||||
@@ -1711,6 +1718,8 @@ dcc_listen_init (struct DCC *dcc, session *sess)
|
||||
set_blocking (dcc->sok);
|
||||
|
||||
dcc->iotag = fe_input_add (dcc->sok, FIA_READ|FIA_EX, dcc_accept, dcc);
|
||||
if (prefs.hex_net_upnp)
|
||||
upnp_add_redir(inet_ntoa(SAddr.sin_addr), dcc->port);
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
@@ -24,7 +24,8 @@ common_sources = [
|
||||
'tree.c',
|
||||
'url.c',
|
||||
'userlist.c',
|
||||
'util.c'
|
||||
'util.c',
|
||||
'upnp.c'
|
||||
]
|
||||
|
||||
common_sysinfo_deps = []
|
||||
@@ -115,6 +116,10 @@ if libssl_dep.found()
|
||||
common_deps += libssl_dep
|
||||
endif
|
||||
|
||||
if miniupnpc_dep.found()
|
||||
common_deps += miniupnpc_dep
|
||||
endif
|
||||
|
||||
if dbus_dep.found()
|
||||
subdir('dbus')
|
||||
common_deps += zoitechat_dbus_dep
|
||||
|
||||
111
src/common/upnp.c
Normal file
111
src/common/upnp.c
Normal file
@@ -0,0 +1,111 @@
|
||||
/*
|
||||
* Copyright (C) Thomas Bernard
|
||||
* Copyright (C) HexChat contributors
|
||||
* Copyright (C) ZoiteChat contributors
|
||||
*/
|
||||
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
|
||||
#include "upnp.h"
|
||||
|
||||
#ifdef USE_MINIUPNPC
|
||||
#include <miniupnpc/miniupnpc.h>
|
||||
#include <miniupnpc/upnpcommands.h>
|
||||
#include <miniupnpc/upnperrors.h>
|
||||
|
||||
static struct UPNPUrls urls;
|
||||
static struct IGDdatas data;
|
||||
static int ready;
|
||||
static char upnp_lanaddr[64];
|
||||
|
||||
void
|
||||
upnp_init(void)
|
||||
{
|
||||
int err = 0;
|
||||
int igd = 0;
|
||||
char lanaddr[64] = {0};
|
||||
struct UPNPDev *devlist;
|
||||
|
||||
memset(&urls, 0, sizeof(urls));
|
||||
memset(&data, 0, sizeof(data));
|
||||
ready = 0;
|
||||
upnp_lanaddr[0] = 0;
|
||||
|
||||
devlist = upnpDiscover(2000, NULL, NULL, 0, 0, 2, &err);
|
||||
if (!devlist)
|
||||
devlist = upnpDiscover(2000, NULL, NULL, 0, 1, 2, &err);
|
||||
if (!devlist)
|
||||
return;
|
||||
|
||||
igd = UPNP_GetValidIGD(devlist, &urls, &data, lanaddr, sizeof(lanaddr));
|
||||
if (igd == 1 || igd == 2 || igd == 3)
|
||||
{
|
||||
ready = 1;
|
||||
snprintf(upnp_lanaddr, sizeof(upnp_lanaddr), "%s", lanaddr);
|
||||
}
|
||||
|
||||
freeUPNPDevlist(devlist);
|
||||
}
|
||||
|
||||
void
|
||||
upnp_add_redir(const char *addr, int port)
|
||||
{
|
||||
char port_str[16];
|
||||
const char *map_addr;
|
||||
int r;
|
||||
|
||||
if (!ready)
|
||||
upnp_init();
|
||||
if (!ready)
|
||||
return;
|
||||
|
||||
map_addr = upnp_lanaddr[0] ? upnp_lanaddr : addr;
|
||||
if (!map_addr || !map_addr[0])
|
||||
return;
|
||||
|
||||
snprintf(port_str, sizeof(port_str), "%d", port);
|
||||
r = UPNP_AddPortMapping(urls.controlURL, data.first.servicetype,
|
||||
port_str, port_str, NULL, "zoitechat", "TCP", NULL, NULL);
|
||||
if (r != UPNPCOMMAND_SUCCESS)
|
||||
r = UPNP_AddPortMapping(urls.controlURL, data.first.servicetype,
|
||||
port_str, port_str, map_addr, "zoitechat", "TCP", NULL, NULL);
|
||||
if (r != UPNPCOMMAND_SUCCESS)
|
||||
return;
|
||||
}
|
||||
|
||||
void
|
||||
upnp_rem_redir(int port)
|
||||
{
|
||||
char port_str[16];
|
||||
|
||||
if (!ready)
|
||||
upnp_init();
|
||||
if (!ready)
|
||||
return;
|
||||
|
||||
snprintf(port_str, sizeof(port_str), "%d", port);
|
||||
UPNP_DeletePortMapping(urls.controlURL, data.first.servicetype, port_str, "TCP", NULL);
|
||||
}
|
||||
|
||||
#else
|
||||
|
||||
void
|
||||
upnp_init(void)
|
||||
{
|
||||
}
|
||||
|
||||
void
|
||||
upnp_add_redir(const char *addr, int port)
|
||||
{
|
||||
(void)addr;
|
||||
(void)port;
|
||||
}
|
||||
|
||||
void
|
||||
upnp_rem_redir(int port)
|
||||
{
|
||||
(void)port;
|
||||
}
|
||||
|
||||
#endif
|
||||
14
src/common/upnp.h
Normal file
14
src/common/upnp.h
Normal file
@@ -0,0 +1,14 @@
|
||||
/*
|
||||
* Copyright (C) Thomas Bernard
|
||||
* Copyright (C) HexChat contributors
|
||||
* Copyright (C) ZoiteChat contributors
|
||||
*/
|
||||
|
||||
#ifndef ZOITECHAT_UPNP_H
|
||||
#define ZOITECHAT_UPNP_H
|
||||
|
||||
void upnp_init(void);
|
||||
void upnp_add_redir(const char *addr, int port);
|
||||
void upnp_rem_redir(int port);
|
||||
|
||||
#endif
|
||||
@@ -54,6 +54,7 @@
|
||||
#include "text.h"
|
||||
#include "url.h"
|
||||
#include "zoitechatc.h"
|
||||
#include "upnp.h"
|
||||
|
||||
#if ! GLIB_CHECK_VERSION (2, 36, 0)
|
||||
#include <glib-object.h> /* for g_type_init() */
|
||||
@@ -961,6 +962,8 @@ xchat_init (void)
|
||||
sound_load ();
|
||||
notify_load ();
|
||||
ignore_load ();
|
||||
if (prefs.hex_net_upnp)
|
||||
upnp_init ();
|
||||
sts_init ();
|
||||
|
||||
g_snprintf (buf, sizeof (buf),
|
||||
|
||||
@@ -202,6 +202,7 @@ struct zoitechatprefs
|
||||
unsigned int hex_net_auto_reconnectonfail;
|
||||
unsigned int hex_net_proxy_auth;
|
||||
unsigned int hex_net_throttle;
|
||||
unsigned int hex_net_upnp;
|
||||
unsigned int hex_notify_whois_online;
|
||||
unsigned int hex_perl_warnings;
|
||||
unsigned int hex_stamp_log;
|
||||
|
||||
@@ -44,7 +44,6 @@ REM zoitechat.rc needs to be in UCS-2 or Resource Compiler will complain
|
||||
powershell "Get-Content -Encoding UTF8 '$(ZoiteChatLib)zoitechat.rc.utf8' | Out-File '$(ZoiteChatLib)zoitechat.rc'; Remove-Item '$(ZoiteChatLib)zoitechat.rc.utf8'"
|
||||
"$(DepsRoot)\bin\glib-compile-resources.exe" --generate-header --manual-register --sourcedir "$(DataDir)" --target "$(ZoiteChatLib)resources.h" "$(DataDir)zoitechat.gresource.xml"
|
||||
"$(DepsRoot)\bin\glib-compile-resources.exe" --generate-source --manual-register --sourcedir "$(DataDir)" --target "$(ZoiteChatLib)resources.c" "$(DataDir)zoitechat.gresource.xml"
|
||||
"$(Python3Path)\python.exe" "$(DataDir)misc\fetch_offline_docs.py" "$(OfflineDocsUrl)" "$(ZoiteChatRel)." "$(SolutionDir).."
|
||||
]]></Command>
|
||||
<Message>Build zoitechat.rc and gresource file</Message>
|
||||
</PreBuildEvent>
|
||||
|
||||
@@ -272,6 +272,13 @@ gtkutil_apply_palette (GtkWidget *widget, const GdkRGBA *bg, const GdkRGBA *fg,
|
||||
theme_manager_apply_palette_widget (widget, bg, fg, font_desc);
|
||||
}
|
||||
|
||||
static void
|
||||
gtkutil_file_req_destroy (GtkWidget * wid, struct file_req *freq)
|
||||
{
|
||||
freq->callback (freq->userdata, NULL);
|
||||
g_free (freq);
|
||||
}
|
||||
|
||||
static void
|
||||
gtkutil_check_file (char *filename, struct file_req *freq)
|
||||
{
|
||||
@@ -383,6 +390,26 @@ gtkutil_file_req_done_chooser (GtkFileChooser *fs, struct file_req *freq)
|
||||
|
||||
}
|
||||
|
||||
static void
|
||||
gtkutil_file_req_done (GtkWidget * wid, struct file_req *freq)
|
||||
{
|
||||
gtkutil_file_req_done_chooser (GTK_FILE_CHOOSER (freq->dialog), freq);
|
||||
gtk_widget_destroy (freq->dialog);
|
||||
}
|
||||
|
||||
static void
|
||||
gtkutil_file_req_response (GtkWidget *dialog, gint res, struct file_req *freq)
|
||||
{
|
||||
if (res == GTK_RESPONSE_ACCEPT)
|
||||
{
|
||||
gtkutil_file_req_done (dialog, freq);
|
||||
return;
|
||||
}
|
||||
|
||||
gtk_widget_destroy (dialog);
|
||||
}
|
||||
|
||||
#ifdef WIN32
|
||||
static gboolean
|
||||
gtkutil_native_dialog_unref_idle (gpointer native)
|
||||
{
|
||||
@@ -396,16 +423,27 @@ gtkutil_native_file_req_response (GtkNativeDialog *dialog, gint res, struct file
|
||||
if (res == GTK_RESPONSE_ACCEPT)
|
||||
gtkutil_file_req_done_chooser (GTK_FILE_CHOOSER (dialog), freq);
|
||||
|
||||
/* Match gtk dialog flow by always sending NULL to indicate completion. */
|
||||
freq->callback (freq->userdata, NULL);
|
||||
g_free (freq);
|
||||
|
||||
/*
|
||||
* Defer unref until idle to avoid disposing the native chooser while
|
||||
* still in the button-release signal stack on Windows.
|
||||
*/
|
||||
g_idle_add (gtkutil_native_dialog_unref_idle, dialog);
|
||||
}
|
||||
#endif
|
||||
|
||||
void
|
||||
gtkutil_file_req (GtkWindow *parent, const char *title, void *callback, void *userdata, char *filter, char *extensions,
|
||||
int flags)
|
||||
{
|
||||
struct file_req *freq;
|
||||
GtkWidget *dialog;
|
||||
GtkFileFilter *filefilter;
|
||||
char *token;
|
||||
char *tokenbuffer;
|
||||
const char *xdir;
|
||||
GtkWindow *effective_parent = parent;
|
||||
|
||||
@@ -415,6 +453,7 @@ gtkutil_file_req (GtkWindow *parent, const char *title, void *callback, void *us
|
||||
|
||||
xdir = get_xdir ();
|
||||
|
||||
#ifdef WIN32
|
||||
{
|
||||
GtkFileChooserNative *native = gtk_file_chooser_native_new (
|
||||
title,
|
||||
@@ -490,7 +529,107 @@ gtkutil_file_req (GtkWindow *parent, const char *title, void *callback, void *us
|
||||
gtk_native_dialog_show (GTK_NATIVE_DIALOG (native));
|
||||
return;
|
||||
}
|
||||
#endif
|
||||
|
||||
if (flags & FRF_WRITE)
|
||||
{
|
||||
dialog = gtk_file_chooser_dialog_new (title, NULL,
|
||||
GTK_FILE_CHOOSER_ACTION_SAVE,
|
||||
_("_Cancel"), GTK_RESPONSE_CANCEL,
|
||||
_("_Save"), GTK_RESPONSE_ACCEPT,
|
||||
NULL);
|
||||
|
||||
if (!(flags & FRF_NOASKOVERWRITE))
|
||||
gtk_file_chooser_set_do_overwrite_confirmation (GTK_FILE_CHOOSER (dialog), TRUE);
|
||||
}
|
||||
else
|
||||
dialog = gtk_file_chooser_dialog_new (title, NULL,
|
||||
GTK_FILE_CHOOSER_ACTION_OPEN,
|
||||
_("_Cancel"), GTK_RESPONSE_CANCEL,
|
||||
_("_Open"), GTK_RESPONSE_ACCEPT,
|
||||
NULL);
|
||||
|
||||
theme_manager_attach_window (dialog);
|
||||
|
||||
if (filter && filter[0] && (flags & FRF_FILTERISINITIAL))
|
||||
{
|
||||
if (flags & FRF_WRITE)
|
||||
{
|
||||
char temp[1024];
|
||||
path_part (filter, temp, sizeof (temp));
|
||||
if (temp[0] && g_file_test (temp, G_FILE_TEST_IS_DIR))
|
||||
gtk_file_chooser_set_current_folder (GTK_FILE_CHOOSER (dialog), temp);
|
||||
else if (xdir && xdir[0] && g_file_test (xdir, G_FILE_TEST_IS_DIR))
|
||||
gtk_file_chooser_set_current_folder (GTK_FILE_CHOOSER (dialog), xdir);
|
||||
gtk_file_chooser_set_current_name (GTK_FILE_CHOOSER (dialog), file_part (filter));
|
||||
}
|
||||
else
|
||||
{
|
||||
if (g_file_test (filter, G_FILE_TEST_IS_DIR))
|
||||
gtk_file_chooser_set_current_folder (GTK_FILE_CHOOSER (dialog), filter);
|
||||
else if (xdir && xdir[0] && g_file_test (xdir, G_FILE_TEST_IS_DIR))
|
||||
gtk_file_chooser_set_current_folder (GTK_FILE_CHOOSER (dialog), xdir);
|
||||
}
|
||||
}
|
||||
else if (!(flags & FRF_RECENTLYUSED))
|
||||
{
|
||||
if (xdir && xdir[0] && g_file_test (xdir, G_FILE_TEST_IS_DIR))
|
||||
gtk_file_chooser_set_current_folder (GTK_FILE_CHOOSER (dialog), xdir);
|
||||
}
|
||||
|
||||
if (flags & FRF_MULTIPLE)
|
||||
gtk_file_chooser_set_select_multiple (GTK_FILE_CHOOSER (dialog), TRUE);
|
||||
if (flags & FRF_CHOOSEFOLDER)
|
||||
gtk_file_chooser_set_action (GTK_FILE_CHOOSER (dialog), GTK_FILE_CHOOSER_ACTION_SELECT_FOLDER);
|
||||
|
||||
if ((flags & FRF_EXTENSIONS || flags & FRF_MIMETYPES) && extensions != NULL)
|
||||
{
|
||||
filefilter = gtk_file_filter_new ();
|
||||
tokenbuffer = g_strdup (extensions);
|
||||
token = strtok (tokenbuffer, ";");
|
||||
|
||||
while (token != NULL)
|
||||
{
|
||||
if (flags & FRF_EXTENSIONS)
|
||||
gtk_file_filter_add_pattern (filefilter, token);
|
||||
else
|
||||
gtk_file_filter_add_mime_type (filefilter, token);
|
||||
token = strtok (NULL, ";");
|
||||
}
|
||||
|
||||
g_free (tokenbuffer);
|
||||
gtk_file_chooser_set_filter (GTK_FILE_CHOOSER (dialog), filefilter);
|
||||
}
|
||||
|
||||
if (xdir && xdir[0] && g_file_test (xdir, G_FILE_TEST_IS_DIR))
|
||||
{
|
||||
GError *shortcut_error = NULL;
|
||||
|
||||
gtk_file_chooser_add_shortcut_folder (GTK_FILE_CHOOSER (dialog), xdir, &shortcut_error);
|
||||
if (shortcut_error)
|
||||
g_error_free (shortcut_error);
|
||||
}
|
||||
freq = g_new (struct file_req, 1);
|
||||
freq->dialog = dialog;
|
||||
freq->flags = flags;
|
||||
freq->callback = callback;
|
||||
freq->userdata = userdata;
|
||||
|
||||
g_signal_connect (G_OBJECT (dialog), "response",
|
||||
G_CALLBACK (gtkutil_file_req_response), freq);
|
||||
g_signal_connect (G_OBJECT (dialog), "destroy",
|
||||
G_CALLBACK (gtkutil_file_req_destroy), (gpointer) freq);
|
||||
|
||||
if (effective_parent)
|
||||
gtk_window_set_transient_for (GTK_WINDOW (dialog), effective_parent);
|
||||
|
||||
if (flags & FRF_MODAL)
|
||||
{
|
||||
g_assert (effective_parent);
|
||||
gtk_window_set_modal (GTK_WINDOW (dialog), TRUE);
|
||||
}
|
||||
|
||||
gtk_widget_show (dialog);
|
||||
}
|
||||
|
||||
static gboolean
|
||||
|
||||
@@ -3471,7 +3471,7 @@ mg_create_infoframe (GtkWidget *box)
|
||||
|
||||
frame = gtk_frame_new (0);
|
||||
gtk_frame_set_shadow_type ((GtkFrame*)frame, GTK_SHADOW_OUT);
|
||||
gtk_box_pack_start (GTK_BOX (box), frame, TRUE, TRUE, 0);
|
||||
gtk_box_pack_start (GTK_BOX (box), frame, FALSE, TRUE, 0);
|
||||
|
||||
hbox = mg_box_new (GTK_ORIENTATION_HORIZONTAL, FALSE, 0);
|
||||
gtk_container_add (GTK_CONTAINER (frame), hbox);
|
||||
@@ -3492,7 +3492,7 @@ mg_create_meters (session_gui *gui, GtkWidget *parent_box)
|
||||
|
||||
if ((prefs.hex_gui_lagometer & 2) || (prefs.hex_gui_throttlemeter & 2))
|
||||
{
|
||||
infbox = mg_box_new (GTK_ORIENTATION_HORIZONTAL, TRUE, 0);
|
||||
infbox = mg_box_new (GTK_ORIENTATION_HORIZONTAL, FALSE, 0);
|
||||
gtk_box_pack_start (GTK_BOX (box), infbox, 0, 0, 0);
|
||||
}
|
||||
|
||||
|
||||
@@ -1717,32 +1717,7 @@ menu_ctcpguiopen (void)
|
||||
static void
|
||||
menu_docs (GtkWidget *wid, gpointer none)
|
||||
{
|
||||
GNetworkMonitor *monitor;
|
||||
char *offline_docs;
|
||||
gboolean online;
|
||||
|
||||
offline_docs = g_build_filename (get_xdir (), "offline-docs", "index.html", NULL);
|
||||
if (g_access (offline_docs, R_OK) == 0)
|
||||
{
|
||||
fe_open_url (offline_docs);
|
||||
g_free (offline_docs);
|
||||
return;
|
||||
}
|
||||
g_free (offline_docs);
|
||||
offline_docs = g_build_filename (ZOITECHATDOCDIR, "index.html", NULL);
|
||||
if (g_access (offline_docs, R_OK) == 0)
|
||||
{
|
||||
fe_open_url (offline_docs);
|
||||
g_free (offline_docs);
|
||||
return;
|
||||
}
|
||||
g_free (offline_docs);
|
||||
online = TRUE;
|
||||
monitor = g_network_monitor_get_default ();
|
||||
if (monitor)
|
||||
online = g_network_monitor_get_network_available (monitor);
|
||||
if (online)
|
||||
fe_open_url ("https://docs.zoitechat.org/en/latest/");
|
||||
fe_open_url ("https://docs.zoitechat.org/en/latest/");
|
||||
}
|
||||
|
||||
/*static void
|
||||
|
||||
@@ -650,7 +650,7 @@ static const setting network_settings[] =
|
||||
{ST_NUMBER, N_("First DCC listen port:"), P_OFFINTNL(hex_dcc_port_first), 0, 0, 65535},
|
||||
{ST_NUMBER, N_("Last DCC listen port:"), P_OFFINTNL(hex_dcc_port_last), 0,
|
||||
(const char **)N_("!Leave ports at zero for full range."), 65535},
|
||||
|
||||
{ST_TOGGLE, N_("Enable UPnP port mapping for DCC"), P_OFFINTNL(hex_net_upnp), 0, 0, 0},
|
||||
{ST_HEADER, N_("Proxy Server"), 0, 0, 0, 0},
|
||||
{ST_ENTRY, N_("Hostname:"), P_OFFSETNL(hex_net_proxy_host), 0, 0, sizeof prefs.hex_net_proxy_host},
|
||||
{ST_NUMBER, N_("Port:"), P_OFFINTNL(hex_net_proxy_port), 0, 0, 65535},
|
||||
|
||||
@@ -2300,12 +2300,6 @@ gtk_xtext_leave_notify (GtkWidget * widget, GdkEventCrossing * event)
|
||||
xtext->hilight_ent = NULL;
|
||||
}
|
||||
|
||||
if (xtext->tooltip_stamp_set)
|
||||
{
|
||||
gtk_widget_set_tooltip_text (widget, NULL);
|
||||
xtext->tooltip_stamp_set = FALSE;
|
||||
}
|
||||
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
@@ -2472,7 +2466,7 @@ gtk_xtext_motion_notify (GtkWidget * widget, GdkEventMotion * event)
|
||||
}
|
||||
|
||||
if (xtext->urlcheck_function == NULL)
|
||||
goto tooltip_check;
|
||||
return FALSE;
|
||||
|
||||
word_type = gtk_xtext_get_word_adjust (xtext, x, y, &word_ent, &offset, &len);
|
||||
if (word_type > 0)
|
||||
@@ -2510,46 +2504,6 @@ gtk_xtext_motion_notify (GtkWidget * widget, GdkEventMotion * event)
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
tooltip_check:
|
||||
if (xtext->buffer->time_stamp && xtext->buffer->indent > 0 && x >= 0 && x < xtext->stamp_width)
|
||||
{
|
||||
textentry *ent = gtk_xtext_find_char (xtext, x, y, NULL, NULL);
|
||||
if (ent && (!xtext->tooltip_stamp_set || xtext->tooltip_stamp != ent->stamp))
|
||||
{
|
||||
char tooltip[96];
|
||||
strftime_utf8 (tooltip, sizeof (tooltip), "%Y-%m-%d", ent->stamp);
|
||||
gtk_widget_set_tooltip_text (widget, tooltip);
|
||||
xtext->tooltip_stamp = ent->stamp;
|
||||
xtext->tooltip_stamp_set = TRUE;
|
||||
}
|
||||
if (ent)
|
||||
return FALSE;
|
||||
}
|
||||
else if (!xtext->buffer->time_stamp && x >= xtext->buffer->indent)
|
||||
{
|
||||
textentry *ent = gtk_xtext_find_char (xtext, x, y, NULL, NULL);
|
||||
if (ent && ent->stamp && (!xtext->tooltip_stamp_set || xtext->tooltip_stamp != ent->stamp))
|
||||
{
|
||||
char tooltip[128];
|
||||
char date[64];
|
||||
char *stamp_text;
|
||||
strftime_utf8 (date, sizeof (date), "%Y-%m-%d", ent->stamp);
|
||||
xtext_get_stamp_str (ent->stamp, &stamp_text);
|
||||
g_snprintf (tooltip, sizeof (tooltip), "%s %s", date, stamp_text);
|
||||
gtk_widget_set_tooltip_text (widget, tooltip);
|
||||
g_free (stamp_text);
|
||||
xtext->tooltip_stamp = ent->stamp;
|
||||
xtext->tooltip_stamp_set = TRUE;
|
||||
}
|
||||
if (ent)
|
||||
return FALSE;
|
||||
}
|
||||
else if (xtext->tooltip_stamp_set)
|
||||
{
|
||||
gtk_widget_set_tooltip_text (widget, NULL);
|
||||
xtext->tooltip_stamp_set = FALSE;
|
||||
}
|
||||
|
||||
gtk_xtext_leave_notify (widget, NULL);
|
||||
|
||||
return FALSE;
|
||||
|
||||
@@ -190,8 +190,6 @@ struct _GtkXText
|
||||
textentry *hilight_ent;
|
||||
int hilight_start;
|
||||
int hilight_end;
|
||||
time_t tooltip_stamp;
|
||||
unsigned int tooltip_stamp_set:1;
|
||||
|
||||
guint16 fontwidth[128]; /* each char's width, only the ASCII ones */
|
||||
|
||||
|
||||
@@ -9,7 +9,6 @@
|
||||
#define PACKAGE_VERSION "<#= [string]::Join('.', $versionParts) #>"
|
||||
#define ZOITECHATLIBDIR ".\\plugins"
|
||||
#define ZOITECHATSHAREDIR "."
|
||||
#define ZOITECHATDOCDIR "offline-docs"
|
||||
#define OLD_PERL
|
||||
#define GETTEXT_PACKAGE "zoitechat"
|
||||
#define PACKAGE_TARNAME "zoitechat-<#= [string]::Join('.', $versionParts) #>"
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
#define APPNAM "ZoiteChat"
|
||||
#define APPVER "<#= [string]::Join('.', $versionParts) #>"
|
||||
#define OFFLINEDOCSURL "https://dl.zoitechat.org/offlinedocs/zoitechat-docs-html-" + APPVER + ".tar.gz"
|
||||
; These are defined by our installer project at build time
|
||||
;#define APPARCH "x64"
|
||||
;#define PROJECTDIR "C:\...\zoitechat\win32\installer\"
|
||||
@@ -50,7 +49,6 @@ Name: "icons"; Description: "Create Shortcuts"; Types: custom; Flags: disablenou
|
||||
Name: "icons\desktopicon"; Description: "Create Desktop Shortcut"; Types: custom; Flags: disablenouninstallwarning
|
||||
Name: "icons\quicklaunchicon"; Description: "Create Quick Launch Shortcut"; Types: custom; Flags: disablenouninstallwarning
|
||||
Name: "translations"; Description: "Translations"; Types: normal custom; Flags: disablenouninstallwarning
|
||||
Name: "docs"; Description: "Offline Documentation"; Types: normal minimal custom; Flags: disablenouninstallwarning
|
||||
Name: "spell"; Description: "Spelling Dictionaries"; Types: custom; Flags: disablenouninstallwarning
|
||||
Name: "plugins"; Description: "Plugins"; Types: custom; Flags: disablenouninstallwarning
|
||||
Name: "plugins\checksum"; Description: "Checksum"; Types: custom; Flags: disablenouninstallwarning
|
||||
@@ -97,7 +95,6 @@ Filename: "{sys}\WindowsPowerShell\v1.0\powershell.exe"; Parameters: "-NoProfile
|
||||
|
||||
[Dirs]
|
||||
Name: "{userappdata}\ZoiteChat\gtk3-themes"; Components: themes
|
||||
Name: "{app}\offline-docs"; Components: docs
|
||||
|
||||
[Files]
|
||||
Source: "portable-mode"; DestDir: "{app}"; Tasks: portable
|
||||
@@ -108,7 +105,6 @@ Source: "cert.pem"; DestDir: "{app}"; Flags: ignoreversion; Components: libs
|
||||
Source: "share\xml\*"; DestDir: "{app}\share\xml"; Flags: ignoreversion createallsubdirs recursesubdirs; Components: libs
|
||||
Source: "share\doc\zoitechat\*"; DestDir: "{app}\share\doc\zoitechat"; Flags: ignoreversion createallsubdirs recursesubdirs; Components: libs
|
||||
Source: "share\doc\WinSparkle\*"; DestDir: "{app}\share\doc\WinSparkle"; Flags: ignoreversion createallsubdirs recursesubdirs; Components: libs
|
||||
Source: "offline-docs\*"; DestDir: "{app}\offline-docs"; Flags: ignoreversion createallsubdirs recursesubdirs; Components: docs
|
||||
Source: "share\themes\MS-Windows\*"; DestDir: "{app}\share\themes\MS-Windows"; Flags: ignoreversion createallsubdirs recursesubdirs skipifsourcedoesntexist; Components: libs
|
||||
Source: "share\glib-2.0\schemas\*"; DestDir: "{app}\share\glib-2.0\schemas"; Flags: ignoreversion createallsubdirs recursesubdirs skipifsourcedoesntexist; Components: libs
|
||||
Source: "share\icons\hicolor\*"; DestDir: "{app}\share\icons\hicolor"; Flags: ignoreversion createallsubdirs recursesubdirs skipifsourcedoesntexist; Components: libs
|
||||
@@ -318,34 +314,7 @@ begin
|
||||
end;
|
||||
|
||||
|
||||
function InstallOfflineDocs(): Boolean;
|
||||
var
|
||||
Archive: String;
|
||||
DocsDir: String;
|
||||
ResultCode: Integer;
|
||||
Script: String;
|
||||
WorkDir: String;
|
||||
begin
|
||||
Result := True;
|
||||
Archive := ExpandConstant('{tmp}\offline-docs.tar.gz');
|
||||
DocsDir := ExpandConstant('{app}\offline-docs');
|
||||
WorkDir := ExpandConstant('{tmp}\offline-docs-extract');
|
||||
if not FileExists(Archive) then
|
||||
Exit;
|
||||
Script := 'Remove-Item -LiteralPath ''' + WorkDir + ''' -Recurse -Force -ErrorAction SilentlyContinue; ' +
|
||||
'New-Item -ItemType Directory -LiteralPath ''' + WorkDir + ''' -Force | Out-Null; ' +
|
||||
'tar -xzf ''' + Archive + ''' -C ''' + WorkDir + '''; ' +
|
||||
'$i = Get-ChildItem -LiteralPath ''' + WorkDir + ''' -Recurse -Filter index.html | Select-Object -First 1; ' +
|
||||
'if (-not $i) { exit 1 }; ' +
|
||||
'Remove-Item -LiteralPath ''' + DocsDir + ''' -Recurse -Force -ErrorAction SilentlyContinue; ' +
|
||||
'New-Item -ItemType Directory -LiteralPath ''' + DocsDir + ''' -Force | Out-Null; ' +
|
||||
'Copy-Item -Path (Join-Path $i.DirectoryName ''*'') -Destination ''' + DocsDir + ''' -Recurse -Force';
|
||||
if not Exec(ExpandConstant('{sys}\WindowsPowerShell\v1.0\powershell.exe'), '-NoProfile -ExecutionPolicy Bypass -Command "' + Script + '"', '', SW_HIDE, ewWaitUntilTerminated, ResultCode) then
|
||||
Result := False
|
||||
else
|
||||
Result := ResultCode = 0;
|
||||
end;
|
||||
|
||||
/////////////////////////////////////////////////////////////////////
|
||||
function CheckSpellInstall(): Boolean;
|
||||
var
|
||||
Version: TWindowsVersion;
|
||||
@@ -382,9 +351,6 @@ begin
|
||||
if IsComponentSelected('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 IsComponentSelected('docs') then
|
||||
idpAddFile('{#OFFLINEDOCSURL}', ExpandConstant('{tmp}\offline-docs.tar.gz'));
|
||||
|
||||
if not IsTaskSelected('portable') then
|
||||
begin
|
||||
|
||||
@@ -453,13 +419,6 @@ begin
|
||||
Exit;
|
||||
end;
|
||||
|
||||
if IsComponentSelected('docs') and not FileExists(ExpandConstant('{tmp}\offline-docs.tar.gz')) then
|
||||
begin
|
||||
MsgBox('Offline documentation could not be downloaded. Please retry setup or rerun setup with Offline Documentation deselected.', mbError, MB_OK);
|
||||
Result := False;
|
||||
Exit;
|
||||
end;
|
||||
|
||||
if IsComponentSelected('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);
|
||||
@@ -538,10 +497,4 @@ begin
|
||||
DeleteFile(ExpandConstant('{app}\portable-mode'));
|
||||
end;
|
||||
end;
|
||||
|
||||
if (CurStep=ssPostInstall) and IsComponentSelected('docs') then
|
||||
begin
|
||||
if not InstallOfflineDocs() then
|
||||
MsgBox('Offline documentation could not be installed from the downloaded archive.', mbError, MB_OK);
|
||||
end;
|
||||
end;
|
||||
|
||||
Reference in New Issue
Block a user