This commit is contained in:
tmolitor 2016-07-17 14:24:13 +02:00
commit d99f190ac6
20 changed files with 180 additions and 409 deletions

View File

@ -5,35 +5,20 @@ hg archive gajim_built
xcopy ..\gajim-plugins\plugin_installer gajim_built\plugins\plugin_installer /e /i
copy msgfmt.exe gajim_built
copy gettextsrc.dll gajim_built
copy gettextlib.dll gajim_built
copy msvcr90.dll gajim_built
copy msvcr100.dll gajim_built
cd gajim_built
REM for libglade-2.0.0.dll
PATH=..\src\gtk\bin;%PATH%
for %%l in (po\*.po) do mkdir po\%%~nl & mkdir po\%%~nl\LC_MESSAGES & msgfmt -o po\%%~nl\LC_MESSAGES\gajim.mo %%l
c:\python27\python.exe setup_win32.py build_exe
c:\python34\python.exe setup_win32.py build_exe
move build\exe.win32-2.7 .
rename exe.win32-2.7 bin
copy ..\LIBEAY32.dll bin
copy ..\SSLEAY32.dll bin
move build\exe.win32-3.4 .
rmdir build
rename exe.win32-3.4 build
REM for snarl plugin
xcopy ..\win32com bin\win32com /e /i
mkdir bin\gtk
cd ../src/gtk
hg archive ..\..\gajim_built\bin\gtk
cd ../../gajim_built/
REM for msgfmt
PATH=bin\gtk\bin;%PATH%
for %%l in (po\*.po) do mkdir po\%%~nl & mkdir po\%%~nl\LC_MESSAGES & msgfmt -o po\%%~nl\LC_MESSAGES\gajim.mo %%l
xcopy ..\win32com build\win32com /e /i
"C:\Program Files (x86)\NSIS\makensis" gajim.nsi

275
gajim.nsi
View File

@ -31,7 +31,7 @@ Var StartMenuFolder
!define MUI_STARTMENUPAGE_REGISTRY_VALUENAME "Start Menu Folder"
!insertmacro MUI_PAGE_STARTMENU Application $StartMenuFolder
!insertmacro MUI_PAGE_INSTFILES
!define MUI_FINISHPAGE_RUN "$INSTDIR\bin\Gajim.exe"
!define MUI_FINISHPAGE_RUN "$INSTDIR\build\Gajim.exe"
!insertmacro MUI_PAGE_FINISH
!insertmacro MUI_UNPAGE_WELCOME
@ -59,7 +59,6 @@ LangString NAME_Themes ${LANG_ENGLISH} "Themes"
LangString NAME_SecDesktopIcon ${LANG_ENGLISH} "Create icon on desktop"
LangString NAME_SecAutostart ${LANG_ENGLISH} "Start Gajim when Windows starts"
LangString DESC_SecGajim ${LANG_ENGLISH} "Installs the main Gajim files."
LangString DESC_SecGtk ${LANG_ENGLISH} "Installs Gtk+ 2 (necessary to run Gajim)."
LangString DESC_SecDesktopIcon ${LANG_ENGLISH} "If set, a shortcut for Gajim will be created on the desktop."
LangString DESC_SecAutostart ${LANG_ENGLISH} "If set, Gajim will be automatically started when Windows starts."
LangString STR_Installed ${LANG_ENGLISH} "Apparently, Gajim is already installed. Uninstall it?"
@ -75,7 +74,6 @@ LangString NAME_Themes ${LANG_FRENCH} "Th
LangString NAME_SecDesktopIcon ${LANG_FRENCH} "Créer une icône sur le bureau"
LangString NAME_SecAutostart ${LANG_FRENCH} "Lancer Gajim au démarrage de Windows"
LangString DESC_SecGajim ${LANG_FRENCH} "Installer les fichiers principaux de Gajim."
LangString DESC_SecGtk ${LANG_FRENCH} "Installer Gtk+ 2 (nécessaire à Gajim)."
LangString DESC_SecDesktopIcon ${LANG_FRENCH} "Si selectionné, un raccourci pour Gajim sera créé sur le bureau."
LangString DESC_SecAutostart ${LANG_FRENCH} "Si activé, Gajim sera automatiquement lancé au démarrage de Windows."
LangString STR_Installed ${LANG_FRENCH} "Gajim est apparement déjà installé. Lancer la désinstallation ?"
@ -91,7 +89,6 @@ LangString NAME_Themes ${LANG_GERMAN} "Designs"
LangString NAME_SecDesktopIcon ${LANG_GERMAN} "Desktop-Icon erstellen"
LangString NAME_SecAutostart ${LANG_GERMAN} "Gajim mit Windows starten"
LangString DESC_SecGajim ${LANG_GERMAN} "Installiert die Hauptdateien von Gajim."
LangString DESC_SecGtk ${LANG_GERMAN} "Installert Gtk+ 2 (notwendig um Gajim zu benutzen)."
LangString DESC_SecDesktopIcon ${LANG_GERMAN} "Wenn dies aktiviert wird, wird ein Icon für Gajim auf dem Desktop erstellt."
LangString DESC_SecAutostart ${LANG_GERMAN} "Gajim wird automatisch gestartet, sowie Windows startet, wenn dies aktivier wird."
LangString STR_Installed ${LANG_GERMAN} "Gajim is apparently already installed. Uninstall it?"
@ -107,7 +104,6 @@ LangString NAME_Themes ${LANG_ITALIAN} "Temi"
LangString NAME_SecDesktopIcon ${LANG_ITALIAN} "Crea un'icona sul desktop"
LangString NAME_SecAutostart ${LANG_ITALIAN} "Lancia Gajim quando parte Windows"
LangString DESC_SecGajim ${LANG_ITALIAN} "Installa i file principali di Gajim."
LangString DESC_SecGtk ${LANG_ITALIAN} "Installa Gtk+ 2 (necessario per eseguire Gajim)."
LangString DESC_SecDesktopIcon ${LANG_ITALIAN} "Se selezionato, un'icona verrà creata sul desktop."
LangString DESC_SecAutostart ${LANG_ITALIAN} "Se selezionato, Gajim sarà eseguito all'avvio di Windows."
LangString STR_Installed ${LANG_ITALIAN} "Gajim is apparently already installed. Uninstall it?"
@ -123,7 +119,6 @@ LangString NAME_Themes ${LANG_RUSSIAN} "
LangString NAME_SecDesktopIcon ${LANG_RUSSIAN} "Ñîçäàòü ÿðëûê íà ðàáî÷åì ñòîëå"
LangString NAME_SecAutostart ${LANG_RUSSIAN} "Çàïóñêàòü Gajim ïðè çàãðóçêå Windows"
LangString DESC_SecGajim ${LANG_RUSSIAN} "Óñòàíîâêà îñíîâíûõ ôàéëîâ Gajim."
LangString DESC_SecGtk ${LANG_RUSSIAN} "Óñòàíîâêà Gtk+ 2 (íåîáõîäèìî äëÿ ğàáîòû Gajim)."
LangString DESC_SecDesktopIcon ${LANG_RUSSIAN} "Åñëè îòìå÷åíî, íà ðàáî÷åì ñòîëå áóäåò ñîçäàí ÿðëûê Gajim."
LangString DESC_SecAutostart ${LANG_RUSSIAN} "Åñëè îòìå÷åíî, Gajim áóäåò àâòîìàòè÷åñêè çàïóñêàòüñÿ ïðè çàãðóçêå Windows."
LangString STR_Installed ${LANG_RUSSIAN} "Ïîõîæå, Gajim óæå óñòàíîâëåí. Äåèíñòàëëèðîâàòü óñòàíîâëåííóþ âåðñèþ?"
@ -138,7 +133,6 @@ LangString NAME_Themes ${LANG_HEBREW} "
LangString NAME_SecDesktopIcon ${LANG_HEBREW} "öåø ñîì áùåìçï òáåãä"
LangString NAME_SecAutostart ${LANG_HEBREW} "äôòì àú Gajim ëàùø Windows îúçéì"
LangString DESC_SecGajim ${LANG_HEBREW} "îú÷éï ÷áöé Gajim òé÷øééí."
LangString DESC_SecGtk ${LANG_HEBREW} "îú÷éï Gtk+ 2 (ğçåöä ìäøöú Gajim)."
LangString DESC_SecDesktopIcon ${LANG_HEBREW} "áîéãä åð÷áòú, ÷éöåø ãøê òáåø Gajim éåùí òì ùåìçï äòáåãä."
LangString DESC_SecAutostart ${LANG_HEBREW} "áîéãä åð÷áòú, Gajim éåôòì àåèåîèéú ëàùø Windows îúçéì."
LangString STR_Installed ${LANG_HEBREW} "ëôé äðøàä, Gajim ëáø îåú÷ï. ìäñéø àåúå?"
@ -153,79 +147,25 @@ Section "Gajim" SecGajim
File "COPYING"
File "THANKS"
File "THANKS.artists"
SetOutPath "$INSTDIR\bin"
File "bin\_bsddb.pyd"
File "bin\_cffi_backend.pyd"
File "bin\_ctypes.pyd"
File "bin\_hashlib.pyd"
File "bin\_socket.pyd"
File "bin\_sqlite3.pyd"
File "bin\_ssl.pyd"
File "bin\atk.pyd"
File "bin\bz2.pyd"
File "bin\cairo._cairo.pyd"
File "bin\Crypto.Cipher._AES.pyd"
File "bin\Crypto.Cipher._DES.pyd"
File "bin\Crypto.Cipher._DES3.pyd"
File "bin\Crypto.Hash._SHA256.pyd"
File "bin\Crypto.Random.OSRNG.winrandom.pyd"
File "bin\Crypto.Util._counter.pyd"
File "bin\Crypto.Util.strxor.pyd"
File "bin\cryptography.hazmat.bindings._constant_time.pyd"
File "bin\cryptography.hazmat.bindings._openssl.pyd"
File "bin\cryptography.hazmat.bindings._padding.pyd"
File "bin\farstream.pyd"
File "bin\gajim.exe"
File "bin\gio._gio.pyd"
File "bin\glib._glib.pyd"
File "bin\gobject._gobject.pyd"
File "bin\goocanvas.pyd"
File "bin\gst._gst.pyd"
File "bin\gst.interfaces.pyd"
File "bin\gtk._gtk.pyd"
File "bin\history_manager.exe"
File "bin\libeay32.dll"
File "bin\libgoocanvas-3.dll"
File "bin\library.zip"
File "bin\libxml2mod.pyd"
File "bin\libxmlmods.libxml2mod.pyd"
File "bin\pangocairo.pyd"
File "bin\pango.pyd"
File "bin\pycurl.pyd"
File "bin\pyexpat.pyd"
File "bin\python27.dll"
File "bin\pythoncom27.dll"
File "bin\pywintypes27.dll"
File "bin\select.pyd"
File "bin\sqlite3.dll"
File "bin\ssleay32.dll"
File "bin\unicodedata.pyd"
File "bin\win32api.pyd"
File "bin\win32file.pyd"
File "bin\win32pipe.pyd"
File "bin\win32ui.pyd"
File "bin\winsound.pyd"
File "msvcr90.dll"
File /r "bin\win32com"
File /r "build"
SetOutPath "$INSTDIR\build"
File "msvcr100.dll"
WriteRegStr HKCU "Software\Gajim" "" $INSTDIR
WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\Gajim" "DisplayName" "Gajim"
WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\Gajim" "UninstallString" "$INSTDIR\Uninstall.exe"
WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\Gajim" "DisplayIcon" "$INSTDIR\bin\Gajim.exe"
WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\Gajim" "DisplayVersion" "0.16.5"
WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\Gajim" "DisplayIcon" "$INSTDIR\build\Gajim.exe"
WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\Gajim" "DisplayVersion" "0.16.4"
WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\Gajim" "URLInfoAbout" "http://www.gajim.org/"
WriteUninstaller "$INSTDIR\Uninstall.exe"
!insertmacro MUI_STARTMENU_WRITE_BEGIN Application
SetShellVarContext current
CreateDirectory "$SMPROGRAMS\$StartMenuFolder"
CreateShortCut "$SMPROGRAMS\$StartMenuFolder\Gajim.lnk" "$INSTDIR\bin\Gajim.exe"
CreateShortCut "$SMPROGRAMS\$StartMenuFolder\Change Theme.lnk" "$INSTDIR\bin\gtk\bin\gtkthemeselector.exe"
CreateShortCut "$SMPROGRAMS\$StartMenuFolder\Gajim.lnk" "$INSTDIR\build\Gajim.exe"
SetShellVarContext all
CreateDirectory "$SMPROGRAMS\$StartMenuFolder"
CreateShortCut "$SMPROGRAMS\$StartMenuFolder\Gajim.lnk" "$INSTDIR\bin\Gajim.exe"
CreateShortCut "$SMPROGRAMS\$StartMenuFolder\Change Theme.lnk" "$INSTDIR\bin\gtk\bin\gtkthemeselector.exe"
CreateShortCut "$SMPROGRAMS\$StartMenuFolder\Gajim.lnk" "$INSTDIR\build\Gajim.exe"
!insertmacro MUI_STARTMENU_WRITE_END
SetOutPath "$INSTDIR\data"
@ -240,15 +180,6 @@ Section "Gajim" SecGajim
File /r "icons\hicolor"
SectionEnd
Section "Gtk+ 2" SecGtk
SectionIn RO
SetOutPath "$INSTDIR\bin\gtk"
File /r "bin\gtk\bin"
File /r "bin\gtk\etc"
File /r "bin\gtk\lib"
File /r "bin\gtk\share"
SectionEnd
Section "Plugins" SecPlugins
SetOutPath "$INSTDIR\plugins"
File /r "plugins\plugin_installer"
@ -325,43 +256,31 @@ SectionGroup $(NAME_Languages)
Section "English (UK)" SecLanguagesEnglishUK
SetOutPath "$INSTDIR\po"
File /r "po\en_GB"
SetOutPath "$INSTDIR\bin\gtk\share\locale"
File /r "bin\gtk\share\locale\en_GB"
SectionEnd
Section "French" SecLanguagesFrench
SetOutPath "$INSTDIR\po"
File /r "po\fr"
SetOutPath "$INSTDIR\bin\gtk\share\locale"
File /r "bin\gtk\share\locale\fr"
SectionEnd
Section "German" SecLanguagesGerman
SetOutPath "$INSTDIR\po"
File /r "po\de"
SetOutPath "$INSTDIR\bin\gtk\share\locale"
File /r "bin\gtk\share\locale\de"
SectionEnd
Section "Italian" SecLanguagesItalian
SetOutPath "$INSTDIR\po"
File /r "po\it"
SetOutPath "$INSTDIR\bin\gtk\share\locale"
File /r "bin\gtk\share\locale\it"
SectionEnd
Section "Spanish" SecLanguagesSpanish
SetOutPath "$INSTDIR\po"
File /r "po\es"
SetOutPath "$INSTDIR\bin\gtk\share\locale"
File /r "bin\gtk\share\locale\es"
SectionEnd
Section "Russian" SecLanguagesRussian
SetOutPath "$INSTDIR\po"
File /r "po\ru"
SetOutPath "$INSTDIR\bin\gtk\share\locale"
File /r "bin\gtk\share\locale\ru"
SectionEnd
Section $(NAME_SecLanguagesOther) SecLanguagesOther
@ -391,159 +310,25 @@ Section $(NAME_SecLanguagesOther) SecLanguagesOther
File /r "po\sv"
File /r "po\uk"
File /r "po\zh_CN"
SetOutPath "$INSTDIR\bin\gtk\share\locale"
File /r "bin\gtk\share\locale\af"
File /r "bin\gtk\share\locale\am"
File /r "bin\gtk\share\locale\ang"
File /r "bin\gtk\share\locale\ar"
File /r "bin\gtk\share\locale\as"
File /r "bin\gtk\share\locale\az"
File /r "bin\gtk\share\locale\az_IR"
File /r "bin\gtk\share\locale\be"
File /r "bin\gtk\share\locale\be@latin"
File /r "bin\gtk\share\locale\bg"
File /r "bin\gtk\share\locale\bn"
File /r "bin\gtk\share\locale\bn_IN"
File /r "bin\gtk\share\locale\br"
File /r "bin\gtk\share\locale\bs"
File /r "bin\gtk\share\locale\ca"
File /r "bin\gtk\share\locale\ca@valencia"
File /r "bin\gtk\share\locale\cs"
File /r "bin\gtk\share\locale\cy"
File /r "bin\gtk\share\locale\da"
File /r "bin\gtk\share\locale\dz"
File /r "bin\gtk\share\locale\el"
File /r "bin\gtk\share\locale\en_CA"
File /r "bin\gtk\share\locale\eo"
File /r "bin\gtk\share\locale\et"
File /r "bin\gtk\share\locale\eu"
File /r "bin\gtk\share\locale\fa"
File /r "bin\gtk\share\locale\fi"
File /r "bin\gtk\share\locale\ga"
File /r "bin\gtk\share\locale\gl"
File /r "bin\gtk\share\locale\gu"
File /r "bin\gtk\share\locale\he"
File /r "bin\gtk\share\locale\hi"
File /r "bin\gtk\share\locale\hr"
File /r "bin\gtk\share\locale\hu"
File /r "bin\gtk\share\locale\hy"
File /r "bin\gtk\share\locale\ia"
File /r "bin\gtk\share\locale\id"
File /r "bin\gtk\share\locale\io"
File /r "bin\gtk\share\locale\is"
File /r "bin\gtk\share\locale\ja"
File /r "bin\gtk\share\locale\ka"
File /r "bin\gtk\share\locale\kn"
File /r "bin\gtk\share\locale\ko"
File /r "bin\gtk\share\locale\ku"
File /r "bin\gtk\share\locale\li"
File /r "bin\gtk\share\locale\lt"
File /r "bin\gtk\share\locale\lv"
File /r "bin\gtk\share\locale\mai"
File /r "bin\gtk\share\locale\mg"
File /r "bin\gtk\share\locale\mi"
File /r "bin\gtk\share\locale\mk"
File /r "bin\gtk\share\locale\ml"
File /r "bin\gtk\share\locale\mn"
File /r "bin\gtk\share\locale\mr"
File /r "bin\gtk\share\locale\ms"
File /r "bin\gtk\share\locale\nb"
File /r "bin\gtk\share\locale\ne"
File /r "bin\gtk\share\locale\nl"
File /r "bin\gtk\share\locale\nn"
File /r "bin\gtk\share\locale\nso"
File /r "bin\gtk\share\locale\oc"
File /r "bin\gtk\share\locale\or"
File /r "bin\gtk\share\locale\pa"
File /r "bin\gtk\share\locale\pl"
File /r "bin\gtk\share\locale\ps"
File /r "bin\gtk\share\locale\pt"
File /r "bin\gtk\share\locale\pt_BR"
File /r "bin\gtk\share\locale\ro"
File /r "bin\gtk\share\locale\rw"
File /r "bin\gtk\share\locale\si"
File /r "bin\gtk\share\locale\sk"
File /r "bin\gtk\share\locale\sl"
File /r "bin\gtk\share\locale\sq"
File /r "bin\gtk\share\locale\sr"
File /r "bin\gtk\share\locale\sr@ije"
File /r "bin\gtk\share\locale\sr@latin"
File /r "bin\gtk\share\locale\sv"
File /r "bin\gtk\share\locale\ta"
File /r "bin\gtk\share\locale\te"
File /r "bin\gtk\share\locale\th"
File /r "bin\gtk\share\locale\tk"
File /r "bin\gtk\share\locale\tl"
File /r "bin\gtk\share\locale\tr"
File /r "bin\gtk\share\locale\tt"
File /r "bin\gtk\share\locale\ug"
File /r "bin\gtk\share\locale\uk"
File /r "bin\gtk\share\locale\ur"
File /r "bin\gtk\share\locale\uz"
File /r "bin\gtk\share\locale\uz@cyrillic"
File /r "bin\gtk\share\locale\vi"
File /r "bin\gtk\share\locale\wa"
File /r "bin\gtk\share\locale\xh"
File /r "bin\gtk\share\locale\yi"
File /r "bin\gtk\share\locale\zh_CN"
File /r "bin\gtk\share\locale\zh_HK"
File /r "bin\gtk\share\locale\zh_TW"
SectionEnd
SectionGroupEnd
SectionGroup $(NAME_Themes)
Section "Clearlooks" SecThemesClearlooks
SetOutPath "$INSTDIR\bin\gtk\share\themes"
File /r "bin\gtk\share\themes\Clearlooks"
SectionEnd
Section "Default GTK" SecThemesDefault
SetOutPath "$INSTDIR\bin\gtk\share\themes"
File /r "bin\gtk\share\themes\Default"
SectionEnd
Section "Glossy" SecThemesGlossy
SetOutPath "$INSTDIR\bin\gtk\share\themes"
File /r "bin\gtk\share\themes\Glossy"
SectionEnd
Section "Glossy-js" SecThemesGlossyJs
SectionIn RO
SetOutPath "$INSTDIR\bin\gtk\share\themes"
File /r "bin\gtk\share\themes\Glossy-js"
SectionEnd
Section "MS-Windows" SecThemesMSWindows
SetOutPath "$INSTDIR\bin\gtk\lib\gtk-2.0\2.10.0\engines"
File "bin\gtk\lib\gtk-2.0\2.10.0\engines\libwimp.dll"
SetOutPath "$INSTDIR\bin\gtk\share\themes"
File /r "bin\gtk\share\themes\MS-Windows"
SectionEnd
SectionGroupEnd
Section $(NAME_SecDesktopIcon) SecDesktopIcon
SetShellVarContext current
SetOutPath "$INSTDIR\bin"
CreateShortCut "$DESKTOP\Gajim.lnk" "$INSTDIR\bin\Gajim.exe"
SetOutPath "$INSTDIR\build"
CreateShortCut "$DESKTOP\Gajim.lnk" "$INSTDIR\build\Gajim.exe"
SectionEnd
Section $(NAME_SecAutostart) SecAutostart
SetShellVarContext current
SetOutPath "$INSTDIR\bin"
CreateShortCut "$SMSTARTUP\Gajim.lnk" "$INSTDIR\bin\Gajim.exe"
SetOutPath "$INSTDIR\build"
CreateShortCut "$SMSTARTUP\Gajim.lnk" "$INSTDIR\build\Gajim.exe"
SectionEnd
Section "Uninstall"
RMDir /r "$INSTDIR\bin\gtk\bin"
RMDir /r "$INSTDIR\bin\gtk\etc"
RMDir /r "$INSTDIR\bin\gtk\lib"
RMDir /r "$INSTDIR\bin\gtk\share"
RMDir "$INSTDIR\bin\gtk"
RMDir "$INSTDIR\bin\win32com"
RMDir /r "$INSTDIR\bin"
RMDir /r "$INSTDIR\build"
RMDir /r "$INSTDIR\data\gui"
RMDir /r "$INSTDIR\data\moods"
RMDir /r "$INSTDIR\data\activities"
@ -568,38 +353,7 @@ Section "Uninstall"
RMDir "$INSTDIR\plugins"
RMDir /r "$INSTDIR\icons\hicolor"
RMDir "$INSTDIR\icons"
RMDir /r "$INSTDIR\po\be"
RMDir /r "$INSTDIR\po\be@latin"
RMDir /r "$INSTDIR\po\bg"
RMDir /r "$INSTDIR\po\br"
RMDir /r "$INSTDIR\po\cs"
RMDir /r "$INSTDIR\po\da"
RMDir /r "$INSTDIR\po\de"
RMDir /r "$INSTDIR\po\el"
RMDir /r "$INSTDIR\po\en_GB"
RMDir /r "$INSTDIR\po\eo"
RMDir /r "$INSTDIR\po\es"
RMDir /r "$INSTDIR\po\eu"
RMDir /r "$INSTDIR\po\fr"
RMDir /r "$INSTDIR\po\gl"
RMDir /r "$INSTDIR\po\he"
RMDir /r "$INSTDIR\po\hr"
RMDir /r "$INSTDIR\po\it"
RMDir /r "$INSTDIR\po\lt"
RMDir /r "$INSTDIR\po\nb"
RMDir /r "$INSTDIR\po\nl"
RMDir /r "$INSTDIR\po\no"
RMDir /r "$INSTDIR\po\pl"
RMDir /r "$INSTDIR\po\pt"
RMDir /r "$INSTDIR\po\pt_BR"
RMDir /r "$INSTDIR\po\ru"
RMDir /r "$INSTDIR\po\sk"
RMDir /r "$INSTDIR\po\sr"
RMDir /r "$INSTDIR\po\sr@Latn"
RMDir /r "$INSTDIR\po\sv"
RMDir /r "$INSTDIR\po\uk"
RMDir /r "$INSTDIR\po\zh_CN"
RMDir "$INSTDIR\po"
RMDir /r "$INSTDIR\po"
Delete "$INSTDIR\AUTHORS"
Delete "$INSTDIR\COPYING"
Delete "$INSTDIR\THANKS"
@ -626,7 +380,6 @@ SectionEnd
!insertmacro MUI_FUNCTION_DESCRIPTION_BEGIN
!insertmacro MUI_DESCRIPTION_TEXT ${SecGajim} $(DESC_SecGajim)
!insertmacro MUI_DESCRIPTION_TEXT ${SecGtk} $(DESC_SecGtk)
!insertmacro MUI_DESCRIPTION_TEXT ${SecDesktopIcon} $(DESC_SecDesktopIcon)
!insertmacro MUI_DESCRIPTION_TEXT ${SecAutostart} $(DESC_SecAutostart)
!insertmacro MUI_FUNCTION_DESCRIPTION_END

View File

@ -1,3 +1,3 @@
cd src
gajim.py
python gajim.py
cd ..

View File

@ -23,41 +23,120 @@ from cx_Freeze import setup, Executable
import glob
import sys
import os
import site
site_dir = site.getsitepackages()[1]
include_dll_path = os.path.join(site_dir, "gnome")
sys.path.append('src')
# Use local gtk folder instead of the one in PATH that is not latest gtk
if 'gtk' in os.listdir('.'):
sys.path.append('gtk/bin')
# Collect the list of missing dll when cx_freeze builds the app
missing_dll = ['libgtk-3-0.dll',
'libgdk-3-0.dll',
'libatk-1.0-0.dll',
'libcairo-gobject-2.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',
'libgnutls-26.dll',
'libp11-kit-0.dll',
'libaerial-0.dll',
'libgstrtp-1.0-0.dll',
'libcurl-4.dll',
'libgstrtsp-1.0-0.dll',
'libdb-4.8.dll',
'libgstrtspserver-1.0-0.dll',
'libfarstream-0.2-2.dll',
'libgstsdp-1.0-0.dll',
'libfftw3.dll',
'libgsttag-1.0-0.dll',
'libfluidsynth-1.dll',
'libgsturidownloader-1.0-0.dll',
'libgraphene-1.0-0.dll',
'libgstvalidate-1.0-0.dll',
'libgssdp-1.0-3.dll',
'libgstvalidate-default-overrides-1.0-0.dll',
'libgstallocators-1.0-0.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',
'libgstbadbase-1.0-0.dll',
'libidn-11.dll',
'libgstbadvideo-1.0-0.dll',
'libjack.dll',
'libgstbase-1.0-0.dll',
'libjasper-1.dll',
'libgstbasecamerabinsrc-1.0-0.dll',
'libnice-10.dll',
'libgstcheck-1.0-0.dll',
'libnotify-4.dll',
'libgstcodecparsers-1.0-0.dll',
'libopenexr-2.dll',
'libgstcontroller-1.0-0.dll',
'libopenjp2.dll',
'libgstfft-1.0-0.dll',
'liborc-0.4-0.dll',
'libgstgl-1.0-0.dll',
'liborc-test-0.4-0.dll',
'libgstinsertbin-1.0-0.dll',
'libproxy.dll',
'libgstmpegts-1.0-0.dll',
'librsvg-2-2.dll',
'libgstnet-1.0-0.dll',
'libsoup-2.4-1.dll',
'libgstpbutils-1.0-0.dll',
'libsqlite3-0.dll',
'libgstphotography-1.0-0.dll',
'libvisual-0.4-0.dll',
'libgstreamer-1.0-0.dll',
'libwebp-5.dll',
'libgstriff-1.0-0.dll',
]
# We need to add all the libraries too (for themes, etc..)
gtk_libs = {
'etc': ['dbus-1', 'fonts', 'gtk-3.0', 'pango'],
'lib': ['aspell-0.60', 'enchant', 'farstream-0.2', 'gdbus-2.0', 'gdk-pixbuf-2.0', 'gio', 'girepository-1.0', 'gobject-introspection', 'gstreamer-1.0', 'gtk-3.0', 'libcanberra-0.30'],
'share': ['dbus-1', 'enchant', 'farstream', 'fonts', 'gir-1.0', 'glib-2.0', 'gobject-introspection-1.0', 'gst-plugins-bad', 'gst-plugins-base', 'gstreamer-1.0', 'gupnp-av', 'gupnp-dlna-2.0', 'icons', 'ssl', 'themes', 'xml'],
}
# Create the list of includes as cx_freeze likes
include_files = []
for dll in missing_dll:
include_files.append((os.path.join(include_dll_path, dll), dll))
# Let's add gtk libraries folders and files
for folder in gtk_libs:
for lib in gtk_libs[folder]:
folder_lib = os.path.join(folder, lib)
include_files.append((os.path.join(include_dll_path, folder_lib), folder_lib))
# Let's add gtk locales that we support in Gajim
for language in next(os.walk('po'))[1]:
target_dir = os.path.join('share', 'locale', language)
language_dir = os.path.join(include_dll_path, target_dir)
if os.path.isdir(language_dir):
include_files.append((language_dir, target_dir))
options = {
'build_exe': {
'includes': ['Gdk.KEY_', 'dumbdbm', 'dbhash', 'bsddb', 'new',
'goocanvas', 'Crypto.PublicKey.DSA', 'Crypto.Hash.HMAC',
'numbers', 'win32com.client', 'win32com.server', 'HTMLParser'],
'base': 'Win32GUI',
'packages': ['cffi', 'cryptography'],
'bin_excludes': [
'iconv.dll', 'intl.dll', 'libatk-1.0-0.dll',
'libgdk_pixbuf-2.0-0.dll', 'libgdk-win32-2.0-0.dll',
'libgio-2.0-0.dll',
'libglib-2.0-0.dll', 'libgmodule-2.0-0.dll',
'libgobject-2.0-0.dll', 'libgthread-2.0-0.dll',
'libgtk-win32-2.0-0.dll', 'libpango-1.0-0.dll',
'libpangowin32-1.0-0.dll', 'libcairo-2.dll',
'libpangocairo-1.0-0.dll', 'libpangoft2-1.0-0.dll',
'libfarstream-0.1-0.dll', 'libgcc_s_dw2-1.dll',
'libgstbase-0.10-0.dll', 'libgstcontroller-0.10-0.dll',
'libgstdataprotocol-0.10-0.dll', 'libgstinterfaces-0.10-0.dll',
'libgstnet-0.10-0.dll', 'libgstreamer-0.10-0.dll',
'libiconv-2.dll', 'libxml2.dll', 'libxml2-2.dll',
'build_exe': {
'compressed': False,
'includes': ['gi', 'Crypto.PublicKey.DSA', 'Crypto.Hash.HMAC',
'numbers', 'win32com.client', 'win32com.server'
],
}
'packages': ['gi', 'cffi', 'cryptography'],
'base': 'Win32GUI',
'include_files': include_files,
}
}
setup(
name='Gajim',
version='0.16.5',
version='0.16.10',
description='A full featured Jabber client',
author='Gajim Development Team',
url='http://gajim.org/',

View File

@ -441,11 +441,22 @@ class ChatControlBase(MessageControl, ChatCommandProcessor, CommandTools):
lang = gajim.LANG
if lang:
try:
gtkspell.Spell(self.msg_textview, lang)
self.spell = gtkspell.Spell(self.msg_textview, lang)
self.msg_textview.lang = lang
self.spell.connect('language_changed', self.on_language_changed)
except (GObject.GError, RuntimeError, TypeError, OSError):
dialogs.AspellDictError(lang)
def on_language_changed(self, spell, lang):
per_type = 'contacts'
if self.type_id == message_control.TYPE_GC:
per_type = 'rooms'
if not gajim.config.get_per(per_type, self.contact.jid):
gajim.config.add_per(per_type, self.contact.jid)
gajim.config.set_per(per_type, self.contact.jid, 'speller_language',
lang)
self.msg_textview.lang = lang
def on_banner_label_populate_popup(self, label, menu):
"""
Override the default context menu and add our own menutiems
@ -480,19 +491,6 @@ class ChatControlBase(MessageControl, ChatCommandProcessor, CommandTools):
Override the default context menu and we prepend an option to switch
languages
"""
def _on_select_dictionary(widget, lang):
per_type = 'contacts'
if self.type_id == message_control.TYPE_GC:
per_type = 'rooms'
if not gajim.config.get_per(per_type, self.contact.jid):
gajim.config.add_per(per_type, self.contact.jid)
gajim.config.set_per(per_type, self.contact.jid, 'speller_language',
lang)
spell = gtkspell.get_from_text_view(self.msg_textview)
self.msg_textview.lang = lang
spell.set_language(lang)
widget.set_active(True)
item = Gtk.MenuItem.new_with_mnemonic(_('_Undo'))
menu.prepend(item)
id_ = item.connect('activate', self.msg_textview.undo)

View File

@ -32,4 +32,4 @@ def remove(sequence, target):
sequence.remove(target)
elif isinstance(sequence, dict):
if target in sequence:
del sequence[target]
del sequence[target]

View File

@ -90,8 +90,8 @@ def add_entropy_sources_OpenSSL():
OpenSSL.rand.add(str(s).encode('utf-8'), 1)
# On Windows add the current contents of the screen to the PRNG state.
if os.name == 'nt':
OpenSSL.rand.screen()
# if os.name == 'nt':
# OpenSSL.rand.screen()
# The /proc filesystem on POSIX systems contains many random variables:
# memory statistics, interrupt counts, network packet counts
if os.name == 'posix':

View File

@ -129,7 +129,7 @@ class UnsubscribedEvent(Event):
class GcInvitationtEvent(Event):
type_ = 'gc-invitation'
def __init__(self, room_jid, reason, password, is_continued, from_jid,
def __init__(self, room_jid, reason, password, is_continued, jid_from,
time_=None, show_in_roster=False, show_in_systray=True):
Event.__init__(self, time_, show_in_roster=show_in_roster,
show_in_systray=show_in_systray)
@ -137,7 +137,7 @@ class GcInvitationtEvent(Event):
self.reason = reason
self.password = password
self.is_continued = is_continued
self.from_jid = from_jid
self.jid_from = jid_from
class FileRequestEvent(Event):
type_ = 'file-request'

View File

@ -198,6 +198,7 @@ class NSLookupResolver(CommonResolver):
if not result:
return []
hosts = []
result = result.decode(sys.stdout.encoding)
lines = result.replace('\r', '').split('\n')
current_host = None
for line in lines:

View File

@ -4712,9 +4712,6 @@ class ClientCertChooserDialog(FileChooserDialog):
check if file exists and call callback
'''
path_to_clientcert_file = self.get_filename()
path_to_clientcert_file = \
gtkgui_helpers.decode_filechooser_file_paths(
(path_to_clientcert_file,))[0]
if os.path.exists(path_to_clientcert_file):
callback(widget, path_to_clientcert_file)
@ -4757,8 +4754,6 @@ class SoundChooserDialog(FileChooserDialog):
Check if file exists and call callback
"""
path_to_snd_file = self.get_filename()
path_to_snd_file = gtkgui_helpers.decode_filechooser_file_paths(
(path_to_snd_file,))[0]
if os.path.exists(path_to_snd_file):
callback(widget, path_to_snd_file)
@ -4799,8 +4794,6 @@ class ImageChooserDialog(FileChooserDialog):
path_to_file = self.get_filename()
if not path_to_file:
return
path_to_file = gtkgui_helpers.decode_filechooser_file_paths(
(path_to_file,))[0]
if os.path.exists(path_to_file):
if isinstance(callback, tuple):
callback[0](widget, path_to_file, *callback[1:])
@ -4892,8 +4885,6 @@ class ArchiveChooserDialog(FileChooserDialog):
path_to_file = self.get_filename()
if not path_to_file:
return
path_to_file = gtkgui_helpers.decode_filechooser_file_paths(
(path_to_file,))[0]
if os.path.exists(path_to_file):
if isinstance(callback, tuple):
callback[0](path_to_file, *callback[1:])

View File

@ -175,8 +175,6 @@ class FeaturesWindow:
return gajim.HAVE_ZEROCONF
def dbus_available(self):
if os.name == 'nt':
return False
from common import dbus_support
return dbus_support.supported

View File

@ -297,8 +297,6 @@ class FileTransfersWindow:
def on_ok(widget):
file_dir = None
files_path_list = dialog.get_filenames()
files_path_list = gtkgui_helpers.decode_filechooser_file_paths(
files_path_list)
text_buffer = desc_entry.get_buffer()
desc = text_buffer.get_text(text_buffer.get_start_iter(),
text_buffer.get_end_iter(), True)
@ -379,8 +377,6 @@ class FileTransfersWindow:
def on_file_request_accepted(self, account, contact, file_props):
def on_ok(widget, account, contact, file_props):
file_path = dialog2.get_filename()
file_path = gtkgui_helpers.decode_filechooser_file_paths(
(file_path,))[0]
if os.path.exists(file_path):
# check if we have write permissions
if not os.access(file_path, os.W_OK):

View File

@ -50,7 +50,7 @@ def send_error(error_message):
try:
import dbus
import dbus.service
import dbus.glib
# import dbus.glib
# test if dbus-x11 is installed
bus = dbus.SessionBus()
except Exception:

View File

@ -38,6 +38,7 @@
import os
import sys
import warnings
import OpenSSL
if os.name == 'nt':
log_path = os.path.join(os.environ['APPDATA'], 'Gajim')
@ -50,26 +51,9 @@ if os.name == 'nt':
warnings.filterwarnings(action='ignore')
if os.path.isdir('gtk'):
# Used to create windows installer with GTK included
paths = os.environ['PATH']
list_ = paths.split(';')
new_list = []
for p in list_:
if p.find('gtk') < 0 and p.find('GTK') < 0:
new_list.append(p)
new_list.insert(0, os.path.join(os.getcwd(), 'gtk', 'lib'))
new_list.insert(0, os.path.join(os.getcwd(), 'gtk', 'bin'))
os.environ['PATH'] = ';'.join(new_list)
# Needs to be imported very early to not crash Gajim on exit.
try:
__import__('libxml2mod')
except ImportError:
pass
HAS_NBXMPP=True
MIN_NBXMPP_VER = "0.5.3"
from gi.repository import GLib
try:
import nbxmpp
except ImportError:
@ -109,19 +93,19 @@ if os.name == 'nt':
gettext.textdomain(APP)
gettext.install(APP, DIR)
locale.setlocale(locale.LC_ALL, '')
import ctypes
import ctypes.util
libintl_path = ctypes.util.find_library('intl')
if libintl_path == None:
local_intl = os.path.join('gtk', 'bin', 'intl.dll')
if os.path.exists(local_intl):
libintl_path = local_intl
if libintl_path == None:
raise ImportError('intl.dll library not found')
libintl = ctypes.cdll.LoadLibrary(libintl_path)
libintl.bindtextdomain(APP, DIR)
libintl.bind_textdomain_codeset(APP, 'UTF-8')
# locale.setlocale(locale.LC_ALL, '')
# import ctypes
# import ctypes.util
# libintl_path = ctypes.util.find_library('intl')
# if libintl_path == None:
# local_intl = os.path.join('gtk', 'bin', 'intl.dll')
# if os.path.exists(local_intl):
# libintl_path = local_intl
# if libintl_path == None:
# raise ImportError('intl.dll library not found')
# libintl = ctypes.cdll.LoadLibrary(libintl_path)
# libintl.bindtextdomain(APP, DIR)
# libintl.bind_textdomain_codeset(APP, 'UTF-8')
if os.name == 'nt':
# needed for docutils
@ -202,8 +186,8 @@ del profile
if os.name == 'nt':
plugins_locale_dir = os.path.join(common.configpaths.gajimpaths[
'PLUGINS_USER'], 'locale').encode(locale.getpreferredencoding())
libintl.bindtextdomain('gajim_plugins', plugins_locale_dir)
libintl.bind_textdomain_codeset('gajim_plugins', 'UTF-8')
# libintl.bindtextdomain('gajim_plugins', plugins_locale_dir)
# libintl.bind_textdomain_codeset('gajim_plugins', 'UTF-8')
class MyStderr(object):
_file = None
@ -316,7 +300,7 @@ if pritext:
del pritext
import gtkexcepthook
#import gtkexcepthook
import signal
import gtkgui_helpers

View File

@ -679,30 +679,6 @@ def make_pixbuf_grayscale(pixbuf):
pixbuf.saturate_and_pixelate(pixbuf2, 0.0, False)
return pixbuf2
def decode_filechooser_file_paths(file_paths):
"""
Decode as UTF-8 under Windows and ask sys.getfilesystemencoding() in POSIX
file_paths MUST be LIST
"""
file_paths_list = list()
if os.name == 'nt': # decode as UTF-8 under Windows
for file_path in file_paths:
file_path = file_path.decode('utf8')
file_paths_list.append(file_path)
else:
for file_path in file_paths:
try:
file_path = file_path.decode(sys.getfilesystemencoding())
except Exception:
try:
file_path = file_path
except Exception:
pass
file_paths_list.append(file_path)
return file_paths_list
def escape_underscore(s):
"""
Escape underlines to prevent them from being interpreted as keyboard
@ -771,7 +747,6 @@ def on_avatar_save_as_menuitem_activate(widget, jid, default_name=''):
def on_ok(widget):
file_path = dialog.get_filename()
file_path = decode_filechooser_file_paths((file_path,))[0]
if os.path.exists(file_path):
# check if we have write permissions
if not os.access(file_path, os.W_OK):

View File

@ -17,6 +17,7 @@
## You should have received a copy of the GNU General Public License
## along with Gajim. If not, see <http://www.gnu.org/licenses/>.
from gi.repository import GObject
from gi.repository import Gtk
import gi
gi.require_version('GtkSpell', '3.0')
@ -31,9 +32,14 @@ def ensure_attached(func):
return f
class Spell(object):
class Spell(GObject.GObject):
__gsignals__ = {
'language_changed': (GObject.SignalFlags.RUN_FIRST, None, (str,))
}
def __init__(self, textview, language=None, create=True):
def __init__(self, textview, language=None, create=True, jid=None,
per_type=None):
GObject.GObject.__init__(self)
if not isinstance(textview, Gtk.TextView):
raise TypeError("Textview must be derived from Gtk.TextView")
spell = GtkSpell.Checker.get_from_text_view(textview)
@ -47,6 +53,7 @@ class Spell(object):
raise OSError("Unable to attach spell object.")
if not self.spell.set_language(language):
raise OSError("Unable to set language: '%s'" % language)
self.spell.connect('language-changed', self.on_language_changed)
else:
if spell:
@ -54,6 +61,9 @@ class Spell(object):
else:
raise RuntimeError("Textview has no Spell object attached")
def on_language_changed(self, spell, lang):
self.emit('language_changed', lang)
@ensure_attached
def set_language(self, language):
if not self.spell.set_language(language):
@ -68,6 +78,7 @@ class Spell(object):
self.spell.detach()
self.spell = None
GObject.type_register(Spell)
def get_from_text_view(textview):
return Spell(textview, create=False)

View File

@ -265,7 +265,7 @@ class GajimPluginConfig():
except:
log.warning('%s plugin config file not readable. Saving it as '
'%s and creating a new one' % (self.plugin.short_name,
self.FILE_PATH + '.bak'))
self.FILE_PATH.decode(locale.getpreferredencoding()) + '.bak'))
if os.path.exists(self.FILE_PATH + '.bak'):
os.remove(self.FILE_PATH + '.bak')
os.rename(self.FILE_PATH, self.FILE_PATH + '.bak')

View File

@ -288,7 +288,7 @@ class ProfileWindow:
else:
if i == 'DESC':
self.xml.get_object('DESC_textview').get_buffer().set_text(
vcard_[i], 0)
vcard_[i], len(vcard[i].encode('utf-8')))
else:
self.set_value(i + '_entry', vcard_[i])
if self.update_progressbar_timeout_id is not None:

View File

@ -3213,7 +3213,7 @@ class RosterWindow:
'attached_gpg_keys').split()
keys = {}
keyID = _('None')
for i in list(range(len(attached_keys)/2)):
for i in list(range(int(len(attached_keys)/2))):
keys[attached_keys[2*i]] = attached_keys[2*i+1]
if attached_keys[2*i] == contact.jid:
keyID = attached_keys[2*i+1]

View File

@ -240,7 +240,7 @@ class VcardWindow:
else:
if i == 'DESC':
self.xml.get_object('DESC_textview').get_buffer().set_text(
vcard[i], 0)
vcard[i], len(vcard[i].encode('utf-8')))
elif i != 'jid': # Do not override jid_label
self.set_value(i + '_label', vcard[i])
self.vcard_arrived = True