ability to compite the installer for gtk3 version

This commit is contained in:
Yann Leboulanger 2016-07-07 22:41:35 +02:00
parent b353a0721a
commit 06a477da8a
11 changed files with 151 additions and 351 deletions

View file

@ -5,35 +5,20 @@ hg archive gajim_built
xcopy ..\gajim-plugins\plugin_installer gajim_built\plugins\plugin_installer /e /i xcopy ..\gajim-plugins\plugin_installer gajim_built\plugins\plugin_installer /e /i
copy msgfmt.exe gajim_built copy msgfmt.exe gajim_built
copy gettextsrc.dll gajim_built copy msvcr100.dll gajim_built
copy gettextlib.dll gajim_built
copy msvcr90.dll gajim_built
cd gajim_built cd gajim_built
REM for libglade-2.0.0.dll for %%l in (po\*.po) do mkdir po\%%~nl & mkdir po\%%~nl\LC_MESSAGES & msgfmt -o po\%%~nl\LC_MESSAGES\gajim.mo %%l
PATH=..\src\gtk\bin;%PATH%
c:\python27\python.exe setup_win32.py build_exe c:\python34\python.exe setup_win32.py build_exe
move build\exe.win32-2.7 . move build\exe.win32-3.4 .
rename exe.win32-2.7 bin rmdir build
rename exe.win32-3.4 build
copy ..\LIBEAY32.dll bin
copy ..\SSLEAY32.dll bin
REM for snarl plugin REM for snarl plugin
xcopy ..\win32com bin\win32com /e /i xcopy ..\win32com build\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
"C:\Program Files (x86)\NSIS\makensis" gajim.nsi "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" !define MUI_STARTMENUPAGE_REGISTRY_VALUENAME "Start Menu Folder"
!insertmacro MUI_PAGE_STARTMENU Application $StartMenuFolder !insertmacro MUI_PAGE_STARTMENU Application $StartMenuFolder
!insertmacro MUI_PAGE_INSTFILES !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_PAGE_FINISH
!insertmacro MUI_UNPAGE_WELCOME !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_SecDesktopIcon ${LANG_ENGLISH} "Create icon on desktop"
LangString NAME_SecAutostart ${LANG_ENGLISH} "Start Gajim when Windows starts" LangString NAME_SecAutostart ${LANG_ENGLISH} "Start Gajim when Windows starts"
LangString DESC_SecGajim ${LANG_ENGLISH} "Installs the main Gajim files." 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_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 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?" 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_SecDesktopIcon ${LANG_FRENCH} "Créer une icône sur le bureau"
LangString NAME_SecAutostart ${LANG_FRENCH} "Lancer Gajim au démarrage de Windows" 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_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_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 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 ?" 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_SecDesktopIcon ${LANG_GERMAN} "Desktop-Icon erstellen"
LangString NAME_SecAutostart ${LANG_GERMAN} "Gajim mit Windows starten" LangString NAME_SecAutostart ${LANG_GERMAN} "Gajim mit Windows starten"
LangString DESC_SecGajim ${LANG_GERMAN} "Installiert die Hauptdateien von Gajim." 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_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 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?" 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_SecDesktopIcon ${LANG_ITALIAN} "Crea un'icona sul desktop"
LangString NAME_SecAutostart ${LANG_ITALIAN} "Lancia Gajim quando parte Windows" LangString NAME_SecAutostart ${LANG_ITALIAN} "Lancia Gajim quando parte Windows"
LangString DESC_SecGajim ${LANG_ITALIAN} "Installa i file principali di Gajim." 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_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 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?" 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_SecDesktopIcon ${LANG_RUSSIAN} "Ñîçäàòü ÿðëûê íà ðàáî÷åì ñòîëå"
LangString NAME_SecAutostart ${LANG_RUSSIAN} "Çàïóñêàòü Gajim ïðè çàãðóçêå Windows" LangString NAME_SecAutostart ${LANG_RUSSIAN} "Çàïóñêàòü Gajim ïðè çàãðóçêå Windows"
LangString DESC_SecGajim ${LANG_RUSSIAN} "Óñòàíîâêà îñíîâíûõ ôàéëîâ Gajim." LangString DESC_SecGajim ${LANG_RUSSIAN} "Óñòàíîâêà îñíîâíûõ ôàéëîâ Gajim."
LangString DESC_SecGtk ${LANG_RUSSIAN} "Óñòàíîâêà Gtk+ 2 (íåîáõîäèìî äëÿ ğàáîòû Gajim)."
LangString DESC_SecDesktopIcon ${LANG_RUSSIAN} "Åñëè îòìå÷åíî, íà ðàáî÷åì ñòîëå áóäåò ñîçäàí ÿðëûê Gajim." LangString DESC_SecDesktopIcon ${LANG_RUSSIAN} "Åñëè îòìå÷åíî, íà ðàáî÷åì ñòîëå áóäåò ñîçäàí ÿðëûê Gajim."
LangString DESC_SecAutostart ${LANG_RUSSIAN} "Åñëè îòìå÷åíî, Gajim áóäåò àâòîìàòè÷åñêè çàïóñêàòüñÿ ïðè çàãðóçêå Windows." LangString DESC_SecAutostart ${LANG_RUSSIAN} "Åñëè îòìå÷åíî, Gajim áóäåò àâòîìàòè÷åñêè çàïóñêàòüñÿ ïðè çàãðóçêå Windows."
LangString STR_Installed ${LANG_RUSSIAN} "Ïîõîæå, Gajim óæå óñòàíîâëåí. Äåèíñòàëëèðîâàòü óñòàíîâëåííóþ âåðñèþ?" LangString STR_Installed ${LANG_RUSSIAN} "Ïîõîæå, Gajim óæå óñòàíîâëåí. Äåèíñòàëëèðîâàòü óñòàíîâëåííóþ âåðñèþ?"
@ -138,7 +133,6 @@ LangString NAME_Themes ${LANG_HEBREW} "
LangString NAME_SecDesktopIcon ${LANG_HEBREW} "öåø ñîì áùåìçï òáåãä" LangString NAME_SecDesktopIcon ${LANG_HEBREW} "öåø ñîì áùåìçï òáåãä"
LangString NAME_SecAutostart ${LANG_HEBREW} "äôòì àú Gajim ëàùø Windows îúçéì" LangString NAME_SecAutostart ${LANG_HEBREW} "äôòì àú Gajim ëàùø Windows îúçéì"
LangString DESC_SecGajim ${LANG_HEBREW} "îú÷éï ÷áöé Gajim òé÷øééí." LangString DESC_SecGajim ${LANG_HEBREW} "îú÷éï ÷áöé Gajim òé÷øééí."
LangString DESC_SecGtk ${LANG_HEBREW} "îú÷éï Gtk+ 2 (ğçåöä ìäøöú Gajim)."
LangString DESC_SecDesktopIcon ${LANG_HEBREW} "áîéãä åð÷áòú, ÷éöåø ãøê òáåø Gajim éåùí òì ùåìçï äòáåãä." LangString DESC_SecDesktopIcon ${LANG_HEBREW} "áîéãä åð÷áòú, ÷éöåø ãøê òáåø Gajim éåùí òì ùåìçï äòáåãä."
LangString DESC_SecAutostart ${LANG_HEBREW} "áîéãä åð÷áòú, Gajim éåôòì àåèåîèéú ëàùø Windows îúçéì." LangString DESC_SecAutostart ${LANG_HEBREW} "áîéãä åð÷áòú, Gajim éåôòì àåèåîèéú ëàùø Windows îúçéì."
LangString STR_Installed ${LANG_HEBREW} "ëôé äðøàä, Gajim ëáø îåú÷ï. ìäñéø àåúå?" LangString STR_Installed ${LANG_HEBREW} "ëôé äðøàä, Gajim ëáø îåú÷ï. ìäñéø àåúå?"
@ -153,79 +147,25 @@ Section "Gajim" SecGajim
File "COPYING" File "COPYING"
File "THANKS" File "THANKS"
File "THANKS.artists" File "THANKS.artists"
File /r "build"
SetOutPath "$INSTDIR\bin" SetOutPath "$INSTDIR\build"
File "bin\_bsddb.pyd" File "msvcr100.dll"
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"
WriteRegStr HKCU "Software\Gajim" "" $INSTDIR WriteRegStr HKCU "Software\Gajim" "" $INSTDIR
WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\Gajim" "DisplayName" "Gajim" 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" "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" "DisplayIcon" "$INSTDIR\build\Gajim.exe"
WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\Gajim" "DisplayVersion" "0.16.5" 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/" WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\Gajim" "URLInfoAbout" "http://www.gajim.org/"
WriteUninstaller "$INSTDIR\Uninstall.exe" WriteUninstaller "$INSTDIR\Uninstall.exe"
!insertmacro MUI_STARTMENU_WRITE_BEGIN Application !insertmacro MUI_STARTMENU_WRITE_BEGIN Application
SetShellVarContext current SetShellVarContext current
CreateDirectory "$SMPROGRAMS\$StartMenuFolder" CreateDirectory "$SMPROGRAMS\$StartMenuFolder"
CreateShortCut "$SMPROGRAMS\$StartMenuFolder\Gajim.lnk" "$INSTDIR\bin\Gajim.exe" CreateShortCut "$SMPROGRAMS\$StartMenuFolder\Gajim.lnk" "$INSTDIR\build\Gajim.exe"
CreateShortCut "$SMPROGRAMS\$StartMenuFolder\Change Theme.lnk" "$INSTDIR\bin\gtk\bin\gtkthemeselector.exe"
SetShellVarContext all SetShellVarContext all
CreateDirectory "$SMPROGRAMS\$StartMenuFolder" CreateDirectory "$SMPROGRAMS\$StartMenuFolder"
CreateShortCut "$SMPROGRAMS\$StartMenuFolder\Gajim.lnk" "$INSTDIR\bin\Gajim.exe" CreateShortCut "$SMPROGRAMS\$StartMenuFolder\Gajim.lnk" "$INSTDIR\build\Gajim.exe"
CreateShortCut "$SMPROGRAMS\$StartMenuFolder\Change Theme.lnk" "$INSTDIR\bin\gtk\bin\gtkthemeselector.exe"
!insertmacro MUI_STARTMENU_WRITE_END !insertmacro MUI_STARTMENU_WRITE_END
SetOutPath "$INSTDIR\data" SetOutPath "$INSTDIR\data"
@ -240,15 +180,6 @@ Section "Gajim" SecGajim
File /r "icons\hicolor" File /r "icons\hicolor"
SectionEnd 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 Section "Plugins" SecPlugins
SetOutPath "$INSTDIR\plugins" SetOutPath "$INSTDIR\plugins"
File /r "plugins\plugin_installer" File /r "plugins\plugin_installer"
@ -325,43 +256,31 @@ SectionGroup $(NAME_Languages)
Section "English (UK)" SecLanguagesEnglishUK Section "English (UK)" SecLanguagesEnglishUK
SetOutPath "$INSTDIR\po" SetOutPath "$INSTDIR\po"
File /r "po\en_GB" File /r "po\en_GB"
SetOutPath "$INSTDIR\bin\gtk\share\locale"
File /r "bin\gtk\share\locale\en_GB"
SectionEnd SectionEnd
Section "French" SecLanguagesFrench Section "French" SecLanguagesFrench
SetOutPath "$INSTDIR\po" SetOutPath "$INSTDIR\po"
File /r "po\fr" File /r "po\fr"
SetOutPath "$INSTDIR\bin\gtk\share\locale"
File /r "bin\gtk\share\locale\fr"
SectionEnd SectionEnd
Section "German" SecLanguagesGerman Section "German" SecLanguagesGerman
SetOutPath "$INSTDIR\po" SetOutPath "$INSTDIR\po"
File /r "po\de" File /r "po\de"
SetOutPath "$INSTDIR\bin\gtk\share\locale"
File /r "bin\gtk\share\locale\de"
SectionEnd SectionEnd
Section "Italian" SecLanguagesItalian Section "Italian" SecLanguagesItalian
SetOutPath "$INSTDIR\po" SetOutPath "$INSTDIR\po"
File /r "po\it" File /r "po\it"
SetOutPath "$INSTDIR\bin\gtk\share\locale"
File /r "bin\gtk\share\locale\it"
SectionEnd SectionEnd
Section "Spanish" SecLanguagesSpanish Section "Spanish" SecLanguagesSpanish
SetOutPath "$INSTDIR\po" SetOutPath "$INSTDIR\po"
File /r "po\es" File /r "po\es"
SetOutPath "$INSTDIR\bin\gtk\share\locale"
File /r "bin\gtk\share\locale\es"
SectionEnd SectionEnd
Section "Russian" SecLanguagesRussian Section "Russian" SecLanguagesRussian
SetOutPath "$INSTDIR\po" SetOutPath "$INSTDIR\po"
File /r "po\ru" File /r "po\ru"
SetOutPath "$INSTDIR\bin\gtk\share\locale"
File /r "bin\gtk\share\locale\ru"
SectionEnd SectionEnd
Section $(NAME_SecLanguagesOther) SecLanguagesOther Section $(NAME_SecLanguagesOther) SecLanguagesOther
@ -391,159 +310,25 @@ Section $(NAME_SecLanguagesOther) SecLanguagesOther
File /r "po\sv" File /r "po\sv"
File /r "po\uk" File /r "po\uk"
File /r "po\zh_CN" 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 SectionEnd
SectionGroupEnd SectionGroupEnd
Section $(NAME_SecDesktopIcon) SecDesktopIcon Section $(NAME_SecDesktopIcon) SecDesktopIcon
SetShellVarContext current SetShellVarContext current
SetOutPath "$INSTDIR\bin" SetOutPath "$INSTDIR\build"
CreateShortCut "$DESKTOP\Gajim.lnk" "$INSTDIR\bin\Gajim.exe" CreateShortCut "$DESKTOP\Gajim.lnk" "$INSTDIR\build\Gajim.exe"
SectionEnd SectionEnd
Section $(NAME_SecAutostart) SecAutostart Section $(NAME_SecAutostart) SecAutostart
SetShellVarContext current SetShellVarContext current
SetOutPath "$INSTDIR\bin" SetOutPath "$INSTDIR\build"
CreateShortCut "$SMSTARTUP\Gajim.lnk" "$INSTDIR\bin\Gajim.exe" CreateShortCut "$SMSTARTUP\Gajim.lnk" "$INSTDIR\build\Gajim.exe"
SectionEnd SectionEnd
Section "Uninstall" 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 "$INSTDIR\bin\win32com"
RMDir /r "$INSTDIR\bin" RMDir /r "$INSTDIR\build"
RMDir /r "$INSTDIR\data\gui" RMDir /r "$INSTDIR\data\gui"
RMDir /r "$INSTDIR\data\moods" RMDir /r "$INSTDIR\data\moods"
RMDir /r "$INSTDIR\data\activities" RMDir /r "$INSTDIR\data\activities"
@ -568,38 +353,7 @@ Section "Uninstall"
RMDir "$INSTDIR\plugins" RMDir "$INSTDIR\plugins"
RMDir /r "$INSTDIR\icons\hicolor" RMDir /r "$INSTDIR\icons\hicolor"
RMDir "$INSTDIR\icons" RMDir "$INSTDIR\icons"
RMDir /r "$INSTDIR\po\be" RMDir /r "$INSTDIR\po"
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"
Delete "$INSTDIR\AUTHORS" Delete "$INSTDIR\AUTHORS"
Delete "$INSTDIR\COPYING" Delete "$INSTDIR\COPYING"
Delete "$INSTDIR\THANKS" Delete "$INSTDIR\THANKS"
@ -626,7 +380,6 @@ SectionEnd
!insertmacro MUI_FUNCTION_DESCRIPTION_BEGIN !insertmacro MUI_FUNCTION_DESCRIPTION_BEGIN
!insertmacro MUI_DESCRIPTION_TEXT ${SecGajim} $(DESC_SecGajim) !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 ${SecDesktopIcon} $(DESC_SecDesktopIcon)
!insertmacro MUI_DESCRIPTION_TEXT ${SecAutostart} $(DESC_SecAutostart) !insertmacro MUI_DESCRIPTION_TEXT ${SecAutostart} $(DESC_SecAutostart)
!insertmacro MUI_FUNCTION_DESCRIPTION_END !insertmacro MUI_FUNCTION_DESCRIPTION_END

View file

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

View file

@ -23,41 +23,120 @@ from cx_Freeze import setup, Executable
import glob import glob
import sys import sys
import os import os
import site
site_dir = site.getsitepackages()[1]
include_dll_path = os.path.join(site_dir, "gnome")
sys.path.append('src') sys.path.append('src')
# Use local gtk folder instead of the one in PATH that is not latest gtk
if 'gtk' in os.listdir('.'): # Collect the list of missing dll when cx_freeze builds the app
sys.path.append('gtk/bin') 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 = { options = {
'build_exe': { 'build_exe': {
'includes': ['Gdk.KEY_', 'dumbdbm', 'dbhash', 'bsddb', 'new', 'compressed': False,
'goocanvas', 'Crypto.PublicKey.DSA', 'Crypto.Hash.HMAC', 'includes': ['gi', 'Crypto.PublicKey.DSA', 'Crypto.Hash.HMAC',
'numbers', 'win32com.client', 'win32com.server', 'HTMLParser'], 'numbers', 'win32com.client', 'win32com.server'
'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',
], ],
} 'packages': ['gi', 'cffi', 'cryptography'],
'base': 'Win32GUI',
'include_files': include_files,
}
} }
setup( setup(
name='Gajim', name='Gajim',
version='0.16.5', version='0.16.10',
description='A full featured Jabber client', description='A full featured Jabber client',
author='Gajim Development Team', author='Gajim Development Team',
url='http://gajim.org/', url='http://gajim.org/',

View file

@ -32,4 +32,4 @@ def remove(sequence, target):
sequence.remove(target) sequence.remove(target)
elif isinstance(sequence, dict): elif isinstance(sequence, dict):
if target in sequence: 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) OpenSSL.rand.add(str(s).encode('utf-8'), 1)
# On Windows add the current contents of the screen to the PRNG state. # On Windows add the current contents of the screen to the PRNG state.
if os.name == 'nt': # if os.name == 'nt':
OpenSSL.rand.screen() # OpenSSL.rand.screen()
# The /proc filesystem on POSIX systems contains many random variables: # The /proc filesystem on POSIX systems contains many random variables:
# memory statistics, interrupt counts, network packet counts # memory statistics, interrupt counts, network packet counts
if os.name == 'posix': if os.name == 'posix':

View file

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

View file

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

View file

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

View file

@ -38,6 +38,7 @@
import os import os
import sys import sys
import warnings import warnings
import OpenSSL
if os.name == 'nt': if os.name == 'nt':
log_path = os.path.join(os.environ['APPDATA'], 'Gajim') log_path = os.path.join(os.environ['APPDATA'], 'Gajim')
@ -50,26 +51,9 @@ if os.name == 'nt':
warnings.filterwarnings(action='ignore') 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 HAS_NBXMPP=True
MIN_NBXMPP_VER = "0.5.3" MIN_NBXMPP_VER = "0.5.3"
from gi.repository import GLib
try: try:
import nbxmpp import nbxmpp
except ImportError: except ImportError:
@ -109,19 +93,19 @@ if os.name == 'nt':
gettext.textdomain(APP) gettext.textdomain(APP)
gettext.install(APP, DIR) gettext.install(APP, DIR)
locale.setlocale(locale.LC_ALL, '') # locale.setlocale(locale.LC_ALL, '')
import ctypes # import ctypes
import ctypes.util # import ctypes.util
libintl_path = ctypes.util.find_library('intl') # libintl_path = ctypes.util.find_library('intl')
if libintl_path == None: # if libintl_path == None:
local_intl = os.path.join('gtk', 'bin', 'intl.dll') # local_intl = os.path.join('gtk', 'bin', 'intl.dll')
if os.path.exists(local_intl): # if os.path.exists(local_intl):
libintl_path = local_intl # libintl_path = local_intl
if libintl_path == None: # if libintl_path == None:
raise ImportError('intl.dll library not found') # raise ImportError('intl.dll library not found')
libintl = ctypes.cdll.LoadLibrary(libintl_path) # libintl = ctypes.cdll.LoadLibrary(libintl_path)
libintl.bindtextdomain(APP, DIR) # libintl.bindtextdomain(APP, DIR)
libintl.bind_textdomain_codeset(APP, 'UTF-8') # libintl.bind_textdomain_codeset(APP, 'UTF-8')
if os.name == 'nt': if os.name == 'nt':
# needed for docutils # needed for docutils
@ -202,8 +186,8 @@ del profile
if os.name == 'nt': if os.name == 'nt':
plugins_locale_dir = os.path.join(common.configpaths.gajimpaths[ plugins_locale_dir = os.path.join(common.configpaths.gajimpaths[
'PLUGINS_USER'], 'locale').encode(locale.getpreferredencoding()) 'PLUGINS_USER'], 'locale').encode(locale.getpreferredencoding())
libintl.bindtextdomain('gajim_plugins', plugins_locale_dir) # libintl.bindtextdomain('gajim_plugins', plugins_locale_dir)
libintl.bind_textdomain_codeset('gajim_plugins', 'UTF-8') # libintl.bind_textdomain_codeset('gajim_plugins', 'UTF-8')
class MyStderr(object): class MyStderr(object):
_file = None _file = None
@ -316,7 +300,7 @@ if pritext:
del pritext del pritext
import gtkexcepthook #import gtkexcepthook
import signal import signal
import gtkgui_helpers import gtkgui_helpers

View file

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