summaryrefslogtreecommitdiffstats
AgeCommit message (Collapse)Author
2019-11-14Pass down SDKROOT environment variableTobias Markmann
This is needed on macOS so that the running compiler knows what SDK to build against. Test-Information: Builds with system and custom build clang on macOS 10.14.6. Change-Id: I80a76937834d681c322bf36bfcb034565be9b2f5
2019-02-20Fix Python 3 Unicode issues related to Windows packagingTobias Markmann
Test-Information: Without these fixes, the build of a Windows MSI package is not possible on Windows Server 2012. This is due to the fact that on Windows you must force UTF8 coding on file open as it defaults to Windows specific codec for everything. Tested by building a Windows MSI package on Windows Server 2012. Change-Id: I32664824188775f5ba27d9644fbbf33bf7094dfa
2019-01-21Make Version.py compatible with both Py2 and Py3Edwin Mons
The merge of 4.x changes onto master introduced changes to Pyhon scripts that weren't compatible with Python 3. The Version.py script is now compatible with both Python 2 and Python 3, and a slightly underimplemented test has been expanded to actually live up to its name. getGitBuildVersion has been refactored completely. It has been simplified to require only one invocation of git describe, unit tests for the parsing have been added, and a way to call getGitBuildVersion from the commandline has been added to Version.py (to avoid adding a unit test that would call out to an external tool). DocBook.py has been made compatible with Python3, and some additional logic to prevent emitting b'path/to/docbook/xml' instead of the desired 'path/to/docbook/xml' has been added. Generation of COPYING in Swift/QtUI now uses the upstream version provided with SCons 3, and our custom version has been removed. Unused code in the SwiftenDevelopersGuide SConscript with invalid regular expressions has been removed, and the remaining regular expressions in SConscripts have been fixed. Test-Information Code has been tested on macOS 10.14. Scons now completes a build on a clean tree using either Python 2 or Python 3. Running it on a previouly built tree works with either, as well, mixing versions between invocations is not an issue. Swift unit tests pass with Python 3.7.0. Version.py unit tests pass with Python 2.7.15 and 3.7.0. Running with doc=1 works with both Python 2 and Python 3, even if the docbook points to a path with unicode characters in it. Resulting COPYING file has been verified both visually and against a Python2 generated one on master. Resulting XML files for documentation have been inspected. Resulting manual HTML and PDF files have been inspected. Change-Id: I54de909d80b8e35a8c351261ae10ce3537729c84
2019-01-15Merge tag 'swift-4.x' into masterTobias Markmann
* branch 'swift-4.x': Update for Debian Don't crash on missing bookmark result Add missing include for QAbstractItemModel Update Debian changelog Fix convertToWindowsVersion() function to handle more RCs Fix error response handling when requesting VCards Test-Information: ./scons test=all succeeded on macOS 10.14.2. Change-Id: I99d20a8b0e1b0be501fbbe95adebbff15f510184
2019-01-07Update for Debianswift-4.0.3Tobias Markmann
Fix UTF-8 handling issues in BuildTools/SCons/Tools/textfile.py . Test-Information: Tested that ./scons test=unit Swift works on Debain Unstable (sid) and macOS 10.14.2. Tested that build_for_debian.sh runs successfully on latest Debian Unstable (sid). Change-Id: I29d8c97ce3b4eb3e4fd680bdc814fb0c911262ff
2018-10-01Pass /bigobj when building on WindowsTobias Markmann
Debug builds building with /MDd will otherwise fail on Windows with MSVS 2015. Test-Information: Builds successfully with /MDd flag on Windows using MSVS 2015. Change-Id: I9ac7e9408f09354025bb39cb5642efce686d11f0
2018-10-01Add ability to specify MSVC runtime libraryTobias Markmann
Test-Information: Builds in default configuration on Windows 10 with MSVS 2015. Change-Id: I82e6a317820168d471694c8ee1f33b652515c0d9
2018-10-01Change ur literals to r, as ur is unsupported in Python 3Tobias Markmann
r literal is supported by both Python 2 and Python 3. Test-Information: Builds on Windows 10 with Python 3 and VS 2015. Change-Id: I2210a1ba01a4bf3c175634adeb067f1f939a7e61
2018-07-12Fix Python 3 compatibility of our SCons and tooling Python codeTobias Markmann
For the upcoming update to Scons 3, which works with Python 2 and Python 3, this change makes our code compatible with Python 3 so that it still works with Python 2. Test-Information: Tested these changes with SCons 3.0.1 on macOS 10.13.6 with Python 2.7.15 and Python 3.7.0. Change-Id: Idb5207b179a79a0dbe89d7e620d182a7d2f1ca6c
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-04-05Fix convertToWindowsVersion() function to handle more RCsswift-4.0.2Tobias Markmann
The new version conversion function allows up to 8 patch releases, up to 11 RC releases, up to 7 beta releases, and up to 5 alpha releases. The script fails hard on invalid input, thus failing the build when used. It also allows for checking the release tag in the release process. Test-Information: Added unit tests for some critical properties of the conversion. As previously the minor number of the Windows version triplet was not used, all new versions using this new scheme are considered newer, for the same major version. Change-Id: I53552a72ceaf7fe90f919990bd3d3be45a976c03
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