2016-08-07 16:13:58 +02:00
|
|
|
# setup_win32.py (run me as python setup_win32.py py2exe -O2)
|
|
|
|
#
|
|
|
|
# Copyright (C) 2003-2014 Yann Leboulanger <asterix AT lagaule.org>
|
|
|
|
# Copyright (C) 2005-2006 Nikos Kouremenos <kourem AT gmail.com>
|
|
|
|
# Copyright (C) 2008 Jonathan Schleifer <js-gajim AT webkeks.org>
|
|
|
|
#
|
|
|
|
# This file is part of Gajim.
|
|
|
|
#
|
|
|
|
# Gajim is free software; you can redistribute it and/or modify
|
|
|
|
# it under the terms of the GNU General Public License as published
|
|
|
|
# by the Free Software Foundation; version 3 only.
|
|
|
|
#
|
|
|
|
# Gajim is distributed in the hope that it will be useful,
|
|
|
|
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
# 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 Gajim. If not, see <http://www.gnu.org/licenses/>.
|
|
|
|
#
|
|
|
|
|
2005-04-01 01:26:05 +02:00
|
|
|
|
2008-05-19 12:58:03 +02:00
|
|
|
import sys
|
2008-04-07 15:14:06 +02:00
|
|
|
import os
|
2016-07-07 22:41:35 +02:00
|
|
|
import site
|
2016-08-07 16:13:58 +02:00
|
|
|
from cx_Freeze import setup, Executable
|
2005-04-01 01:26:05 +02:00
|
|
|
|
2016-08-07 16:13:58 +02:00
|
|
|
SITEDIR = site.getsitepackages()[1]
|
|
|
|
INCLUDE_DLL_PATH = os.path.join(SITEDIR, "gnome")
|
2008-05-19 12:58:03 +02:00
|
|
|
sys.path.append('src')
|
2016-07-07 22:41:35 +02:00
|
|
|
|
|
|
|
# Collect the list of missing dll when cx_freeze builds the app
|
2016-08-07 16:13:58 +02:00
|
|
|
|
|
|
|
MISSING_DLL = ['libgtk-3-0.dll',
|
2016-07-07 22:41:35 +02:00
|
|
|
'libgdk-3-0.dll',
|
|
|
|
'libatk-1.0-0.dll',
|
|
|
|
'libgdk_pixbuf-2.0-0.dll',
|
|
|
|
'libjpeg-8.dll',
|
|
|
|
'libpango-1.0-0.dll',
|
|
|
|
'libpangocairo-1.0-0.dll',
|
|
|
|
'libpangoft2-1.0-0.dll',
|
|
|
|
'libpangowin32-1.0-0.dll',
|
2016-08-07 16:13:58 +02:00
|
|
|
'libgnutls-28.dll',
|
2016-07-07 22:41:35 +02:00
|
|
|
'libp11-kit-0.dll',
|
2016-08-07 16:13:58 +02:00
|
|
|
'libgstrtp-1.0-0.dll',
|
|
|
|
'libgstrtsp-1.0-0.dll',
|
|
|
|
'libgstrtspserver-1.0-0.dll',
|
|
|
|
'libfarstream-0.2-5.dll',
|
|
|
|
'libgstsdp-1.0-0.dll',
|
|
|
|
'libgsttag-1.0-0.dll',
|
|
|
|
'libgssdp-1.0-3.dll',
|
|
|
|
'libgstvideo-1.0-0.dll',
|
|
|
|
'libgstapp-1.0-0.dll',
|
|
|
|
'libgupnp-1.0-4.dll',
|
|
|
|
'libgstaudio-1.0-0.dll',
|
|
|
|
'libgupnp-igd-1.0-4.dll',
|
|
|
|
'libgstbase-1.0-0.dll',
|
|
|
|
'libnice-10.dll',
|
|
|
|
'librsvg-2-2.dll',
|
|
|
|
'libvisual-0.4-0.dll',
|
|
|
|
'libwebp-5.dll',
|
|
|
|
'libgstriff-1.0-0.dll',
|
|
|
|
'libepoxy-0.dll',
|
|
|
|
'libharfbuzz-0.dll',
|
|
|
|
'libtiff-5.dll',
|
|
|
|
'libjasper-1.dll',
|
|
|
|
'libgstpbutils-1.0-0.dll',
|
|
|
|
'liborc-0.4-0.dll',
|
|
|
|
'libgstnet-1.0-0.dll',
|
|
|
|
'libsoup-2.4-1.dll',
|
|
|
|
'liborc-test-0.4-0.dll',
|
|
|
|
'libavcodec-57.dll',
|
|
|
|
'libavutil-55.dll',
|
|
|
|
'libswresample-2.dll',
|
|
|
|
'libavformat-57.dll',
|
|
|
|
'libavfilter-6.dll',
|
|
|
|
'libgssapi-3.dll',
|
|
|
|
'libopenssl.dll',
|
|
|
|
'libsqlite3-0.dll',
|
|
|
|
'libproxy.dll',
|
|
|
|
'libstdc++.dll',
|
|
|
|
'libgstfft-1.0-0.dll']
|
|
|
|
|
2016-07-07 22:41:35 +02:00
|
|
|
|
|
|
|
# We need to add all the libraries too (for themes, etc..)
|
2016-08-07 16:13:58 +02:00
|
|
|
GTK_LIBS = {
|
|
|
|
'etc': ['dbus-1', 'fonts', 'gtk-3.0', 'pango'],
|
|
|
|
'lib': ['farstream-0.2', 'gdbus-2.0',
|
|
|
|
'gdk-pixbuf-2.0', 'gio', 'girepository-1.0',
|
|
|
|
'gstreamer-1.0', 'gtk-3.0'],
|
|
|
|
'share': ['dbus-1', 'farstream', 'fonts',
|
|
|
|
'glib-2.0',
|
|
|
|
'gst-plugins-base', 'gstreamer-1.0', 'gupnp-av',
|
|
|
|
'gupnp-dlna-2.0', 'icons', 'ssl', 'themes', 'xml']
|
2016-07-07 22:41:35 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
# Create the list of includes as cx_freeze likes
|
2016-08-07 16:13:58 +02:00
|
|
|
INCLUDE_FILES = []
|
|
|
|
for dll in MISSING_DLL:
|
|
|
|
INCLUDE_FILES.append((os.path.join(INCLUDE_DLL_PATH, dll), dll))
|
|
|
|
|
2016-07-07 22:41:35 +02:00
|
|
|
# Let's add gtk libraries folders and files
|
2016-08-07 16:13:58 +02:00
|
|
|
for folder in GTK_LIBS:
|
|
|
|
for lib in GTK_LIBS[folder]:
|
2016-07-07 22:41:35 +02:00
|
|
|
folder_lib = os.path.join(folder, lib)
|
2016-08-07 16:13:58 +02:00
|
|
|
INCLUDE_FILES.append((os.path.join(INCLUDE_DLL_PATH, folder_lib),
|
|
|
|
folder_lib))
|
|
|
|
|
|
|
|
#Let's add gtk locales that we support in Gajim
|
2016-07-07 22:41:35 +02:00
|
|
|
for language in next(os.walk('po'))[1]:
|
|
|
|
target_dir = os.path.join('share', 'locale', language)
|
2016-08-07 16:13:58 +02:00
|
|
|
language_dir = os.path.join(INCLUDE_DLL_PATH, target_dir)
|
2016-07-07 22:41:35 +02:00
|
|
|
if os.path.isdir(language_dir):
|
2016-08-07 16:13:58 +02:00
|
|
|
INCLUDE_FILES.append((language_dir, target_dir))
|
2005-04-01 01:26:05 +02:00
|
|
|
|
2016-08-07 16:13:58 +02:00
|
|
|
OPTIONS = {
|
2016-07-07 22:41:35 +02:00
|
|
|
'build_exe': {
|
2016-12-06 12:50:00 +01:00
|
|
|
'includes': ['gi', 'numbers', 'win32com.client', 'win32com.server'],
|
2016-08-07 19:10:54 +02:00
|
|
|
'packages': ['gi', 'cffi', 'cryptography', 'google', 'axolotl',
|
2016-12-11 17:20:58 +01:00
|
|
|
'pkg_resources', 'Crypto', 'pycparser', 'keyring'],
|
2016-08-07 16:13:58 +02:00
|
|
|
'include_files': INCLUDE_FILES,
|
2016-07-07 22:41:35 +02:00
|
|
|
}
|
2005-04-01 01:26:05 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
setup(
|
2010-02-08 15:08:40 +01:00
|
|
|
name='Gajim',
|
2016-07-07 22:41:35 +02:00
|
|
|
version='0.16.10',
|
2010-02-08 15:08:40 +01:00
|
|
|
description='A full featured Jabber client',
|
|
|
|
author='Gajim Development Team',
|
2011-09-17 22:22:56 +02:00
|
|
|
url='http://gajim.org/',
|
|
|
|
download_url='http://gajim.org/downloads.php',
|
2010-02-08 15:08:40 +01:00
|
|
|
license='GPL',
|
2016-08-07 16:13:58 +02:00
|
|
|
options=OPTIONS,
|
2016-12-06 12:50:00 +01:00
|
|
|
executables=[Executable('src/gajim.py', icon='data/pixmaps/gajim.ico',
|
|
|
|
base='Win32GUI')],
|
2005-04-01 01:26:05 +02:00
|
|
|
)
|