summaryrefslogtreecommitdiffstats
AgeCommit message (Collapse)Author
2018-05-29Sort input file listBernhard M. Wiedemann
so that the swift-im openSUSE package builds in a reproducible way in spite of indeterministic filesystem readdir order See https://reproducible-builds.org/ for why this is good. License: This patch is BSD licensed - see Documentation/Licenses/BSD-simplified.txt for details. Test-Information: Builds on different machines should no longer have differences in Swiften.h Change-Id: I8066a66db83c7d7ff10858196cb72b13af3f6008
2018-05-17Make generated files handle Unicode charactersThanos Doukoudakis
This patch handles a case where some of the files used to generate COPYING, were containing unicode strings, which could lead to a failure when building sid package. The code now will check the type of the string before writing to the file, and if needed it will transform it to the appropriate format. Test-Information: Generated the sid package with package_all_platforms script with no problems. Created a debian sid box and tested the installation of the generated packages. Validated the output generated in Windows 10 and Ubuntu 16.04 builds through the "About" dialog in Swift. Change-Id: I05e518b758f316d9fbf23c1079be5a462e75106c
2018-05-17Add support for QtWebKit 5.6 and newer to packaging on WindowsTobias Markmann
Qt's windeployqt tool does not know about QtWebKit's dependencies, as it is not shipped together anymore and QtWebKit is not maintained by the same maintainers as Qt anymore. Test-Information: With this patch ./scons dist=1 on Windows with latest Qt 5.10 and QtWebKit 5.212.0 Alpha 2 creates a Swift/QtUI/Swift directory with a running Swift.exe inside. Without this patch Swift.exe crashes due to missing libxml2.dll and missing libxslt.dll. Change-Id: I2f8e658bf417bde20648618bac19b1c148831e1e
2018-05-03Disable all warnings for generated Qt filesTobias Markmann
This includes compilation of MOC generated source files and adjusting the UIC generated header files with compiler pragmas that ignore all warnings. Test-Information: Tested no warnings are emitted for generated files on macOS 10.13.4 with Qt 5.5.1 and clang trunk. Change-Id: Ib49ba7bc2017e018ebd857837fbe2d9640fba2bb
2018-03-20Merge branch 'swift-4.x'swift-5.0alpha2Tobias Markmann
* swift-4.x: (44 commits) Test-Information: Builds on macOS 10.13.3 with clang trunk. Change-Id: If50381f103b0ad18d038b920d3d43537642141cb
2018-03-12Enable per user installations on WindowsThanos Doukoudakis
This patch will allow the installer to perform per-user installations that doesn't require elevated rights. If the Visual Studio prerequisites are missing, the installer will ask the user if he wants to install them. If the user chooses not to, the installer will deploy the necessary files in the installation folder. Installations for all users (per machine) are still available. Upon upgrading in per-user installs from previous versions, the user can still access the settings that were stored in the registry, but not the settings stored in system-settings.xml. Test-Information: Build and tested with Wix3.11, Qt 5.8 and Visual Studio 2015 on Windows 10 and Windows 7. Tested fresh install and upgrade, for per-machine and per-user installations. Tested the vcredist install and the dll deployment when the installation is not present. Verified that the installer uses the registry settings in per-user installations. Change-Id: I1879e2fb7ee347dab58852eb73d4ddddec15b35d
2018-02-09Move man page generation from package.sh to sconsTobias Markmann
Pass help2man=1 to have scons build man page sources via help2man. Adjusted package.sh to use scons to build man pages. Test-Information: Tested on Ubuntu 16.04 and it generated man page sources when help2man=1. Tested package_all_platforms on Ubuntu 16.04. The build does not fail due to missing man pages anymore. Change-Id: I6c62bc3f666ffd9f926038045672eb6e456082e5
2018-02-02Add support for extracting certificate chain from PEM stringTobias Markmann
Add PrivateKey class to simply encapsulate arbitrary private key data and the corresponding password. This enables easy unit testing by loading the certificate and key from within a test case. Test-Information: Added unit tests for certificate and key generated by OpenSSL. Tested on macOS 10.13.2 with OpenSSL. Change-Id: I1c9ffc3c70f61af65c4f1c48670badaf74b672b7
2017-12-19Allow to override Swiften libdirDennis Schridde
The libdir for Swiften was hardcoded to "lib". With this patch it is possible to override it. License: This patch is BSD-licensed, see Documentation/Licenses/BSD-simplified.txt for details. Test-Information: Build with SWIFTEN_LIBDIR=lib64 and observe that files are installed into the desired directory (i.e. /usr/lib64, if SWIFTEN_INSTALLDIR=/usr). Change-Id: I4d844b93a189254b5923f9cd58190b0f6a65b9ac
2017-07-26Workaround Boost bug to prevent crash in recents loadingThanos Doukoudakis
Boost 1.64 introduced a regression where boost::optional deserialisation could lead to a crash when loading the recent chats. This fix updates the way we serialise the ChatListWindow::Chat and HighlightAction classes to avoid these errors. A flag has been added, to allow the use of the erroneous version of the library during the build. During runtime if needed, the client will skip loading the data, to avoid any unpredicted behaviour. Test-Information: Tested on windows 10 with different versions of boost 1.56(bundled), 1.63, 1.64, 1.65 and Ubuntu 17.04 with versions 1.56(bundled) and 1.64. Added unit tests for the serialisation ChatListWindow::Chat class. Change-Id: Idc5c3a6cfd92272b8eab2d77e243dda743803a31
2017-07-11Add missing SWIFTEN_OVERRIDE statements to dtorsTobias Markmann
Also removes -Winconsistent-missing-destructor-override from the list of ignored clang warnings. Test-Information: Tested on macOS 10.12.5 with clang trunk. Change-Id: Iad951879e01eb951a2a393399f55e4e37437c6a2
2017-07-07Make std:: make_unique available in gcc with c++11Joanna Hulboj
Test-Information: Unit tests pass OK on Windows 10 and CentOS 7.3. Change-Id: I33c9eb6b3e6409727350a44e6d5c88c5e8907275
2017-06-26Fix compiler warnings raise by Clang on LinuxTobias Markmann
Clang raises warnings about unused members and macros on Linux. These are fixed with this change. Test-Information: Tested with clang-3.9 on Debian Stretch. Change-Id: I87bc0606cfd14365330aaad4ed433d3bca2d5330
2017-06-21Add CircleCI configuration for basic GitHub PR checksTobias Markmann
This also disables a couple compiler warnings raised by clang trunk. Test-Information: Tested this on my personal GitHub fork of Swift and it works. Change-Id: I646d3beb9fc0376e0b38ce8e323e5717a899ad45
2017-04-10Only add existing environment variables to QtUI test envTobias Markmann
Furthermore extended the list of potential environment variables based on what the qt4.py tool creates. Fix for commit ed2226782ac15345aeb8e615b41d30e5aab67b51. Test-Information: Tested on Windows 8 with VS2013 with Qt 5.4.2 and on macOS 10.12.4 with Qt 5.5.1. Change-Id: Ib52084ca0e1505fe943c33fa74f479e360d834fe
2017-02-24Add Sparkle license to about dialog COPYING file on demandTobias Markmann
If scons detects a Sparkle release in the 3rdParty folder, it will add the containing LICENSE file at the end of the dynamically generated COPYING file. Test-Information: Tested that the contents of Sparkle’s LICENSE file are at the end of the text in the license window of the about dialog, if the Sparkle folder, with a Sparkle release inside, is present in 3rdParty. Tested that Swift builds fine, if the Sparkle folder is missing in 3rdParty. Change-Id: I89db155b5bb3eef4d632997fd99ff270b4720a16
2017-01-17Add Qt bin path to SCons process' PATH environment variableTobias Markmann
Test-Information: Tested scons dist=1 successfully on Windows 10 with Visual Studio 2015 and Qt 5.7.1. Change-Id: I41271f10367249e2e89fdba85f1d5c5305c548ff
2017-01-11Integrate googletest and googlemock libraries to 3rdPartyTobias Markmann
googletest and googlemock from release 1.8.0 have been copied to the 3rdParty folder. With this commit tests for Swift project can also written using googletest and googlemock APIs. The test runners will execute test suites written to either test library. Passing —-xml to a test runner will now create two test report XML files, namely $programName-report.cppunit.xml and $programName-report.gtest.xml. The ByteArrayTest has been converted to use googletest instead of googlemock to serve as an example and test the integration. Test-Information: Build all tests via ‘./scons test=all’ and verified all tests are run. Build all tests via ‘./scons test=all checker_report=1’ and verified that two report XML files are generated per test runner executed. Change-Id: I81a9fb2c7ea5612fc1b34eef70ed7e711bfeea81
2016-12-15Merge branch 'swift-3.x’Tobias Markmann
* swift-3.x: - Fix building Swift on 32-bit Linux distributions - Remove optional_fwd.hpp use; workaround for Boost Bug #12179 - Split COPYING.thirdparty in contributions/dependencies - Fixes for building packages on Debian Conflicts: BuildTools/SCons/SConstruct Sluift/Console.h Sluift/ITunesInterface.h Sluift/Terminal.h Swift/Packaging/Debian/debian/control.in Swift/QtUI/SConscript Swiften/Elements/Stanza.h Swiften/FileTransfer/FileTransferTransporter.h Swiften/FileTransfer/IBBReceiveSession.h Swiften/JID/JID.h Swiften/Network/BoostConnectionServer.h Swiften/Network/ConnectionServer.h Swiften/Parser/AttributeMap.h Test-Information: Builds on macOS 10.12.1 with clang trunk. Change-Id: I9f41ab199f227bc106721627ea994313c68e5cfe
2016-11-18Add scons options forcing for bundled Boost, libminiupnpc, libnatpmpTobias Markmann
Test-Information: Build Swiften on Debian 8.6 with all installed dependencies with and without passing these new options to scons. Either case built fine. Change-Id: I4867c0479a0d44b15e12918c5075e9039945ed95
2016-10-21Fix package generation on macOS 10.12Tobias Markmann
This removes resource forks from our template disk image. Add custom InstallWithSymLinks command that does behave similar to the default env.Install command, however preserves relative symbolic links inside an installed directory. This is needed because the Sparkle.framework internally uses symbolic links and codesign utility fails if these links are replaced by copies of the original files. Test-Information: Verified dist=1 builds with and without code signing on macOS 10.12. Verified that on change of presence of the codesign_identity SCons argument or its value, a new package is build. If it does not change nothing is built again. Change-Id: Iade94811b7d608cb7520662e2820be3b128ee90b
2016-10-18Auto extend copyright year in app bundles and fix copyrightTobias Markmann
Test-Information: Build Swift and verified that Info.plist inside Swift.app has the updated year and copyright on macOS 10.12. Change-Id: I84f921edf0b555a102dfb207d8fc3ee5f5f59eb9
2016-09-29Support building against newer QtWebKit on macOSTobias Markmann
Test-Information: Tested with official Qt/QtWebKit 5.4.2 and Qt/QtWebKit 5.5.1. Tested with official Qt 5.6.1 and QtWebKit from https://github.com/annulen/webkit . Change-Id: I2b8258faec71296591095e998e61da55ba0ca67c
2016-09-26Update and tidy up Sparkle software update supportTobias Markmann
Sparkle is configured to do silent automatic background updates based on the provide appcast feed. When a new update was downloaded and is ready to be installed Swift notifies the user that they can restart to take advantage of the newly available version. Test-Information: Setup a custom appcast feed with a newer Swift dev release. Tested updating with Sparkle 1.14.0 binary release using DSA keys and signatures. Did not test Sparkle update with code signed Swift builds. Tested on macOS 10.12. Change-Id: Idad461ec53963c80990e51a502cb6e28bc7b6b4e
2016-08-23Do not require debug MSVC runtime for non optimized buildsTobias Markmann
This allows building Swift with debug symbols and the non-debug MSVC dynamic runtime. Test-Information: scons debug=1 optimize=0 and ./scons debug=1 optimize=1 both build and Swift runs in both configurations on Windows 8 with VS 2013. Change-Id: I47d75916963c4e64732c547bc7dfb322096d6189
2016-08-03Add support for signing the resulting MSI installer on WindowsTobias Markmann
Test-Information: Created a custom CA and added it as trusted to the system. Created a signing certificate and passed it to scons as described. The resulting installer does not show a red UAC dialog anymore during installation. Instead the publisher from the certificate is shown in a blue UAC dialog. Change-Id: Ie4043520f6d45ec2e7aad712441a928cb423b0de
2016-07-25Improve Qt detection on Linux by setting correct environmentTobias Markmann
Pass along current scons process environment to the Popen call that detects Qt MOC version. This is required for Linux distributions that use qtchooser. This fixes building Swift on Gentoo. Test-Information. None. Change-Id: I8a1f18af5b8a7bdfe86b262ab38088d0700aab8d
2016-07-22Ignore warnings in Qt headers and fix Boost.Signals2 detectionTobias Markmann
SCons will now include Qt headers via -isystem if the compiler is either clang or gcc to ignore warnings in files out of our control. Fix SCons to test for boost/signals2.hpp header instead of boost/signals.hpp as we migrated to the newer signals2 library. Test-Information: Successfully build with allow_warnings=0 on Debian 8.5 with system boost. Change-Id: Ie6871daae73d97369de4de652e994ad5542715cf
2016-07-12Remove Snarl notification supportTobias Markmann
This removes Snarl from 3rdParty, our adapter to it in SwifTools and the integration in Swift UI. Test-Information: Builds and installer still work on Windows 8. Standard system tray balloon notifications still work. Change-Id: Id580642932eac260c79eaf2343a94ec9d5606f11
2016-07-05Fix building with Qt 5.5.1 on OS XTobias Markmann
Since Qt 5.5.1 the packages from qt.io require setting the rpath for linking. Test-Information: Tested building with dist=1 and testing distribution packages and their used runtime libraries with Qt 5.4.2 and Qt 5.5.1. Change-Id: Idc6826a61489842d39c1d6aec3548e26da48e738
2016-07-05Update Debian building ready for shipping 3.0 to themKevin Smith
Change-Id: If42f50bf0ffbabee5e2c03fd99b3154362230189
2016-07-05Set QT_SELECT environment variable during scons buildTobias Markmann
This enables building on Gentoo. Test-Information: A user successfully built with this patch and both Qt4 and Qt5 installed. Change-Id: I81ada408d34208bbba22d30de5f4ecd0060e223f
2016-06-30Add initial support for code signing on OS XTobias Markmann
See DEVELOPMENT.md for instructions. Test-Information: Tested using a self-signed code signing certificate created using Keychain Access.app. Compared the output of 'codesign -vvv -d' on Swift.app with preinstall apps. The output looks much the same except for the signing authority. Change-Id: Idbb3209ad917091c371ced61ec8a77e3e5d18884
2016-06-23Improve Linux spell checking UX and enable it by defaultTobias Markmann
This removes support for user dictionaries for now. The new UI shows a list human readable languages (in their native spelling) where the user can select one to use for spell checking. Updated our InstallSwiftDependencies.sh based on the package names in their repositories. Test-Information: Tested on Ubuntu 16.04 with Hunspell and tested it still builds on OS X 10.11.4. Did not test InstallSwiftDependencies.sh. Change-Id: I24fc705b1495f7c39a8da149cbd7116e41609998
2016-06-14Re-enable support for system libminiupnpc and libnatpmpTobias Markmann
Test-Information: Unit and integration tests pass with system libs on Debian 8.5. Change-Id: Ibcf7a1e07071d5de10c9d99c9b38e67b747f45eb
2016-06-10Fix remaining compiler warnings on OS X with clangTobias Markmann
This changes HippoMocks include to -isystem include so it will not cause compiler warnings. This changes UserLocation floating point values to double and remove remaining numerical casts. Change C++11 compiler test to not cause warnings. Test-Information: Builds with allow_warnings=0 on OS X 10.11.5 with Xcode clang. Change-Id: I26c60265a86c9be656089ade63fe9ad63851580f
2016-06-02Ignore warning 4503 when building with MS Visual Studio compilerTobias Markmann
This warning is generated when symbol names exceed a character limit. This can happen fast with layered C++ templates. Test-Information: Tested with Visual Studio 2013 that the warning is not issued anymore when building BoostConnectionTest. Change-Id: I21c1e37ed6306f2da92dc7f78a1c16f26db0daf2
2016-06-02Implement allow_warnings SCons flag for WindowsTobias Markmann
Test-Information: Build failed correctly on error on Windows 8 with Visual Studio 2013. Change-Id: I1afc7a8a4cf0449057959638709c80c7ded8a5a6
2016-04-25Convert hard tabs to four spaces in all our SConscript/*.py filesTobias Markmann
Test-Information: Test that it still builds and unit test pass on OS X 10.11.4. Change-Id: I2eb4a0b707991aee553db36a8cd1ae28b813acab
2016-04-25Add Lato font and use it in chat view themeTobias Markmann
The font has been imported from the TTF version available from http://www.latofonts.com/lato-free-fonts/ . This commit also adds default parameters to all Qt resource compiler calls, so that files that compress by more than 5% are compressed with the highest compression level. Ideally this will lead to smaller resource C++ source code files that will require less runtime memory when compiled. VS's cl.exe is particular resource hungry. Test-Information: Started Swift and verified the new font is used correctly in chat views. Change-Id: I0b450819b0f50041e768deca6e0ef5619b45d7bf
2016-04-25Require a configured TLS backend to buildTobias Markmann
Converted relevant SCons files from hard tabs to space based indentation with 4 spaces width. Test-Information: Tested that build failed with misconfigured OpenSSL backend (providing tls_backend=openssl on OS X and no information on where to find it). Tested that build succeeds on OS X 10.11.4. Change-Id: I17f85ca3194f100f63361a8c94667d7aa76e811a
2016-04-14Set QT_SELECT environment variable during scons buildTobias Markmann
This enables building on Gentoo. Test-Information: A user successfully built with this patch and both Qt4 and Qt5 installed. Change-Id: I81ada408d34208bbba22d30de5f4ecd0060e223f
2016-04-07Fix building with system boost on Debian 8.4Tobias Markmann
The signals library is still called signals and not signals2. Test-Information: Builds and unit tests pass on Debian 8.4 with system GCC. Change-Id: I1d1b3f6bade979bc8a181915176b84be0ddf6597
2016-04-06Add distcc support to our SCons scriptTobias Markmann
Just pass distcc=1 and set cxx=distcc clang++ and cc=distcc clang and use an appropriate parallelization argument (-j). Converted hard tabs to spaces in the process. Test-Information: Used distcc with -j 10 to build the whole Swift project with unit tests in 13 minutes across 2 hosts. Change-Id: Ib6b63b5079872632a11c0fd28eb90b8901b956df
2016-04-05Migrate to Boost.Signals2 from Boost.SignalsTobias Markmann
Boost.Signals was deprecated and is not improved further. This patch removes Boost.Signals from 3rdParty and adds Boost.Signals2 and its dependencies. Also removed the Qt signals compatibility file Swiften/Base/boost_bsignals.h. Test-Information: Build and ran unit tests on OS X 10.11.4. Confirmed successful login using Swift client. Change-Id: Ie6e3b2d15aac2462cda95401582f5287a479fb54
2016-03-14Build all Swift projects as C++11Tobias Markmann
Added a SCons compiler test so that the build process fails early if C++11 is not supported. Remove C++11 checks as we now default to C++11 and they are not needed anymore. Ignore a Clang warning if building 3rdParty Boost. Test-Information: Tested build and unit tests on OS X 10.11.3. Change-Id: Icbecbd1e25e8d8bbe5f402f75355373a86b5f8a1
2016-03-09Fix using external OpenSSL on Mac OS XTobias Markmann
This commit changes our TLS backend configuration behavior. It introduces the tls_backend Scons argument, which defaults to the native backend, but can also explicitly set to 'openssl' to use a project external OpenSSL installation or 'openssl_bundled' to build and configure with the OpenSSL source in the 3rdParty directory. Test-Information: Tested on OS X 10.11.3. ./scons ends up using Secure Transport. ./scons tls_backend=openssl \ openssl_include=/usr/local/opt/openssl/include \ openssl_libdir=/usr/local/opt/openssl/lib \ openssl=/usr/local/opt/openssl successfully builds with openssl from Homebrew. ./scons tls_backend=openssl_bundled successfully builds with OpenSSL in 3rdParty. Change-Id: I4fb0ef9d197609afe793554f86e54fe67fc1cab5
2016-02-29Fix scons2ninja toolingTobias Markmann
scons2ninja was broken since our last update to SCons in 3rdParty. This commit fixes it. This also includes a workaround to AppBundle.py working around an SCons encoding bug. Test-Information: Successfully run ./BuildTools/scons2ninja.py followed by ninja. Change-Id: I2f9dbbb33dc559ca339bb26ba11b885b39135011
2016-02-25Disable Hunspell support by default as it is not finished yetTobias Markmann
Our Hunspell support has not been finished and thoroughly tested yet. This commit disabled building with Hunspell by default, even if the dependencies for it are installed on the system. Remove libhunspell-dev from the build depends in Debian packaging. Test-Information: Tested on Debian 8. Tested with and without the hunspell_enable=True flag. With the spellchecking options are shown and however spell checking is not stable. Without it the spellchecking options are not shown and spellchecking is disabled in general, as expected. Change-Id: I100582852cbe128149fdb2e2a28d4ae407398be6
2016-02-15Improve SCons reporting on missing Qt toolsTobias Markmann
This will print errors like missing Qt linguist tools. Test-Information: Tested on Fedora 22 and OS X 10.11.3. Change-Id: I0817f368920b839805597d8eb2f3297b1fbd90e6