summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAnton <anton@picapica.im>2026-09-26 03:03:13 +0400
committerAnton <anton@picapica.im>2026-09-26 03:03:13 +0400
commit47cc7e0baaa6328540215c34eedacaf36fcc5d01 (patch)
tree3624002a1f451a4056268b5622844e52379d8b3a
parent1f7c350a83d6a515919255dc72266fd4e143cd1d (diff)
downloadpica-pica-47cc7e0baaa6328540215c34eedacaf36fcc5d01.tar.gz
pica-pica-47cc7e0baaa6328540215c34eedacaf36fcc5d01.zip
windows build & installers, icons, manifests
-rw-r--r--Makefile.am44
-rw-r--r--configure.ac31
-rwxr-xr-xwindows/cross_build_mxe.sh91
-rwxr-xr-xwindows/installer32.nsi.in71
-rwxr-xr-xwindows/installer64.nsi.in71
-rw-r--r--windows/mxe_ffmpeg_strip_excess_deps.patch63
-rw-r--r--windows/mxe_qtbase_strip_excess_deps.patch44
-rw-r--r--windows/pica-client.exe.manifest.in73
-rw-r--r--windows/pica-client.rc55
-rw-r--r--windows/pica-node.exe.manifest.in66
-rw-r--r--windows/pica-node.rc54
11 files changed, 661 insertions, 2 deletions
diff --git a/Makefile.am b/Makefile.am
index e0ed1cd..fa89256 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -12,6 +12,39 @@ EXTRA_DIST = iniparser/LICENSE \
pica-client/icons
#####################################
+# Windows resources. Each program gets the program icon and the application
+# manifest compiled into a linkable object by windres, which is then added to
+# its LDADD below. Only the Windows build has a use for these, but the suffix
+# itself is declared unconditionally so that make knows .rc is a source suffix
+# and not the name of a file.
+SUFFIXES = .rc
+
+if TARGET_WINDOWS
+
+# The icon lives in the source directory while the manifest is generated by
+# configure into the build directory, so both have to be on the include path
+# windres resolves the file names in the resource script against. The version
+# is handed to the VERSIONINFO resource on the command line instead of the
+# resource script being generated, in the two spellings the numeric and the
+# string fields need. The quotes around the string one are escaped twice on
+# purpose: windres passes its own command line to the preprocessor through a
+# shell, so one round of quoting is eaten there and one here.
+.rc.o:
+ $(WINDRES) -I $(srcdir)/windows -I windows \
+ -DPICA_WINDOWS_VERSION_COMMAS=$(PICA_WINDOWS_VERSION_COMMAS) \
+ -DPICA_WINDOWS_VERSION_STRING=\\\"$(VERSION)\\\" \
+ -i $< -o $@
+
+windows/pica-node.o: windows/pica-node.rc windows/picapica.ico \
+ windows/pica-node.exe.manifest
+
+windows/pica-client.o: windows/pica-client.rc windows/picapica.ico \
+ windows/pica-client.exe.manifest
+
+CLEANFILES += windows/pica-node.o windows/pica-client.o
+
+endif
+#####################################
if PICA_NODE
bin_PROGRAMS += pica-node
@@ -30,6 +63,11 @@ dist_man_MANS = pica-node.8 pica-node.conf.5
pica_node_CPPFLAGS = -DPICA_INSTALLPREFIX=\"$(prefix)\" -DPICA_SYSCONFDIR=\"$(sysconfdir)\" -DPICA_LOCALSTATEDIR=\"$(localstatedir)\"
pica_node_LDADD = $(PICA_NODE_LIBS)
+
+if TARGET_WINDOWS
+pica_node_LDADD += windows/pica-node.o
+endif
+
pkglocalstatedir = $(localstatedir)/pica-node
dist_pkglocalstate_DATA = nodelist.db
@@ -193,10 +231,14 @@ pica-client/mainwindow.cpp: ui_mainwindow.h
ui_%.h: pica-client/%.ui
$(UIC) $< -o $@
-
+
pica_client_pica_client_CPPFLAGS = -DPICA_INSTALLPREFIX=\"$(prefix)\" $(QT_DEPENDENCIES_CFLAGS) $(FFMPEG_CFLAGS) $(PLATFORM_DEPS_CFLAGS) $(WEBRTC_AUDIO_PROCESSING_CFLAGS)
pica_client_pica_client_LDADD = $(QT_DEPENDENCIES_LIBS) $(FFMPEG_LIBS) $(PLATFORM_DEPS_LIBS) $(WEBRTC_AUDIO_PROCESSING_LIBS)
+if TARGET_WINDOWS
+pica_client_pica_client_LDADD += windows/pica-client.o
+endif
+
# Listing PulseAudio sources and sinks in the settings dialog. The two
# native backend sources above are compiled unconditionally and are empty
# preprocessor-wise on the platforms they are not for, but libpulse is a
diff --git a/configure.ac b/configure.ac
index e6639bb..eea64d1 100644
--- a/configure.ac
+++ b/configure.ac
@@ -144,13 +144,19 @@ AS_CASE([$host],
],
[*-w64-mingw*],
[
+ TARGET_OS=windows
QT_DEPENDENCIES_LIBS="$QT_DEPENDENCIES_LIBS -mwindows"
#the WASAPI backend is COM: ole32 for CoCreateInstance and the
#task allocator, oleaut32 for PROPVARIANT.
PLATFORM_DEPS_LIBS="$PLATFORM_DEPS_LIBS -lole32 -loleaut32"
+ AC_PATH_TOOL(WINDRES, windres, none)
+ if test x$WINDRES = xnone; then
+ AC_MSG_ERROR("windres not found")
+ fi
],
[*-apple-darwin*],
[
+ TARGET_OS=darwin
#the CoreAudio backend: the HAL for device enumeration,
#AudioUnit/AudioToolbox for the VoiceProcessingIO unit that does
#the echo cancellation, CoreFoundation for the CFString handling
@@ -324,5 +330,28 @@ AC_TYPE_UINT16_T
# Checks for library functions.
AC_CHECK_FUNCS([getcwd inet_ntoa memmove memset select socket strchr strstr strtol])
-AC_CONFIG_FILES([Makefile])
+VERSION=$PACKAGE_VERSION
+AC_SUBST([VERSION])
+
+# Both the assemblyIdentity element of a Windows application manifest and the
+# FILEVERSION field of a VERSIONINFO resource only accept a version of exactly
+# four numbers, which the package version ("0.9.0dev") is not. Cut it at the
+# first character that is neither a digit nor a dot and pad the rest with ".0"
+# up to four components. The manifest wants them separated by dots and
+# VERSIONINFO by commas, so both spellings are substituted.
+AC_MSG_CHECKING([for the Windows binary version number])
+PICA_WINDOWS_VERSION=`echo "$PACKAGE_VERSION" | sed -e ['s/[^0-9.].*$//'] -e ['s/\.*$//']`
+AS_IF([test -z "$PICA_WINDOWS_VERSION"], [PICA_WINDOWS_VERSION=0])
+while test `echo "$PICA_WINDOWS_VERSION" | tr -dc . | wc -c` -lt 3
+do
+ PICA_WINDOWS_VERSION="$PICA_WINDOWS_VERSION.0"
+done
+PICA_WINDOWS_VERSION_COMMAS=`echo "$PICA_WINDOWS_VERSION" | tr . ,`
+AC_MSG_RESULT([$PICA_WINDOWS_VERSION])
+AC_SUBST([PICA_WINDOWS_VERSION])
+AC_SUBST([PICA_WINDOWS_VERSION_COMMAS])
+
+AM_CONDITIONAL([TARGET_WINDOWS], [test x$TARGET_OS = xwindows])
+AM_CONDITIONAL([TARGET_DARWIN], [test x$TARGET_OS = xdarwin])
+AC_CONFIG_FILES([Makefile windows/installer32.nsi windows/installer64.nsi windows/pica-client.exe.manifest windows/pica-node.exe.manifest])
AC_OUTPUT
diff --git a/windows/cross_build_mxe.sh b/windows/cross_build_mxe.sh
new file mode 100755
index 0000000..515346a
--- /dev/null
+++ b/windows/cross_build_mxe.sh
@@ -0,0 +1,91 @@
+#!/bin/bash
+
+# Build script that cross-builds Pica Pica Messenger
+# for Windows on a GNU/Linux or Mac host using MXE build environment
+
+# make sure that MXE dependencies are installed on a host system first
+# see https://mxe.cc for details
+
+function build_for_arch {
+
+arch=$1
+
+PREFIX=$PWD/usr/$arch
+
+mkdir -p build_pica-pica
+cd build_pica-pica
+../../../configure --host=$arch --prefix=$PREFIX
+make -j$(nproc)
+make install
+make clean
+cd ..
+
+#copy exe & DLLs
+mkdir -p build_installer_$arch
+cp $PREFIX/bin/pica-client.exe build_installer_$arch/
+cp $PREFIX/bin/pica-node.exe build_installer_$arch/
+
+#run copydlldeps.sh from destination dir, otherwise it recursively walks all MXE tree and copies excess DLLs
+
+cd build_installer_$arch
+../tools/copydlldeps.sh --infile ./pica-client.exe --destdir ./ --recursivesrcdir $PREFIX --copy --enforcedir $PREFIX/qt5/plugins/platforms/ --enforcedir $PREFIX/qt5/plugins/sqldrivers/ --enforcedir $PREFIX/qt5/plugins/imageformats/ --objdump ../usr/bin/$arch-objdump
+
+cd build_installer_$arch
+../tools/copydlldeps.sh --infile ./pica-node.exe --destdir ./ --recursivesrcdir $PREFIX --copy --objdump ../usr/bin/$arch-objdump
+
+cd ..
+
+#strip
+usr/bin/$arch-strip build_installer_$arch/*.dll build_installer_$arch/*.exe build_installer_$arch/sqldrivers/*.dll build_installer_$arch/platforms/*.dll build_installer_$arch/imageformats/*.dll
+
+#build installer
+cd build_installer_$arch
+
+for dll in *.dll
+do
+ echo "File $dll" >> dll_list.nsh
+done
+
+cp ../../../COPYING ./
+cp ../../../README ./
+cp ../../../windows/picapica.ico ./
+
+mkdir -p share
+
+cp $PREFIX/share/pica-client/dhparam4096.pem share/
+cp $PREFIX/share/pica-client/picapica-icon-fly.png share/
+cp $PREFIX/share/pica-client/picapica-icon-sit.png share/
+cp $PREFIX/share/pica-client/picapica-snd-newmessage.wav share/
+
+if test $arch = 'i686-w64-mingw32.shared'
+then
+ cp ../build_pica-pica/win/installer32.nsi ./
+ makensis installer32.nsi
+elif test $arch = 'x86_64-w64-mingw32.shared'
+then
+ cp ../build_pica-pica/win/installer64.nsi ./
+ makensis installer64.nsi
+fi
+
+cd ..
+}
+
+
+git clone https://github.com/mxe/mxe.git
+
+cd mxe
+git checkout 4efbb3567463a6d0a4d8ad7b822af0881bb1d9f8
+patch -p1 < ../mxe_qtbase_strip_excess_deps.patch || exit
+patch -p1 < ../mxe_ffmpeg_strip_excess_deps.patch || exit
+
+# TODO: libva for windows, enable vaapi in ffmpeg configuration
+
+make MXE_TARGETS='i686-w64-mingw32.shared x86_64-w64-mingw32.shared' cc qtbase ffmpeg openssl speexdsp miniupnpc libevent sqlite webrtc-audio-processing nsis
+
+export PATH=$PWD/usr/bin/:$PATH
+
+
+for arch in i686-w64-mingw32.shared x86_64-w64-mingw32.shared
+do
+ build_for_arch $arch
+done
diff --git a/windows/installer32.nsi.in b/windows/installer32.nsi.in
new file mode 100755
index 0000000..3e80e53
--- /dev/null
+++ b/windows/installer32.nsi.in
@@ -0,0 +1,71 @@
+!include MUI2.nsh
+
+!define VERSION "@VERSION@"
+
+Name "Pica Pica Messenger"
+OutFile "PicaPicaMessengerInstaller_${VERSION}_32bit.exe"
+InstallDir "$PROGRAMFILES\Pica Pica Messenger"
+InstallDirRegKey HKLM "Software\Pica Pica Messenger" ""
+RequestExecutionLevel admin
+SetCompressor /FINAL /SOLID lzma
+!define MUI_ICON "picapica.ico"
+!define MUI_UNICON "picapica.ico"
+
+!insertmacro MUI_PAGE_WELCOME
+!insertmacro MUI_PAGE_LICENSE "COPYING"
+!insertmacro MUI_PAGE_DIRECTORY
+!insertmacro MUI_PAGE_INSTFILES
+!define MUI_FINISHPAGE_RUN $INSTDIR\pica-client.exe
+!define MUI_FINISHPAGE_RUN_TEXT "Run Pica Pica Messenger"
+!insertmacro MUI_PAGE_FINISH
+
+!insertmacro MUI_UNPAGE_CONFIRM
+!insertmacro MUI_UNPAGE_INSTFILES
+
+!insertmacro MUI_LANGUAGE "English"
+
+Section
+ SetOutPath "$INSTDIR"
+ SetShellVarContext all
+
+!include dll_list.nsh
+
+ File "pica-client.exe"
+ File "picapica.ico"
+ File "COPYING"
+ File "README"
+ SetOutPath "$INSTDIR\share"
+ File "share/picapica-icon-fly.png"
+ File "share/picapica-icon-sit.png"
+ File "share/picapica-snd-newmessage.wav"
+ File "share/dhparam4096.pem"
+ SetOutPath "$INSTDIR\sqldrivers"
+ File "sqldrivers/qsqlite.dll"
+ SetOutPath "$INSTDIR\platforms"
+ File "platforms/qwindows.dll"
+ SetOutPath "$INSTDIR\imageformats"
+ File "imageformats/qico.dll"
+ WriteUninstaller "uninstall.exe"
+
+ WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\Pica Pica Messenger" "DisplayName" "Pica Pica Messenger"
+ WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\Pica Pica Messenger" "UninstallString" '"$INSTDIR\uninstall.exe"'
+ WriteRegDWORD HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\Pica Pica Messenger" "NoModify" 1
+ WriteRegDWORD HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\Pica Pica Messenger" "NoRepair" 1
+ WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\Pica Pica Messenger" "HelpLink" "https://picapica.im"
+
+
+ CreateDirectory "$SMPROGRAMS\Pica Pica Messenger"
+ SetOutPath $INSTDIR
+ CreateShortCut "$SMPROGRAMS\Pica Pica Messenger\Pica Pica Messenger.lnk" "$INSTDIR\pica-client.exe" "" "$INSTDIR\picapica.ico"
+
+
+SectionEnd
+
+Section "Uninstall"
+ SetShellVarContext all
+ Delete "$INSTDIR\Uninstall.exe"
+ RMDir /r "$INSTDIR"
+ RMDir /r "$SMPROGRAMS\Pica Pica Messenger"
+ DeleteRegKey HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\Pica Pica Messenger"
+SectionEnd
+
diff --git a/windows/installer64.nsi.in b/windows/installer64.nsi.in
new file mode 100755
index 0000000..3ca2ced
--- /dev/null
+++ b/windows/installer64.nsi.in
@@ -0,0 +1,71 @@
+!include MUI2.nsh
+
+!define VERSION "@VERSION@"
+
+Name "Pica Pica Messenger"
+OutFile "PicaPicaMessengerInstaller_${VERSION}_64bit.exe"
+InstallDir "$PROGRAMFILES64\Pica Pica Messenger"
+InstallDirRegKey HKLM "Software\Pica Pica Messenger" ""
+RequestExecutionLevel admin
+SetCompressor /FINAL /SOLID lzma
+!define MUI_ICON "picapica.ico"
+!define MUI_UNICON "picapica.ico"
+
+!insertmacro MUI_PAGE_WELCOME
+!insertmacro MUI_PAGE_LICENSE "COPYING"
+!insertmacro MUI_PAGE_DIRECTORY
+!insertmacro MUI_PAGE_INSTFILES
+!define MUI_FINISHPAGE_RUN $INSTDIR\pica-client.exe
+!define MUI_FINISHPAGE_RUN_TEXT "Run Pica Pica Messenger"
+!insertmacro MUI_PAGE_FINISH
+
+!insertmacro MUI_UNPAGE_CONFIRM
+!insertmacro MUI_UNPAGE_INSTFILES
+
+!insertmacro MUI_LANGUAGE "English"
+
+Section
+ SetOutPath "$INSTDIR"
+ SetShellVarContext all
+
+!include dll_list.nsh
+
+ File "pica-client.exe"
+ File "picapica.ico"
+ File "COPYING"
+ File "README"
+ SetOutPath "$INSTDIR\share"
+ File "share/picapica-icon-fly.png"
+ File "share/picapica-icon-sit.png"
+ File "share/picapica-snd-newmessage.wav"
+ File "share/dhparam4096.pem"
+ SetOutPath "$INSTDIR\sqldrivers"
+ File "sqldrivers/qsqlite.dll"
+ SetOutPath "$INSTDIR\platforms"
+ File "platforms/qwindows.dll"
+ SetOutPath "$INSTDIR\imageformats"
+ File "imageformats/qico.dll"
+ WriteUninstaller "uninstall.exe"
+
+ WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\Pica Pica Messenger" "DisplayName" "Pica Pica Messenger"
+ WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\Pica Pica Messenger" "UninstallString" '"$INSTDIR\uninstall.exe"'
+ WriteRegDWORD HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\Pica Pica Messenger" "NoModify" 1
+ WriteRegDWORD HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\Pica Pica Messenger" "NoRepair" 1
+ WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\Pica Pica Messenger" "HelpLink" "https://picapica.im"
+
+
+ CreateDirectory "$SMPROGRAMS\Pica Pica Messenger"
+ SetOutPath $INSTDIR
+ CreateShortCut "$SMPROGRAMS\Pica Pica Messenger\Pica Pica Messenger.lnk" "$INSTDIR\pica-client.exe" "" "$INSTDIR\picapica.ico"
+
+
+SectionEnd
+
+Section "Uninstall"
+ SetShellVarContext all
+ Delete "$INSTDIR\Uninstall.exe"
+ RMDir /r "$INSTDIR"
+ RMDir /r "$SMPROGRAMS\Pica Pica Messenger"
+ DeleteRegKey HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\Pica Pica Messenger"
+SectionEnd
+
diff --git a/windows/mxe_ffmpeg_strip_excess_deps.patch b/windows/mxe_ffmpeg_strip_excess_deps.patch
new file mode 100644
index 0000000..cb0c851
--- /dev/null
+++ b/windows/mxe_ffmpeg_strip_excess_deps.patch
@@ -0,0 +1,63 @@
+diff --git a/src/ffmpeg.mk b/src/ffmpeg.mk
+index 8dd80d86..e2132c3c 100644
+--- a/src/ffmpeg.mk
++++ b/src/ffmpeg.mk
+@@ -8,9 +8,9 @@ $(PKG)_CHECKSUM := cf38e0e28c7e5605942c4a77755349b0145804a397af37eb1fb4c77cb237f
+ $(PKG)_SUBDIR := $(PKG)-$($(PKG)_VERSION)
+ $(PKG)_FILE := $(PKG)-$($(PKG)_VERSION).tar.xz
+ $(PKG)_URL := https://ffmpeg.org/releases/$($(PKG)_FILE)
+-$(PKG)_DEPS := cc bzip2 gnutls lame libass libbluray libbs2b libcaca \
+- libvpx opencore-amr $(BUILD)~nasm opus sdl2 speex theora vidstab \
+- vo-amrwbenc vorbis x264 x265 xvidcore zlib
++$(PKG)_DEPS := cc bzip2 \
++ libvpx opencore-amr $(BUILD)~nasm opus sdl2 speex \
++ vo-amrwbenc vorbis x264 x265 zlib
+
+ # DO NOT ADD fdk-aac OR openssl SUPPORT.
+ # Although they are free softwares, their licenses are not compatible with
+@@ -42,24 +42,35 @@ define $(PKG)_BUILD
+ --enable-gpl \
+ --enable-version3 \
+ --extra-libs="`'$(TARGET)-pkg-config' --libs libmpg123` -mconsole" \
+- --enable-gnutls \
+- --enable-libass \
+- --enable-libbluray \
+- --enable-libbs2b \
+- --enable-libcaca \
+- --enable-libmp3lame \
+ --enable-libopencore-amrnb \
+ --enable-libopencore-amrwb \
+ --enable-libopus \
+ --enable-libspeex \
+- --enable-libtheora \
+- --enable-libvidstab \
+ --enable-libvo-amrwbenc \
+- --enable-libvorbis \
+ --enable-libvpx \
+ --enable-libx264 \
+ --enable-libx265 \
+- --enable-libxvid \
++ --disable-programs \
++ --enable-protocol=file \
++ --enable-muxer=matroska \
++ --enable-muxer=mjpeg \
++ --enable-demuxer=mjpeg \
++ --enable-decoder=h264 \
++ --enable-decoder=hevc \
++ --enable-decoder=libvpx-vp9 \
++ --enable-decoder=mjpeg \
++ --enable-decoder=opus \
++ --enable-decoder=libopus \
++ --enable-decoder=pcm_alaw \
++ --enable-decoder=g722 \
++ --enable-encoder=mjpeg \
++ --enable-encoder=libvpx-vp9 \
++ --enable-encoder=libx264 \
++ --enable-encoder=libx265 \
++ --enable-encoder=opus \
++ --enable-encoder=libopus \
++ --enable-encoder=pcm_alaw \
++ --enable-encoder=g722 \
+ --extra-ldflags="-fstack-protector" \
+ $($(PKG)_CONFIGURE_OPTS)
+ $(MAKE) -C '$(BUILD_DIR)' -j '$(JOBS)'
diff --git a/windows/mxe_qtbase_strip_excess_deps.patch b/windows/mxe_qtbase_strip_excess_deps.patch
new file mode 100644
index 0000000..ac68f59
--- /dev/null
+++ b/windows/mxe_qtbase_strip_excess_deps.patch
@@ -0,0 +1,44 @@
+diff --git a/src/qtbase.mk b/src/qtbase.mk
+index 600ff60f..29578a77 100644
+--- a/src/qtbase.mk
++++ b/src/qtbase.mk
+@@ -9,8 +9,8 @@ $(PKG)_CHECKSUM := 51e91c73abacab81e64efd01bf95794e79c0e605ad80947a024769f0dd620
+ $(PKG)_SUBDIR := $(PKG)-everywhere-src-$($(PKG)_VERSION)
+ $(PKG)_FILE := $(PKG)-everywhere-opensource-src-$($(PKG)_VERSION).tar.xz
+ $(PKG)_URL := https://download.qt.io/archive/qt/5.15/$($(PKG)_VERSION)/submodules/$($(PKG)_FILE)
+-$(PKG)_DEPS := cc dbus fontconfig freetds freetype harfbuzz jpeg mariadb-connector-c \
+- libpng mesa openssl pcre2 postgresql sqlite zlib zstd $(BUILD)~zstd \
++$(PKG)_DEPS := cc dbus fontconfig freetype harfbuzz \
++ libpng mesa openssl pcre2 sqlite zlib zstd $(BUILD)~zstd \
+ $(if $(findstring shared,$(MXE_TARGETS)), icu4c)
+ $(PKG)_DEPS_$(BUILD) :=
+ $(PKG)_TARGETS := $(BUILD) $(MXE_TARGETS)
+@@ -27,8 +27,6 @@ define $(PKG)_BUILD
+ # ICU is buggy on static builds. See #653. TODO: reenable it some time in the future.
+ cd '$(1)' && \
+ OPENSSL_LIBS="`'$(TARGET)-pkg-config' --libs-only-l openssl`" \
+- PSQL_LIBS="-lpq -lpgport -lpgcommon -lsecur32 `'$(TARGET)-pkg-config' --libs-only-l openssl pthreads` -lws2_32" \
+- SYBASE_LIBS="-lsybdb `'$(TARGET)-pkg-config' --libs-only-l openssl` -liconv -lws2_32" \
+ PKG_CONFIG="${TARGET}-pkg-config" \
+ PKG_CONFIG_SYSROOT_DIR="/" \
+ PKG_CONFIG_LIBDIR="$(PREFIX)/$(TARGET)/lib/pkgconfig" \
+@@ -51,11 +49,7 @@ define $(PKG)_BUILD
+ -accessibility \
+ -nomake examples \
+ -nomake tests \
+- -plugin-sql-mysql \
+ -plugin-sql-sqlite \
+- -plugin-sql-odbc \
+- -plugin-sql-psql \
+- -plugin-sql-tds -D Q_USE_SYBASE \
+ -system-zlib \
+ -system-libpng \
+ -system-libjpeg \
+@@ -65,7 +59,6 @@ define $(PKG)_BUILD
+ -system-harfbuzz \
+ -system-pcre \
+ -openssl-linked \
+- -dbus-linked \
+ -no-pch \
+ -v \
+ $(PKG_CONFIGURE_OPTS)
diff --git a/windows/pica-client.exe.manifest.in b/windows/pica-client.exe.manifest.in
new file mode 100644
index 0000000..b30df69
--- /dev/null
+++ b/windows/pica-client.exe.manifest.in
@@ -0,0 +1,73 @@
+<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
+<assembly xmlns="urn:schemas-microsoft-com:asm.v1" manifestVersion="1.0">
+
+ <assemblyIdentity
+ type="win32"
+ name="picapica.im.pica-pica.pica-client"
+ version="@PICA_WINDOWS_VERSION@"
+ processorArchitecture="*"
+ />
+
+ <description>Pica Pica Messenger</description>
+
+ <!-- Use the themed version 6 common controls. Without this dependency
+ Windows loads the Windows 95 era comctl32.dll and Qt's native dialogs
+ and widget style fall back to the unthemed look. -->
+ <dependency>
+ <dependentAssembly>
+ <assemblyIdentity
+ type="win32"
+ name="Microsoft.Windows.Common-Controls"
+ version="6.0.0.0"
+ publicKeyToken="6595b64144ccf1df"
+ language="*"
+ processorArchitecture="*"
+ />
+ </dependentAssembly>
+ </dependency>
+
+ <!-- Run with the privileges of the invoking user. This also stops the
+ installer detection heuristics from asking for elevation just because
+ the file name or the resources contain words like "setup" or "update",
+ and it disables registry/file system virtualization. -->
+ <trustInfo xmlns="urn:schemas-microsoft-com:asm.v3">
+ <security>
+ <requestedPrivileges>
+ <requestedExecutionLevel level="asInvoker" uiAccess="false"/>
+ </requestedPrivileges>
+ </security>
+ </trustInfo>
+
+ <!-- Declare which Windows versions this program was tested against. An
+ unlisted program is reported the version of the newest OS it claims
+ support for, and may silently get compatibility shims applied. -->
+ <compatibility xmlns="urn:schemas-microsoft-com:compatibility.v1">
+ <application>
+ <!-- Windows Vista -->
+ <supportedOS Id="{e2011457-1546-43c5-a5fe-008deee3d3f0}"/>
+ <!-- Windows 7 -->
+ <supportedOS Id="{35138b9a-5d96-4fbd-8e2d-a2440225f93a}"/>
+ <!-- Windows 8 -->
+ <supportedOS Id="{4a2f28e3-53b9-4441-ba9c-d69d4a4a6e38}"/>
+ <!-- Windows 8.1 -->
+ <supportedOS Id="{1f676c76-80e1-4239-95bb-83d0f6d0da78}"/>
+ <!-- Windows 10 and Windows 11 -->
+ <supportedOS Id="{8e0f7a12-bfb3-4fe8-b9a5-48fd50a15a9a}"/>
+ </application>
+ </compatibility>
+
+ <application xmlns="urn:schemas-microsoft-com:asm.v3">
+ <windowsSettings>
+ <!-- Allow paths longer than MAX_PATH in the file transfer code. This
+ has no effect unless the machine also has the LongPathsEnabled
+ policy turned on, so it is safe on older systems. -->
+ <longPathAware xmlns="http://schemas.microsoft.com/SMI/2016/WindowsSettings">true</longPathAware>
+
+ <!-- Deliberately no dpiAware/dpiAwareness setting here: the Qt windows
+ platform plugin selects the DPI awareness mode itself at startup,
+ and a value in the manifest would override it. Add one only
+ together with the matching Qt high DPI attributes. -->
+ </windowsSettings>
+ </application>
+
+</assembly>
diff --git a/windows/pica-client.rc b/windows/pica-client.rc
new file mode 100644
index 0000000..a81fcb8
--- /dev/null
+++ b/windows/pica-client.rc
@@ -0,0 +1,55 @@
+/* Resources linked into pica-client.exe by windres.
+ *
+ * The file names below are looked up along the windres include path, which
+ * Makefile.am points at both this directory and the matching build directory,
+ * since the manifest is generated by configure while the icon is not.
+ */
+
+/* The name IDI_ICON1 is not arbitrary: besides being the icon Explorer shows
+ * for the executable, it is the one Qt's windows platform plugin loads from
+ * the running binary and installs as the window class icon, which is what
+ * appears in the title bar, in the task bar and in the Alt+Tab list. */
+IDI_ICON1 ICON "picapica.ico"
+
+/* The application manifest, as resource 1 (CREATEPROCESS_MANIFEST_RESOURCE_ID)
+ * of type 24 (RT_MANIFEST). Spelled numerically so that the resource script
+ * does not have to include windows.h through the cross compiler. */
+1 24 "pica-client.exe.manifest"
+
+/* What the Details tab of the file properties dialog shows. The two version
+ * macros come from the windres command line in Makefile.am:
+ * PICA_WINDOWS_VERSION_COMMAS is the four number form configure derives from
+ * the package version, which is the only thing the FILEVERSION field accepts,
+ * and PICA_WINDOWS_VERSION_STRING is the package version as it is written
+ * everywhere else, which the string fields are free to use. */
+1 VERSIONINFO
+FILEVERSION PICA_WINDOWS_VERSION_COMMAS
+PRODUCTVERSION PICA_WINDOWS_VERSION_COMMAS
+FILEFLAGSMASK 0x3fL
+FILEFLAGS 0x0L
+FILEOS 0x40004L /* VOS_NT_WINDOWS32 */
+FILETYPE 0x1L /* VFT_APP */
+FILESUBTYPE 0x0L
+BEGIN
+ BLOCK "StringFileInfo"
+ BEGIN
+ /* 0409 is US English, 04E4 is code page 1252. The pair has to
+ * match the Translation value at the bottom, which is what the
+ * property sheet looks the block up by. */
+ BLOCK "040904E4"
+ BEGIN
+ VALUE "CompanyName", "picapica.im"
+ VALUE "FileDescription", "Pica Pica Messenger"
+ VALUE "FileVersion", PICA_WINDOWS_VERSION_STRING
+ VALUE "InternalName", "pica-client"
+ VALUE "LegalCopyright", "Copyright (c) 2012 - 2026 Anton Sviridenko"
+ VALUE "OriginalFilename", "pica-client.exe"
+ VALUE "ProductName", "Pica Pica Messenger"
+ VALUE "ProductVersion", PICA_WINDOWS_VERSION_STRING
+ END
+ END
+ BLOCK "VarFileInfo"
+ BEGIN
+ VALUE "Translation", 0x409, 1252
+ END
+END
diff --git a/windows/pica-node.exe.manifest.in b/windows/pica-node.exe.manifest.in
new file mode 100644
index 0000000..b3c97e9
--- /dev/null
+++ b/windows/pica-node.exe.manifest.in
@@ -0,0 +1,66 @@
+<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
+<assembly xmlns="urn:schemas-microsoft-com:asm.v1" manifestVersion="1.0">
+
+ <assemblyIdentity
+ type="win32"
+ name="picapica.im.pica-pica.pica-node"
+ version="@PICA_WINDOWS_VERSION@"
+ processorArchitecture="*"
+ />
+
+ <description>Pica Pica node</description>
+
+ <!-- The node has no user interface, so unlike the client it does not pull in
+ the themed version 6 common controls. -->
+
+ <!-- The same binary runs both ways: started by the service control manager
+ it serves the SCM, and started from a console it falls back to running
+ in the foreground. Nothing below is specific to either mode - a manifest
+ cannot ask for anything of the service control manager, and the process
+ privileges of the service come from the account it was registered with
+ ("sc create ... obj= ..."), not from here. -->
+
+ <!-- Run with the privileges of the invoking user. The service control
+ manager ignores this and uses the account the service was registered
+ with, but it is what the console mode needs: asking for administrator
+ rights here would make every foreground start raise a UAC prompt.
+ Declaring any level at all also disables registry/file system
+ virtualization, so that a write to the installation directory fails
+ visibly instead of being redirected into VirtualStore. -->
+ <trustInfo xmlns="urn:schemas-microsoft-com:asm.v3">
+ <security>
+ <requestedPrivileges>
+ <requestedExecutionLevel level="asInvoker" uiAccess="false"/>
+ </requestedPrivileges>
+ </security>
+ </trustInfo>
+
+ <!-- Declare which Windows versions this program was tested against. An
+ unlisted program is reported the version of the newest OS it claims
+ support for, and may silently get compatibility shims applied. -->
+ <compatibility xmlns="urn:schemas-microsoft-com:compatibility.v1">
+ <application>
+ <!-- Windows Vista -->
+ <supportedOS Id="{e2011457-1546-43c5-a5fe-008deee3d3f0}"/>
+ <!-- Windows 7 -->
+ <supportedOS Id="{35138b9a-5d96-4fbd-8e2d-a2440225f93a}"/>
+ <!-- Windows 8 -->
+ <supportedOS Id="{4a2f28e3-53b9-4441-ba9c-d69d4a4a6e38}"/>
+ <!-- Windows 8.1 -->
+ <supportedOS Id="{1f676c76-80e1-4239-95bb-83d0f6d0da78}"/>
+ <!-- Windows 10 and Windows 11 -->
+ <supportedOS Id="{8e0f7a12-bfb3-4fe8-b9a5-48fd50a15a9a}"/>
+ </application>
+ </compatibility>
+
+ <application xmlns="urn:schemas-microsoft-com:asm.v3">
+ <windowsSettings>
+ <!-- Allow the node list database and the log file to sit behind a path
+ longer than MAX_PATH. This has no effect unless the machine also
+ has the LongPathsEnabled policy turned on, so it is safe on older
+ systems. -->
+ <longPathAware xmlns="http://schemas.microsoft.com/SMI/2016/WindowsSettings">true</longPathAware>
+ </windowsSettings>
+ </application>
+
+</assembly>
diff --git a/windows/pica-node.rc b/windows/pica-node.rc
new file mode 100644
index 0000000..7d0df4a
--- /dev/null
+++ b/windows/pica-node.rc
@@ -0,0 +1,54 @@
+/* Resources linked into pica-node.exe by windres.
+ *
+ * The file names below are looked up along the windres include path, which
+ * Makefile.am points at both this directory and the matching build directory,
+ * since the manifest is generated by configure while the icon is not.
+ */
+
+/* Shown by Explorer for the executable and for shortcuts to it. */
+IDI_ICON1 ICON "picapica.ico"
+
+/* The application manifest, as resource 1 (CREATEPROCESS_MANIFEST_RESOURCE_ID)
+ * of type 24 (RT_MANIFEST). Spelled numerically so that the resource script
+ * does not have to include windows.h through the cross compiler. */
+1 24 "pica-node.exe.manifest"
+
+/* What the Details tab of the file properties dialog shows, and, because this
+ * binary is registered as a service, the name the Task Manager lists the
+ * process under: that column is the FileDescription value below, not the file
+ * name. The two version macros come from the windres command line in
+ * Makefile.am: PICA_WINDOWS_VERSION_COMMAS is the four number form configure
+ * derives from the package version, which is the only thing the FILEVERSION
+ * field accepts, and PICA_WINDOWS_VERSION_STRING is the package version as it
+ * is written everywhere else, which the string fields are free to use. */
+1 VERSIONINFO
+FILEVERSION PICA_WINDOWS_VERSION_COMMAS
+PRODUCTVERSION PICA_WINDOWS_VERSION_COMMAS
+FILEFLAGSMASK 0x3fL
+FILEFLAGS 0x0L
+FILEOS 0x40004L /* VOS_NT_WINDOWS32 */
+FILETYPE 0x1L /* VFT_APP, there is no separate type for a service */
+FILESUBTYPE 0x0L
+BEGIN
+ BLOCK "StringFileInfo"
+ BEGIN
+ /* 0409 is US English, 04E4 is code page 1252. The pair has to
+ * match the Translation value at the bottom, which is what the
+ * property sheet looks the block up by. */
+ BLOCK "040904E4"
+ BEGIN
+ VALUE "CompanyName", "picapica.im"
+ VALUE "FileDescription", "Pica Pica Node"
+ VALUE "FileVersion", PICA_WINDOWS_VERSION_STRING
+ VALUE "InternalName", "pica-node"
+ VALUE "LegalCopyright", "Copyright (c) 2012 - 2026 Anton Sviridenko"
+ VALUE "OriginalFilename", "pica-node.exe"
+ VALUE "ProductName", "Pica Pica Node"
+ VALUE "ProductVersion", PICA_WINDOWS_VERSION_STRING
+ END
+ END
+ BLOCK "VarFileInfo"
+ BEGIN
+ VALUE "Translation", 0x409, 1252
+ END
+END