Skip to content
This repository has been archived by the owner on Jan 27, 2024. It is now read-only.

Commit

Permalink
Merge branch 'dev-1.4.0'
Browse files Browse the repository at this point in the history
  • Loading branch information
BenWiederhake committed Mar 2, 2019
2 parents 811a5d1 + 42f9e9a commit d3d0909
Show file tree
Hide file tree
Showing 69 changed files with 4,190 additions and 2,913 deletions.
3 changes: 3 additions & 0 deletions .gitignore
Expand Up @@ -9,3 +9,6 @@
/config.status
/Makefile
/commit.h
/telegram-purple.nsi
/win32/
/contrib/
31 changes: 29 additions & 2 deletions .travis.yml
Expand Up @@ -14,6 +14,9 @@ script:
- ./configure $CONFIGURE_FLAGS
- make -j2
- make check
# Test both installation routines:
- sudo make install
- make local_install
compiler:
- clang
- gcc
Expand All @@ -27,6 +30,14 @@ env:
# - CONFIGURE_FLAGS="--disable-gcrypt --disable-translation"
# - CONFIGURE_FLAGS=" --disable-libwebp --disable-translation"
- CONFIGURE_FLAGS="--disable-gcrypt --disable-libwebp --disable-translation"
- CONFIGURE_FLAGS="--disable-png"
# - CONFIGURE_FLAGS="--disable-png --disable-gcrypt"
- CONFIGURE_FLAGS="--disable-png --disable-libwebp"
# - CONFIGURE_FLAGS="--disable-png --disable-gcrypt --disable-libwebp"
# - CONFIGURE_FLAGS="--disable-png --disable-translation"
# - CONFIGURE_FLAGS="--disable-png --disable-gcrypt --disable-translation"
# - CONFIGURE_FLAGS="--disable-png --disable-libwebp --disable-translation"
# - CONFIGURE_FLAGS="--disable-png --disable-gcrypt --disable-libwebp --disable-translation"
matrix:
# Be even nicer by excluding half of the combinations
exclude:
Expand All @@ -40,9 +51,25 @@ matrix:
# env: CONFIGURE_FLAGS="--disable-gcrypt --disable-libwebp"
- compiler: gcc
env: CONFIGURE_FLAGS=" --disable-translation"
# - compiler: clang
# - compiler: XXX
# env: CONFIGURE_FLAGS="--disable-gcrypt --disable-translation"
# - compiler: gcc
# - compiler: XXX
# env: CONFIGURE_FLAGS=" --disable-libwebp --disable-translation"
- compiler: clang
env: CONFIGURE_FLAGS="--disable-gcrypt --disable-libwebp --disable-translation"
- compiler: clang
env: CONFIGURE_FLAGS="--disable-png"
# - compiler: XXX
# env: CONFIGURE_FLAGS="--disable-png --disable-gcrypt"
- compiler: gcc
env: CONFIGURE_FLAGS="--disable-png --disable-libwebp"
# - compiler: XXX
# env: CONFIGURE_FLAGS="--disable-png --disable-gcrypt --disable-libwebp"
# - compiler: XXX
# env: CONFIGURE_FLAGS="--disable-png --disable-translation"
# - compiler: XXX
# env: CONFIGURE_FLAGS="--disable-png --disable-gcrypt --disable-translation"
# - compiler: XXX
# env: CONFIGURE_FLAGS="--disable-png --disable-libwebp --disable-translation"
# - compiler: XXX
# env: CONFIGURE_FLAGS="--disable-png --disable-gcrypt --disable-libwebp --disable-translation"
4 changes: 2 additions & 2 deletions AUTHORS
@@ -1,4 +1,4 @@
Matthias Jentsch <mtthsjntsch@gmail.com>
Ben Wiederhake <Ben.Wiederhake@gmail.com>
Ben Wiederhake <BenWiederhake.GitHub@gmx.de>
Vitaly Valtman <vvaltman@aurum>
Christopher Althaus <althaus.christopher@gmail.com>
Christopher Althaus <althaus.christopher@gmail.com>
16 changes: 16 additions & 0 deletions CHANGELOG.md
@@ -1,6 +1,22 @@
Changelog
---------

##### 1.4.1

- *REMOVED* active support for Adium. We just don't know how! Help wanted!
- Had to skip 1.4.0 as someone distributed an intermediate version as "1.4.0"
- Import awesomeness from kenorb's mega-merge:
* Support for pinned and other action types.
* Stability improvements in general
- Better build support:
* No `-Werror`
* Compatibility with LibreSSL
* Compatibility with C++
- Simplify: Only one level of submodules
- Add support for replies/forwarded messages
- Add support for IPv6-only
- Add windows cross-compilation script

##### 1.3.1

- Stability improvements
Expand Down
46 changes: 46 additions & 0 deletions HACKING.md
Expand Up @@ -18,3 +18,49 @@ Here's a few places to start:
## How to contribute

Write [an issue](https://github.com/majn/telegram-purple/issues/new), shoot us a mail (scrape the address from the git history), or contact us in dev chat (changing URL, see README for that).

## How to release

#### Translations

Make sure that the string freeze has already happened.

Go to the [translation site](https://www.transifex.com/telegram-purple-developers/telegram-purple/content/),
and close the current resource for new translations. Rename and re-prioritize it appropriately.
Download the zip-file, extract it, remove the annoying prefix. Move all files to `po/`.

Run `make po/*.po` to fix the filenames. Do not delete any files. Rationale see `Makefile`.

Adjust `po/LINGUAS*` as you see fit.

#### Increment version

Attempt to use semver.

Adjust `configure.ac`, in macro `AC_INIT`. Remember to run `autoreconf`.

Update `CHANGELOG.md`.

#### Run some tests

First locally, then on Travis.
Also, install it locally. Don't forget to `./configure` first.

#### Prepare release files

Make a tag: `git tag v1.something`
Remember to push the tag to github.

Make a dist-bundle: `make dist`
Keep the resulting `telegram-purple_1.something.orig.tar.gz` safe.

Make the windows installer: `./mkwindows.sh`
Keep the resulting `telegram-purple-1.something+gcafebabe5.exe` safe.

#### Create release on github

FIXME

#### Close associated issues

All relevant issues are marked with `in-pipeline`, but sadly too many are marked this way.
146 changes: 130 additions & 16 deletions Makefile.in
Expand Up @@ -14,16 +14,50 @@
# along with this program; if not, write to the Free Software
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA
#
# Copyright Matthias Jentsch, Vitaly Valtman, Christopher Althaus, Markus Endres 2014-2015
# Copyright Matthias Jentsch, Vitaly Valtman, Christopher Althaus, Markus Endres 2014-2017

srcdir=@srcdir@
prefix=@prefix@
datarootdir=@datarootdir@
localedir=@localedir@
gettext_package=@GETTEXT_PACKAGE@

CFLAGS=@CFLAGS@ @PURPLE_CFLAGS@ @DEFS@ -DENABLE_NLS -DLOCALEDIR='"$(localedir)"' -Wall -Wextra -Wno-deprecated-declarations -Wno-unused-parameter -I${srcdir} -I. -fno-strict-aliasing -fPIC -D_FORTIFY_SOURCE=2
LDFLAGS=@LDFLAGS@ @OPENSSL_LIBS@ @PURPLE_LIBS@ @LIBS@ -rdynamic -ggdb
PIDGIN_VERSION=2.12.0
WIN32_GTK_BUNDLE_DIR=win32/gtk+-bundle_2.24.10-20120208_win32
WIN32_GTK_BUNDLE_URL=http://ftp.acc.umu.se/pub/gnome/binaries/win32/gtk+/2.24/gtk+-bundle_2.24.10-20120208_win32.zip
WIN32_GTK_BUNDLE_FILE=win32/gtk+-bundle_2.24.10-20120208_win32.zip
WIN32_PIDGIN_SRC_URL=http://sourceforge.net/projects/pidgin/files/Pidgin/${PIDGIN_VERSION}/pidgin-${PIDGIN_VERSION}.tar.gz/download
WIN32_PIDGIN_SRC_FILE=win32/pidgin-${PIDGIN_VERSION}.tar.gz
WIN32_PIDGIN_SRC_DIR=win32/pidgin-${PIDGIN_VERSION}
WIN32_PIDGIN_BIN_URL=http://sourceforge.net/projects/pidgin/files/Pidgin/${PIDGIN_VERSION}/pidgin-${PIDGIN_VERSION}-win32-bin.zip/download
WIN32_PIDGIN_BIN_FILE=win32/pidgin-${PIDGIN_VERSION}-win32-bin.zip
WIN32_PIDGIN_BIN_DIR=win32/pidgin-${PIDGIN_VERSION}-win32bin
WIN32_WEBP_URL=https://storage.googleapis.com/downloads.webmproject.org/releases/webp/libwebp-0.6.1.tar.gz
WIN32_WEBP_FILE=win32/libwebp-0.6.1.tar.gz
WIN32_WEBP_DIR=win32/libwebp-0.6.1
WIN32_DIRS=${WIN32_GTK_BUNDLE_DIR} ${WIN32_PIDGIN_SRC_DIR} ${WIN32_PIDGIN_BIN_DIR} ${WIN32_WEBP_DIR}
# Not directly used here, but the usage will be injected via the CFLAGS configure var.
# Note on webp: locally cross-built! That's why it violates the pattern.
WIN32_INC=-I${WIN32_PIDGIN_SRC_DIR}/pidgin \
-I${WIN32_PIDGIN_SRC_DIR}/pidgin/win32 \
-I${WIN32_PIDGIN_SRC_DIR}/libpurple \
-I${WIN32_PIDGIN_SRC_DIR}/libpurple/win32 \
-I${WIN32_GTK_BUNDLE_DIR}/include \
-I${WIN32_GTK_BUNDLE_DIR}/include/glib-2.0 \
-I${WIN32_GTK_BUNDLE_DIR}/lib/glib-2.0/include \
-I${WIN32_GTK_BUNDLE_DIR}/include/gtk-2.0 \
-I${WIN32_GTK_BUNDLE_DIR}/lib/gtk-2.0/include \
-Iobjs/webp-install/include
WIN32_CONTRIB_FILES=contrib/libgcrypt-20.dll contrib/libgpg-error-0.dll contrib/libgcc_s_sjlj-1.dll

CFLAGS_INTL=-DENABLE_NLS -DLOCALEDIR='"$(localedir)"'
CFLAGS_WARN=-Wall -Wextra -Wno-deprecated-declarations -Wno-unused-parameter
CFLAGS_EXTRA=-I${srcdir} -I. -fno-strict-aliasing -fPIC -D_FORTIFY_SOURCE=2
CFLAGS=@CFLAGS@ @PURPLE_CFLAGS@ @DEFS@ ${CFLAGS_INTL} ${CFLAGS_WARN} ${CFLAGS_EXTRA}

LDFLAGS_EXTRA=-rdynamic -ggdb
LDFLAGS=@LDFLAGS@ @OPENSSL_LIBS@ @PURPLE_LIBS@ @LIBS@ ${LDFLAGS_EXTRA}

DIR_PERM=0755
FILE_PERM=0644

Expand All @@ -40,10 +74,10 @@ endif
DEP=dep
EXE=bin
OBJ=objs
DIR_LIST=${DEP} ${EXE} ${OBJ}
DIR_LIST=${DEP} ${EXE} ${OBJ} contrib

PLUGIN_OBJECTS=${OBJ}/tgp-net.o ${OBJ}/tgp-timers.o ${OBJ}/msglog.o ${OBJ}/telegram-base.o ${OBJ}/telegram-purple.o ${OBJ}/tgp-2prpl.o ${OBJ}/tgp-structs.o ${OBJ}/tgp-utils.o ${OBJ}/tgp-chat.o ${OBJ}/tgp-ft.o ${OBJ}/tgp-msg.o ${OBJ}/tgp-request.o ${OBJ}/tgp-blist.o ${OBJ}/tgp-info.o
ALL_OBJS=${PLUGIN_OBJECTS}
ALL_OBJS=${PLUGIN_OBJECTS} ${EXTRA_OBJECTS}

ifdef MSGFMT_PATH
LOCALES=$(shell cat po/LINGUAS)
Expand All @@ -64,8 +98,8 @@ CRYPTO_FLAG=@CRYPTO_FLAG@


### == 'Magic' targets and infrastructure. == ###
# Here be dragons! See https://github.com/majn/telegram-purple/issues/242
# For the full list of requirements, goals, and rationale.
# Here be dragons! See HACKING.BUILD.md
# for the full list of requirements, goals, and rationale.

.PHONY: create_dirs
create_dirs: ${DIR_LIST}
Expand Down Expand Up @@ -110,18 +144,37 @@ ${PLUGIN_OBJECTS}: ${OBJ}/%.o: ${srcdir}/%.c tgl/libs/libtgl.a | create_dirs
po/%.mo: po/%.po
${MSGFMT_PATH} -cf -o $@ $< >/dev/null 2>&1

${PRPL_LIBNAME}: ${PLUGIN_OBJECTS} tgl/libs/libtgl.a | create_dirs
${PRPL_LIBNAME}: ${ALL_OBJS} tgl/libs/libtgl.a | create_dirs
${CC} -shared -o $@ $^ ${LDFLAGS}


### == Translation fixes == ###
# I fucked up some of the language codes.
# Fixing it in Transifex would require me to recreate these groups,
# deleting all old translations and potentially losing the translators.
# This is ugly, but better than losing translators.
# The space in the matching pattern excludes the "Language-Team:" field.

po/de.po: po/de_DE.po
sed -re 's/ de_DE/ de/' $< > $@

po/it.po: po/it_IT.po
sed -re 's/ it_IT/ it/' $< > $@

po/pl.po: po/pl_PL.po
sed -re 's/ pl_PL/ pl/' $< > $@

po/ru.po: po/ru_RU.po
sed -re 's/ru_RU/ru/' $< > $@


### == noicon_{,un}install targets. Use only if you know that you don't need icons. Note that pidgin uses those files. == ###

.PHONY: noicon_install
noicon_install: $(PRPL_LIBNAME) $(LOCALE_MOS)
mkdir -m $(DIR_PERM) -p $(DESTDIR)$(PLUGIN_DIR_PURPLE)
install -m $(FILE_PERM) $(PRPL_LIBNAME) $(DESTDIR)$(PLUGIN_DIR_PURPLE)/$(PRPL_NAME)
mkdir -m $(DIR_PERM) -p $(DESTDIR)/etc/telegram-purple
install -m $(FILE_PERM) tg-server.tglpub $(DESTDIR)/etc/telegram-purple/server.tglpub
# Assume that the user does not use AppStream if she doesn't want icons
@for lang in $(LOCALES); do \
mkdir -p $(DESTDIR)$(localedir)/$$lang/LC_MESSAGES; \
Expand All @@ -133,7 +186,7 @@ noicon_install: $(PRPL_LIBNAME) $(LOCALE_MOS)
noicon_uninstall:
rm -f $(DESTDIR)$(PLUGIN_DIR_PURPLE)/$(PRPL_NAME)
rm -f $(DESTDIR)/etc/telegram-purple/server.pub # TODO: Remove this in later versions
rm -f $(DESTDIR)/etc/telegram-purple/server.tglpub
rm -f $(DESTDIR)/etc/telegram-purple/server.tglpub # TODO: Remove this in later versions
# TODO: Delete all installed .mo's, no matter what LINGUAS says.
@for lang in $(LOCALES); do \
echo "removing $(localedir)/$$lang/LC_MESSAGES/$(gettext_package).mo"; \
Expand Down Expand Up @@ -168,14 +221,68 @@ uninstall: noicon_uninstall
local_install:
mkdir -m $(DIR_PERM) -p $(DESTDIR)$(HOME)/.purple/plugins
install -m $(FILE_PERM) $(PRPL_LIBNAME) $(DESTDIR)$(HOME)/.purple/plugins/$(PRPL_NAME)
# See telegram-base.c, function get_user_pk_path for justification:
mkdir -m $(DIR_PERM) -p $(DESTDIR)$(HOME)/.purple/telegram-purple
install -m $(FILE_PERM) tg-server.tglpub $(DESTDIR)$(HOME)/.purple/telegram-purple/server.tglpub

.PHONY: local_uninstall
local_uninstall:
rm -f $(DESTDIR)$(HOME)/.purple/plugins/$(PRPL_NAME)
rm -f $(DESTDIR)$(HOME)/.purple/telegram-purple/server.tglpub
rm -f $(DESTDIR)$(HOME)/.purple/telegram-purple/server.tglpub # TODO: Remove this in later versions


### == Windows sources downloads == ###

.PHONY: download_win32_sources
download_win32_sources: | ${WIN32_DIRS}

win32:
@mkdir -p $@

${WIN32_GTK_BUNDLE_DIR}: | ${WIN32_GTK_BUNDLE_FILE}
unzip -q $| -d $@

${WIN32_GTK_BUNDLE_FILE}: | win32
wget -q -O $@ ${WIN32_GTK_BUNDLE_URL}

${WIN32_PIDGIN_SRC_DIR}: | ${WIN32_PIDGIN_SRC_FILE}
tar xf $| -C win32/

${WIN32_PIDGIN_SRC_FILE}: | win32
wget -q -O $@ ${WIN32_PIDGIN_SRC_URL}

${WIN32_PIDGIN_BIN_DIR}: | ${WIN32_PIDGIN_BIN_FILE}
unzip -q $| -d win32/

${WIN32_PIDGIN_BIN_FILE}: | win32
wget -q -O $@ ${WIN32_PIDGIN_BIN_URL}

${WIN32_WEBP_DIR}: | ${WIN32_WEBP_FILE}
tar xf $| -C win32/

${WIN32_WEBP_FILE}: | win32
wget -q -O $@ ${WIN32_WEBP_URL}

.PHONY: win-installer-deps
win-installer-deps: telegram-purple.nsi $(PRPL_LIBNAME) $(LOCALE_MOS) ${WIN32_CONTRIB_FILES}
@[ "x${PRPL_NAME}" = "xlibtelegram.dll" ] || { \
echo "WARNING: Bad PRPL_NAME. This probably won't work." ; \
echo " (The DLL file cannot be just renamed!)" ; }

/usr/%:
@echo "You're missing the file $@"
@echo "Try installing the appropriate of the following packages:"
@echo " libgcrypt-mingw-w64-dev"
@echo " libgpg-error-mingw-w64-dev"
@echo " gcc-mingw-w64-i686"
@echo "Also, please file a bug report *EVEN IF THIS SOLVES THE ISSUE*,"
@echo "as it should have been detected earlier."

contrib/libgcrypt-20.dll: /usr/i686-w64-mingw32/bin/libgcrypt-20.dll | contrib
cp $< "$@"

contrib/libgpg-error-0.dll: /usr/i686-w64-mingw32/bin/libgpg-error-0.dll | contrib
cp $< "$@"

contrib/libgcc_s_sjlj-1.dll: /usr/lib/gcc/i686-w64-mingw32/*-win32/libgcc_s_sjlj-1.dll | contrib
cp $< "$@"


### == Handling and maintenance. Subject to rapid change, shouldn't be used in scripts. == ###
Expand All @@ -188,7 +295,14 @@ strip: $(PRPL_LIBNAME)
$(STRIP) --strip-unneeded $(PRPL_LIBNAME)

.PHONY: build-nsi
build-nsi: telegram-purple.nsi.awk telegram-purple.nsi.awk-in
build-nsi: telegram-purple.nsi

config.h:
@echo "How did you manage to do that?"
@echo "You probably want to call ./config.status first."
@exit 1

telegram-purple.nsi: telegram-purple.nsi.awk telegram-purple.nsi.awk-in po/LINGUAS config.h
awk -f telegram-purple.nsi.awk telegram-purple.nsi.awk-in > telegram-purple.nsi

.PHONY: run
Expand Down Expand Up @@ -225,7 +339,7 @@ dist: check-clean commit.h .git create_dirs

.PHONY: clean-here
clean-here:
rm -rf ${DIR_LIST} $(PRPL_LIBNAME) po/*.mo autom4te.cache AppStream/po/*.mo
rm -rf ${DIR_LIST} $(PRPL_LIBNAME) telegram-purple.nsi po/*.mo autom4te.cache AppStream/po/*.mo

-include test/Makefile

Expand Down

0 comments on commit d3d0909

Please sign in to comment.